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

fix: check await when parsing AsyncArrowBindingIdentifier #10953

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jan 2, 2020

Q                       A
Fixed Issues? When parsing AsyncArrowBindingIdentifier, we should check if it is await.
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
License MIT

When parsing

async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] =>
  AsyncConciseBody[?In],

the await check is missing so babel does not throw on async await => {}, this PR adds the context manipulation step also used in parseParenAndDistinguishExpression.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser labels Jan 2, 2020
@nicolo-ribaudo nicolo-ribaudo added PR: Spec Compliance 👓 A type of pull request used for our changelog categories and removed PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Jan 2, 2020
@nicolo-ribaudo nicolo-ribaudo merged commit a283537 into babel:master Jan 3, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the fix-async-arrow-binding-identifier branch January 3, 2020 22:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants