Added missing '?' grammar rule for import statements

This commit is contained in:
Nocturn9x 2021-10-23 12:00:26 +02:00
parent 7a80bb071f
commit 73c00ab4ea
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ statement → exprStmt | forStmt | ifStmt | returnStmt| whileStmt| blockStm
exprStmt → expression ";"; // Any expression followed by a semicolon is technically a statement
returnStmt → "return" expression? ";"; // Returns from a function, illegal in top-level code
breakStmt → "break" ";";
importStmt -> ("from" IDENTIFIER)? "import" (IDENTIFIER ("as" IDENTIFIER)? ",")+ ";";
importStmt -> ("from" IDENTIFIER)? "import" (IDENTIFIER ("as" IDENTIFIER)? ","?)+ ";";
assertStmt → "assert" expression ";";
delStmt → "del" expression ";"
continueStmt → "continue" ";";