Lines Matching refs:tokens
24 private $tokens; variable in Twig\\TokenStream
28 public function __construct(array $tokens, Source $source = null) argument
30 $this->tokens = $tokens;
36 return implode("\n", $this->tokens);
39 public function injectTokens(array $tokens) argument
41 …$this->tokens = array_merge(\array_slice($this->tokens, 0, $this->current), $tokens, \array_slice(…
49 if (!isset($this->tokens[++$this->current])) {
50 …throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(),…
53 return $this->tokens[$this->current - 1];
63 if ($this->tokens[$this->current]->test($primary, $secondary)) {
73 $token = $this->tokens[$this->current];
95 if (!isset($this->tokens[$this->current + $number])) {
96 …throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->…
99 return $this->tokens[$this->current + $number];
107 return $this->tokens[$this->current]->test($primary, $secondary);
115 return /* Token::EOF_TYPE */ -1 === $this->tokens[$this->current]->getType();
120 return $this->tokens[$this->current];