You are here

protected function Twig_Lexer::lexComment in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Lexer.php \Twig_Lexer::lexComment()
  2. 7.2 vendor/Twig/Lexer.php \Twig_Lexer::lexComment()
1 call to Twig_Lexer::lexComment()
Twig_Lexer::lexData in vendor/Twig/Lexer.php

File

vendor/Twig/Lexer.php, line 304

Class

Twig_Lexer
Lexes a template string.

Code

protected function lexComment() {
  if (!preg_match($this->regexes['lex_comment'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
    throw new Twig_Error_Syntax('Unclosed comment', $this->lineno, $this->filename);
  }
  $this
    ->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor) . $match[0][0]);
}