[parenscript-devel] Bug: cases where PS generates syntax errors instead of expressions

Daniel Gackle danielgackle at gmail.com
Mon Nov 7 22:15:50 UTC 2011


(ps (create a 11 b 22)) => "{ a : 11, b : 22 };", which is illegal at
the top level because JS interprets the curly braces as statement
block delimiters. PS should probably generate "({ a : 11, b : 22 })"
instead.

Similarly, (ps (lambda () 123)) =>

"function () {
    return 123;
};"

is also illegal at the top level and should also be wrapped in parens.

Such forms obviously don't come up much in source files, but they do
in a REPL.  We're making a PS REPL (and source-level debugger) for
Emacs, which is how we ran across them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20111107/d904d80e/attachment.html>


More information about the parenscript-devel mailing list