Closed
Bug 461122
Opened 16 years ago
Closed 16 years ago
Improve handling of future reserved words
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hannesw, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
2.33 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3 Build Identifier: Rhino currently defaults to disallow future reserved words (ECMAScript 7.5.3) as identifiers. It seems all browser JS engines including spidermonkey allow these words to be used. Rhino has a FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER which is false by default, and prints a warning message when this feature is set to true and a future reserved word is encountered. I propose to set the default value for FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER to true and remove the warning. Reproducible: Always
Reporter | ||
Comment 1•16 years ago
|
||
Sets the default value for Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER to true. Also treat "export" and "import" as ordinary reserved words instead of actual keywords. They are listed as such in the ECMAScript spec, only spidermonkey uses them as actual keywords, but Rhino doesn't implement that feature.
Reporter | ||
Comment 2•16 years ago
|
||
Changing summary to "Improve handling of future reserved words" as I'll leave the default value for FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER as false for now, but will commit the other changes.
Summary: Change default to allow future reserved words → Improve handling of future reserved words
Reporter | ||
Comment 3•16 years ago
|
||
updated patch to changes in CVS, leave default value for Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER as false.
Attachment #344257 -
Attachment is obsolete: true
Reporter | ||
Comment 4•16 years ago
|
||
Committed to CVS HEAD: Checking in src/org/mozilla/javascript/Node.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Node.java,v <-- Node.java new revision: 1.78; previous revision: 1.77 done Checking in src/org/mozilla/javascript/TokenStream.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/TokenStream.java,v <-- TokenStream.java new revision: 1.74; previous revision: 1.73 done
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•