Skip to content

Commit 77803de

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/separate-cli
2 parents 5bf87ab + 2612565 commit 77803de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

compiler/src/parser.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2734,6 +2734,11 @@ static AstStructType* parse_struct(OnyxParser* parser) {
27342734
bh_arr_clear(member_list_temp);
27352735
while (!consume_token_if_next(parser, ':')) {
27362736
if (parser->hit_unexpected_token) return NULL;
2737+
if (parser->curr->type == Token_Type_Doc_Comment) {
2738+
consume_token(parser);
2739+
continue;
2740+
}
2741+
27372742
bh_arr_push(member_list_temp, expect_token(parser, Token_Type_Symbol));
27382743

27392744
if (parser->curr->type != ':')
@@ -3670,6 +3675,10 @@ static AstEnumType* parse_enum_declaration(OnyxParser* parser) {
36703675

36713676
while (!consume_token_if_next(parser, '}')) {
36723677
if (parser->hit_unexpected_token) return enum_node;
3678+
if (parser->curr->type == Token_Type_Doc_Comment) {
3679+
consume_token(parser);
3680+
continue;
3681+
}
36733682

36743683
AstEnumValue* evalue = make_node(AstEnumValue, Ast_Kind_Enum_Value);
36753684
evalue->token = expect_token(parser, Token_Type_Symbol);

0 commit comments

Comments
 (0)