From 06f19a329cf9739b005351f6abfea69d5f03d452 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Wed, 14 Sep 2022 11:53:27 -0500 Subject: [PATCH] added 'dummy' tags at end of structs --- compiler/src/parser.c | 5 +++++ misc/onyx.sublime-syntax | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/src/parser.c b/compiler/src/parser.c index 78a74d6b..6ff1aaa4 100644 --- a/compiler/src/parser.c +++ b/compiler/src/parser.c @@ -2069,6 +2069,11 @@ static AstStructType* parse_struct(OnyxParser* parser) { parser->tag_depth -= 1; } + if (parser->curr->type == '}') { + consume_token(parser); + break; + } + member_is_used = consume_token_if_next(parser, Token_Type_Keyword_Use); bh_arr_clear(member_list_temp); diff --git a/misc/onyx.sublime-syntax b/misc/onyx.sublime-syntax index a2365ed7..ccce2161 100644 --- a/misc/onyx.sublime-syntax +++ b/misc/onyx.sublime-syntax @@ -51,8 +51,8 @@ contexts: - match: '#[a-zA-Z_]+' scope: keyword.other.onyx - - match: '@[a-zA-Z0-9_]+' - scope: meta.toc-list.task-tag.note.onyx + - match: '@[a-zA-Z0-9_.]+' + scope: keyword.other.onyx - match: '\$[a-zA-Z0-9_]+' scope: constant.other.onyx -- 2.25.1