-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Classify 'await' as a control keyword #75782
Conversation
@@ -16,7 +16,7 @@ | |||
|
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
Fixes #40741
Can skip second commit.