introduce foreign call

This commit is contained in:
Folkert 2020-11-05 23:35:56 +01:00
parent 3d0f2751f5
commit 3cd132dd51
8 changed files with 134 additions and 3 deletions

View file

@ -98,6 +98,11 @@ pub enum Expr {
args: Vec<(Variable, Expr)>,
ret_var: Variable,
},
ForeignCall {
foreign_symbol: InlinableString,
args: Vec<(Variable, Expr)>,
ret_var: Variable,
},
Closure {
function_type: Variable,
@ -1116,7 +1121,8 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
| other @ Accessor { .. }
| other @ Update { .. }
| other @ Var(_)
| other @ RunLowLevel { .. } => other,
| other @ RunLowLevel { .. }
| other @ ForeignCall { .. } => other,
List {
list_var,