Add F1 help keyword for default constraint#65229
Conversation
CyrusNajmabadi
left a comment
There was a problem hiding this comment.
yup yup , that's it.
I opened dotnet/docs#32184 to do that. |
| if (token.Parent is DefaultSwitchLabelSyntax) | ||
| { | ||
| text = Keyword("defaultcase"); | ||
| return true; | ||
| } | ||
|
|
||
| if (token.Parent is DefaultConstraintSyntax) | ||
| { | ||
| text = Keyword("defaultconstraint"); | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Consider handling goto default (not sure which doc page is suitable).
Also #line default
There was a problem hiding this comment.
Thanks for the suggestions. Added
I'll let @BillWagner decide, but for goto default we could always go to the page for switch and for #line default we could go to the section for #line preprocessing directive.
There was a problem hiding this comment.
we could go to the section
We can't go to a specific section, unfortunately.
But I'll update the page on dotnet/docs to have the new F1 keyword. Edit: Opened dotnet/docs#32197
|
|
||
| if (token.Parent is DefaultSwitchLabelSyntax or GotoStatementSyntax) | ||
| { | ||
| text = Keyword("defaultcase"); |
There was a problem hiding this comment.
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 goto default there, but I opened dotnet/docs#32196
| if (token.Parent is DefaultSwitchLabelSyntax) | ||
| { | ||
| text = Keyword("defaultcase"); | ||
| return true; | ||
| } | ||
|
|
There was a problem hiding this comment.
Duplicated below
| if (token.Parent is DefaultSwitchLabelSyntax) | |
| { | |
| text = Keyword("defaultcase"); | |
| return true; | |
| } |
| if (token.Parent is LineDirectiveTriviaSyntax) | ||
| { | ||
| text = Keyword("defaultline"); | ||
| return true; | ||
| } |
There was a problem hiding this comment.
@BillWagner Where should this go? The proposal? Or is there any conceptual doc for it? Just saw #65229 (comment)
|
@CyrusNajmabadi Made a couple additions since your review. Could you take another look? |
|
thanks! |
Fixes #65210
@CyrusNajmabadi I'm not familiar with F1 help. I just picked a keyword "defaultconstraint" that seems aligned with existing keywords. If I understood correctly, we can ping Bill to add that keyword and point it appropriately?