Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Parsing error under certain scenarios when using async as shorthand property in literal #186

Closed
DrewML opened this issue Oct 16, 2016 · 1 comment

Comments

@DrewML
Copy link
Member

DrewML commented Oct 16, 2016

Originally reported by @Blesh in babel/babel#4384 - opening an issue here because it looks like a Babylon bug.

Test Case

babylon.parse('var foo = {async, bar}') // SyntaxError: Unexpected token (1:16)

As pointed out by Ben, this failure doesn't happen in some other situations

Working examples

babylon.parse('var foo = {async}')
babylon.parse('var foo = {bar, async}')
babylon.parse('var foo = {async: async, bar}')
@DrewML
Copy link
Member Author

DrewML commented Oct 16, 2016

I have this fixed locally. PR coming soon, once I figure out the issue I am having with adding a new test case.

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

No branches or pull requests

1 participant