diff --git a/src/main.c b/src/main.c index b3b814a..852d51f 100644 --- a/src/main.c +++ b/src/main.c @@ -33,7 +33,7 @@ void print_node(noomP_Node* node, noom_uint_t depth) { int main(int argc, char** argv) { // uhh uhhh uhhhhh - const char* code = "function a(...) print(...) end"; + const char* code = "local t = {'a'; 2; 6}"; noom_uint_t pos = 0; printf("LEX OUTPUT:\n"); diff --git a/src/parser.c b/src/parser.c index c855b73..cb2958d 100644 --- a/src/parser.c +++ b/src/parser.c @@ -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; }