codegen: support pass statement. Closes #10

This commit is contained in:
Sebastien Bourdeauducq 2021-09-22 15:15:55 +08:00
parent db14b4b635
commit 013e7cfc2a

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);
}