pub enum Expr {
Show 13 variants
Literal(Value),
Var(String),
Env(String),
KeyPath {
base: String,
keys: Vec<String>,
},
List(Vec<Expr>),
Map(Vec<(String, Expr)>),
Call {
name: String,
args: Vec<Expr>,
},
Compare {
op: CompareOp,
left: Box<Expr>,
right: Box<Expr>,
},
Arithmetic {
op: ArithOp,
left: Box<Expr>,
right: Box<Expr>,
},
CompiledMath(Vec<MathOp>),
UnsignedIntBoundary(u64),
Not(Box<Expr>),
Logical {
op: LogicalOp,
left: Box<Expr>,
right: Box<Expr>,
},
}Variants§
Literal(Value)
Var(String)
Env(String)
Environment read (env:KEY): resolves against the script
environment at evaluation time.
KeyPath
List(Vec<Expr>)
Map(Vec<(String, Expr)>)
Call
Compare
Arithmetic
CompiledMath(Vec<MathOp>)
Lowering-optimized form: folded literals stay Literal, dynamic
arithmetic/comparison subtrees arrive here as flat RPN.
UnsignedIntBoundary(u64)
Lowering-only intermediate staging 9223372036854775808 (the unsigned
half of i64::MIN). Valid only as the direct child of unary -;
any instance reaching lowering completion bails integer overflow.
Not(Box<Expr>)
Logical
Trait Implementations§
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