diff options
Diffstat (limited to 'engines/director/lingo/lingo-gr.y')
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index d6fe5cd7b6..e2e874b97f 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -103,7 +103,7 @@ void checkEnd(Common::String *token, const char *expect, bool required) { %token tON tME %type<code> asgn begin elseif elsestmtoneliner end expr if when repeatwhile repeatwith stmtlist -%type<narg> argdef arglist +%type<narg> argdef arglist nonemptyarglist %right '=' %left tLT tLE tGT tGE tNEQ tCONTAINS tSTARTS @@ -586,7 +586,7 @@ argstore: /* nothing */ { g_lingo->codeArgStore(); } ; -macro: ID arglist { +macro: ID nonemptyarglist { g_lingo->code1(g_lingo->c_call); g_lingo->codeString($1->c_str()); inst numpar = 0; @@ -599,4 +599,8 @@ arglist: /* nothing */ { $$ = 0; } | arglist ',' expr { $$ = $1 + 1; } ; +nonemptyarglist: expr { $$ = 1; } + | arglist ',' expr { $$ = $1 + 1; } + ; + %% |