You are here

protected function Twig_Lexer::lexBlock in Translation template extractor 7.3

Same name and namespace in other branches
  1. 6.3 vendor/Twig/Lexer.php \Twig_Lexer::lexBlock()
  2. 7.2 vendor/Twig/Lexer.php \Twig_Lexer::lexBlock()
1 call to Twig_Lexer::lexBlock()
Twig_Lexer::tokenize in vendor/Twig/Lexer.php
Tokenizes a source code.

File

vendor/Twig/Lexer.php, line 198

Class

Twig_Lexer
Lexes a template string.

Code

protected function lexBlock() {
  if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, null, $this->cursor)) {
    $this
      ->pushToken(Twig_Token::BLOCK_END_TYPE);
    $this
      ->moveCursor($match[0]);
    $this
      ->popState();
  }
  else {
    $this
      ->lexExpression();
  }
}