Mark implicit macro argument default values as such with an attribute in AST

This commit is contained in:
Jeroen Versteeg
2024-03-16 16:44:23 +01:00
committed by Fabien Potencier
parent b46e93c725
commit e83a8028f0
2 changed files with 25 additions and 1 deletions
+2 -1
View File
@@ -591,7 +591,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
*
@@ -642,6 +642,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 {