enum StmtKindThe grammar form and child nodes of a parsed statement.
Some surface constructs are already normalized: pattern-bearing conditionals become match expressions, while ownership modes on for remain explicit for later lowering.
Cases
case expr_stmt(Expr)
An expression evaluated for its value or effects.
case if_stmt(Expr, Block, Block?)
A boolean-only if statement; pattern-bearing ifs desugar to a match in expr_stmt (matching the reference).
case return_stmt(Expr?)
Returns an optional value from the enclosing function.
case break_stmt
Exits the nearest loop.
case assignment([Expr])
[lhs, rhs].
case loop_stmt(Expr?, Block)
A loop with an optional condition and its body.
case for_stmt(Expr, Pattern, Block, ArgMode?)
An iterable expression, element pattern, body, and ownership mode.
case continue_stmt
Starts the next iteration of the nearest loop.
case resume_stmt(Expr?)
'continue expr? — resumes the enclosing effect handler.
case handle_stmt(String, Int, Int, Block)
#handle 'effect { body } — the effect name (sigil excluded), its lexeme span, and the handler block.