You are here

public function Twig_TokenStream::look in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/lib/Twig/TokenStream.php \Twig_TokenStream::look()

Looks at the next token.

Parameters

int $number:

Return value

Twig_Token

File

vendor/twig/twig/lib/Twig/TokenStream.php, line 107

Class

Twig_TokenStream
Represents a token stream.

Code

public function look($number = 1) {
  if (!isset($this->tokens[$this->current + $number])) {
    throw new Twig_Error_Syntax('Unexpected end of template.', $this->tokens[$this->current + $number - 1]
      ->getLine(), $this->filename);
  }
  return $this->tokens[$this->current + $number];
}