pub enum Stmt {
Show 14 variants
Assignment {
ident: Identifier,
vtype: Option<Type>,
expr: Option<Expr>,
},
Constant {
name: Identifier,
vtype: Option<Type>,
expr: Expr,
},
Reassignment {
ident: Identifier,
expr: Expr,
},
DerefReassignment {
target: Expr,
expr: Expr,
},
Expr(Expr),
If {
cond: Expr,
then_branch: Vec<Stmt>,
else_if_branches: Vec<(Expr, Vec<Stmt>)>,
else_branch: Option<Vec<Stmt>>,
},
While {
cond: Expr,
body: Vec<Stmt>,
},
For {
init: Box<Stmt>,
cond: Expr,
step: Box<Stmt>,
body: Vec<Stmt>,
},
Return {
value: Option<Expr>,
span: Location,
},
Use {
path: Vec<String>,
},
Struct {
name: Identifier,
generic_params: Vec<String>,
fields: Vec<Parameter>,
},
Function {
name: Identifier,
public: bool,
rttype: Option<Type>,
generic_params: Vec<String>,
params: Vec<Parameter>,
body: Vec<Stmt>,
},
Extern {
name: Identifier,
rttype: Option<Type>,
generic_params: Vec<String>,
params: Vec<Parameter>,
},
Break {
location: Location,
},
}Variants§
Assignment
Constant
Reassignment
DerefReassignment
Expr(Expr)
If
Fields
While
For
Return
Use
Struct
Function
Fields
§
name: IdentifierExtern
Break
Trait Implementations§
Auto Trait Implementations§
impl !Send for Stmt
impl !Sync for Stmt
impl Freeze for Stmt
impl RefUnwindSafe 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