protected function Twig_Lexer::lexComment in Translation template extractor 7.2
Same name and namespace in other branches
- 6.3 vendor/Twig/Lexer.php \Twig_Lexer::lexComment()
- 7.3 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 299
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]);
}