From 8f68f03408b04fbd5f21efaa375b9c7f732ac607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sat, 30 Oct 2010 22:25:46 +0200 Subject: [PATCH] Correction (?) sur le defun dans lisp2li. --- lisp2li.lisp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp2li.lisp b/lisp2li.lisp index e27fe1b..340212f 100644 --- 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))