diff --git a/lisp2li.lisp b/lisp2li.lisp index e0a19d8..0dc74f6 100644 --- a/lisp2li.lisp +++ b/lisp2li.lisp @@ -143,6 +143,14 @@ par le compilateur et par l’interpréteur" ,(lisp2li value env)))) names values) ,(lisp2li (implicit-progn body) new-env))))) + ((eq 'let* (car expr)) + (cond-match expr + (((? (eq x 'let*)) :bindings () :body _*) + (lisp2li (implicit-progn body) env)) + (((? (eq x 'let*)) :bindings ((:name $ :value _) :rest ($ _)*) :body _*) + (lisp2li `(let ((,name ,value)) + (let* ,rest + ,@body)) env)))) ;; defun ((eq 'defun (car expr)) `(:call set-defun (:const . ,(second expr)) diff --git a/meval.lisp b/meval.lisp index dca0baa..bf14312 100644 --- a/meval.lisp +++ b/meval.lisp @@ -109,7 +109,7 @@ d’arguments dans un certain environnement." (let ((sub-env (get-env-num num-env env))) (if sub-env (aref sub-env index) - (error "The variable unbound" expr)))) + (error "The variable unbound : ~w" expr)))) ((:nil :if :predicat @. :expr1 @. :expr2 @.) (if (meval predicat env) (meval expr1 env)