133 references to CaseKeyword
Microsoft.CodeAnalysis.CSharp (14)
Parser\LanguageParser.cs (9)
7988case SyntaxKind.CaseKeyword: // error recovery case. 8810case SyntaxKind.CaseKeyword: // for parsing an errant case without a switch. 9513if (this.CurrentToken.Kind is SyntaxKind.CaseKeyword or SyntaxKind.DefaultKeyword) 9516if (caseOrDefault.Kind == SyntaxKind.CaseKeyword) 9634Debug.Assert(this.CurrentToken.Kind is SyntaxKind.SwitchKeyword or SyntaxKind.CaseKeyword); 9659if (this.CurrentToken.Kind is SyntaxKind.CaseKeyword) 9704return this.CurrentToken.Kind == SyntaxKind.CaseKeyword || 9719if (this.CurrentToken.Kind == SyntaxKind.CaseKeyword) 10581case SyntaxKind.CaseKeyword:
Parser\LanguageParser_Patterns.cs (1)
587var errantCase = this.CurrentToken.Kind == SyntaxKind.CaseKeyword
Syntax\SyntaxFactory.cs (1)
2429return SyntaxFactory.CaseSwitchLabel(SyntaxFactory.Token(SyntaxKind.CaseKeyword), value, SyntaxFactory.Token(SyntaxKind.ColonToken));
Syntax\SyntaxKindFacts.cs (3)
817case SyntaxKind.CaseKeyword: 909return SyntaxKind.CaseKeyword; 1557case SyntaxKind.CaseKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
188(currentToken.Kind() == SyntaxKind.CaseKeyword || currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
732syntaxTree.IsAfterKeyword(position, SyntaxKind.CaseKeyword, cancellationToken) || 1378if (leftToken.Kind() is SyntaxKind.CaseKeyword or SyntaxKind.IsKeyword) 2062if (token.IsKind(SyntaxKind.CaseKeyword) && 2891if (tokenBeforeName.Kind() == SyntaxKind.CaseKeyword)
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\KeywordRecommenders\CaseKeywordRecommender.cs (1)
15: base(SyntaxKind.CaseKeyword)
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
74case SyntaxKind.CaseKeyword:
Highlighting\KeywordHighlighters\SwitchStatementHighlighter.cs (1)
28or SyntaxKind.CaseKeyword
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (105)
Generated\Syntax.Test.xml.Generated.cs (8)
431=> InternalSyntaxFactory.CasePatternSwitchLabel(InternalSyntaxFactory.Token(SyntaxKind.CaseKeyword), GenerateDiscardPattern(), null, InternalSyntaxFactory.Token(SyntaxKind.ColonToken)); 434=> InternalSyntaxFactory.CaseSwitchLabel(InternalSyntaxFactory.Token(SyntaxKind.CaseKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.ColonToken)); 2452Assert.Equal(SyntaxKind.CaseKeyword, node.Keyword.Kind); 2465Assert.Equal(SyntaxKind.CaseKeyword, node.Keyword.Kind); 10608=> SyntaxFactory.CasePatternSwitchLabel(SyntaxFactory.Token(SyntaxKind.CaseKeyword), GenerateDiscardPattern(), default(WhenClauseSyntax), SyntaxFactory.Token(SyntaxKind.ColonToken)); 10611=> SyntaxFactory.CaseSwitchLabel(SyntaxFactory.Token(SyntaxKind.CaseKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.ColonToken)); 12629Assert.Equal(SyntaxKind.CaseKeyword, node.Keyword.Kind()); 12642Assert.Equal(SyntaxKind.CaseKeyword, node.Keyword.Kind());
Parsing\DeconstructionTests.cs (2)
2831N(SyntaxKind.CaseKeyword); 2899N(SyntaxKind.CaseKeyword);
Parsing\ExpressionParsingTests.cs (3)
3963N(SyntaxKind.CaseKeyword); 4629N(SyntaxKind.CaseKeyword); 4855N(SyntaxKind.CaseKeyword);
Parsing\FunctionPointerTests.cs (2)
2566N(SyntaxKind.CaseKeyword); 2600N(SyntaxKind.CaseKeyword);
Parsing\NullableParsingTests.cs (5)
706N(SyntaxKind.CaseKeyword); 768N(SyntaxKind.CaseKeyword); 855N(SyntaxKind.CaseKeyword); 911N(SyntaxKind.CaseKeyword); 970N(SyntaxKind.CaseKeyword);
Parsing\PatternParsingTests.cs (54)
820N(SyntaxKind.CaseKeyword); 837N(SyntaxKind.CaseKeyword); 854N(SyntaxKind.CaseKeyword); 871N(SyntaxKind.CaseKeyword); 888N(SyntaxKind.CaseKeyword); 905N(SyntaxKind.CaseKeyword); 954N(SyntaxKind.CaseKeyword); 996N(SyntaxKind.CaseKeyword); 1472N(SyntaxKind.CaseKeyword); 1524N(SyntaxKind.CaseKeyword); 1592N(SyntaxKind.CaseKeyword); 1635N(SyntaxKind.CaseKeyword); 1686N(SyntaxKind.CaseKeyword); 1747N(SyntaxKind.CaseKeyword); 1797N(SyntaxKind.CaseKeyword); 1886N(SyntaxKind.CaseKeyword); 1974N(SyntaxKind.CaseKeyword); 2059N(SyntaxKind.CaseKeyword); 2186N(SyntaxKind.CaseKeyword); 2259N(SyntaxKind.CaseKeyword); 2308N(SyntaxKind.CaseKeyword); 2354N(SyntaxKind.CaseKeyword); 2405N(SyntaxKind.CaseKeyword); 2763N(SyntaxKind.CaseKeyword); 2830N(SyntaxKind.CaseKeyword); 2900N(SyntaxKind.CaseKeyword); 2951N(SyntaxKind.CaseKeyword); 3888N(SyntaxKind.CaseKeyword); 3959N(SyntaxKind.CaseKeyword); 4032N(SyntaxKind.CaseKeyword); 4103N(SyntaxKind.CaseKeyword); 4176N(SyntaxKind.CaseKeyword); 4263N(SyntaxKind.CaseKeyword); 5503N(SyntaxKind.CaseKeyword); 5539N(SyntaxKind.CaseKeyword); 5575N(SyntaxKind.CaseKeyword); 6595N(SyntaxKind.CaseKeyword); 6617N(SyntaxKind.CaseKeyword); 6643N(SyntaxKind.CaseKeyword); 6669N(SyntaxKind.CaseKeyword); 7097N(SyntaxKind.CaseKeyword); 7214N(SyntaxKind.CaseKeyword); 7276N(SyntaxKind.CaseKeyword); 7341N(SyntaxKind.CaseKeyword); 7398N(SyntaxKind.CaseKeyword); 11267N(SyntaxKind.CaseKeyword); 11321N(SyntaxKind.CaseKeyword); 11755N(SyntaxKind.CaseKeyword); 12190N(SyntaxKind.CaseKeyword); 12290N(SyntaxKind.CaseKeyword); 12391N(SyntaxKind.CaseKeyword); 12491N(SyntaxKind.CaseKeyword); 12605N(SyntaxKind.CaseKeyword); 12656N(SyntaxKind.CaseKeyword);
Parsing\StatementAttributeParsingTests.cs (1)
2483N(SyntaxKind.CaseKeyword);
Parsing\StatementParsingTests.cs (29)
1063Assert.Equal(SyntaxKind.CaseKeyword, gs.CaseOrDefaultKeyword.Kind()); 2163Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2199Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2210Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[1].Labels[0].Keyword.Kind()); 2279Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2285Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[1].Keyword.Kind()); 2321Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 4338N(SyntaxKind.CaseKeyword); 4502N(SyntaxKind.CaseKeyword); 4693N(SyntaxKind.CaseKeyword); 4800N(SyntaxKind.CaseKeyword); 4840N(SyntaxKind.CaseKeyword); 4927N(SyntaxKind.CaseKeyword); 4967N(SyntaxKind.CaseKeyword); 5060N(SyntaxKind.CaseKeyword); 5111N(SyntaxKind.CaseKeyword); 5203N(SyntaxKind.CaseKeyword); 5213N(SyntaxKind.CaseKeyword); 5270N(SyntaxKind.CaseKeyword); 5285N(SyntaxKind.CaseKeyword); 5353N(SyntaxKind.CaseKeyword); 5373N(SyntaxKind.CaseKeyword); 5448N(SyntaxKind.CaseKeyword); 5468N(SyntaxKind.CaseKeyword); 5514N(SyntaxKind.CaseKeyword); 5570N(SyntaxKind.CaseKeyword); 5626N(SyntaxKind.CaseKeyword); 5692N(SyntaxKind.CaseKeyword); 5762N(SyntaxKind.CaseKeyword);
Parsing\SwitchExpressionParsingTests.cs (1)
400N(SyntaxKind.CaseKeyword);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Classification\ClassificationHelpers.cs (1)
82case SyntaxKind.CaseKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
188(currentToken.Kind() == SyntaxKind.CaseKeyword || currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
732syntaxTree.IsAfterKeyword(position, SyntaxKind.CaseKeyword, cancellationToken) || 1378if (leftToken.Kind() is SyntaxKind.CaseKeyword or SyntaxKind.IsKeyword) 2062if (token.IsKind(SyntaxKind.CaseKeyword) && 2891if (tokenBeforeName.Kind() == SyntaxKind.CaseKeyword)