Like previous fix, but for object-like macros (and add a test).
The support for an object-like amcro within a macro-invocation argument was also implemented at one level too high in the grammar. Fortunately, this is a very simple fix.
This commit is contained in:
+1
-3
@@ -169,9 +169,6 @@ argument:
|
||||
$$ = _string_list_create (parser);
|
||||
_string_list_append_item ($$, $1);
|
||||
}
|
||||
| macro {
|
||||
$$ = _string_list_create (parser);
|
||||
}
|
||||
| argument argument_word {
|
||||
_string_list_append_item ($1, $2);
|
||||
talloc_free ($2);
|
||||
@@ -189,6 +186,7 @@ argument_word:
|
||||
IDENTIFIER { $$ = $1; }
|
||||
| TOKEN { $$ = $1; }
|
||||
| FUNC_MACRO { $$ = $1; }
|
||||
| macro { $$ = xtalloc_strdup (parser, ""); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#define bar success
|
||||
#define foo(x) x
|
||||
foo(more bar)
|
||||
Reference in New Issue
Block a user