projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e45b8e
)
lisp-to-js and js-to-lisp wrappers
author
David Vázquez
<davazp@gmail.com>
Tue, 4 Jun 2013 17:59:17 +0000
(18:59 +0100)
committer
David Vázquez
<davazp@gmail.com>
Tue, 4 Jun 2013 17:59:17 +0000
(18:59 +0100)
src/compiler.lisp
patch
|
blob
|
history
diff --git
a/src/compiler.lisp
b/src/compiler.lisp
index
449bb3e
..
0ad7637
100644
(file)
--- 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*