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);
39 if ($value !=
$name) {
43 $this->parser->popLocalScope();
51 return $token->
test(
'endmacro');
60 class_alias(
'Twig_TokenParser_Macro',
'Twig\TokenParser\MacroTokenParser',
false);
getTag()
Gets the tag name associated with this token parser.
test($type, $values=null)
Tests the current token for a type and/or a value.
$stream
PHP stream implementation.
Exception thrown when a syntax error occurs during lexing or parsing of a template.
Base class for all token parsers.
Create styles array
The data for the language used.
decideBlockEnd(Twig_Token $token)
parse(Twig_Token $token)
Parses a token and returns a node.