mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
make invoke work
This commit is contained in:
parent
2a3bf72d60
commit
6e0f57d7eb
6 changed files with 319 additions and 158 deletions
|
@ -82,6 +82,18 @@ where
|
|||
self.free_symbols(stmt);
|
||||
Ok(())
|
||||
}
|
||||
Stmt::Invoke {
|
||||
symbol,
|
||||
layout,
|
||||
call,
|
||||
pass,
|
||||
fail: _,
|
||||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), layout.clone(), pass);
|
||||
self.build_stmt(&stmt)
|
||||
}
|
||||
x => Err(format!("the statement, {:?}, is not yet implemented", x)),
|
||||
}
|
||||
}
|
||||
|
@ -299,7 +311,18 @@ where
|
|||
self.scan_ast(following);
|
||||
}
|
||||
|
||||
Stmt::Invoke { .. } => todo!("invoke is not implemented (yet) for gen_dev"),
|
||||
Stmt::Invoke {
|
||||
symbol,
|
||||
layout,
|
||||
call,
|
||||
pass,
|
||||
fail: _,
|
||||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), layout.clone(), pass);
|
||||
self.scan_ast(&stmt);
|
||||
}
|
||||
|
||||
Stmt::Switch {
|
||||
cond_symbol,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue