comptime expandable match statements
This commit is contained in:
@@ -180,7 +180,7 @@ Stmt :: struct {
|
||||
immutable: bool,
|
||||
value_control_flow: bool,
|
||||
pointer_capture: bool,
|
||||
inline: bool,
|
||||
expand: bool,
|
||||
error_only: bool,
|
||||
// Assignments store the lvalue in `target`, the right-hand side in `expr`,
|
||||
// and the source operator in `assignment_op`. `Set` is ordinary `=`;
|
||||
@@ -207,7 +207,8 @@ Stmt :: struct {
|
||||
// list (empty marks the `else` arm; more than one is a multi-pattern arm),
|
||||
// `captures` for the optional payload capture (0 or 1 name, tagged-union variants
|
||||
// only) with `pointer_capture` distinguishing `|@cap|` from `|cap|`, and `body`
|
||||
// as the arm body.
|
||||
// as the arm body. An expanded arm has `expand` set, no patterns, and one or two
|
||||
// captures for its specialized value/payload and optional tagged-union tag.
|
||||
captures: []symbol.Id,
|
||||
// `Match_Arm` pattern list; empty ⇒ the `else` arm.
|
||||
patterns: []Expr_Id,
|
||||
|
||||
Reference in New Issue
Block a user