block labels
This commit is contained in:
@@ -156,6 +156,9 @@ Stmt_Kind :: enum u8 {
|
||||
For,
|
||||
Break,
|
||||
Continue,
|
||||
// A labeled value block (`blk: { … yield :blk v }`): lowers to its `then_body`
|
||||
// followed by an exit label, so a `yield :blk` (a labeled break) lands after it.
|
||||
Block,
|
||||
}
|
||||
|
||||
Assignment_Op :: enum u8 {
|
||||
@@ -172,6 +175,9 @@ Stmt :: struct {
|
||||
span: source.Span,
|
||||
local: Local_Id,
|
||||
index_local: Local_Id,
|
||||
// `While`/`For`/`Block` may carry a label; a labeled `Break`/`Continue` targets the
|
||||
// matching enclosing loop or value block. `INVALID` when absent.
|
||||
label: symbol.Id,
|
||||
target: Expr_Id,
|
||||
expr: Expr_Id,
|
||||
iterator_type: types.Type,
|
||||
|
||||
Reference in New Issue
Block a user