mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-27 02:24:15 +03:00
Fix issue in codegen
This commit is contained in:
parent
64548699a9
commit
59f418f5d0
@ -167,13 +167,7 @@ impl<'a> CodeGenerator<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn visit_expression_statement(&mut self, input: &'a ExpressionStatement) -> String {
|
fn visit_expression_statement(&mut self, input: &'a ExpressionStatement) -> String {
|
||||||
match input.expression {
|
self.visit_expression(&input.expression).1
|
||||||
Expression::Call(_) => {
|
|
||||||
// Note that codegen for CallExpression in an expression statement does not return any destination registers.
|
|
||||||
self.visit_expression(&input.expression).1
|
|
||||||
}
|
|
||||||
_ => unreachable!("ExpressionStatement's can only contain CallExpression's."),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_increment(&mut self, input: &'a IncrementStatement) -> String {
|
fn visit_increment(&mut self, input: &'a IncrementStatement) -> String {
|
||||||
|
Loading…
Reference in New Issue
Block a user