public function Twig_TokenStream::look in Translation template extractor 7.2
Same name and namespace in other branches
- 6.3 vendor/Twig/TokenStream.php \Twig_TokenStream::look()
- 7.3 vendor/Twig/TokenStream.php \Twig_TokenStream::look()
Looks at the next token.
Parameters
integer $number:
Return value
File
- vendor/
Twig/ TokenStream.php, line 108
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];
}