pub enum Stmt {
Show 22 variants
Dim {
vars: Vec<(String, Vec<Expr>)>,
},
ReDim {
preserve: bool,
var_bounds: Vec<(String, Vec<Expr>)>,
},
Const(Vec<(String, Lit)>),
Set {
var: FullIdent,
rhs: SetRhs,
},
Assignment {
full_ident: FullIdent,
value: Box<Expr>,
},
IfStmt {
condition: Box<Expr>,
body: Vec<Stmt>,
elseif_statements: Vec<(Box<Expr>, Vec<Stmt>)>,
else_stmt: Option<Vec<Stmt>>,
},
WhileStmt {
condition: Box<Expr>,
body: Vec<Stmt>,
},
ForStmt {
counter: String,
start: Box<Expr>,
end: Box<Expr>,
step: Option<Box<Expr>>,
body: Vec<Stmt>,
},
ForEachStmt {
element: String,
group: Box<Expr>,
body: Vec<Stmt>,
},
DoLoop {
check: DoLoopCheck,
body: Vec<Stmt>,
},
SelectCase {
test_expr: Box<Expr>,
cases: Vec<Case>,
else_stmt: Option<Vec<Stmt>>,
},
SubCall {
fn_name: FullIdent,
args: Vec<Option<Expr>>,
},
Call(FullIdent),
With {
object: FullIdent,
body: Vec<Stmt>,
},
Sub {
visibility: Visibility,
name: String,
parameters: Vec<Argument>,
body: Vec<Stmt>,
},
Function {
visibility: Visibility,
name: String,
parameters: Vec<Argument>,
body: Vec<Stmt>,
},
ExitDo,
ExitFor,
ExitFunction,
ExitProperty,
ExitSub,
OnError {
error_clause: ErrorClause,
},
}
Variants§
Dim
ReDim
Const(Vec<(String, Lit)>)
Set
Assignment
IfStmt
Fields
WhileStmt
ForStmt
ForEachStmt
DoLoop
SelectCase
SubCall
Call(FullIdent)
Call statement You are not required to use the Call keyword when calling a procedure. However, if you use the Call keyword to call a procedure that requires arguments, argumentlist must be enclosed in parentheses. If you omit the Call keyword, you also must omit the parentheses around argumentlist. If you use either Call syntax to call any intrinsic or user-defined function, the function’s return value is discarded.
With
Sub
Function
ExitDo
ExitFor
ExitFunction
ExitProperty
ExitSub
OnError
Fields
§
error_clause: ErrorClause
Implementations§
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