mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
implement function_R invoke
This commit is contained in:
parent
8a1a643e3b
commit
1beed7f759
1 changed files with 20 additions and 8 deletions
|
@ -553,15 +553,27 @@ fn function_r<'a, 'i>(env: &mut Env<'a, 'i>, stmt: &'a Stmt<'a>) -> &'a Stmt<'a>
|
||||||
arena.alloc(Let(*symbol, expr.clone(), *layout, b))
|
arena.alloc(Let(*symbol, expr.clone(), *layout, b))
|
||||||
}
|
}
|
||||||
Invoke {
|
Invoke {
|
||||||
symbol: _,
|
symbol,
|
||||||
call: _,
|
call,
|
||||||
layout: _,
|
layout,
|
||||||
pass: _,
|
pass,
|
||||||
fail: _,
|
fail,
|
||||||
exception_id: _,
|
exception_id,
|
||||||
} => {
|
} => {
|
||||||
// TODO implement this
|
let branch_info = BranchInfo::None;
|
||||||
stmt
|
let new_pass = function_r_branch_body(env, &branch_info, pass);
|
||||||
|
let new_fail = function_r_branch_body(env, &branch_info, fail);
|
||||||
|
|
||||||
|
let invoke = Invoke {
|
||||||
|
symbol: *symbol,
|
||||||
|
call: call.clone(),
|
||||||
|
layout: *layout,
|
||||||
|
pass: new_pass,
|
||||||
|
fail: new_fail,
|
||||||
|
exception_id: *exception_id,
|
||||||
|
};
|
||||||
|
|
||||||
|
arena.alloc(invoke)
|
||||||
}
|
}
|
||||||
Refcounting(modify_rc, continuation) => {
|
Refcounting(modify_rc, continuation) => {
|
||||||
let b = function_r(env, continuation);
|
let b = function_r(env, continuation);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue