32 $template = $this->parser->getExpressionParser()->parseExpression();
33 $stream = $this->parser->getStream();
36 throw new Twig_Error_Syntax(
'The template references in a "use" statement must be a string.',
$stream->getCurrent()->getLine(),
$stream->getSourceContext());
49 $targets[
$name] =
new Twig_Node_Expression_Constant($alias, -1);
70 class_alias(
'Twig_TokenParser_Use',
'Twig\TokenParser\UseTokenParser',
false);
Represents a node in the AST.
$stream
PHP stream implementation.
Exception thrown when a syntax error occurs during lexing or parsing of a template.
Base class for all token parsers.
parse(Twig_Token $token)
Parses a token and returns a node.
getTag()
Gets the tag name associated with this token parser.
Imports blocks defined in another template into the current template.