projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
5bd86ab
640c358
)
Merge branch 'while'
author
Raimon Grau
<raimonster@gmail.com>
Fri, 14 Dec 2012 23:54:03 +0000
(
00:54
+0100)
committer
Raimon Grau
<raimonster@gmail.com>
Fri, 14 Dec 2012 23:54:03 +0000
(
00:54
+0100)
Conflicts:
lispstrack.lisp
1
2
lispstrack.lisp
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
lispstrack.lisp
index
a1d4add
,
d7e41a1
..
ba97bd6
---
1
/
lispstrack.lisp
---
2
/
lispstrack.lisp
+++ b/
lispstrack.lisp
@@@
-78,9
-90,11
+90,14
@@@
body can access to the local environmen
(define-compilation quote (sexp)
(lisp->js sexp))
+(define-compilation debug (form)
+ (format nil "console.log(~a)" (ls-compile form env)))
+
+ (define-compilation while (pred &rest body)
+ (format nil "(function(){while(~a){~a}})() "
+ (ls-compile pred env)
+ (ls-compile-sexps body env)))
+
(defparameter *env* '())
(defparameter *env-fun* '())