pub enum Expr<'arena> {
RealNumber {
val: f64,
},
ImaginaryNumber {
val: f64,
},
ComplexNumber {
val: Complex64,
},
Binding {
name: &'arena mut str,
},
FunctionCall {
ident: &'arena mut str,
args: Vec<'arena, &'arena mut Expr<'arena>>,
},
Operator {
op: Operator,
rhs: &'arena mut Expr<'arena>,
lhs: &'arena mut Expr<'arena>,
},
}
Expand description
A token Tree representing a whole Expression It lives inside an Arena
Variants§
RealNumber
A real number
ImaginaryNumber
An imaginary number
ComplexNumber
Complex number
Binding
A variable
FunctionCall
A function call, with an variable amount of arguments
Fields
Operator
An operation
Implementations§
Trait Implementations§
impl<'arena> StructuralPartialEq for Expr<'arena>
Auto Trait Implementations§
impl<'arena> Freeze for Expr<'arena>
impl<'arena> !RefUnwindSafe for Expr<'arena>
impl<'arena> !Send for Expr<'arena>
impl<'arena> !Sync for Expr<'arena>
impl<'arena> Unpin for Expr<'arena>
impl<'arena> !UnwindSafe for Expr<'arena>
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