pub enum Expr {
Show 17 variants
Era,
Var {
nam: Name,
},
Chn {
nam: Name,
},
Num {
val: Num,
},
Call {
fun: Box<Expr>,
args: Vec<Expr>,
kwargs: Vec<(Name, Expr)>,
},
Lam {
names: Vec<(Name, bool)>,
bod: Box<Expr>,
},
Opr {
op: Op,
lhs: Box<Expr>,
rhs: Box<Expr>,
},
Str {
val: GlobalString,
},
Lst {
els: Vec<Expr>,
},
Tup {
els: Vec<Expr>,
},
Sup {
els: Vec<Expr>,
},
Ctr {
name: Name,
args: Vec<Expr>,
kwargs: Vec<(Name, Expr)>,
},
LstMap {
term: Box<Expr>,
bind: Name,
iter: Box<Expr>,
cond: Option<Box<Expr>>,
},
Map {
entries: Vec<(Expr, Expr)>,
},
MapGet {
nam: Name,
key: Box<Expr>,
},
TreeNode {
left: Box<Expr>,
right: Box<Expr>,
},
TreeLeaf {
val: Box<Expr>,
},
}Variants§
Era
Var
Chn
Num
Call
Lam
Opr
Str
Fields
§
val: GlobalStringLst
Tup
Sup
Ctr
LstMap
Map
MapGet
TreeNode
TreeLeaf
Implementations§
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more