While writing additional tests during the process of reviewing bug 750388, I found that we failed a set of tests that I wrote. The patch was trivial -- a missing UngetToken() call that is needed because the incorrect token might be a parenthesis, bracket, or brace, and predates bug 750388.
Created attachment 754651 [details] [diff] [review] Add missing UngetToken() call in an+b microsyntax parsing.
Attachment #754651 - Flags: review?(bzbarsky)
Comment on attachment 754651 [details] [diff] [review] Add missing UngetToken() call in an+b microsyntax parsing. Shouldn't the UngetToken happen after the REPORT_UNEXPECTED_TOKEN? r=me with that or with a comment explaining the nonintuitive ordering in this case.
Attachment #754651 - Flags: review?(bzbarsky) → review+
From a behavior perspective it doesn't matter, since UngetToken just sets mHavePushBack and doesn't actually change mToken. But you're right that it makes more sense that way (and most but not all of the existing occurrences of this pattern seem to be in that order).
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.