-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put old ES3 reserved words behind a flag #93
Comments
This is also needed so Rhino does not die when running QUnit tests that use |
It also make it impossible to do Ember.js precompilation in Rhino. Ember uses the volatile keyword which is ES3 |
This is a problem; it makes it impossible to unit test Ember applications using EnvJasmine. |
Closing as this works now in Rhino, at least with Context.VERSION_ES6 as language level:
|
Rhino currently chokes on this code that contains an ES3 reserved word.
Java keywords that aren't used in JavaScript are not reserved anymore, as of ES5:
http://ecma-international.org/ecma-262/5.1/#sec-7.6.1
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words
For this reason, I think that the JS tokenizer should only choke on ES3 reserved words when a flag is set. (or, even better, not at all)
The relevant code seems to be here:
https://github.com/mozilla/rhino/blob/master/src/org/mozilla/javascript/TokenStream.java#L135
Once that is fixed, the map below should probably be re-generated.
https://github.com/mozilla/rhino/blob/master/src/org/mozilla/javascript/TokenStream.java#L153
The text was updated successfully, but these errors were encountered: