forked from M-Labs/nac3
1
0
Fork 0

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
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 // return true if it contains terminator
pub fn gen_stmt(&mut self, stmt: &Stmt<Option<Type>>) -> bool { pub fn gen_stmt(&mut self, stmt: &Stmt<Option<Type>>) -> bool {
match &stmt.node { match &stmt.node {
StmtKind::Pass => {},
StmtKind::Expr { value } => { StmtKind::Expr { value } => {
self.gen_expr(&value); self.gen_expr(&value);
} }