mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 14:07:34 +02:00
Allow evaluating scheme procedures
This commit is contained in:
parent
0c2106ec05
commit
b86cb0b561
1 changed files with 4 additions and 1 deletions
|
@ -1350,12 +1350,15 @@ object apply(object cont, object func, object args){
|
|||
|
||||
case cons_tag:
|
||||
{
|
||||
// TODO: would be better to compare directly against symbol here,
|
||||
// TODO: would be better to compare directly against symbols here,
|
||||
// but need a way of looking up this symbol ahead of time.
|
||||
// maybe a libinit() or such is required.
|
||||
if (strncmp(((symbol)car(func))->pname, "primitive", 10) == 0) {
|
||||
make_cons(c, cadr(func), args);
|
||||
((closure)__glo_eval)->fn(3, __glo_eval, cont, &c, nil);
|
||||
} else if (strncmp(((symbol)car(func))->pname, "procedure", 10) == 0) {
|
||||
make_cons(c, func, args);
|
||||
((closure)__glo_eval)->fn(3, __glo_eval, cont, &c, nil);
|
||||
} else {
|
||||
make_cons(c, func, args);
|
||||
Cyc_rt_raise2("Unable to evaluate: ", &c);
|
||||
|
|
Loading…
Add table
Reference in a new issue