From ce03a342c9107df076cbcd40e6138b4bde57132c Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 11 Jan 2025 13:27:06 +1100 Subject: [PATCH] Fixed a missing ';' required at the end of var statements --- source/toy_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/toy_parser.c b/source/toy_parser.c index 61cadd9..62c1339 100644 --- a/source/toy_parser.c +++ b/source/toy_parser.c @@ -904,6 +904,8 @@ static void makeVariableDeclarationStmt(Toy_Bucket** bucketHandle, Toy_Parser* p //finally, emit the declaration as an Ast Toy_private_emitAstVariableDeclaration(bucketHandle, rootHandle, nameStr, expr); + + consume(parser, TOY_TOKEN_OPERATOR_SEMICOLON, "Expected ';' at the end of var statement"); } static void makeStmt(Toy_Bucket** bucketHandle, Toy_Parser* parser, Toy_Ast** rootHandle) {