From: David Vazquez Date: Sat, 22 Dec 2012 05:17:55 +0000 (+0000) Subject: Export compile and compileString too X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=b1b613df851c1e24a03e3343c5e27c82d47049a7;p=jscl.git Export compile and compileString too --- diff --git a/test.lisp b/test.lisp index 737165a..b18e571 100644 --- a/test.lisp +++ b/test.lisp @@ -911,10 +911,10 @@ (defmacro with-compilation-unit (&rest body) `(progn (setq *compilation-unit-checks* nil) - ,@body - (dolist (check *compilation-unit-checks*) - (funcall check)) - (setq *compilation-unit-checks* nil))) + (prog1 (progn ,@body) + (dolist (check *compilation-unit-checks*) + (funcall check)) + (setq *compilation-unit-checks* nil)))) #+common-lisp @@ -959,11 +959,14 @@ (setq *toplevel-compilations* (append *toplevel-compilations* (list c1 c2))))) - (js-eval (concat "var lisp = {};" - "lisp.eval = " (lookup-function-translation 'eval nil) ";" *newline* "lisp.read = " (lookup-function-translation 'ls-read-from-string nil) ";" *newline* + "lisp.eval = " (lookup-function-translation 'eval nil) ";" *newline* + "lisp.compile = " (lookup-function-translation 'ls-compile-toplevel nil) ";" *newline* "lisp.evalString = function(str){" *newline* " return lisp.eval(lisp.read(str));" *newline* + "}" *newline* + "lisp.compileString = function(str){" *newline* + " return lisp.compile(lisp.read(str));" *newline* "}" *newline*))