forked from M-Labs/nac3
codegen: support pass statement. Closes #10
This commit is contained in:
parent
db14b4b635
commit
013e7cfc2a
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user