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

Support async iteration statement for-await-of introduced in ES2018 #372

Merged
merged 1 commit into from
May 21, 2018

Conversation

twada
Copy link
Member

@twada twada commented May 10, 2018

Generates for-await-of statement using await property of ForOfStatement.

async function f() {
    for await (const x of ait) {
        console.log(x);
    }
}

refs: https://tc39.github.io/proposal-async-iteration/
refs: https://github.com/tc39/proposal-async-iteration#the-async-iteration-statement-for-await-of
refs: estree/estree#185

@twada
Copy link
Member Author

twada commented May 15, 2018

@michaelficarra Would you review this pull-req?

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll wait until estree/estree#185 is merged before committing to this AST structure.

@michaelficarra michaelficarra merged commit d3b88db into estools:master May 21, 2018
@twada
Copy link
Member Author

twada commented Jun 7, 2018

@michaelficarra Thank you for merging this. Would you cut a new (maybe a minor) release?

@michaelficarra
Copy link
Member

@twada Published 1.10.0: df61463

@twada
Copy link
Member Author

twada commented Jun 12, 2018

@michaelficarra Thanks!

@twada twada deleted the es2018-for-await-of branch June 12, 2018 01:51
@sanex3339
Copy link
Contributor

Hi. With compact: true escodegen produced wrong code:

forawait

instead of

for await

@sanex3339
Copy link
Contributor

Fix:
#402

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

Successfully merging this pull request may close these issues.

3 participants