diff --git a/docs/grammar.md b/docs/grammar.md index 115e84f..cb4ef29 100644 --- a/docs/grammar.md +++ b/docs/grammar.md @@ -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" ";";