From 047828ded0e6a3713062ea74cbf97741ec505bc3 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 8 Apr 2009 15:09:19 -0700 Subject: [PATCH] Allow macro expansions to take arguments with multiple arguments. This patch allows a macro expansion to have an argument which itself has multiple arguments (handle nested ","). --- ivlpp/lexor.lex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index dbe9371b5..a6e652c5e 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -599,7 +599,8 @@ keywords (include|define|undef|ifdef|ifndef|else|elseif|endif) "(" { macro_add_to_arg(0); ma_parenthesis_level++; } -"," { macro_finish_arg(); } +"," { if (ma_parenthesis_level > 0) macro_add_to_arg(0); + else macro_finish_arg(); } ")" { if (ma_parenthesis_level > 0) {