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

Can't parse es2017 and later #12

Open
falsandtru opened this issue Apr 29, 2018 · 4 comments
Open

Can't parse es2017 and later #12

falsandtru opened this issue Apr 29, 2018 · 4 comments

Comments

@falsandtru
Copy link

Acorn targets es2016 by default, not es2017 or later. You have to specify the version.

https://github.com/acornjs/acorn#main-parser

@falsandtru falsandtru changed the title Can't parse es2017 Can't parse es2017 and later Apr 29, 2018
@twada
Copy link
Member

twada commented May 9, 2018

@falsandtru Sorry for my late response. I'll take a look.

To give you a quick fix, could you tell me what transpiler-side product are you using?

  • unassertify
  • babel-plugin-unassert
  • webpack-unassert-loader
  • gulp-unassert
  • unassert-cli

I'll fix it first.

@falsandtru
Copy link
Author

I'm using gulp-unassert.

@twada
Copy link
Member

twada commented May 10, 2018

While tackling with this issue, I've found that escodegen cannot generate for-await-of statement so I made a PR to fix. Please wait for a moment.

refs: Support async iteration statement for-await-of introduced in ES2018

@falsandtru
Copy link
Author

Now gulp-unassert can work with es2018, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants