Ticket #48 (closed bug: fixed)

Opened 10 years ago

Last modified 10 years ago

py2js parentheses bug

Reported by: Hemml Owned by: apoirier
Priority: critical Component: uncategorized
Version: Keywords: py2js


in if-statements some parentheses can be lost.
This code:

if a==b or (c==d and d==e):


translates to:

if ((a == b)
(c == d) && (d == e)) {



but must be translated to:

if ((a == b)
((c == d) && (d == e))) {



Change History

comment:1 Changed 10 years ago by apoirier

  • Status changed from new to closed
  • Resolution set to fixed

(In [5bced6e5760a46904dc6a4595455069c3e4e9d10]) Fixes #48.
Boolean expressions parenthesis handling backported from the lastest version of pyjs.

Note: See TracTickets for help on using tickets.