-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add F1 help keyword for default constraint
#65229
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -451,10 +451,31 @@ private static bool TryGetTextForKeyword(SyntaxToken token, [NotNullWhen(true)] | |
| } | ||
| } | ||
|
|
||
| if (token.IsKind(SyntaxKind.DefaultKeyword) && token.Parent is DefaultSwitchLabelSyntax) | ||
| if (token.IsKind(SyntaxKind.DefaultKeyword)) | ||
| { | ||
| text = Keyword("defaultcase"); | ||
| return true; | ||
| if (token.Parent is DefaultSwitchLabelSyntax) | ||
| { | ||
| text = Keyword("defaultcase"); | ||
| return true; | ||
| } | ||
|
|
||
| if (token.Parent is DefaultConstraintSyntax) | ||
| { | ||
| text = Keyword("defaultconstraint"); | ||
| return true; | ||
| } | ||
|
||
|
|
||
| if (token.Parent is DefaultSwitchLabelSyntax or GotoStatementSyntax) | ||
| { | ||
| text = Keyword("defaultcase"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will redirect to https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/selection-statements Currently there doesn't seem to be anything about |
||
| return true; | ||
| } | ||
|
|
||
| if (token.Parent is LineDirectiveTriviaSyntax) | ||
| { | ||
| text = Keyword("defaultline"); | ||
| return true; | ||
| } | ||
|
Comment on lines
+468
to
+472
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
|
|
||
| if (token.IsKind(SyntaxKind.ClassKeyword) && token.Parent is ClassOrStructConstraintSyntax) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Duplicated below