feat: Add support for return and break statements.
This commit is contained in:
11
src/ast.rs
11
src/ast.rs
@@ -68,15 +68,26 @@ pub enum Statement {
|
||||
},
|
||||
|
||||
If {
|
||||
kw_span: Span,
|
||||
condition: Expression,
|
||||
then: Box<Statement>,
|
||||
elze: Option<Box<Statement>>,
|
||||
},
|
||||
|
||||
Loop {
|
||||
kw_span: Span,
|
||||
body: Box<Statement>,
|
||||
},
|
||||
|
||||
Break {
|
||||
kw_span: Span,
|
||||
},
|
||||
|
||||
Return {
|
||||
kw_span: Span,
|
||||
value: Option<Expression>,
|
||||
},
|
||||
|
||||
Compound {
|
||||
body: Vec<Statement>,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user