[parenscript-devel] A class of bugs in PS: expressions not parenthesized when necessary
tc at travislists.com
Sun Nov 16 15:05:51 UTC 2008
Travis Cross wrote:
>> and here again:
>> (ps (- (if x y z)))
>> => "-x ? y : z;"
This now returns:
=> -(x ? y : z);
I pushed a minor overhaul of operator handling. The old code was badly
broken, particularly with regard to unary operators and named operators.
Some things that now work correctly:
(ps (new (or a b)))
(ps (delete (if a (or b c) d)))
(ps (! (if (or x (! y)) z)))
(ps (- (- (* 1 2) 3)))
(ps (instanceof (or a b) (if x y z)))
(ps (doeach (x (or a b))))
Any error of expression precedence in PS output is a bug. Please let us
know if there are any unsolved cases that you can find.
More information about the parenscript-devel