diff options
Diffstat (limited to 'ast.h')
| -rw-r--r-- | ast.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -139,6 +139,14 @@ struct if_node { struct scope* scope; }; +struct loop_node { + struct expr_node* init; /* null if absent */ + struct expr_node* cond; /* null if absent */ + struct expr_node* incr; /* null if absent */ + struct stmt_node* body; + struct scope* scope; +}; + struct stmt_node { enum { STMT_EMPTY, @@ -147,6 +155,7 @@ struct stmt_node { STMT_RETURN, STMT_GROUP, STMT_IF, + STMT_LOOP, } type; union { struct expr_node expr; @@ -154,6 +163,7 @@ struct stmt_node { struct return_node return_; struct group_node group; struct if_node if_; + struct loop_node loop; } inner; struct stmt_node* next; |
