279 references to IsKeyword
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder_Operators.cs (1)
3177
Error(diagnostics, ErrorCode.ERR_BadUnaryOp, node, SyntaxFacts.GetText(SyntaxKind.
IsKeyword
), operand.Display);
Parser\LanguageParser.cs (3)
3921
if (!(opKind == SyntaxKind.
IsKeyword
||
5959
case SyntaxKind.
IsKeyword
: // e.g. `e is A<B> is bool`
12637
case SyntaxKind.
IsKeyword
:
Syntax\SyntaxKindFacts.cs (3)
623
case SyntaxKind.
IsKeyword
:
971
return SyntaxKind.
IsKeyword
;
1619
case SyntaxKind.
IsKeyword
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
48
public static readonly SyntaxToken IsKeyword = Token(SyntaxKind.
IsKeyword
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
339
if (currentKind == SyntaxKind.
IsKeyword
||
343
previousKind == SyntaxKind.
IsKeyword
||
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
1384
if (leftToken.Kind() is SyntaxKind.CaseKeyword or SyntaxKind.
IsKeyword
)
1526
binaryExpressionSyntax.OperatorToken.IsKind(SyntaxKind.
IsKeyword
) &&
1919
if (token.Kind() is SyntaxKind.
IsKeyword
or SyntaxKind.AsKeyword)
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\KeywordRecommenders\IsKeywordRecommender.cs (1)
13
: base(SyntaxKind.
IsKeyword
)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (258)
Generated\Syntax.Test.xml.Generated.cs (4)
269
=> InternalSyntaxFactory.IsPatternExpression(GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.
IsKeyword
), GenerateDiscardPattern());
1762
Assert.Equal(SyntaxKind.
IsKeyword
, node.IsKeyword.Kind);
10485
=> SyntaxFactory.IsPatternExpression(GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.
IsKeyword
), GenerateDiscardPattern());
11978
Assert.Equal(SyntaxKind.
IsKeyword
, node.IsKeyword.Kind());
Parsing\AsyncParsingTests.cs (4)
2664
N(SyntaxKind.
IsKeyword
);
2706
N(SyntaxKind.
IsKeyword
);
2755
N(SyntaxKind.
IsKeyword
);
2802
N(SyntaxKind.
IsKeyword
);
Parsing\AwaitParsingTests.cs (11)
1164
N(SyntaxKind.
IsKeyword
);
1201
N(SyntaxKind.
IsKeyword
);
1254
N(SyntaxKind.
IsKeyword
);
1307
N(SyntaxKind.
IsKeyword
);
1389
N(SyntaxKind.
IsKeyword
);
1469
N(SyntaxKind.
IsKeyword
);
1548
N(SyntaxKind.
IsKeyword
);
1639
N(SyntaxKind.
IsKeyword
);
1706
N(SyntaxKind.
IsKeyword
);
1760
N(SyntaxKind.
IsKeyword
);
1801
N(SyntaxKind.
IsKeyword
);
Parsing\CollectionExpressionParsingTests.cs (8)
1150
N(SyntaxKind.
IsKeyword
);
18132
N(SyntaxKind.
IsKeyword
);
18216
N(SyntaxKind.
IsKeyword
);
18275
N(SyntaxKind.
IsKeyword
);
18330
N(SyntaxKind.
IsKeyword
);
18390
N(SyntaxKind.
IsKeyword
);
18456
N(SyntaxKind.
IsKeyword
);
18533
N(SyntaxKind.
IsKeyword
);
Parsing\DeclarationExpressionTests.cs (7)
75
N(SyntaxKind.
IsKeyword
);
111
N(SyntaxKind.
IsKeyword
);
153
N(SyntaxKind.
IsKeyword
);
197
N(SyntaxKind.
IsKeyword
);
240
N(SyntaxKind.
IsKeyword
);
304
N(SyntaxKind.
IsKeyword
);
370
N(SyntaxKind.
IsKeyword
);
Parsing\DeconstructionTests.cs (2)
2706
N(SyntaxKind.
IsKeyword
);
2768
N(SyntaxKind.
IsKeyword
);
Parsing\ExpressionParsingTests.cs (8)
661
TestBinary(SyntaxKind.
IsKeyword
);
4149
N(SyntaxKind.
IsKeyword
);
4243
N(SyntaxKind.
IsKeyword
);
4342
N(SyntaxKind.
IsKeyword
);
4447
N(SyntaxKind.
IsKeyword
);
6840
N(SyntaxKind.
IsKeyword
);
6894
N(SyntaxKind.
IsKeyword
);
6975
N(SyntaxKind.
IsKeyword
);
Parsing\FunctionPointerTests.cs (2)
2480
N(SyntaxKind.
IsKeyword
);
2512
N(SyntaxKind.
IsKeyword
);
Parsing\LambdaAttributeParsingTests.cs (7)
1422
N(SyntaxKind.
IsKeyword
);
2173
N(SyntaxKind.
IsKeyword
);
2222
N(SyntaxKind.
IsKeyword
);
2274
N(SyntaxKind.
IsKeyword
);
2336
N(SyntaxKind.
IsKeyword
);
2398
N(SyntaxKind.
IsKeyword
);
2465
N(SyntaxKind.
IsKeyword
);
Parsing\LambdaReturnTypeParsingTests.cs (1)
4697
N(SyntaxKind.
IsKeyword
);
Parsing\NameParsingTests.cs (1)
1450
N(SyntaxKind.
IsKeyword
);
Parsing\NullableParsingTests.cs (16)
344
N(SyntaxKind.
IsKeyword
);
376
N(SyntaxKind.
IsKeyword
);
412
N(SyntaxKind.
IsKeyword
);
456
N(SyntaxKind.
IsKeyword
);
1800
N(SyntaxKind.
IsKeyword
);
1836
N(SyntaxKind.
IsKeyword
);
1870
N(SyntaxKind.
IsKeyword
);
1912
N(SyntaxKind.
IsKeyword
);
1962
N(SyntaxKind.
IsKeyword
);
2001
N(SyntaxKind.
IsKeyword
);
2052
N(SyntaxKind.
IsKeyword
);
2108
N(SyntaxKind.
IsKeyword
);
2162
N(SyntaxKind.
IsKeyword
);
2237
N(SyntaxKind.
IsKeyword
);
2285
N(SyntaxKind.
IsKeyword
);
2331
N(SyntaxKind.
IsKeyword
);
Parsing\PatternParsingTests.cs (107)
236
N(SyntaxKind.
IsKeyword
);
369
N(SyntaxKind.
IsKeyword
);
471
N(SyntaxKind.
IsKeyword
);
486
N(SyntaxKind.
IsKeyword
);
528
N(SyntaxKind.
IsKeyword
);
567
N(SyntaxKind.
IsKeyword
);
597
N(SyntaxKind.
IsKeyword
);
629
N(SyntaxKind.
IsKeyword
);
659
N(SyntaxKind.
IsKeyword
);
686
N(SyntaxKind.
IsKeyword
);
716
N(SyntaxKind.
IsKeyword
);
746
N(SyntaxKind.
IsKeyword
);
776
N(SyntaxKind.
IsKeyword
);
1061
N(SyntaxKind.
IsKeyword
);
1099
N(SyntaxKind.
IsKeyword
);
1137
N(SyntaxKind.
IsKeyword
);
1180
N(SyntaxKind.
IsKeyword
);
2862
N(SyntaxKind.
IsKeyword
);
3070
N(SyntaxKind.
IsKeyword
);
3128
N(SyntaxKind.
IsKeyword
);
3188
N(SyntaxKind.
IsKeyword
);
3253
N(SyntaxKind.
IsKeyword
);
3320
N(SyntaxKind.
IsKeyword
);
3378
N(SyntaxKind.
IsKeyword
);
3438
N(SyntaxKind.
IsKeyword
);
3503
N(SyntaxKind.
IsKeyword
);
3570
N(SyntaxKind.
IsKeyword
);
3644
N(SyntaxKind.
IsKeyword
);
3720
N(SyntaxKind.
IsKeyword
);
3801
N(SyntaxKind.
IsKeyword
);
4358
N(SyntaxKind.
IsKeyword
);
4468
N(SyntaxKind.
IsKeyword
);
4574
N(SyntaxKind.
IsKeyword
);
4642
N(SyntaxKind.
IsKeyword
);
4706
N(SyntaxKind.
IsKeyword
);
4793
N(SyntaxKind.
IsKeyword
);
4876
N(SyntaxKind.
IsKeyword
);
4921
N(SyntaxKind.
IsKeyword
);
5027
N(SyntaxKind.
IsKeyword
);
5129
N(SyntaxKind.
IsKeyword
);
5193
N(SyntaxKind.
IsKeyword
);
5253
N(SyntaxKind.
IsKeyword
);
5336
N(SyntaxKind.
IsKeyword
);
5614
N(SyntaxKind.
IsKeyword
);
5652
N(SyntaxKind.
IsKeyword
);
5690
N(SyntaxKind.
IsKeyword
);
6352
N(SyntaxKind.
IsKeyword
);
6404
N(SyntaxKind.
IsKeyword
);
6457
N(SyntaxKind.
IsKeyword
);
6510
N(SyntaxKind.
IsKeyword
);
6542
N(SyntaxKind.
IsKeyword
);
6783
N(SyntaxKind.
IsKeyword
);
6829
N(SyntaxKind.
IsKeyword
);
6867
N(SyntaxKind.
IsKeyword
);
6926
N(SyntaxKind.
IsKeyword
);
7033
N(SyntaxKind.
IsKeyword
);
8149
N(SyntaxKind.
IsKeyword
);
8191
N(SyntaxKind.
IsKeyword
);
8229
N(SyntaxKind.
IsKeyword
);
8284
N(SyntaxKind.
IsKeyword
);
8346
N(SyntaxKind.
IsKeyword
);
8405
N(SyntaxKind.
IsKeyword
);
8454
N(SyntaxKind.
IsKeyword
);
9142
N(SyntaxKind.
IsKeyword
);
9182
N(SyntaxKind.
IsKeyword
);
9226
N(SyntaxKind.
IsKeyword
);
9271
N(SyntaxKind.
IsKeyword
);
9377
N(SyntaxKind.
IsKeyword
);
9424
N(SyntaxKind.
IsKeyword
);
9729
N(SyntaxKind.
IsKeyword
);
9782
N(SyntaxKind.
IsKeyword
);
9848
N(SyntaxKind.
IsKeyword
);
9921
N(SyntaxKind.
IsKeyword
);
9961
N(SyntaxKind.
IsKeyword
);
10011
N(SyntaxKind.
IsKeyword
);
10057
N(SyntaxKind.
IsKeyword
);
10112
N(SyntaxKind.
IsKeyword
);
10161
N(SyntaxKind.
IsKeyword
);
10209
N(SyntaxKind.
IsKeyword
);
10253
N(SyntaxKind.
IsKeyword
);
10355
N(SyntaxKind.
IsKeyword
);
10396
N(SyntaxKind.
IsKeyword
);
10437
N(SyntaxKind.
IsKeyword
);
10478
N(SyntaxKind.
IsKeyword
);
10533
N(SyntaxKind.
IsKeyword
);
10578
N(SyntaxKind.
IsKeyword
);
10651
N(SyntaxKind.
IsKeyword
);
10688
N(SyntaxKind.
IsKeyword
);
10729
N(SyntaxKind.
IsKeyword
);
10771
N(SyntaxKind.
IsKeyword
);
10824
N(SyntaxKind.
IsKeyword
);
10873
N(SyntaxKind.
IsKeyword
);
10930
N(SyntaxKind.
IsKeyword
);
10991
N(SyntaxKind.
IsKeyword
);
11042
N(SyntaxKind.
IsKeyword
);
11094
N(SyntaxKind.
IsKeyword
);
11147
N(SyntaxKind.
IsKeyword
);
11204
N(SyntaxKind.
IsKeyword
);
11377
N(SyntaxKind.
IsKeyword
);
11487
N(SyntaxKind.
IsKeyword
);
11571
N(SyntaxKind.
IsKeyword
);
11631
N(SyntaxKind.
IsKeyword
);
11689
N(SyntaxKind.
IsKeyword
);
11820
N(SyntaxKind.
IsKeyword
);
11893
N(SyntaxKind.
IsKeyword
);
12001
N(SyntaxKind.
IsKeyword
);
12718
N(SyntaxKind.
IsKeyword
);
Parsing\PatternParsingTests_ListPatterns.cs (40)
43
N(SyntaxKind.
IsKeyword
);
76
N(SyntaxKind.
IsKeyword
);
114
N(SyntaxKind.
IsKeyword
);
161
N(SyntaxKind.
IsKeyword
);
193
N(SyntaxKind.
IsKeyword
);
220
N(SyntaxKind.
IsKeyword
);
244
N(SyntaxKind.
IsKeyword
);
281
N(SyntaxKind.
IsKeyword
);
321
N(SyntaxKind.
IsKeyword
);
360
N(SyntaxKind.
IsKeyword
);
389
N(SyntaxKind.
IsKeyword
);
421
N(SyntaxKind.
IsKeyword
);
459
N(SyntaxKind.
IsKeyword
);
485
N(SyntaxKind.
IsKeyword
);
518
N(SyntaxKind.
IsKeyword
);
541
N(SyntaxKind.
IsKeyword
);
565
N(SyntaxKind.
IsKeyword
);
595
N(SyntaxKind.
IsKeyword
);
631
N(SyntaxKind.
IsKeyword
);
674
N(SyntaxKind.
IsKeyword
);
721
N(SyntaxKind.
IsKeyword
);
749
N(SyntaxKind.
IsKeyword
);
779
N(SyntaxKind.
IsKeyword
);
818
N(SyntaxKind.
IsKeyword
);
847
N(SyntaxKind.
IsKeyword
);
884
N(SyntaxKind.
IsKeyword
);
927
N(SyntaxKind.
IsKeyword
);
956
N(SyntaxKind.
IsKeyword
);
991
N(SyntaxKind.
IsKeyword
);
1043
N(SyntaxKind.
IsKeyword
);
1080
N(SyntaxKind.
IsKeyword
);
1113
N(SyntaxKind.
IsKeyword
);
1149
N(SyntaxKind.
IsKeyword
);
1189
N(SyntaxKind.
IsKeyword
);
1240
N(SyntaxKind.
IsKeyword
);
1291
N(SyntaxKind.
IsKeyword
);
1354
N(SyntaxKind.
IsKeyword
);
1417
N(SyntaxKind.
IsKeyword
);
1484
N(SyntaxKind.
IsKeyword
);
1551
N(SyntaxKind.
IsKeyword
);
Parsing\PatternParsingTests2.cs (29)
64
N(SyntaxKind.
IsKeyword
);
129
N(SyntaxKind.
IsKeyword
);
175
N(SyntaxKind.
IsKeyword
);
232
N(SyntaxKind.
IsKeyword
);
289
N(SyntaxKind.
IsKeyword
);
343
N(SyntaxKind.
IsKeyword
);
399
N(SyntaxKind.
IsKeyword
);
455
N(SyntaxKind.
IsKeyword
);
510
N(SyntaxKind.
IsKeyword
);
566
N(SyntaxKind.
IsKeyword
);
614
N(SyntaxKind.
IsKeyword
);
660
N(SyntaxKind.
IsKeyword
);
714
N(SyntaxKind.
IsKeyword
);
785
N(SyntaxKind.
IsKeyword
);
843
N(SyntaxKind.
IsKeyword
);
903
N(SyntaxKind.
IsKeyword
);
968
N(SyntaxKind.
IsKeyword
);
1002
N(SyntaxKind.
IsKeyword
);
1059
N(SyntaxKind.
IsKeyword
);
1093
N(SyntaxKind.
IsKeyword
);
1162
N(SyntaxKind.
IsKeyword
);
1279
N(SyntaxKind.
IsKeyword
);
1310
N(SyntaxKind.
IsKeyword
);
1377
N(SyntaxKind.
IsKeyword
);
1423
N(SyntaxKind.
IsKeyword
);
1473
N(SyntaxKind.
IsKeyword
);
1553
N(SyntaxKind.
IsKeyword
);
1630
N(SyntaxKind.
IsKeyword
);
1691
N(SyntaxKind.
IsKeyword
);
Parsing\RangeExpressionParsingTests.cs (3)
236
N(SyntaxKind.
IsKeyword
);
271
N(SyntaxKind.
IsKeyword
);
302
N(SyntaxKind.
IsKeyword
);
Parsing\RecordParsing.cs (5)
1865
N(SyntaxKind.
IsKeyword
);
2027
N(SyntaxKind.
IsKeyword
);
2116
N(SyntaxKind.
IsKeyword
);
2168
N(SyntaxKind.
IsKeyword
);
2232
N(SyntaxKind.
IsKeyword
);
Parsing\StatementParsingTests.cs (3)
4667
N(SyntaxKind.
IsKeyword
);
5869
N(SyntaxKind.
IsKeyword
);
5963
N(SyntaxKind.
IsKeyword
);
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Simplification\Simplifiers\MemberAccessExpressionSimplifier.cs (1)
75
(CSharp.SyntaxFacts.IsKeywordKind(nextToken.Kind()) && nextToken.Kind() is not SyntaxKind.AsKeyword and not SyntaxKind.
IsKeyword
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
48
public static readonly SyntaxToken IsKeyword = Token(SyntaxKind.
IsKeyword
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
339
if (currentKind == SyntaxKind.
IsKeyword
||
343
previousKind == SyntaxKind.
IsKeyword
||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
1384
if (leftToken.Kind() is SyntaxKind.CaseKeyword or SyntaxKind.
IsKeyword
)
1526
binaryExpressionSyntax.OperatorToken.IsKind(SyntaxKind.
IsKeyword
) &&
1919
if (token.Kind() is SyntaxKind.
IsKeyword
or SyntaxKind.AsKeyword)