From 5f2b220a850c6812bb7b5e4d778be37d8dc8962b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 25 Jul 2022 12:12:25 +0100 Subject: [PATCH] Fix minor issue with a lack of a trailing comma --- src/parser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index 247255ce8..b62ec7a74 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -3894,7 +3894,8 @@ Ast *parse_field_list(AstFile *f, isize *name_count_, u32 allowed_flags, TokenKi while (f->curr_token.kind != follow && - f->curr_token.kind != Token_EOF) { + f->curr_token.kind != Token_EOF && + f->curr_token.kind != Token_Semicolon) { CommentGroup *docs = f->lead_comment; u32 set_flags = parse_field_prefixes(f); Token tag = {}; @@ -3922,7 +3923,7 @@ Ast *parse_field_list(AstFile *f, isize *name_count_, u32 allowed_flags, TokenKi default_value = parse_expr(f, false); if (!allow_default_parameters) { syntax_error(f->curr_token, "Default parameters are only allowed for procedures"); - default_value = nullptr; + default_value = nullptr; } }