diff options
Diffstat (limited to 'src/ast.h')
| -rw-r--r-- | src/ast.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -115,6 +115,7 @@ enum StatementKind STATEMENT_GOTO, STATEMENT_SYSCALL, STATEMENT_IF, + STATEMENT_WHILE, STATEMENT_CALL, STATEMENT_STACK, }; @@ -149,6 +150,15 @@ struct IfStatement size_t else_count; }; +struct WhileStatement +{ + struct Expr* left; + struct Token comparison; + struct Expr* right; + struct Statement* body; + size_t body_count; +}; + struct CallStatement { struct Token name; @@ -172,6 +182,7 @@ struct Statement struct LabelStatement label; struct GotoStatement jump; struct IfStatement branch; + struct WhileStatement loop; struct CallStatement call; struct StackStatement stack; }; |
