From: David Vázquez Date: Tue, 4 Jun 2013 17:59:17 +0000 (+0100) Subject: lisp-to-js and js-to-lisp wrappers X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=a3fcec857214548b2570904f0cd54776c62bb323;p=jscl.git lisp-to-js and js-to-lisp wrappers --- diff --git a/src/compiler.lisp b/src/compiler.lisp index 449bb3e..0ad7637 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1247,6 +1247,9 @@ (define-builtin objectp (x) (js!bool (code "(typeof (" x ") === 'object')"))) +(define-builtin lisp-to-js (x) (code "lisp_to_js(" x ")")) +(define-builtin js-to-lisp (x) (code "js_to_lisp(" x ")")) + (define-builtin oget (object key) (js!selfcall "var tmp = " "(" object ")[xstring(" key ")];" *newline*