Statement for void function call

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2021-02-06 10:42:54 -05:00
1 parent f9f41fc9bf
commit d949d58f7b
12 files changed
+668 -621

No files matched your search

+9
View File
@@ -203,6 +203,15 @@ where
self.visitor.visit_lhs_expr(&self.expressions[left]);
self.traverse_expr(value);
}
S::Call {
function,
ref arguments,
} => {
for &argument in arguments {
self.traverse_expr(argument);
}
self.visitor.visit_fun(function);
}
}
}
}
+1
View File
@@ -35,6 +35,7 @@ pub fn ensure_block_returns(block: &mut crate::Block) {
| Some(&mut crate::Statement::Kill) => (),
Some(&mut crate::Statement::Loop { .. })
| Some(&mut crate::Statement::Store { .. })
| Some(&mut crate::Statement::Call { .. })
| None => block.push(crate::Statement::Return { value: None }),
}
}