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

Breadcrumb

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

function Environment::tokenize

Throws

SyntaxError When the code is syntactically wrong

1 call to Environment::tokenize()
Environment::compileSource in vendor/twig/twig/src/Environment.php
Compiles a template source code.

File

vendor/twig/twig/src/Environment.php, line 514

Class

Environment
Stores the Twig configuration and renders templates.

Namespace

Twig

Code

public function tokenize(Source $source) : TokenStream {
    if (null === $this->lexer) {
        $this->lexer = new Lexer($this);
    }
    return $this->lexer
        ->tokenize($source);
}
RSS feed
Powered by Drupal