r/o

5c186f2ce0bc43617194d400148f8e9ce923c18a parent d9a0d7a4

authored by Yuki Izumi <yuki@kivikakk.ee> 10 years ago

Fix exprlist bug.

lang.y | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lang.y b/lang.y
index b67c9c4..f92251e 100644
--- a/lang.y
+++ b/lang.y
@@ -44,9 +44,9 @@ stmt: TOKEN opt_exprlist { $$ = ast_stmt_alloc(STMT_CALL); $$->ca
;
exprlist: EXPR { $$ = $1; }
- | exprlist ',' EXPR { $$ = $1; $1->next = $3; $1->nexttype = ','; }
- | exprlist ';' EXPR { $$ = $1; $1->next = $3; $1->nexttype = ';'; }
- | exprlist EXPR { $$ = $1; $1->next = $2; $1->nexttype = ';'; }
+ | EXPR ',' exprlist { $$ = $1; $1->next = $3; $1->nexttype = ','; }
+ | EXPR ';' exprlist { $$ = $1; $1->next = $3; $1->nexttype = ';'; }
+ | EXPR exprlist { $$ = $1; $1->next = $2; $1->nexttype = ';'; }
;
opt_exprlist: /* empty */ { $$ = 0; }