protected function Twig_Lexer::lexVar

1 call to Twig_Lexer::lexVar()
Twig_Lexer::tokenize in drupal/core/vendor/twig/twig/lib/Twig/Lexer.php
Tokenizes a source code.

File

drupal/core/vendor/twig/twig/lib/Twig/Lexer.php, line 210

Class

Twig_Lexer
Lexes a template string.

Code

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