You are here

protected function Twig_Lexer::pushToken in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Lexer.php \Twig_Lexer::pushToken()
  2. 7.2 vendor/Twig/Lexer.php \Twig_Lexer::pushToken()
8 calls to Twig_Lexer::pushToken()
Twig_Lexer::lexBlock in vendor/Twig/Lexer.php
Twig_Lexer::lexData in vendor/Twig/Lexer.php
Twig_Lexer::lexExpression in vendor/Twig/Lexer.php
Twig_Lexer::lexInterpolation in vendor/Twig/Lexer.php
Twig_Lexer::lexRawData in vendor/Twig/Lexer.php

... See full list

File

vendor/Twig/Lexer.php, line 349

Class

Twig_Lexer
Lexes a template string.

Code

protected function pushToken($type, $value = '') {

  // do not push empty text tokens
  if (Twig_Token::TEXT_TYPE === $type && '' === $value) {
    return;
  }
  $this->tokens[] = new Twig_Token($type, $value, $this->lineno);
}