Skip to content
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

Add ECMAScript version filter #7

Closed
nzakas opened this issue Dec 13, 2014 · 0 comments
Closed

Add ECMAScript version filter #7

nzakas opened this issue Dec 13, 2014 · 0 comments

Comments

@nzakas
Copy link
Member

nzakas commented Dec 13, 2014

This feature allows an extra ecmascript option to be passed to the parse() method. This determines the syntax will be accepted by the parser. The default is all syntax (similar to Esprima) and the valid values are currently 5 and 6.

To test, it's easiest to use let and const. Espree already parses them but technically these are not allowed in ECMAScript 5. So when ecmascript is 5, using let and const should throw an error.

@nzakas nzakas closed this as completed in 9e6c48b Dec 13, 2014
nzakas added a commit that referenced this issue Dec 13, 2014
New: Add ecmascript flag (fixes #7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant