Looks good. Applied to SVN. Revision 4334. Thank you for your on-going support.
Cheers, Sebastian Alessandro Sala schrieb: > Hi sebastian, > > I think I've found another bug, this time in treegenerator.py: when > an expression starts with a pre-increment or pre-decrement operator > and begins on a new line, soon after a loop or a block, the > treegenerator produces the wrong tree, making the treecompiler > produce wrong code (it transforms the prefix operator into a postfix > one applied to the preceding block). > > For example: > > while (a) > a -= 1; > > ++a; > > > becomes: > > while(a)a-=1++;a; > > The problem lies in the fact that ++ and -- can be either left or > right unary operators but they are right unary operators only if they > are not preceded by end-of-line (see ECMAScript grammar > [http://www.mozilla.org/js/language/E262-3.pdf] on page 54): the > treegenerator, after reading a loop, simply checks for the next token > to be in SINGLE_RIGHT_OPERATORS and finds it, while in this case it > really should be a SINGLE_LEFT_OPERATORS. > > So I'm attaching a patch against 0.6.1 for you to apply, if you > like it: it traces if a token was immediately preceded by an eol > and, if so, it ignores SINGLE_RIGHT_OPERATORS. > > Cheers, > Alessandro > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
