mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-24 12:46:44 +00:00
Merge branch '3.x' into 4.x
* 3.x: Mark implicit macro argument default values as such with an attribute in AST
This commit is contained in:
@@ -565,7 +565,7 @@ class ExpressionParser
|
||||
* Parses arguments.
|
||||
*
|
||||
* @param bool $namedArguments Whether to allow named arguments or not
|
||||
* @param bool $definition Whether we are parsing arguments for a function definition
|
||||
* @param bool $definition Whether we are parsing arguments for a function (or macro) definition
|
||||
*
|
||||
* @return Node
|
||||
*
|
||||
@@ -616,6 +616,7 @@ class ExpressionParser
|
||||
if (null === $name) {
|
||||
$name = $value->getAttribute('name');
|
||||
$value = new ConstantExpression(null, $this->parser->getCurrentToken()->getLine());
|
||||
$value->setAttribute('is_implicit', true);
|
||||
}
|
||||
$args[$name] = $value;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user