pub enum Stmt {
Show 15 variants
Expr {
expr: Box<Expr>,
span: Option<Span>,
},
Assign {
target: Box<Expr>,
value: Box<Expr>,
span: Option<Span>,
},
If {
branches: Vec<IfBranch>,
else: Option<Vec<Stmt>>,
span: Option<Span>,
},
For {
variable: Box<Expr>,
iterable: Box<Expr>,
body: Vec<Stmt>,
span: Option<Span>,
},
While {
condition: Box<Expr>,
body: Vec<Stmt>,
span: Option<Span>,
},
DoWhile {
condition: Box<Expr>,
body: Vec<Stmt>,
span: Option<Span>,
},
Switch {
value: Box<Expr>,
arms: Vec<SwitchArm>,
span: Option<Span>,
},
Delete {
target: Box<Expr>,
span: Option<Span>,
},
Break {
span: Option<Span>,
},
Return {
span: Option<Span>,
},
Continue {
span: Option<Span>,
},
Goto {
label: Option<String>,
offset: Option<Box<Expr>>,
rule_start: bool,
span: Option<Span>,
},
Label {
name: String,
span: Option<Span>,
},
CallSubroutine {
name: String,
span: Option<Span>,
},
Pass {
span: Option<Span>,
},
}Expand description
A statement.
Variants§
Expr
Assign
If
For
While
DoWhile
Switch
Delete
Break
Return
Continue
Goto
Label
CallSubroutine
Pass
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stmt
impl<'de> Deserialize<'de> for Stmt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Stmt
Auto Trait Implementations§
impl Freeze for Stmt
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnsafeUnpin for Stmt
impl UnwindSafe for Stmt
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