codegen: support pass statement. Closes #10

escape-analysis
Sebastien Bourdeauducq 2021-09-22 15:15:55 +08:00
parent db14b4b635
commit 013e7cfc2a
1 changed files with 1 additions and 0 deletions

View File

@ -94,6 +94,7 @@ impl<'ctx, 'a> CodeGenContext<'ctx, 'a> {
// return true if it contains terminator
pub fn gen_stmt(&mut self, stmt: &Stmt<Option<Type>>) -> bool {
match &stmt.node {
StmtKind::Pass => {},
StmtKind::Expr { value } => {
self.gen_expr(&value);
}