From: Brendan Hansen Date: Tue, 31 Aug 2021 02:26:13 +0000 (-0500) Subject: quick functions can return multiple things X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=33b040221b57209cb9252460495db423ba2ab4fb;p=onyx.git quick functions can return multiple things --- diff --git a/bin/onyx b/bin/onyx index 82cd9f03..983758a2 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/core/wasi/clock.onyx b/core/wasi/clock.onyx index 0760f2d5..7f1e2b7b 100644 --- a/core/wasi/clock.onyx +++ b/core/wasi/clock.onyx @@ -42,4 +42,4 @@ sleep :: #match { error_code := poll_oneoff(^subscription, ^event, 1, ^number_of_events); } -} \ No newline at end of file +} diff --git a/src/onyxparser.c b/src/onyxparser.c index bfc44810..1c3a7961 100644 --- a/src/onyxparser.c +++ b/src/onyxparser.c @@ -2250,7 +2250,7 @@ static b32 parse_possible_quick_function_definition(OnyxParser* parser, AstTyped return_type = (AstType *) &basic_type_auto_return; } else { - AstTyped* body = parse_expression(parser, 0); + AstTyped* body = parse_compound_expression(parser, 0); AstReturn* return_node = make_node(AstReturn, Ast_Kind_Return); return_node->token = body->token;