pub enum Statement {
Show 15 variants
Expression(Expression),
Return(Option<Expression>),
If {
condition: Expression,
then_branch: Box<Statement>,
else_branch: Option<Box<Statement>>,
},
For {
variable: String,
start: Expression,
end: Expression,
step: Option<Expression>,
body: Box<Statement>,
},
ForEach {
variable: String,
iterable: Expression,
body: Box<Statement>,
},
While {
condition: Expression,
body: Box<Statement>,
},
DoWhile {
condition: Expression,
body: Box<Statement>,
check_at_end: bool,
},
SelectCase {
expression: Expression,
cases: Vec<CaseClause>,
default_case: Option<Box<Statement>>,
},
With {
target: Expression,
statements: Vec<Statement>,
},
Try {
try_block: Vec<Statement>,
catch_clauses: Vec<CatchClause>,
finally_block: Option<Vec<Statement>>,
},
Dim(VariableDeclaration),
Const {
name: String,
constant_type: String,
value: Expression,
},
Exit(String),
Continue(String),
Block(Vec<Statement>),
}Expand description
Statement.
Variants§
Expression(Expression)
Expression statement.
Return(Option<Expression>)
Return statement.
If
If statement.
Fields
§
condition: ExpressionThe condition expression.
For
For loop.
Fields
§
start: ExpressionThe start expression.
§
end: ExpressionThe end expression.
§
step: Option<Expression>The optional step expression.
ForEach
For Each loop.
Fields
§
iterable: ExpressionThe iterable expression.
While
While loop.
DoWhile
Do While loop.
Fields
§
condition: ExpressionThe condition expression.
SelectCase
Select Case statement.
With
With statement.
Fields
§
target: ExpressionThe target expression.
Try
Try statement.
Fields
§
catch_clauses: Vec<CatchClause>The catch clauses.
Dim(VariableDeclaration)
Dim statement (variable declaration).
Const
Const statement (constant declaration).
Fields
§
value: ExpressionConstant value.
Exit(String)
Exit statement.
Continue(String)
Continue statement.
Block(Vec<Statement>)
Block statement (multiple statements).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Statement
impl<'de> Deserialize<'de> for Statement
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 Statement
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnsafeUnpin 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