commit 8f68f03408b04fbd5f21efaa375b9c7f732ac607 parent b661c5f3191ebb7e0bd2e2490ed4bc7006fab01b Author: Georges Dupéron <jahvascriptmaniac+github@free.fr> Date: Sat, 30 Oct 2010 22:25:46 +0200 Correction (?) sur le defun dans lisp2li. Diffstat:
| M | lisp2li.lisp | | | 11 | +++++++---- |
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/lisp2li.lisp b/lisp2li.lisp @@ -28,10 +28,13 @@ 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 (list 'add-top-level-binding (cons :lclosure (list (length (third expr)) - (lisp2li (fourth expr) - (make-stat-env (push-new-env env "DEFUN") - (third expr)))))))) + (add-top-level-binding env + (second expr) + (cons :lclosure (list (length (third expr)) + (lisp2li (fourth expr) + (make-stat-env (push-new-env env "DEFUN") + (third expr)))))) + (cons :lit (second expr))) ((eq 'setq (car expr)) (cons :call (cons 'set-binding (list `(:lit . ,env) (cons :lit (second expr))