pub enum ExprKind {
Show 26 variants
Error,
Number(f64),
Integer(i64),
Bool(bool),
StringLiteral(String),
TypeSystemRef(Spanned<TypeSystemRef>),
GraphRef(Spanned<ResolvedName<Decl>>),
ConstRef(Spanned<ConstRef>),
LocalRef(Spanned<LocalId>),
BinOp {
op: BinOp,
lhs: Box<Expr>,
rhs: Box<Expr>,
},
UnaryOp {
op: UnaryOp,
operand: Box<Expr>,
},
FnCall {
callee: Spanned<FunctionRef>,
type_args: Vec<GenericArg>,
args: Vec<Expr>,
},
If {
condition: Box<Expr>,
then_branch: Box<Expr>,
else_branch: Box<Expr>,
},
UnitLiteral {
value: f64,
unit: UnitExpr,
},
Convert {
expr: Box<Expr>,
target: UnitExpr,
},
DisplayTimezone {
expr: Box<Expr>,
timezone: String,
},
FieldAccess {
expr: Box<Expr>,
field: Spanned<FieldName>,
},
ConstructorCall {
callee: Spanned<ResolvedName<Constructor>>,
generic_args: Vec<GenericArg>,
fields: Vec<FieldInit>,
},
MapLiteral {
entries: Vec<MapEntry>,
},
ForComp {
bindings: Vec<ForBinding>,
body: Box<Expr>,
},
IndexAccess {
expr: Box<Expr>,
args: Vec<IndexArg>,
},
Scan {
source: Box<Expr>,
init: Box<Expr>,
acc: LocalDef,
val: LocalDef,
body: Box<Expr>,
},
Unfold {
init: Box<Expr>,
prev: LocalDef,
curr: LocalDef,
body: Box<Expr>,
},
Match {
scrutinee: Box<Expr>,
arms: Vec<MatchArm>,
},
VariantLiteral(IndexVariantRef),
InlineDagRef {
target: Spanned<DagId>,
args: Vec<ParamBinding>,
output: Spanned<ResolvedName<Decl>>,
},
}Expand description
Resolved expression shape.
Variants§
Error
A reference that failed to resolve.
Produced only by tolerant lowering; the diagnostic for the failure is reported alongside the lowered tree. The strict entry points reject trees containing this node, so the batch pipeline never observes it.
Number(f64)
Integer(i64)
Bool(bool)
StringLiteral(String)
TypeSystemRef(Spanned<TypeSystemRef>)
GraphRef(Spanned<ResolvedName<Decl>>)
ConstRef(Spanned<ConstRef>)
LocalRef(Spanned<LocalId>)
BinOp
UnaryOp
FnCall
If
UnitLiteral
Convert
DisplayTimezone
FieldAccess
ConstructorCall
MapLiteral
ForComp
IndexAccess
Scan
Unfold
Match
VariantLiteral(IndexVariantRef)
InlineDagRef
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnsafeUnpin for ExprKind
impl UnwindSafe for ExprKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more