[parenscript-devel] A class of bugs in PS: expressions not parenthesized when necessary
Daniel Gackle
danielgackle at gmail.com
Tue Nov 11 23:51:24 UTC 2008
The following bug in PS broke my code today:
(ps (aref (if (and x (> (length x) 0))
(aref x 0)
y)
z))
=> "x && x.length > 0 ? x[0] : y[z];"
Obviously, this should be:
(x && x.length > 0 ? x[0] : y)[z]
You can see a similar bug here:
(ps (aref (or (slot-value x 'y)
(slot-value a 'b))
z))
=> "x.y || a.b[z];"
and here again:
(ps (- (if x y z)))
=> "-x ? y : z;"
Clearly, there's a problem with not parenthesizing things.
Since the last patch or two I've sent have been ignored, I won't send a new
one here, but rather ask: is PS being actively maintained or not? This
project is too valuable to let fade.
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20081111/15147a60/attachment.html>
More information about the parenscript-devel
mailing list