From 4023b68c4be7d62b293733d2c4cecdb7c46acc72 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Tue, 6 Feb 2024 11:30:56 -0600 Subject: [PATCH] fixed: parsing of compound results in quick functions --- compiler/src/parser.c | 8 +------- core/runtime/info/global_tags.onyx | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/compiler/src/parser.c b/compiler/src/parser.c index bec7ef9e..a2aee9e4 100644 --- a/compiler/src/parser.c +++ b/compiler/src/parser.c @@ -190,12 +190,6 @@ static b32 next_tokens_are(OnyxParser* parser, i32 n, ...) { TokenType expected_type = va_arg(va, TokenType); OnyxToken *peeked_token = peek_token(i + skipped); - // if (peeked_token->type == Token_Type_Inserted_Semicolon) { - // i--; - // skipped += 1; - // continue; - // } - if (peeked_token->type != expected_type) { matched = 0; break; @@ -3235,7 +3229,7 @@ static b32 parse_possible_quick_function_definition(OnyxParser* parser, AstTyped return_type = (AstType *) &basic_type_auto_return; } else { - AstTyped* body = parse_compound_expression(parser, 0); + AstTyped* body = parse_expression(parser, 0); if (body == NULL) { onyx_report_error(parser->curr->pos, Error_Critical, "Expected an expression here."); parser->hit_unexpected_token = 1; diff --git a/core/runtime/info/global_tags.onyx b/core/runtime/info/global_tags.onyx index 0e5db7c6..c7a91ee9 100644 --- a/core/runtime/info/global_tags.onyx +++ b/core/runtime/info/global_tags.onyx @@ -27,7 +27,7 @@ get_globals_with_tag :: ($tag_type: type_expr) -> [] GGWT_Result(tag_type) { data = glob.data, type = glob.type, tag = cast(&tag_type) tag.data, - pack = glob.pack + pack = glob.pack, }); }); } -- 2.25.1