Skip to content

Commit

Permalink
feat: add support for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tohrnii committed Aug 8, 2023
1 parent 80c1a88 commit 7806077
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions parser/src/transforms/inlining.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,17 +307,13 @@ impl<'a> Inlining<'a> {
Ok(vec![Statement::Expr(expr)])
}

Statement::Return(mut expr) => {
match expr {
Expr::Call(call) => {
self.expand_call(call)
}
_ => {
self.rewrite_expr(&mut expr)?;
Ok(vec![Statement::Return(expr)])
}
}
}
Statement::Return(mut expr) => match expr {
Expr::Call(call) => self.expand_call(call),
_ => {
self.rewrite_expr(&mut expr)?;
Ok(vec![Statement::Return(expr)])
}
},
}
}

Expand Down

0 comments on commit 7806077

Please sign in to comment.