Verified Commit 2ec94dc8 authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Олексій Замковий's hack for writing arbitrary strings to Parenscript output

parent c5df4ac9
......@@ -219,8 +219,10 @@
`(ps-js:escape
(with-output-to-string (*psw-stream*)
(let ((compile-expression? ,compile-expression?)
(*js-string-delimiter* ,*js-string-delimiter*))
(parenscript-print (ps-compile ,lisp-form) t)))))
(*js-string-delimiter* ,*js-string-delimiter*)
(eval-results (multiple-value-list ,lisp-form)))
(when eval-results
(parenscript-print (ps-compile (car eval-results)) t))))))
(defun lisp (x) x)
......
......@@ -4171,3 +4171,10 @@ function sideEffect() {
};
x = 2 + sideEffect() + x + 5;")
(test-ps-js stupid-lisp-trick
(alert
(lisp
(progn
(write-string "[1,2,3]" ps::*psw-stream*)
(values))))
"alert([1,2,3]);")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment