feat: Add support for return and break statements.

This commit is contained in:
Jooris Hadeler
2026-01-15 21:52:26 +01:00
parent b0f3937227
commit 4edcd1a7b7
3 changed files with 39 additions and 4 deletions

View File

@@ -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>,
},