(defmacro with-compilation-unit (&rest body)
`(progn
- (setq *env* nil)
- (setq *fenv* nil)
(setq *compilation-unit-checks* nil)
,@body
(dolist (check *compilation-unit-checks*)
(funcall check))
- (setq *env* nil)
- (setq *fenv* nil)
(setq *compilation-unit-checks* nil)))
(defun ls-compile-toplevel (sexp)
(defmacro with-compilation-unit (&rest body)
`(progn
- (setq *env* nil)
- (setq *fenv* nil)
(setq *compilation-unit-checks* nil)
,@body
(dolist (check *compilation-unit-checks*)
(funcall check))
- (setq *env* nil)
- (setq *fenv* nil)
(setq *compilation-unit-checks* nil)))
(defun eval (x)
(js-eval (ls-compile x nil nil)))
+
+
+(debug (ls-compile '(+ 1 2) nil nil))