function Environment::parse
Converts a token stream to a node tree.
Throws
SyntaxError When the token stream is syntactically or semantically wrong
1 call to Environment::parse()
- Environment::compileSource in vendor/
twig/ twig/ src/ Environment.php - Compiles a template source code.
File
-
vendor/
twig/ twig/ src/ Environment.php, line 533
Class
- Environment
- Stores the Twig configuration and renders templates.
Namespace
TwigCode
public function parse(TokenStream $stream) : ModuleNode {
if (null === $this->parser) {
$this->parser = new Parser($this);
}
return $this->parser
->parse($stream);
}