30 $macro = $this->parser->getExpressionParser()->parseExpression();
31 $stream = $this->parser->getStream();
32 $stream->expect(
'import');
39 if ($stream->test(
'as')) {
45 $targets[$name] = $alias;
58 foreach ($targets as $name => $alias) {
59 $this->parser->addImportedSymbol(
'function', $alias,
'get'.$name, $node->getNode(
'var'));
Base class for all token parsers.
parse(Twig_Token $token)
Parses a token and returns a node.
Represents an import node.
getTag()
Gets the tag name associated with this token parser.