Implement block scopes (code inside braces)
- Putting code in between braces will create a new scope
This commit is contained in:
@@ -18,6 +18,7 @@ impl SimpleAstOptimizer {
|
||||
for stmt in block {
|
||||
match stmt {
|
||||
Statement::Expr(expr) => Self::optimize_expr(expr),
|
||||
Statement::Block(block) => Self::optimize_block(block),
|
||||
Statement::Loop(Loop {
|
||||
condition,
|
||||
advancement,
|
||||
|
||||
Reference in New Issue
Block a user