pub enum Expr {
Error,
Log(Box<Expr>),
Block(Vec<Box<Stmt>>, Option<Box<Expr>>),
If(Box<Expr>, Box<Expr>, Option<Box<Expr>>),
While(Box<Expr>, Vec<Box<Stmt>>),
Assign(Box<Expr>, AssignOp, Box<Expr>),
Binary(Box<Expr>, BinaryOp, Box<Expr>),
Unary(UnaryOp, Box<Expr>),
Property(Box<Expr>, String),
Index(Box<Expr>, Box<Expr>),
Call(Box<Expr>, Vec<Box<Expr>>),
Constant(Constant),
}
Variants§
Error
Log(Box<Expr>)
Outputs the value of the contained Expr as a log.
Block(Vec<Box<Stmt>>, Option<Box<Expr>>)
If(Box<Expr>, Box<Expr>, Option<Box<Expr>>)
The first Expr is the condition, the second the “true” block, and the third the “false” block.
Else-if statements are collapsed as if a standard if statement was put inside of the else block.
While(Box<Expr>, Vec<Box<Stmt>>)
Assign(Box<Expr>, AssignOp, Box<Expr>)
Binary(Box<Expr>, BinaryOp, Box<Expr>)
Unary(UnaryOp, Box<Expr>)
Property(Box<Expr>, String)
Index(Box<Expr>, Box<Expr>)
Call(Box<Expr>, Vec<Box<Expr>>)
Constant(Constant)
Trait Implementations§
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
Mutably borrows from an owned value. Read more