enum ExprKindThe grammar form and child nodes of a parsed expression.
Recursive operands use arrays for finite value layout, with comments documenting positional payload conventions. Recovery nodes such as incomplete_member remain in the tree for editor tooling. All names and effects are unresolved.
Cases
case literal_int(String)
An integer literal preserved in source spelling.
case literal_float(String)
A floating-point literal preserved in source spelling.
case literal_true
The Boolean literal true.
case literal_false
The Boolean literal false.
case literal_string(String)
A decoded string literal.
case literal_character(String)
A decoded character literal.
case variable(String)
A reference to a source-spelled binding name.
case unary(TokenKind, [Expr])
The operand, as a one-element array.
case binary(TokenKind, [Expr])
[lhs, rhs].
case call([Expr], [GenericArg], [CallArg], [Block])
The callee as a one-element array, explicit generic arguments, the arguments, then a trailing block closure as a zero- or one-element array.
case constructor(String, [[GenericArg]])
A specialized type reference (Opt<Int>, Res<Int>.A<Bool>): the dotted path and one generic-argument list per path segment.
case member(MemberLabel, Int, Int, [Expr])
The receiver as a zero- (leading dot) or one-element array. The label span mirrors the reference: an identifier label's own token, a positional label the FOLLOWING token (quirk), a float-split member its digits' sub-span.
case incomplete_member([Expr])
A dot with no member name after it: LSP-supporting recovery node, receiver as a zero- or one-element array.
case tuple([Expr])
An ordered tuple of element expressions.
case block(Block)
A block used in expression position.
case literal_array([Expr])
An array literal's element expressions.
case subscript_expr([Expr])
[lhs, index].
case func_expr(Func)
A func literal in expression position.
case unsafe_expr(Block)
#unsafe { … }.
case if_expr([Expr], Block, Block)
A conditional in expression position (and the desugared form of pattern-bearing if statements): condition as a one-element array, then the success and failure blocks.
case match_expr([Expr], [MatchArm])
The scrutinee as a one-element array, then the arms.
case as_cast([Expr], TypeAnnotation)
expr as Type: the operand as a one-element array.
case propagate([Expr])
Postfix ? early propagation; the operand as a one-element array.
case force_unwrap([Expr])
Postfix !: the operand, then the hidden failure expression — unreachable spanning the bang until desugaring sends it to 'panic.
case unreachable_expr
The bottom-valued unreachable expression.
case call_effect(String, Int, Int, [GenericArg], [CallArg], [Block])
'effect(args) { ... }: the effect name (sigil excluded) and its lexeme span, explicit generic arguments, arguments, then a trailing block closure as a zero- or one-element array.
case record_literal([RecordField], [Expr])
{ label: value, ...spread }: the fields, then the spread expression as a zero- or one-element array.
case inline_ir([Expr], IRInstruction)
#_ir(binds…) { %d = instr … }: the bind expressions, then the instruction. Only the binds render in the dump.
case macro_call(String, Int, Int, Int, Int, [MacroToken], [Expr])
@name(...), @name[...], or @name {...}: the name and its lexeme span, the complete delimited input span, its canonical tokens, and legacy expression arguments when the parenthesized payload consists only of expressions.
case syntax_quote(String, [MacroToken], [String], Int)
quote { ... } in a macro unit: the original source, canonical group tokens, and the named expression antiquotations encountered in the tree. The trailing Int is the quoted category: 0 for an expression quotation (quote { ... }), 1 for a declaration quotation (quote decl { ... }, ADR 0026 wrapper macros).