Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
parenscript
parenscript
Commits
2ec94dc8
Verified
Commit
2ec94dc8
authored
Oct 21, 2018
by
Vladimir Sedach
Browse files
Олексій Замковий's hack for writing arbitrary strings to Parenscript output
parent
c5df4ac9
Changes
2
Show whitespace changes
Inline
Side-by-side
src/non-cl.lisp
View file @
2ec94dc8
...
...
@@ -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
)
...
...
tests/output-tests.lisp
View file @
2ec94dc8
...
...
@@ -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]);"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment