projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix little bugs
[jscl.git]
/
lispstrack.lisp
diff --git
a/lispstrack.lisp
b/lispstrack.lisp
index
2d27c25
..
7848b81
100644
(file)
--- a/
lispstrack.lisp
+++ b/
lispstrack.lisp
@@
-330,7
+330,7
@@
*newline*
(if rest-argument
(let ((js!rest (lookup-variable-translation rest-argument new-env)))
*newline*
(if rest-argument
(let ((js!rest (lookup-variable-translation rest-argument new-env)))
- (concat "var " js!rest ";" *newline*
+ (concat "var " js!rest "= false;" *newline*
"for (var i = arguments.length-1; i>="
(integer-to-string (length required-arguments))
"; i--)" *newline*
"for (var i = arguments.length-1; i>="
(integer-to-string (length required-arguments))
"; i--)" *newline*
@@
-363,6
+363,9
@@
(let ((ch (char string index)))
(when (or (char= ch #\") (char= ch #\\))
(setq output (concat output "\\")))
(let ((ch (char string index)))
(when (or (char= ch #\") (char= ch #\\))
(setq output (concat output "\\")))
+ (when (or (char= ch #\newline))
+ (setq output (concat output "\\"))
+ (setq ch #\n))
(setq output (concat output (string ch))))
(incf index))
output))
(setq output (concat output (string ch))))
(incf index))
output))
@@
-648,9
+651,10
@@
(setq *toplevel-compilations* nil)
(let ((code (ls-compile sexp)))
(prog1
(setq *toplevel-compilations* nil)
(let ((code (ls-compile sexp)))
(prog1
- (concat (join (mapcar (lambda (x) (concat x ";" *newline*))
+ (concat "/* " (princ-to-string sexp) " */"
+ (join (mapcar (lambda (x) (concat x ";" *newline*))
*toplevel-compilations*)
*toplevel-compilations*)
- "")
+ "")
code)
(setq *toplevel-compilations* nil))))
code)
(setq *toplevel-compilations* nil))))