commit 2badf52db35ce1d18933590d351cdbdc7e5aefa6 parent 0fb441b12716c6defa2b751af3310fcb02241753 Author: Bertrand BRUN <bertrand.brun@me.com> Date: Sat, 30 Oct 2010 22:12:18 +0200 Correction dans le code de generation des defuns Diffstat:
| M | lisp2li.lisp | | | 9 | ++++----- |
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lisp2li.lisp b/lisp2li.lisp @@ -27,11 +27,10 @@ par le compilateur et par l’interpréteur" ((eq 'quote (car expr)) ;; quotes (cons :lit (second expr))) ((eq 'defun (car expr)) ;; TODO : a verifier que le cas de defun est bien gerer comme on le veux - (cons :call (cons 'add-binding (list (list :call 'push-new-env `(:lit . ,env) '(:lit . "DEFUN")) - (cons :lit (second expr)) - (cons :lit (cons (length (third expr)) - (lisp2li (fourth expr) - (make-stat-env env (third expr))))))))) + (cons :call (list 'add-top-level-binding (cons :lclosure (list (length (third expr)) + (lisp2li (fourth expr) + (make-stat-env (push-new-env env "DEFUN") + (third expr)))))))) ((eq 'setq (car expr)) (cons :call (cons 'set-binding (list `(:lit . ,env) (cons :lit (second expr))