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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more