while loops
This commit is contained in:
@@ -141,6 +141,7 @@ Stmt_Kind :: enum u8 {
|
||||
Sink,
|
||||
Trap,
|
||||
If,
|
||||
While,
|
||||
}
|
||||
|
||||
Stmt :: struct {
|
||||
@@ -151,8 +152,11 @@ Stmt :: struct {
|
||||
expr: Expr_Id,
|
||||
// `If` statements use `expr` as the condition and `then_body`/`else_body` as
|
||||
// the branch statement lists.
|
||||
// `While` statements use `expr` as the condition, `then_body` as the loop
|
||||
// body, and `update` as the optional post-iteration statement.
|
||||
then_body: []Stmt_Id,
|
||||
else_body: []Stmt_Id,
|
||||
update: Stmt_Id,
|
||||
diagnostic: source.Diagnostic_Id,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user