add defer
This commit is contained in:
@@ -131,6 +131,8 @@ Stmt_Kind :: enum u8 {
|
||||
For,
|
||||
Break,
|
||||
Continue,
|
||||
Block,
|
||||
Defer,
|
||||
}
|
||||
|
||||
Assignment_Op :: enum u8 {
|
||||
@@ -165,6 +167,9 @@ Stmt :: struct {
|
||||
// `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.
|
||||
// `Block` statements (a bare `{ ... }` scope) use `body` as their statements.
|
||||
// `Defer` statements use `update` as the deferred statement (which may itself
|
||||
// be a `Block`).
|
||||
captures: []symbol.Id,
|
||||
guard: Expr_Id,
|
||||
body: []Stmt_Id,
|
||||
|
||||
Reference in New Issue
Block a user