Updated grammar with nee assert keyword

This commit is contained in:
nocturn9x 2021-08-21 15:05:14 +02:00
parent aeaaff2555
commit cd84f8a187
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ forStmt → "for" "(" ( varDecl | exprStmt | ";" ) expression? ";" expres
ifStmt → "if" "(" expression ")" statement ( "else" statement )?; // If statements are conditional jumps
returnStmt → "return" expression? ";"; // Returns from a function, illegal in top-level code
breakStmt → "break" ";";
assertStmt → "assert" expression ";"
continueStmt → "continue" ";";
whileStmt → "while" "(" expression ")" statement; // While loops run until their condition is truthy
blockStmt → "{" declaration* "}"; // Blocks create a new scope that lasts until they're closed