[parenscript-devel] Bug in composed conditional expressions
Daniel Gackle
danielgackle at gmail.com
Sat Apr 25 05:57:52 UTC 2009
I'm seeing a bug in how conditionals are grouped together.
(ps (return (if (if x y z) a b)))
=> "return x ? y : z ? a : b;"
This requires parentheses in order to evaluate the way the PS expression was
clearly intended, namely:
(x ? y : z) ? a : b
PS appears to make the wrong decision about when to include parentheses,
since it does it here when the default would do:
(ps (return (if x y (if z a b))))
=> "return x ? y : (z ? a : b);"
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20090424/d63836ae/attachment.html>
More information about the parenscript-devel
mailing list