Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TokenStream.php

function TokenStream::look

Looks at the next token.

File

vendor/twig/twig/src/TokenStream.php, line 94

Class

TokenStream
Represents a token stream.

Namespace

Twig

Code

public function look(int $number = 1) : Token {
    if (!isset($this->tokens[$this->current + $number])) {
        throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]
            ->getLine(), $this->source);
    }
    return $this->tokens[$this->current + $number];
}
RSS feed
Powered by Drupal