Closed
Bug 423706
Opened 18 years ago
Closed 18 years ago
Parser generates ListExpr in many cases when it shouldn't
Categories
(Tamarin Graveyard :: Self-hosting compiler (ESC), defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: lhansen, Assigned: lhansen)
Details
Attachments
(1 file)
|
19.52 KB,
patch
|
jodyer
:
review+
|
Details | Diff | Splinter Review |
This returns false as it should:
delete Boolean.prototype
This returns true:
delete (Boolean.prototype)
| Assignee | ||
Comment 1•18 years ago
|
||
This is an instance of a general parser bug wherein the parser returns Ast::ListExpr nodes far too often. The grammar production in question is ListExpression, but this production is overloaded to be used both on function parameters and on comma expressions. The latter cases should (probably) be rewritten to use a CommaExpression production which produces a simple expression if there's only one and Ast::Comma(x,y) otherwise. Note, this may cause some wrinkles in cogen which depends on Ast::ListExpr in a couple of places.
| Assignee | ||
Comment 2•18 years ago
|
||
Also a problem for "typeof (x)" for the same reason.
| Assignee | ||
Updated•18 years ago
|
Summary: delete operator is wonky → Parser generates ListExpr in many cases when it shouldn't
| Assignee | ||
Comment 3•18 years ago
|
||
Removes ListExpr from ESC, substitutes CommaExpr and cleans up some hacks that were necessary to support ListExpr previously.
Attachment #311190 -
Flags: review?(jodyer)
Comment on attachment 311190 [details] [diff] [review]
Patch
This matches my updated grammar with one difference being is renamed parenListExpression to parenExpression rather than parenCommaExpression
Attachment #311190 -
Flags: review?(jodyer) → review+
| Assignee | ||
Comment 5•18 years ago
|
||
Changeset 485:ca35d6ab0083
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 6•18 years ago
|
||
Was never pushed, new changeset 492:9068d6de7549
You need to log in
before you can comment on or make changes to this bug.
Description
•