Shortened line

This commit is contained in:
nocturn9x 2021-07-13 16:11:08 +02:00
parent 26e1727e72
commit 22b71f9dbe
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ program → declaration* EOF; // An entire program (Note: an empty progra
declaration → structDecl | funDecl | varDecl | statement; // A program is composed by a list of declarations
structDecl → "struct" IDENTIFIER "{" (varDecl)* "}"; // Declares a structure type similar to C's
funDecl → "fun" function; // Function declarations
varDecl → "var" | "let" | "const" IDENTIFIER ( "=" expression )? ";"; // Constants and immutables still count as "variable" declarations in the grammar
// Constants and immutables still count as "variable" declarations in the grammar
varDecl → "var" | "let" | "const" IDENTIFIER ( "=" expression )? ";";
// Statements (rules that produce side effects but without binding a name)
statement → exprStmt | forStmt | ifStmt | returnStmt| whileStmt| blockStmt; // The set of all statements