Add blocks to IR Generator
This commit is contained in:
parent
c9c3cacb53
commit
4d00bbb6ba
1 changed files with 7 additions and 1 deletions
|
@ -203,6 +203,12 @@ fn visit_ast_node(
|
||||||
},
|
},
|
||||||
While(_, _) => todo!(),
|
While(_, _) => todo!(),
|
||||||
FunCall(_, _) => todo!(),
|
FunCall(_, _) => todo!(),
|
||||||
Block(_) => todo!(),
|
Block(expressions) => {
|
||||||
|
let mut result_var = symbols.get("unit").clone();
|
||||||
|
for expression in expressions {
|
||||||
|
result_var = visit_ast_node(expression, types, symbols, instructions, labels)
|
||||||
|
}
|
||||||
|
result_var
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue