Enum num_parser::Expression
source · [−]pub enum Expression {
Binary(Box<Expression>, TokenType, Box<Expression>),
Unary(TokenType, Box<Expression>),
Var(String),
Func(String, Vec<Box<Expression>>),
Literal(Value),
Union(Vec<Box<Expression>>),
}Expand description
Every expression variant.
Variants
Binary(Box<Expression>, TokenType, Box<Expression>)
A binary operation between two expression.
Unary(TokenType, Box<Expression>)
An unary operation to an expression.
Var(String)
A variable.
Func(String, Vec<Box<Expression>>)
A function call and its parameters.
Literal(Value)
A literal value.
Union(Vec<Box<Expression>>)
A union of values.
Implementations
sourceimpl Expression
impl Expression
Trait Implementations
sourceimpl Clone for Expression
impl Clone for Expression
sourcefn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Expression
impl Debug for Expression
sourceimpl PartialEq<Expression> for Expression
impl PartialEq<Expression> for Expression
sourcefn eq(&self, other: &Expression) -> bool
fn eq(&self, other: &Expression) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &Expression) -> bool
fn ne(&self, other: &Expression) -> bool
This method tests for !=.
impl StructuralPartialEq for Expression
Auto Trait Implementations
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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