while loops
This commit is contained in:
@@ -120,6 +120,7 @@ Stmt_Kind :: enum u8 {
|
||||
Return,
|
||||
Expression,
|
||||
If,
|
||||
While,
|
||||
}
|
||||
|
||||
Stmt :: struct {
|
||||
@@ -133,8 +134,11 @@ Stmt :: struct {
|
||||
// `If` statements use `expr` as the condition, `body` as the then-block, and
|
||||
// `else_body` as the else-block. An `else if` chain is represented as an
|
||||
// `else_body` holding a single nested `If` statement.
|
||||
// `While` statements use `expr` as the condition, `body` as the loop body,
|
||||
// and `update` as the optional post-iteration statement.
|
||||
body: []Stmt_Id,
|
||||
else_body: []Stmt_Id,
|
||||
update: Stmt_Id,
|
||||
diagnostic: source.Diagnostic_Id,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user