parser: fix table literals with semicolons

This commit is contained in:
2026-05-08 21:55:51 +02:00
parent 9f6b6e1eec
commit 8e8642d7d6
2 changed files with 3 additions and 1 deletions

View File

@@ -270,6 +270,8 @@ noomP_Node* noomP_parseTableLiteral(noomP_Parser* parser) {
if (noomP_peek(parser, &token)) return 0;
if (token.type == NOOML_TOKEN_SYMBOL && noom_streql(parser->code + token.offset, token.length, ",", 1)) {
noomP_skip(parser, &token);
} else if (token.type == NOOML_TOKEN_SYMBOL && noom_streql(parser->code + token.offset, token.length, ";", 1)) {
noomP_skip(parser, &token);
} else {
break;
}