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

Update: Upgrade Acorn to support ES2017 (fixes #287) #290

Merged
merged 1 commit into from Sep 15, 2016
Merged

Conversation

xjamundx
Copy link
Contributor

@xjamundx xjamundx commented Sep 14, 2016

This PR adds support for ecmaVersion: 8 to espree by using the latest acorn.

The main requested new feature here is support for async and await.

I copied all of the test cases from the acorn test suite here (there are piles of them):
https://github.com/ternjs/acorn/blob/master/test/tests-asyncawait.js

Still needs rebasing, etc.

@jquerybot
Copy link

Thank you for your pull request. It looks like this may be your first contribution to a jQuery Foundation project, if so we need you to sign our Contributor License Agreement (CLA).

📝 Please visit http://contribute.jquery.org/CLA/ to sign.

After you signed, the PR is checked again automatically after a minute. If there's still an issue, please reply here to let us know.


If you've already signed our CLA, it's possible your git author information doesn't match your CLA signature (both your name and email have to match), for more information, check the status of your CLA check.

@nzakas
Copy link
Member

nzakas commented Sep 14, 2016

Can you add some tests for trailing commas in function arguments too?

function foo(a, b,) {}

var foo = function(a, b,) {};

var foo = (a, b,) => {};

foo(a, b,);

@xjamundx
Copy link
Contributor Author

Certainly!

@xjamundx
Copy link
Contributor Author

Added comma-dangle tests

@xjamundx
Copy link
Contributor Author

Hold on, some issues with the tests. 1 sec.

@xjamundx
Copy link
Contributor Author

K tests are in. Turns out your tests should default to script for the sourceType isntead of module. Should have realized.

@xjamundx
Copy link
Contributor Author

Oh and I need to fix my github author. Used my paypal account...

@xjamundx
Copy link
Contributor Author

Just squashed it into your orgiinal commit if that's alright.

@mysticatea
Copy link
Member

Wow, amazing, near 20K lines 😮

@xjamundx
Copy link
Contributor Author

Lol @mysticatea it's just the generated tests. New code is like 10 lines.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Awesome stuff!

@nzakas nzakas merged commit 9bbcad8 into master Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants