chapter 9 in rust

This commit is contained in:
Sebastian Hugentobler 2025-02-12 13:10:07 +01:00
parent 1a485ebcb1
commit f82919414e
5 changed files with 271 additions and 35 deletions

View file

@ -10,4 +10,13 @@ pub enum Statement {
name: Token,
initializer: Box<Option<Expression>>,
},
If {
condition: Expression,
then_branch: Box<Statement>,
else_branch: Option<Box<Statement>>,
},
While {
condition: Expression,
body: Box<Statement>,
},
}