pub enum ExprKind {
Number {
value: Ratio<i128>,
text: String,
},
Quantity {
magnitude: Ratio<i128>,
mag_text: String,
unit: UnitExpr,
},
Length {
inches: Ratio<i128>,
},
Ident {
name: String,
},
Unary {
op: UnaryOp,
operand: NodeId,
},
Binary {
op: BinaryOp,
left: NodeId,
right: NodeId,
},
Call {
callee: Callee,
args: Vec<CallArg>,
},
}Expand description
Expression node kinds (grammar §5.2).
Variants§
Number
Dimensionless numeric literal.
Quantity
Numeric magnitude with attached unit expression.
Fields
Length
Length literal from tick notation (12', 6", 12'-6").
Ident
Free symbol or unresolved identifier.
Unary
Unary operator.
Binary
Binary operator.
Call
Function or code-equation call.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ExprKind
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnsafeUnpin for ExprKind
impl UnwindSafe for ExprKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more