[parenscript-devel] Bug: throw (and other operators) should expect an expression

Daniel Gackle danielgackle at gmail.com
Wed Aug 20 15:29:11 UTC 2008


The operators "throw", "delete",  "void", "typeof", and "new" are not
compiling to JS correctly. For example,

(ps (throw (if a b c)))

=>

"throw if (a) {
    b;
} else {
    c;
};"

when it should be:

"throw a ? b : c;"

There is an easy fix:

hunk ./src/special-forms.lisp 33
-                             (list 'js-named-operator ',op
(compile-parenscript-form value)))))
+                             (list 'js-named-operator ',op
(compile-parenscript-form value :expecting :expression)))))

Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20080820/a2845060/attachment.html>


More information about the parenscript-devel mailing list