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

Async Functions for ES6 #3078

Merged
merged 46 commits into from
Jul 1, 2015
Merged

Async Functions for ES6 #3078

merged 46 commits into from
Jul 1, 2015

Conversation

rbuckton
Copy link
Member

@rbuckton rbuckton commented May 8, 2015

Adds support for async functions when targeting ES6 only.

}

function doOutsideOfContext<T>(context: ParserContextFlags, func: () => T): T {
let setContextFlags = context & contextFlags;
Copy link
Contributor

Choose a reason for hiding this comment

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

'setContextFlags' is not a great name (esp as we have a function call setContextFlag). Maybe 'newContextFlags'?

Copy link
Member Author

Choose a reason for hiding this comment

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

setContextFlags -> contextFlagsToClear
unsetContextFlags -> contextFlagsToSet

Copy link
Contributor

Choose a reason for hiding this comment

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

Great!

fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ !!node.asteriskToken, /*requireCompleteParameterList*/ false, node);
node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, Diagnostics.or_expected);
let isGenerator = !!node.asteriskToken;
let isAsync = isAsyncFunctionLike(node);
Copy link
Contributor

Choose a reason for hiding this comment

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

same here.

@mhegazy mhegazy mentioned this pull request Jun 19, 2015
rbuckton added a commit that referenced this pull request Jul 1, 2015
@rbuckton rbuckton merged commit b2a871d into master Jul 1, 2015
@rbuckton rbuckton deleted the asyncFunctions branch July 1, 2015 16:51
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
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.

9 participants