Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Lexer.php

function Lexer::lexComment

1 call to Lexer::lexComment()
Lexer::lexData in vendor/twig/twig/src/Lexer.php

File

vendor/twig/twig/src/Lexer.php, line 479

Class

Lexer
@author Fabien Potencier <fabien@symfony.com>

Namespace

Twig

Code

private function lexComment() : void {
    if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) {
        throw new SyntaxError('Unclosed comment.', $this->lineno, $this->source);
    }
    $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor) . $match[0][0]);
}
RSS feed
Powered by Drupal