pub enum Expr {
Show 39 variants
Block(Vec<Expr>),
LabelAnnotated {
label: LabelMetadata,
expr: Box<Expr>,
},
Null,
Bool(bool),
Number(f64),
String(CompactString),
Variable(CompactString),
List(Vec<Expr>),
Record(Vec<(CompactString, Expr)>),
Assign {
target: AssignTarget,
expr: Box<Expr>,
},
If {
condition: Box<Expr>,
then_block: Box<Expr>,
else_block: Box<Expr>,
},
For {
binding: CompactString,
iterable: Box<Expr>,
body: Box<Expr>,
},
While {
condition: Box<Expr>,
body: Box<Expr>,
},
Break,
Continue,
StartProcess(ProcessStartExpr),
ProcessRef {
process: CompactString,
},
HostValueConstructor {
type_name: CompactString,
input: Box<Expr>,
},
ResourceRef(ResourceRefExpr),
ReceiverCall {
receiver: Box<Expr>,
operation: CompactString,
args: Vec<Expr>,
},
Await(Box<Expr>),
SleepFor(Box<Expr>),
SleepUntil(Box<Expr>),
WaitSignal,
SignalRun {
run: Box<Expr>,
payload: Box<Expr>,
},
ResultUnwrap(Box<Expr>),
Cancel(Box<Expr>),
Print(Box<Expr>),
Submit(Option<Box<Expr>>),
Yield(Box<Expr>),
Wake(Box<Expr>),
Finish(Option<Box<Expr>>),
Fail(Box<Expr>),
BuiltinCall {
name: CompactString,
args: Vec<Expr>,
},
Field {
target: Box<Expr>,
field: CompactString,
},
Index {
target: Box<Expr>,
index: Box<Expr>,
},
Unary {
op: UnaryOp,
expr: Box<Expr>,
},
Binary {
left: Box<Expr>,
op: BinaryOp,
right: Box<Expr>,
},
TypeLiteral(Box<TypeExpr>),
}Variants§
Block(Vec<Expr>)
LabelAnnotated
Null
Bool(bool)
Number(f64)
String(CompactString)
Variable(CompactString)
List(Vec<Expr>)
Record(Vec<(CompactString, Expr)>)
Assign
If
For
While
Break
Continue
StartProcess(ProcessStartExpr)
ProcessRef
Fields
§
process: CompactStringHostValueConstructor
ResourceRef(ResourceRefExpr)
ReceiverCall
Await(Box<Expr>)
SleepFor(Box<Expr>)
SleepUntil(Box<Expr>)
WaitSignal
SignalRun
ResultUnwrap(Box<Expr>)
Cancel(Box<Expr>)
Print(Box<Expr>)
Submit(Option<Box<Expr>>)
Yield(Box<Expr>)
Wake(Box<Expr>)
Finish(Option<Box<Expr>>)
Fail(Box<Expr>)
BuiltinCall
Field
Index
Unary
Binary
TypeLiteral(Box<TypeExpr>)
Implementations§
Source§impl Expr
impl Expr
Sourcepub fn children(&self) -> ExprChildren<'_>
pub fn children(&self) -> ExprChildren<'_>
Yields every direct child expression of self in evaluation order.
This is the single structural-traversal primitive: any pass that only
needs to recurse into the sub-expressions of a node (without caring
about the node’s own kind) can fold over children() instead of
re-spelling the full match. Leaf nodes (Null, Bool, Number,
String, Variable, Break, Continue, WaitSignal,
ResourceRef, ProcessRef, HostValueConstructor metadata, and
TypeLiteral) yield nothing.
Assign includes any dynamic index expressions in its target path
(in path order) before the assigned value, matching the order in which
the compiler and linker visit them.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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