;;; Utils
+#+common-lisp
(defmacro while (condition &body body)
`(do ()
((not ,condition))
code)
(setq *literals* nil))))
+#+common-lisp
(defun ls-compile-file (filename output)
(with-open-file (in filename)
(with-open-file (out output :direction :output :if-exists :supersede)
for compilation = (ls-compile-toplevel x)
when compilation do (write-line (concat compilation "; ") out)))))
-
;;; Testing
(defun compile-test ()
(ls-compile-file "test.lisp" "test.js"))