added while parser rule

This commit is contained in:
Felix Müller 2024-05-06 14:13:43 +02:00
parent f8c888216a
commit 5d155416b4
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,7 @@ statementlist: statementlist statement
statement: assign
| decl
| definition
| while
| branch;
branchif: KeyIf expr '{' statementlist '}' { DEBUG("if"); };
@ -101,6 +102,8 @@ branchelseifs: branchelseifs branchelseif
branch: branchif branchelseifs
| branchif branchelseifs branchelse;
while: KeyWhile expr '{' statementlist '}' { DEBUG("while"); };
identlist: Ident ',' identlist
| Ident
| ;