Enum cranelift_isle::ast::Expr
source · [−]pub enum Expr {
Term {
sym: Ident,
args: Vec<Expr>,
pos: Pos,
},
Var {
name: Ident,
pos: Pos,
},
ConstInt {
val: i64,
pos: Pos,
},
ConstPrim {
val: Ident,
pos: Pos,
},
Let {
defs: Vec<LetDef>,
body: Box<Expr>,
pos: Pos,
},
}
Expand description
An expression: the right-hand side of a rule.
Note that this almost looks like a core Lisp or lambda calculus, except that there is no abstraction (lambda). This first-order limit is what makes it analyzable.
Variants
Term
A term: (sym args...)
.
Var
A variable use.
ConstInt
A constant integer.
ConstPrim
A constant of some other primitive type.
Let
The (let ((var ty val)*) body)
form.
Implementations
Trait Implementations
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more