mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
Provide implementation for macro arguments containing parentheses.
We were correctly parsing this already, but simply not returning any value (for no good reason). Fortunately the fix is quite simple. This makes the test added in the previous commit now pass.
This commit is contained in:
parent
f6ae186cfd
commit
3596bb149e
2 changed files with 9 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -21,5 +21,5 @@ test: glcpp
|
|||
@(cd tests; ./glcpp-test)
|
||||
|
||||
clean:
|
||||
rm -f glcpp-lex.c glcpp-parse.c *.o *~
|
||||
rm -f glcpp glcpp-lex.c glcpp-parse.c *.o *~
|
||||
rm -f tests/*.out tests/*.gcc tests/*.expected tests/*~
|
||||
|
|
|
|||
|
|
@ -177,13 +177,20 @@ argument:
|
|||
| argument word {
|
||||
_string_list_append_item ($1, $2);
|
||||
talloc_free ($2);
|
||||
$$ = $1;
|
||||
}
|
||||
| argument SPACE word {
|
||||
_string_list_append_item ($1, " ");
|
||||
_string_list_append_item ($1, $3);
|
||||
talloc_free ($3);
|
||||
$$ = $1;
|
||||
}
|
||||
| argument '(' argument ')' {
|
||||
_string_list_append_item ($1, "(");
|
||||
_string_list_append_list ($1, $3);
|
||||
_string_list_append_item ($1, ")");
|
||||
$$ = $1;
|
||||
}
|
||||
| argument '(' argument ')'
|
||||
;
|
||||
|
||||
directive_with_newline:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue