pub enum Statement {
Assignment {
name: String,
value: Spanned<Expression>,
},
Expression {
expression: Spanned<Expression>,
},
Block {
statements: Vec<Spanned<Statement>>,
},
If {
condition: Spanned<Expression>,
then_branch: Vec<Spanned<Statement>>,
else_branch: Vec<Spanned<Statement>>,
},
While {
condition: Spanned<Expression>,
body: Vec<Spanned<Statement>>,
},
FunctionDefinition {
name: String,
parameters: Vec<String>,
body: Vec<Spanned<Statement>>,
},
Return {
value: Option<Spanned<Expression>>,
},
Use {
path: Vec<String>,
},
}Variants§
Assignment
Expression
Fields
§
expression: Spanned<Expression>Block
If
Fields
§
condition: Spanned<Expression>While
FunctionDefinition
Return
Fields
§
value: Option<Spanned<Expression>>Use
use a::b::c; — load module file a/b/c.amarok and flat-merge its
top-level functions and variables into the current scope.
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