pub enum Statement {
Assign {
declaration: bool,
variable: Expr,
assign: Expr,
},
ExprStatement(Expr),
Return(Option<Expr>),
IfElse {
cond: Expr,
if_: Vec<Statement>,
else_: Vec<Statement>,
},
Switch {
arg: Expr,
default: Vec<Statement>,
cases: Vec<(Expr, Vec<Statement>)>,
},
While {
cond: Expr,
stmts: Vec<Statement>,
},
Break,
Continue,
Throw(Expr),
Try {
stmts: Vec<Statement>,
},
Catch {
stmts: Vec<Statement>,
},
Comment(String),
}
Variants§
Assign
Variable assignment
ExprStatement(Expr)
Expression statement
Return(Option<Expr>)
Return an expression or nothing (void)
IfElse
If/Else statement
Switch
While
While statement
Break
Continue
Throw(Expr)
Try
Catch
Comment(String)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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