enum Meta::Expr

A quoted block's body as a tree (docs/14 §6), each node with its line.

<prelude>:358

Variants

variant Meta::Expr::Lit(value: Shareable, line: Int)

A literal, or a constant whose value is one (Shareable, as what can be baked is).

<prelude>:361

variant Meta::Expr::Capture(index: Int, name: Symbol, line: Int)

A value from outside the block: Quoted#captures[index].

<prelude>:363

variant Meta::Expr::Arg(name: Symbol, depth: Int, line: Int)

A parameter of the depth-th enclosing Block (0: the innermost; the quoted block itself is the outermost).

<prelude>:366

variant Meta::Expr::SelfRef(depth: Int, line: Int)

The self of the depth-th enclosing Block that has a receiver (0: the innermost; the quoted block itself counts when its procedure type has one).

<prelude>:370

variant Meta::Expr::Call(recv: Meta::Expr?, method: Meta::MethodRef, methods: Array[Meta::MethodRef], args: Array[Meta::Expr], block: Meta::Expr?, line: Int)

A call of the methods the checker chose: methods, one per method a union receiver's members run, in dispatch order (one entry for any other call); method, the one the call was resolved to (for members' methods that override a common one, that one; otherwise the first of methods).

<prelude>:376

variant Meta::Expr::And(left: Meta::Expr, right: Meta::Expr, line: Int)

The built-in &&, || and !; on a union where some members define !, those members' ! (methods, in dispatch order; empty: the built-in alone).

<prelude>:380

variant Meta::Expr::Or(left: Meta::Expr, right: Meta::Expr, line: Int)

<prelude>:381

variant Meta::Expr::Not(operand: Meta::Expr, methods: Array[Meta::MethodRef], line: Int)

<prelude>:382

variant Meta::Expr::If(cond: Meta::Expr, then_expr: Meta::Expr, else_expr: Meta::Expr?, line: Int)

if, unless (its condition under a Not) and ?:.

<prelude>:384

variant Meta::Expr::ArrayLit(items: Array[Meta::Expr], line: Int)

<prelude>:385

variant Meta::Expr::HashLit(pairs: Array[[Meta::Expr, Meta::Expr]], line: Int)

<prelude>:386

variant Meta::Expr::Interp(parts: Array[Meta::Expr], line: Int)

A string with interpolation: its parts, literals and expressions.

<prelude>:388

variant Meta::Expr::Block(params: Array[Symbol], body: Array[Meta::Expr], line: Int)

A block given to a call inside the quoted one (and the quoted block itself): its parameters' names and its statements.

<prelude>:391