Enum endbasic_core::ast::Expr
source · pub enum Expr {
Show 25 variants
Boolean(BooleanSpan),
Double(DoubleSpan),
Integer(IntegerSpan),
Text(TextSpan),
Symbol(SymbolSpan),
Add(Box<BinaryOpSpan>),
Subtract(Box<BinaryOpSpan>),
Multiply(Box<BinaryOpSpan>),
Divide(Box<BinaryOpSpan>),
Modulo(Box<BinaryOpSpan>),
Power(Box<BinaryOpSpan>),
Negate(Box<UnaryOpSpan>),
Equal(Box<BinaryOpSpan>),
NotEqual(Box<BinaryOpSpan>),
Less(Box<BinaryOpSpan>),
LessEqual(Box<BinaryOpSpan>),
Greater(Box<BinaryOpSpan>),
GreaterEqual(Box<BinaryOpSpan>),
And(Box<BinaryOpSpan>),
Not(Box<UnaryOpSpan>),
Or(Box<BinaryOpSpan>),
Xor(Box<BinaryOpSpan>),
ShiftLeft(Box<BinaryOpSpan>),
ShiftRight(Box<BinaryOpSpan>),
Call(CallSpan),
}
Expand description
Represents an expression and provides mechanisms to evaluate it.
Variants§
Boolean(BooleanSpan)
A literal boolean value.
Double(DoubleSpan)
A literal double-precision floating point value.
Integer(IntegerSpan)
A literal integer value.
Text(TextSpan)
A literal string value.
Symbol(SymbolSpan)
A reference to a variable.
Add(Box<BinaryOpSpan>)
Arithmetic addition of two expressions.
Subtract(Box<BinaryOpSpan>)
Arithmetic subtraction of two expressions.
Multiply(Box<BinaryOpSpan>)
Arithmetic multiplication of two expressions.
Divide(Box<BinaryOpSpan>)
Arithmetic division of two expressions.
Modulo(Box<BinaryOpSpan>)
Arithmetic modulo operation of two expressions.
Power(Box<BinaryOpSpan>)
Arithmetic power operation of two expressions.
Negate(Box<UnaryOpSpan>)
Arithmetic sign flip of an expression.
Equal(Box<BinaryOpSpan>)
Relational equality comparison of two expressions.
NotEqual(Box<BinaryOpSpan>)
Relational inequality comparison of two expressions.
Less(Box<BinaryOpSpan>)
Relational less-than comparison of two expressions.
LessEqual(Box<BinaryOpSpan>)
Relational less-than or equal-to comparison of two expressions.
Greater(Box<BinaryOpSpan>)
Relational greater-than comparison of two expressions.
GreaterEqual(Box<BinaryOpSpan>)
Relational greater-than or equal-to comparison of two expressions.
And(Box<BinaryOpSpan>)
Logical and of two expressions.
Not(Box<UnaryOpSpan>)
Logical not of an expression.
Or(Box<BinaryOpSpan>)
Logical or of two expressions.
Xor(Box<BinaryOpSpan>)
Logical xor of two expressions.
ShiftLeft(Box<BinaryOpSpan>)
Shift left of a signed integer by a number of bits without rotation.
ShiftRight(Box<BinaryOpSpan>)
Shift right of a signed integer by a number of bits without rotation.
Call(CallSpan)
A function call or an array reference.
Implementations§
Trait Implementations§
source§impl PartialEq for Expr
impl PartialEq for Expr
impl StructuralPartialEq for Expr
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)