mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
Removed debug code
This commit is contained in:
parent
9443f92fe2
commit
327941b980
3 changed files with 17 additions and 5 deletions
|
@ -1873,8 +1873,8 @@ object apply(object cont, object func, object args){
|
||||||
Cyc_rt_raise2("Call of non-procedure: ", func);
|
Cyc_rt_raise2("Call of non-procedure: ", func);
|
||||||
} else if (strncmp(((symbol)fobj)->pname, "lambda", 7) == 0) {
|
} else if (strncmp(((symbol)fobj)->pname, "lambda", 7) == 0) {
|
||||||
make_cons(c, func, args);
|
make_cons(c, func, args);
|
||||||
printf("JAE DEBUG, sending to eval: ");
|
//printf("JAE DEBUG, sending to eval: ");
|
||||||
Cyc_display(&c, stderr);
|
//Cyc_display(&c, stderr);
|
||||||
((closure)__glo_eval)->fn(2, __glo_eval, cont, &c, nil);
|
((closure)__glo_eval)->fn(2, __glo_eval, cont, &c, nil);
|
||||||
|
|
||||||
// TODO: would be better to compare directly against symbols here,
|
// TODO: would be better to compare directly against symbols here,
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
(list
|
(list
|
||||||
(cons 'and
|
(cons 'and
|
||||||
(lambda (expr rename compare)
|
(lambda (expr rename compare)
|
||||||
(cond ((null? (cdr expr)))
|
(cond ((null? (cdr expr))) ;; TODO (?): #t)
|
||||||
((null? (cddr expr)) (cadr expr))
|
((null? (cddr expr)) (cadr expr))
|
||||||
(else (list (rename 'if) (cadr expr)
|
(else (list (rename 'if) (cadr expr)
|
||||||
(cons (rename 'and) (cddr expr))
|
(cons (rename 'and) (cddr expr))
|
||||||
|
|
16
test2.scm
16
test2.scm
|
@ -26,7 +26,19 @@
|
||||||
(cons (rename 'and) (cddr expr))
|
(cons (rename 'and) (cddr expr))
|
||||||
#f))))))
|
#f))))))
|
||||||
|
|
||||||
(write
|
(define-syntax or
|
||||||
(test 1 2 3))
|
(er-macro-transformer
|
||||||
|
(lambda (expr rename compare)
|
||||||
|
(cond ((null? (cdr expr)) #f)
|
||||||
|
((null? (cddr expr)) (cadr expr))
|
||||||
|
(else
|
||||||
|
(list (rename 'let) (list (list (rename 'tmp) (cadr expr)))
|
||||||
|
(list (rename 'if) (rename 'tmp)
|
||||||
|
(rename 'tmp)
|
||||||
|
(cons (rename 'or) (cddr expr)))))))))
|
||||||
|
|
||||||
|
(write (test 1 2 3))
|
||||||
|
(write (or 1 2 3 'or))
|
||||||
|
(write (or #f 2 3 'or))
|
||||||
;(test 'done)
|
;(test 'done)
|
||||||
'done
|
'done
|
||||||
|
|
Loading…
Add table
Reference in a new issue