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

Classify 'await' as a control keyword #75782

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Fixes #40741

Can skip second commit.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner November 6, 2024 04:27
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 6, 2024
@@ -16,7 +16,7 @@

Copy link
Member Author

Choose a reason for hiding this comment

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

view with whitespace off.

var actualFormatted = actualOrdered.Select(a => new FormattedClassification(allCode.Substring(a.TextSpan.Start, a.TextSpan.Length), a.ClassificationType));
AssertEx.Equal(expected, actualFormatted);
var actualFormatted = actualOrdered.SelectAsArray(a => new FormattedClassification(allCode.Substring(a.TextSpan.Start, a.TextSpan.Length), a.ClassificationType));
AssertEx.Equal(expected.ToImmutableArray(), actualFormatted);
Copy link
Member Author

Choose a reason for hiding this comment

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

this improves the diff view as the immutablearray overload produces a better diff.

case SyntaxKind.DoKeyword:
case SyntaxKind.SwitchKeyword:
case SyntaxKind.AwaitKeyword:
case SyntaxKind.BreakKeyword:
Copy link
Member Author

Choose a reason for hiding this comment

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

sorted just for clarity. the only other hcange is adding the .AwaitKeyword entry.

case SyntaxKind.SwitchStatement:
case SyntaxKind.SwitchSection:
case SyntaxKind.CaseSwitchLabel:
case SyntaxKind.AwaitExpression:
case SyntaxKind.CasePatternSwitchLabel:
Copy link
Member Author

Choose a reason for hiding this comment

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

sorted for clarity. the only other change was adding .AwaitExpression

@CyrusNajmabadi CyrusNajmabadi merged commit 6bf9911 into dotnet:main Nov 6, 2024
25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the awaitClassification branch November 6, 2024 13:58
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 6, 2024
@jjonescz jjonescz modified the milestones: Next, 17.13 P2 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style await with Keyword - Control Category
3 participants