27 $lineno =
$token->getLine();
28 $stream = $this->parser->getStream();
31 $arguments = $this->parser->getExpressionParser()->parseArguments(
true,
true);
34 $this->parser->pushLocalScope();
35 $body = $this->parser->subparse(array($this,
'decideBlockEnd'),
true);
37 $value =
$token->getValue();
39 if ($value !=
$name) {
43 $this->parser->popLocalScope();
51 return $token->test(
'endmacro');
60class_alias(
'Twig_TokenParser_Macro',
'Twig\TokenParser\MacroTokenParser',
false);
An exception for terminatinating execution or to throw for unit testing.
Exception thrown when a syntax error occurs during lexing or parsing of a template.
parse(Twig_Token $token)
Parses a token and returns a node.
getTag()
Gets the tag name associated with this token parser.
decideBlockEnd(Twig_Token $token)
Base class for all token parsers.
$stream
PHP stream implementation.