summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-20 08:42:02 -0700
committerCarl Worth <cworth@cworth.org>2010-05-20 08:46:54 -0700
commit9f3d2c4e3dff3eb4f5820a034426056bf66b3015 (patch)
tree0b0b5cc681aa804580caaadf75763ac59eae8b68 /tests
parentb569383bbdfa22ed591255f56fb93832633a95ae (diff)
Add support for commas within parenthesized groups in function arguments.
The specification says that commas within a parenthesized group, (that's not a function-like macro invocation), are passed through literally and not considered argument separators in any outer macro invocation. Add support and a test for this case. This support makes a third occurrence of the same "FUNC_MACRO (" shift/reduce conflict appear, so expect that. This change does introduce a fairly large copy/paste block in the grammar which is unfortunate. Perhaps if I were more clever I'd find a way to share the common pieces between argument and argument_or_comma.
Diffstat (limited to 'tests')
-rw-r--r--tests/038-func-arg-with-commas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/038-func-arg-with-commas.c b/tests/038-func-arg-with-commas.c
new file mode 100644
index 0000000000..1407c7d6e3
--- /dev/null
+++ b/tests/038-func-arg-with-commas.c
@@ -0,0 +1,2 @@
+#define foo(x) success
+foo(argument (with,embedded , commas) -- tricky)