25 $macro = $this->parser->getExpressionParser()->parseExpression();
26 $stream = $this->parser->getStream();
38 $targets[
$name] = $alias;
49 foreach ($targets as
$name => $alias) {
50 if ($this->parser->isReservedMacroName(
$name)) {
54 $this->parser->addImportedSymbol(
'function', $alias,
'get'.
$name, $node->getNode(
'var'));
66 class_alias(
'Twig_TokenParser_From',
'Twig\TokenParser\FromTokenParser',
false);
$stream
PHP stream implementation.
getTag()
Gets the tag name associated with this token parser.
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.
Represents an import node.