added 'dummy' tags at end of structs
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Wed, 14 Sep 2022 16:53:27 +0000 (11:53 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Wed, 14 Sep 2022 16:53:27 +0000 (11:53 -0500)
compiler/src/parser.c
misc/onyx.sublime-syntax

index 78a74d6b9bc00f2ebe5a1565aae7a12e8de35de2..6ff1aaa45fefd08015a7ed935669e01757c297cb 100644 (file)
@@ -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);
index a2365ed76f39542b2c130dc3ef34b4a0cda53f8e..ccce21610d71d616088a32f778a7f179590498cc 100644 (file)
@@ -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