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