Enum carlotk::Expression
source · pub enum Expression {
Assignment {
left: String,
right: Box<Expression>,
},
Reassignment {
left: String,
right: Box<Expression>,
},
Float {
value: f64,
kg: f64,
m: f64,
s: f64,
a: f64,
k: f64,
mol: f64,
},
Identifier(String),
Symbolic(String),
BinOp {
left: Box<Expression>,
oper: BinaryOperation,
right: Box<Expression>,
},
Null,
}Expand description
Enumerates the expression available to the Carlo parser.
Variants§
Assignment
Assignment
Reassignment
Reassignment
Float
64-bit dimensioned floating-point
Identifier(String)
Identifier
Symbolic(String)
Symbolic identifier
BinOp
Binary operation
Null
Null
Implementations§
Trait Implementations§
source§impl Clone for Expression
impl Clone for Expression
source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for Expression
impl Debug 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§
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