pub enum MojoExpression {
Literal(MojoLiteral),
Identifier(String),
Binary {
left: Box<MojoExpression>,
op: String,
right: Box<MojoExpression>,
},
Unary {
op: String,
right: Box<MojoExpression>,
},
Call {
callee: Box<MojoExpression>,
args: Vec<MojoExpression>,
},
}Expand description
Mojo expression types.
Variants§
Literal(MojoLiteral)
Literal expression.
Identifier(String)
Identifier expression.
Binary
Binary expression with left operand, operator, and right operand.
Unary
Unary expression with operator and operand.
Call
Function call expression.
Trait Implementations§
Source§impl Clone for MojoExpression
impl Clone for MojoExpression
Source§fn clone(&self) -> MojoExpression
fn clone(&self) -> MojoExpression
Returns a duplicate 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 MojoExpression
impl Debug for MojoExpression
Source§impl<'de> Deserialize<'de> for MojoExpression
impl<'de> Deserialize<'de> for MojoExpression
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MojoExpression
impl RefUnwindSafe for MojoExpression
impl Send for MojoExpression
impl Sync for MojoExpression
impl Unpin for MojoExpression
impl UnsafeUnpin for MojoExpression
impl UnwindSafe for MojoExpression
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