Correction (?) sur le defun dans lisp2li.
This commit is contained in:
parent
b661c5f319
commit
8f68f03408
11
lisp2li.lisp
11
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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user