fix format bug for elsestme and stmt def in .g4

This commit is contained in:
Downright
2025-03-05 13:43:27 +08:00
parent 6f51e76804
commit 51ed88f761
4 changed files with 4 additions and 3 deletions

View File

@@ -137,6 +137,7 @@ blockStmt: LBRACE blockItem* RBRACE;
blockItem: decl | stmt;
stmt: lValue ASSIGN exp SEMICOLON
| exp? SEMICOLON
| blockStmt
| IF LPAREN cond RPAREN stmt (ELSE stmt)?
| WHILE LPAREN cond RPAREN stmt