conditionally unwrapping while loops
This commit is contained in:
@@ -202,13 +202,12 @@ Stmt :: struct {
|
||||
assignment_op: Assignment_Op,
|
||||
target: Expr_Id,
|
||||
expr: Expr_Id,
|
||||
// `If` statements use `expr` as the condition, `captures` as optional
|
||||
// unwrap binding names, `guard` as the optional post-unwrap boolean
|
||||
// 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.
|
||||
// `If` and `While` statements use `expr` as the condition, `captures` as
|
||||
// optional unwrap binding names, and `guard` as the optional post-unwrap
|
||||
// boolean condition. `If` uses `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` uses `body` as the loop
|
||||
// body and `update` as the optional post-iteration statement.
|
||||
// `For` statements use `expr` as the iterable, `name` as the item capture,
|
||||
// `index_name` as the optional index capture, and `pointer_capture` to
|
||||
// distinguish `|@item|` from copy capture.
|
||||
|
||||
Reference in New Issue
Block a user