Closed
Bug 974368
Opened 10 years ago
Closed 10 years ago
Fix ! operator precedence in manifestparser's expression parser
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla30
People
(Reporter: ted, Assigned: ted)
Details
Attachments
(1 file)
2.55 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
I found a stupid bug in manifestparser's ExpressionParser, the precedence of the ! operator is broken: >>> import manifestparser >>> manifestparser.parse("!true || true") False >>> manifestparser.parse("true || !true") True >>> manifestparser.parse("false || true") True Turns out it's a 1-line fix, I missed a point in the original article I was using for reference: http://effbot.org/zone/simple-top-down-parsing.htm Search for "To support the unary operators" for an explanation.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8378266 -
Flags: review?(jmaher)
Comment 2•10 years ago
|
||
Comment on attachment 8378266 [details] [diff] [review] Fix ! operator precedence in manifestparser's expression parser Review of attachment 8378266 [details] [diff] [review]: ----------------------------------------------------------------- thanks for the fix and the tests!!
Attachment #8378266 -
Flags: review?(jmaher) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/758c586cde7a
https://hg.mozilla.org/mozilla-central/rev/758c586cde7a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•