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 ",").
(cherry picked from commit 047828ded0)
This commit is contained in:
Cary R 2009-04-08 15:09:19 -07:00 committed by Stephen Williams
parent d7b76e9390
commit b16e3ab59e
1 changed files with 2 additions and 1 deletions

View File

@ -599,7 +599,8 @@ keywords (include|define|undef|ifdef|ifndef|else|elseif|endif)
<MA_ADD>"(" { macro_add_to_arg(0); ma_parenthesis_level++; }
<MA_ADD>"," { macro_finish_arg(); }
<MA_ADD>"," { if (ma_parenthesis_level > 0) macro_add_to_arg(0);
else macro_finish_arg(); }
<MA_ADD>")" {
if (ma_parenthesis_level > 0) {