pub enum Expr<'a> {
Variable(VariablePath<'a>),
Literal(Literal<'a>),
UnOp(UnOpKind, Box<Self>),
BinOp(BinOpKind, Box<Self>, Box<Self>),
FunCall(Box<Self>, Vec<Self>),
}
Expand description
an expression.
to implementer: you can use stack machine to express the evaluation of this tree structure.
Variants§
Variable(VariablePath<'a>)
Literal(Literal<'a>)
UnOp(UnOpKind, Box<Self>)
BinOp(BinOpKind, Box<Self>, Box<Self>)
FunCall(Box<Self>, Vec<Self>)
Trait Implementations§
impl<'a> StructuralPartialEq for Expr<'a>
Auto Trait Implementations§
impl<'a> Freeze for Expr<'a>
impl<'a> RefUnwindSafe for Expr<'a>
impl<'a> Send for Expr<'a>
impl<'a> Sync for Expr<'a>
impl<'a> Unpin for Expr<'a>
impl<'a> UnwindSafe for Expr<'a>
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