pub enum Expr {
Show 15 variants
Eraser,
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>,
},
Bin {
op: Op,
lhs: Box<Expr>,
rhs: Box<Expr>,
},
Str {
val: GlobalString,
},
Lst {
els: Vec<Expr>,
},
Tup {
els: Vec<Expr>,
},
Sup {
els: Vec<Expr>,
},
Constructor {
name: Name,
args: Vec<Expr>,
kwargs: Vec<(Name, Expr)>,
},
Comprehension {
term: Box<Expr>,
bind: Name,
iter: Box<Expr>,
cond: Option<Box<Expr>>,
},
MapInit {
entries: Vec<(Expr, Expr)>,
},
MapGet {
nam: Name,
key: Box<Expr>,
},
}
Variants§
Eraser
Var
Chn
Num
Call
Lam
Bin
Str
Fields
§
val: GlobalString
Lst
Tup
Sup
Constructor
Comprehension
MapInit
MapGet
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 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> 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