This repository has been archived by the owner. 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

Projects
None yet
3 participants
@zenparsing
Copy link
Contributor

zenparsing commented Apr 5, 2016

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!

@kittens kittens merged commit b926e40 into babel:master Apr 5, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kittens

This comment has been minimized.

Copy link
Contributor

kittens commented Apr 5, 2016

Awesome, thank you!

@hzoo

This comment has been minimized.

This file isn't necessary right? expected.json but the options throw an error?

cc @zenparsing

This comment has been minimized.

Copy link
Contributor

zenparsing replied May 3, 2016

Correct.

@hzoo hzoo referenced this pull request Nov 8, 2016

Merged

Create async-iteration.md #138

@hzoo hzoo referenced this pull request Feb 7, 2017

Closed

[7.0] Change ForAwaitStatement node type to match ESTree #348

0 of 6 tasks complete

@danez danez referenced this pull request Feb 9, 2017

Closed

[7.0] Change ForAwaitStatement node type to match ESTree #5286

0 of 7 tasks complete
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.