Correction (?) sur le defun dans lisp2li.

This commit is contained in:
Georges Dupéron 2010-10-30 22:25:46 +02:00 committed by Bertrand BRUN
parent b661c5f319
commit 8f68f03408

View File

@ -28,10 +28,13 @@ par le compilateur et par linterpré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))