Fix js-eval. Macros bug fixed!
authorDavid Vazquez <davazp@gmail.com>
Sun, 23 Dec 2012 21:41:28 +0000 (21:41 +0000)
committerDavid Vazquez <davazp@gmail.com>
Sun, 23 Dec 2012 21:41:28 +0000 (21:41 +0000)
lispstrack.lisp
test.lisp

index 3fff9a3..0cd2d69 100644 (file)
                 "})()" *newline*))))
 
 (define-compilation js-eval (string)
-  (concat "eval(" (ls-compile string env fenv)  ")"))
-
+  (concat "eval.apply(window, [" (ls-compile string env fenv)  "])"))
 
 (define-compilation error (string)
   (concat "(function (){ throw " (ls-compile string env fenv) ";" "return 0;})()"))
index 101964c..10187b6 100644 (file)
--- a/test.lisp
+++ b/test.lisp
                 "})()" *newline*))))
 
 (define-compilation js-eval (string)
-  (concat "eval(" (ls-compile string env fenv)  ")"))
+  (concat "eval.apply(window, [" (ls-compile string env fenv)  "])"))
 
 
 (define-compilation error (string)