Closed
Bug 306268
Opened 19 years ago
Closed 19 years ago
Decompilation of E4X dot query is broken
Categories
(Rhino Graveyard :: E4X, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
Details
Attachments
(1 file)
1.91 KB,
patch
|
Details | Diff | Splinter Review |
Patches from Olinda Spider (pat@mcnerthney.com):
Here is another patch that fixes the displayed, decompiled output of
the E4X dot query operator. It was missing the terminating right
parathesis.
--- rhino1_6R2pre-org/src/org/mozilla/javascript/Parser.java
+++ rhino1_6R2pre-new/src/org/mozilla/javascript/Parser.java
@@ -1702,6 +1702,7 @@
decompiler.addToken(Token.DOTQUERY);
pn = nf.createDotQuery(pn, expr(false),
ts.getLineno());
mustMatchToken(Token.RP, "msg.no.paren");
+ decompiler.addToken(Token.RP);
break;
case Token.LB:
Here is another patch that fixes the displayed, decompiled output of
the E4X dot query operator. It was missing the terminating right
parathesis.
--- rhino1_6R2pre-org/src/org/mozilla/javascript/Parser.java
+++ rhino1_6R2pre-new/src/org/mozilla/javascript/Parser.java
@@ -1702,6 +1702,7 @@
decompiler.addToken(Token.DOTQUERY);
pn = nf.createDotQuery(pn, expr(false),
ts.getLineno());
mustMatchToken(Token.RP, "msg.no.paren");
+ decompiler.addToken(Token.RP);
break;
case Token.LB:
Assignee | ||
Comment 1•19 years ago
|
||
(In reply to comment #0)
> Patches from Olinda Spider (pat@mcnerthney.com):
Wrong cut and paste, the fkirst patch was:
--- rhino1_6R2pre-org/src/org/mozilla/javascript/Decompiler.java
+++ rhino1_6R2pre-new/src/org/mozilla/javascript/Decompiler.java
@@ -783,6 +783,10 @@
result.append("..");
break;
+ case Token.DOTQUERY:
+ result.append(".(");
+ break;
+
case Token.XMLATTR:
result.append('@');
break;
Assignee | ||
Comment 2•19 years ago
|
||
Assignee | ||
Comment 3•19 years ago
|
||
I committed the fix
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•