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

Parse for-await statements when asyncGenerators plugin is active #17

Merged
merged 1 commit into from
Apr 5, 2016

Conversation

zenparsing
Copy link
Contributor

Per March 2016 TC39 meeting, async generators and for-await are now at stage 2. Babylon already supports parsing of async generator functions. This commit adds support for for-await statements.

For-await statements look like this:

async function f() {
  for await (let x of y);
}

I've chosen to output a new node type: "ForAwaitStatement". Another approach would be to output a "ForOfStatement" with an "await" property set to true.

Thanks!

@sebmck sebmck merged commit b926e40 into babel:master Apr 5, 2016
@sebmck
Copy link
Contributor

sebmck commented Apr 5, 2016

Awesome, thank you!

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

Successfully merging this pull request may close these issues.

3 participants