pub enum Node {
Show 17 variants
Int(i64),
BigInt(IntId),
Unit,
Symbol(Sym),
Str(StrId),
Local {
name: Sym,
index: u32,
},
Builtin(Builtin),
ModItem {
index: u32,
depth: u32,
name: Sym,
},
Home {
leaf: HomeLeaf,
depth: u32,
},
App {
len: u32,
args: NodeId,
},
List {
len: u32,
elems: NodeId,
},
Map {
len: u32,
entries: NodeId,
},
Block {
len: u32,
binds: PatId,
exprs: NodeId,
},
Case {
len: u32,
conds: PatId,
exprs: NodeId,
},
Abs(LambdaId),
Recur(ModId),
Barrier {
run: Run,
len: u32,
},
}Expand description
An expression: a tag and up to three u32 operands, 16 bytes. Children are
ids into the same chunk; a node with many children names a run.
Variants§
Int(i64)
An integer that fits in i64.
BigInt(IntId)
Any other integer, in the chunk’s ints table.
Unit
Symbol(Sym)
A dotted symbol, stored without the dot.
Str(StrId)
Local
A resolved local; name is kept for rendering.
Builtin(Builtin)
ModItem
A member of an enclosing module: index into its member space, past
depth module terminals.
Home
App
The run is the callee, then the len - 1 arguments.
List
Map
The run is the len keys, then the len values.
Block
len patterns from binds (Pat::None for a clause that binds
nothing) and len clause expressions from exprs.
Case
len patterns from conds, and from exprs the len arm bodies
followed by the subject.
Abs(LambdaId)
Recur(ModId)
A recur group: a nested module with items and a body.
Barrier
Stands before a run in debug builds.