mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
Avoid swallowing initial left parenthesis from nested macro invocation.
We weren't including this left parenthesis in the argument's token list so the nested function invocation wasn not being recognized. With this fix, tests 21 and 22 now pass.
This commit is contained in:
parent
c7581c2e6e
commit
652fa272ea
1 changed files with 6 additions and 2 deletions
|
|
@ -754,9 +754,12 @@ _arguments_parse (argument_list_t *arguments, token_node_t **node_ret)
|
|||
if (node == NULL || node->token->type != '(')
|
||||
return FUNCTION_NOT_A_FUNCTION;
|
||||
|
||||
last = node;
|
||||
node = node->next;
|
||||
|
||||
argument = NULL;
|
||||
|
||||
for (paren_count = 0; node; last = node, node = node->next) {
|
||||
for (paren_count = 1; node; last = node, node = node->next) {
|
||||
if (node->token->type == '(')
|
||||
{
|
||||
paren_count++;
|
||||
|
|
@ -770,7 +773,8 @@ _arguments_parse (argument_list_t *arguments, token_node_t **node_ret)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (node->token->type == ',' &&
|
||||
|
||||
if (node->token->type == ',' &&
|
||||
paren_count == 1)
|
||||
{
|
||||
argument = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue