112 references to CaseKeyword
Microsoft.CodeAnalysis.CSharp (14)
Parser\LanguageParser.cs (9)
7413
case SyntaxKind.
CaseKeyword
: // error recovery case.
8234
case SyntaxKind.
CaseKeyword
: // for parsing an errant case without a switch.
8945
if (this.CurrentToken.Kind is SyntaxKind.
CaseKeyword
or SyntaxKind.DefaultKeyword)
8948
if (caseOrDefault.Kind == SyntaxKind.
CaseKeyword
)
9066
Debug.Assert(this.CurrentToken.Kind is SyntaxKind.SwitchKeyword or SyntaxKind.
CaseKeyword
);
9091
if (this.CurrentToken.Kind is SyntaxKind.
CaseKeyword
)
9136
return this.CurrentToken.Kind == SyntaxKind.
CaseKeyword
||
9151
if (this.CurrentToken.Kind == SyntaxKind.
CaseKeyword
)
9995
case SyntaxKind.
CaseKeyword
:
Parser\LanguageParser_Patterns.cs (1)
568
var errantCase = this.CurrentToken.Kind == SyntaxKind.
CaseKeyword
Syntax\SyntaxFactory.cs (1)
2417
return SyntaxFactory.CaseSwitchLabel(SyntaxFactory.Token(SyntaxKind.
CaseKeyword
), value, SyntaxFactory.Token(SyntaxKind.ColonToken));
Syntax\SyntaxKindFacts.cs (3)
789
case SyntaxKind.
CaseKeyword
:
881
return SyntaxKind.
CaseKeyword
;
1521
case SyntaxKind.
CaseKeyword
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
TokenBasedFormattingRule.cs (1)
186
(currentToken.Kind() == SyntaxKind.
CaseKeyword
|| currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (4)
730
syntaxTree.IsAfterKeyword(position, SyntaxKind.
CaseKeyword
, cancellationToken) ||
1370
if (leftToken.Kind() is SyntaxKind.
CaseKeyword
or SyntaxKind.IsKeyword)
2059
if (token.IsKind(SyntaxKind.
CaseKeyword
) &&
2895
if (tokenBeforeName.Kind() == SyntaxKind.
CaseKeyword
)
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\KeywordRecommenders\CaseKeywordRecommender.cs (1)
15
: base(SyntaxKind.
CaseKeyword
)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (86)
Generated\Syntax.Test.xml.Generated.cs (8)
422
=> InternalSyntaxFactory.CasePatternSwitchLabel(InternalSyntaxFactory.Token(SyntaxKind.
CaseKeyword
), GenerateDiscardPattern(), null, InternalSyntaxFactory.Token(SyntaxKind.ColonToken));
425
=> InternalSyntaxFactory.CaseSwitchLabel(InternalSyntaxFactory.Token(SyntaxKind.
CaseKeyword
), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.ColonToken));
2404
Assert.Equal(SyntaxKind.
CaseKeyword
, node.Keyword.Kind);
2417
Assert.Equal(SyntaxKind.
CaseKeyword
, node.Keyword.Kind);
10398
=> SyntaxFactory.CasePatternSwitchLabel(SyntaxFactory.Token(SyntaxKind.
CaseKeyword
), GenerateDiscardPattern(), default(WhenClauseSyntax), SyntaxFactory.Token(SyntaxKind.ColonToken));
10401
=> SyntaxFactory.CaseSwitchLabel(SyntaxFactory.Token(SyntaxKind.
CaseKeyword
), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.ColonToken));
12380
Assert.Equal(SyntaxKind.
CaseKeyword
, node.Keyword.Kind());
12393
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)
705
N(SyntaxKind.
CaseKeyword
);
767
N(SyntaxKind.
CaseKeyword
);
853
N(SyntaxKind.
CaseKeyword
);
909
N(SyntaxKind.
CaseKeyword
);
968
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
);
2198
N(SyntaxKind.
CaseKeyword
);
2271
N(SyntaxKind.
CaseKeyword
);
2320
N(SyntaxKind.
CaseKeyword
);
2366
N(SyntaxKind.
CaseKeyword
);
2417
N(SyntaxKind.
CaseKeyword
);
2796
N(SyntaxKind.
CaseKeyword
);
2869
N(SyntaxKind.
CaseKeyword
);
2939
N(SyntaxKind.
CaseKeyword
);
2990
N(SyntaxKind.
CaseKeyword
);
3927
N(SyntaxKind.
CaseKeyword
);
3998
N(SyntaxKind.
CaseKeyword
);
4071
N(SyntaxKind.
CaseKeyword
);
4142
N(SyntaxKind.
CaseKeyword
);
4215
N(SyntaxKind.
CaseKeyword
);
4302
N(SyntaxKind.
CaseKeyword
);
5542
N(SyntaxKind.
CaseKeyword
);
5578
N(SyntaxKind.
CaseKeyword
);
5614
N(SyntaxKind.
CaseKeyword
);
6634
N(SyntaxKind.
CaseKeyword
);
6656
N(SyntaxKind.
CaseKeyword
);
6682
N(SyntaxKind.
CaseKeyword
);
6708
N(SyntaxKind.
CaseKeyword
);
7136
N(SyntaxKind.
CaseKeyword
);
7253
N(SyntaxKind.
CaseKeyword
);
7315
N(SyntaxKind.
CaseKeyword
);
7380
N(SyntaxKind.
CaseKeyword
);
7437
N(SyntaxKind.
CaseKeyword
);
11306
N(SyntaxKind.
CaseKeyword
);
11360
N(SyntaxKind.
CaseKeyword
);
11794
N(SyntaxKind.
CaseKeyword
);
12229
N(SyntaxKind.
CaseKeyword
);
12329
N(SyntaxKind.
CaseKeyword
);
12430
N(SyntaxKind.
CaseKeyword
);
12530
N(SyntaxKind.
CaseKeyword
);
12644
N(SyntaxKind.
CaseKeyword
);
12695
N(SyntaxKind.
CaseKeyword
);
Parsing\StatementAttributeParsingTests.cs (1)
2482
N(SyntaxKind.
CaseKeyword
);
Parsing\StatementParsingTests.cs (10)
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());
4310
N(SyntaxKind.
CaseKeyword
);
4474
N(SyntaxKind.
CaseKeyword
);
4665
N(SyntaxKind.
CaseKeyword
);
Parsing\SwitchExpressionParsingTests.cs (1)
399
N(SyntaxKind.
CaseKeyword
);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Classification\ClassificationHelpers.cs (1)
82
case SyntaxKind.
CaseKeyword
:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (4)
730
syntaxTree.IsAfterKeyword(position, SyntaxKind.
CaseKeyword
, cancellationToken) ||
1370
if (leftToken.Kind() is SyntaxKind.
CaseKeyword
or SyntaxKind.IsKeyword)
2059
if (token.IsKind(SyntaxKind.
CaseKeyword
) &&
2895
if (tokenBeforeName.Kind() == SyntaxKind.
CaseKeyword
)
TokenBasedFormattingRule.cs (1)
186
(currentToken.Kind() == SyntaxKind.
CaseKeyword
|| currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword))