pub enum Statement {
Show 22 variants
Assignment {
target: Expression,
value: Expression,
location: Location,
},
Expression {
expr: Expression,
location: Location,
},
If {
condition: Expression,
then_block: Vec<Statement>,
else_block: Option<Vec<Statement>>,
location: Location,
},
For {
variable: String,
start: Expression,
end: Expression,
step: Option<Expression>,
body: Vec<Statement>,
location: Location,
},
Foreach {
variable: String,
iterable: Expression,
index_var: Option<String>,
body: Vec<Statement>,
location: Location,
},
While {
condition: Expression,
body: Vec<Statement>,
location: Location,
},
Repeat {
body: Vec<Statement>,
condition: Expression,
location: Location,
},
Break {
location: Location,
},
Continue {
location: Location,
},
Return {
value: Option<Expression>,
location: Location,
},
ProcedureCall {
name: String,
args: Vec<Expression>,
keywords: Vec<Keyword>,
location: Location,
},
Common {
name: String,
variables: Vec<String>,
location: Location,
},
CompileOpt {
options: Vec<String>,
location: Location,
},
FunctionDef {
name: String,
params: Vec<Parameter>,
keywords: Vec<KeywordDecl>,
body: Vec<Statement>,
location: Location,
},
ProcedureDef {
name: String,
params: Vec<Parameter>,
keywords: Vec<KeywordDecl>,
body: Vec<Statement>,
location: Location,
},
Label {
name: String,
location: Location,
},
Goto {
label: String,
location: Location,
},
Case {
expr: Expression,
branches: Vec<CaseBranch>,
else_block: Option<Vec<Statement>>,
location: Location,
},
Switch {
expr: Expression,
branches: Vec<CaseBranch>,
else_block: Option<Vec<Statement>>,
location: Location,
},
ClassDefinition {
name: String,
body: Vec<Statement>,
location: Location,
},
MethodDefinition {
class_name: String,
method_name: String,
is_function: bool,
params: Vec<Parameter>,
keywords: Vec<KeywordDecl>,
body: Vec<Statement>,
location: Location,
},
ObjectDestroy {
objects: Vec<Expression>,
location: Location,
},
}Expand description
XDL Statements
Variants§
Assignment
Expression
If
Fields
§
condition: ExpressionFor
Foreach
Fields
§
iterable: ExpressionWhile
Repeat
Break
Continue
Return
ProcedureCall
Common
CompileOpt
FunctionDef
Fields
§
keywords: Vec<KeywordDecl>ProcedureDef
Fields
§
keywords: Vec<KeywordDecl>Label
Goto
Case
Switch
ClassDefinition
MethodDefinition
Fields
§
keywords: Vec<KeywordDecl>ObjectDestroy
Implementations§
Trait Implementations§
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 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