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

Highlight await and return in top-level statements #60401

Merged

Conversation

DoctorKrolic
Copy link
Contributor

Fixes: #60400

@DoctorKrolic DoctorKrolic requested a review from a team as a code owner March 26, 2022 11:30
@ghost ghost added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Mar 26, 2022
@DoctorKrolic DoctorKrolic changed the title Highlight await in top-level statements Highlight await in top-level statements Mar 26, 2022
Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Does return get highlighted correctly?

Should IsReturnableConstruct be updated instead? This will require reviewing all its usages, so I don't feel strongly about it.

@DoctorKrolic
Copy link
Contributor Author

Does return get highlighted correctly?

Why do you ask about return in context of async-await? Is there some kind of connection between them or what?

Should IsReturnableConstruct be updated instead?

I don't think so. IsReturnableConstruct, as you said, is used in other places and in general it is just a simple SyntaxKind filter, while here a bit more complex logic is performed

@Youssef1313
Copy link
Member

Why do you ask about return in context of async-await? Is there some kind of connection between them or what?

Just that we fix two bugs together :)

@DoctorKrolic DoctorKrolic changed the title Highlight await in top-level statements Highlight await and return in top-level statements Mar 26, 2022
@davidwengier
Copy link
Contributor

Thanks for the contribution!

@davidwengier davidwengier merged commit 2aed89b into dotnet:main Mar 28, 2022
@ghost ghost added this to the Next milestone Mar 28, 2022
@DoctorKrolic DoctorKrolic deleted the highlight-await-in-top-level-statements branch March 28, 2022 13:57
@allisonchou allisonchou modified the milestones: Next, 17.2.P3 Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

await is not highlighted in top-level statements when clicked
4 participants