From 2599c9a822de9691dbea4a0f6e6fe45a9ed5af79 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Fri, 7 May 2021 10:40:33 -0500 Subject: [PATCH] tiny bug fixes --- modules/immediate_mode/immediate_renderer.onyx | 1 + src/onyxparser.c | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/immediate_mode/immediate_renderer.onyx b/modules/immediate_mode/immediate_renderer.onyx index 4d55eace..e499f723 100644 --- a/modules/immediate_mode/immediate_renderer.onyx +++ b/modules/immediate_mode/immediate_renderer.onyx @@ -194,6 +194,7 @@ Immediate_Renderer :: struct { } quad :: (use ir: ^Immediate_Renderer, position: Vector2, size: Vector2, color: Color4 = .{1,1,1}) { + // SPEED: Would inlining these function calls be a little bit faster? push_vertex(ir, .{ position.x, position.y }, color); push_vertex(ir, .{ position.x + size.x, position.y }); push_vertex(ir, .{ position.x + size.x, position.y + size.y }); diff --git a/src/onyxparser.c b/src/onyxparser.c index 1f04cc83..c24ff4e8 100644 --- a/src/onyxparser.c +++ b/src/onyxparser.c @@ -1707,6 +1707,7 @@ static AstStructType* parse_struct(OnyxParser* parser) { } else { bh_arr_clear(member_list_temp); while (!consume_token_if_next(parser, ':')) { + if (parser->hit_unexpected_token) return NULL; bh_arr_push(member_list_temp, expect_token(parser, Token_Type_Symbol)); if (parser->curr->type != ':') -- 2.25.1