commit 015f4d24022a2a2722a56c6d8443a93fefb2fe7f
parent 2f35a51210963a27182ace202bf5cd157b18da42
Author: Drew DeVault <sir@cmpwn.com>
Date: Fri, 1 Jan 2021 13:03:16 -0500
parse: fix trailing comma on parameter list
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/parse.c b/src/parse.c
@@ -216,6 +216,10 @@ parse_parameter_list(struct lexer *lexer, struct ast_function_type *type)
more = false;
trace(TR_PARSE, ", ...");
break;
+ case T_RPAREN:
+ more = false;
+ unlex(lexer, &tok);
+ break;
default:
unlex(lexer, &tok);
next->next = mkfuncparams(&lexer->loc);