[parenscript-devel] Bug: throw (and other operators) should expect an expression
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
Daniel Gackle wrote:
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)))))
Right you are. Fixed. Cheers, -- Travis
participants (2)
-
Daniel Gackle
-
Travis Cross