Added missing '?' grammar rule for import statements
This commit is contained in:
parent
7a80bb071f
commit
73c00ab4ea
|
@ -86,7 +86,7 @@ statement → exprStmt | forStmt | ifStmt | returnStmt| whileStmt| blockStm
|
||||||
exprStmt → expression ";"; // Any expression followed by a semicolon is technically a statement
|
exprStmt → expression ";"; // Any expression followed by a semicolon is technically a statement
|
||||||
returnStmt → "return" expression? ";"; // Returns from a function, illegal in top-level code
|
returnStmt → "return" expression? ";"; // Returns from a function, illegal in top-level code
|
||||||
breakStmt → "break" ";";
|
breakStmt → "break" ";";
|
||||||
importStmt -> ("from" IDENTIFIER)? "import" (IDENTIFIER ("as" IDENTIFIER)? ",")+ ";";
|
importStmt -> ("from" IDENTIFIER)? "import" (IDENTIFIER ("as" IDENTIFIER)? ","?)+ ";";
|
||||||
assertStmt → "assert" expression ";";
|
assertStmt → "assert" expression ";";
|
||||||
delStmt → "del" expression ";"
|
delStmt → "del" expression ";"
|
||||||
continueStmt → "continue" ";";
|
continueStmt → "continue" ";";
|
||||||
|
|
Loading…
Reference in New Issue