pub enum Stmt {
Show 17 variants
Set {
name: String,
value: Expr,
},
SetIndex {
object: Box<Expr>,
index: Box<Expr>,
value: Expr,
},
FuncDef {
name: String,
params: Vec<String>,
body: Vec<Stmt>,
},
GeneratorDef {
name: String,
params: Vec<String>,
body: Vec<Stmt>,
},
LazyDef {
name: String,
expr: Expr,
},
Return(Expr),
Yield(Expr),
Break,
Continue,
While {
condition: Expr,
body: Vec<Stmt>,
},
For {
var: String,
iterable: Expr,
body: Vec<Stmt>,
},
ForIndexed {
index_var: String,
value_var: String,
iterable: Expr,
body: Vec<Stmt>,
},
Switch {
expr: Expr,
cases: Vec<(Expr, Vec<Stmt>)>,
default: Option<Vec<Stmt>>,
},
Import {
names: Vec<String>,
path: String,
aliases: Vec<Option<String>>,
namespace: Option<String>,
},
Export(String),
Throw(Expr),
Expression(Expr),
}Expand description
Statements - things that perform actions
Variants§
Set
SetIndex
FuncDef
GeneratorDef
LazyDef
Return(Expr)
Yield(Expr)
Break
Continue
While
For
ForIndexed
Switch
Import
Export(String)
Throw(Expr)
Expression(Expr)
Trait Implementations§
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 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