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

trailing comma in object should throw an error when parsing ecmaVersion 3 #866

Closed
LongTengDao opened this issue Aug 20, 2019 · 2 comments
Closed

Comments

@LongTengDao
Copy link
Contributor

LongTengDao commented Aug 20, 2019

({ k: 'v', })

This should be an error in ES 3.

Is this an oversight? Or the acorn was designed not so restrictive about version?

@marijnh
Copy link
Member

marijnh commented Aug 21, 2019

That would be an oversight—we do aim to not accept code when an engine targeting the given language version wouldn't support it. Want to submit a pull request to fix this?

@LongTengDao
Copy link
Contributor Author

@marijnh I'm not familar enough with acorn source, so I can only fix bugs with thrown error stack when shouldn't, but can't figure out where an error should be thrown but not...

Thank you for your trust and giving me chance to fix that, XD

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