277 references to ConstantPattern
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
188
if (expression.IsParentKind(SyntaxKind.
ConstantPattern
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (2)
40
var parentExpression = nodeParent.IsKind(SyntaxKind.
ConstantPattern
)
250
if (nodeParent.IsKind(SyntaxKind.
ConstantPattern
) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
124
public int? ConstantPattern => (int)SyntaxKind.
ConstantPattern
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
300
if (currentOriginalNode.Kind() is SyntaxKind.CaseSwitchLabel or SyntaxKind.
ConstantPattern
)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Semantics\PatternMatchingTests3.cs (7)
4130
Assert.Equal(SyntaxKind.
ConstantPattern
, pattern.Kind());
4187
Assert.Equal(SyntaxKind.
ConstantPattern
, pattern.Kind());
4194
Assert.Equal(SyntaxKind.
ConstantPattern
, pattern.Kind());
4357
Assert.Equal(SyntaxKind.
ConstantPattern
, pattern.Kind());
4393
Assert.Equal(SyntaxKind.
ConstantPattern
, pattern.Kind());
4421
Assert.Equal(SyntaxKind.
ConstantPattern
, pattern.Kind());
4428
Assert.Equal(SyntaxKind.
ConstantPattern
, pattern.Kind());
Microsoft.CodeAnalysis.CSharp.Features (2)
EditAndContinue\SyntaxComparer.cs (1)
530
case SyntaxKind.
ConstantPattern
:
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
190
if (expression.IsParentKind(SyntaxKind.
ConstantPattern
))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (257)
Parsing\AwaitParsingTests.cs (1)
1828
N(SyntaxKind.
ConstantPattern
);
Parsing\CollectionExpressionParsingTests.cs (2)
1154
N(SyntaxKind.
ConstantPattern
);
1162
N(SyntaxKind.
ConstantPattern
);
Parsing\ExpressionParsingTests.cs (1)
4856
N(SyntaxKind.
ConstantPattern
);
Parsing\FunctionPointerTests.cs (1)
2751
N(SyntaxKind.
ConstantPattern
);
Parsing\LambdaAttributeParsingTests.cs (1)
1712
N(SyntaxKind.
ConstantPattern
);
Parsing\LambdaParameterParsingTests.cs (4)
3698
N(SyntaxKind.
ConstantPattern
);
3929
N(SyntaxKind.
ConstantPattern
);
3953
N(SyntaxKind.
ConstantPattern
);
3977
N(SyntaxKind.
ConstantPattern
);
Parsing\LambdaReturnTypeParsingTests.cs (9)
3457
N(SyntaxKind.
ConstantPattern
);
3513
N(SyntaxKind.
ConstantPattern
);
4309
M(SyntaxKind.
ConstantPattern
);
4417
M(SyntaxKind.
ConstantPattern
);
4452
M(SyntaxKind.
ConstantPattern
);
4493
N(SyntaxKind.
ConstantPattern
);
4504
N(SyntaxKind.
ConstantPattern
);
4531
N(SyntaxKind.
ConstantPattern
);
4542
N(SyntaxKind.
ConstantPattern
);
Parsing\NullableParsingTests.cs (2)
2188
N(SyntaxKind.
ConstantPattern
);
2199
N(SyntaxKind.
ConstantPattern
);
Parsing\PatternParsingTests.cs (135)
568
N(SyntaxKind.
ConstantPattern
);
598
N(SyntaxKind.
ConstantPattern
);
630
N(SyntaxKind.
ConstantPattern
);
687
N(SyntaxKind.
ConstantPattern
);
717
N(SyntaxKind.
ConstantPattern
);
747
N(SyntaxKind.
ConstantPattern
);
777
N(SyntaxKind.
ConstantPattern
);
1062
N(SyntaxKind.
ConstantPattern
);
1100
N(SyntaxKind.
ConstantPattern
);
1687
N(SyntaxKind.
ConstantPattern
);
1798
N(SyntaxKind.
ConstantPattern
);
1902
N(SyntaxKind.
ConstantPattern
);
1996
N(SyntaxKind.
ConstantPattern
);
2079
N(SyntaxKind.
ConstantPattern
);
2098
N(SyntaxKind.
ConstantPattern
);
2121
N(SyntaxKind.
ConstantPattern
);
2421
M(SyntaxKind.
ConstantPattern
);
2509
N(SyntaxKind.
ConstantPattern
);
2525
N(SyntaxKind.
ConstantPattern
);
2583
N(SyntaxKind.
ConstantPattern
);
2672
N(SyntaxKind.
ConstantPattern
);
2683
N(SyntaxKind.
ConstantPattern
);
2694
N(SyntaxKind.
ConstantPattern
);
2901
N(SyntaxKind.
ConstantPattern
);
2952
N(SyntaxKind.
ConstantPattern
);
4378
N(SyntaxKind.
ConstantPattern
);
4397
N(SyntaxKind.
ConstantPattern
);
4420
N(SyntaxKind.
ConstantPattern
);
4484
N(SyntaxKind.
ConstantPattern
);
4503
N(SyntaxKind.
ConstantPattern
);
4526
N(SyntaxKind.
ConstantPattern
);
4594
N(SyntaxKind.
ConstantPattern
);
4658
N(SyntaxKind.
ConstantPattern
);
4726
N(SyntaxKind.
ConstantPattern
);
4745
N(SyntaxKind.
ConstantPattern
);
4809
N(SyntaxKind.
ConstantPattern
);
4828
N(SyntaxKind.
ConstantPattern
);
4941
N(SyntaxKind.
ConstantPattern
);
4960
N(SyntaxKind.
ConstantPattern
);
4983
N(SyntaxKind.
ConstantPattern
);
5043
N(SyntaxKind.
ConstantPattern
);
5062
N(SyntaxKind.
ConstantPattern
);
5085
N(SyntaxKind.
ConstantPattern
);
5149
N(SyntaxKind.
ConstantPattern
);
5209
N(SyntaxKind.
ConstantPattern
);
5273
N(SyntaxKind.
ConstantPattern
);
5292
N(SyntaxKind.
ConstantPattern
);
5352
N(SyntaxKind.
ConstantPattern
);
5371
N(SyntaxKind.
ConstantPattern
);
5576
N(SyntaxKind.
ConstantPattern
);
5788
N(SyntaxKind.
ConstantPattern
);
5819
N(SyntaxKind.
ConstantPattern
);
5850
N(SyntaxKind.
ConstantPattern
);
5890
N(SyntaxKind.
ConstantPattern
);
5921
N(SyntaxKind.
ConstantPattern
);
6104
N(SyntaxKind.
ConstantPattern
);
6154
N(SyntaxKind.
ConstantPattern
);
6204
N(SyntaxKind.
ConstantPattern
);
6263
N(SyntaxKind.
ConstantPattern
);
6313
N(SyntaxKind.
ConstantPattern
);
6711
N(SyntaxKind.
ConstantPattern
);
6754
M(SyntaxKind.
ConstantPattern
);
6799
N(SyntaxKind.
ConstantPattern
);
6837
M(SyntaxKind.
ConstantPattern
);
6883
N(SyntaxKind.
ConstantPattern
);
6894
M(SyntaxKind.
ConstantPattern
);
6934
M(SyntaxKind.
ConstantPattern
);
6945
M(SyntaxKind.
ConstantPattern
);
6984
N(SyntaxKind.
ConstantPattern
);
7000
M(SyntaxKind.
ConstantPattern
);
7049
N(SyntaxKind.
ConstantPattern
);
7060
M(SyntaxKind.
ConstantPattern
);
7458
N(SyntaxKind.
ConstantPattern
);
7477
N(SyntaxKind.
ConstantPattern
);
7518
N(SyntaxKind.
ConstantPattern
);
7545
N(SyntaxKind.
ConstantPattern
);
7585
N(SyntaxKind.
ConstantPattern
);
7627
N(SyntaxKind.
ConstantPattern
);
7930
M(SyntaxKind.
ConstantPattern
);
7978
M(SyntaxKind.
ConstantPattern
);
8011
N(SyntaxKind.
ConstantPattern
);
8052
N(SyntaxKind.
ConstantPattern
);
8068
N(SyntaxKind.
ConstantPattern
);
8104
N(SyntaxKind.
ConstantPattern
);
8120
N(SyntaxKind.
ConstantPattern
);
8287
N(SyntaxKind.
ConstantPattern
);
8295
N(SyntaxKind.
ConstantPattern
);
8349
N(SyntaxKind.
ConstantPattern
);
8357
N(SyntaxKind.
ConstantPattern
);
8409
N(SyntaxKind.
ConstantPattern
);
8458
N(SyntaxKind.
ConstantPattern
);
8538
N(SyntaxKind.
ConstantPattern
);
8546
N(SyntaxKind.
ConstantPattern
);
8565
N(SyntaxKind.
ConstantPattern
);
8573
N(SyntaxKind.
ConstantPattern
);
8593
N(SyntaxKind.
ConstantPattern
);
8613
N(SyntaxKind.
ConstantPattern
);
8905
M(SyntaxKind.
ConstantPattern
);
8946
M(SyntaxKind.
ConstantPattern
);
8987
M(SyntaxKind.
ConstantPattern
);
9435
N(SyntaxKind.
ConstantPattern
);
9551
N(SyntaxKind.
ConstantPattern
);
9785
N(SyntaxKind.
ConstantPattern
);
9798
N(SyntaxKind.
ConstantPattern
);
10068
N(SyntaxKind.
ConstantPattern
);
10123
N(SyntaxKind.
ConstantPattern
);
10254
N(SyntaxKind.
ConstantPattern
);
10356
N(SyntaxKind.
ConstantPattern
);
10397
N(SyntaxKind.
ConstantPattern
);
10534
N(SyntaxKind.
ConstantPattern
);
10593
N(SyntaxKind.
ConstantPattern
);
10604
N(SyntaxKind.
ConstantPattern
);
10772
N(SyntaxKind.
ConstantPattern
);
10825
N(SyntaxKind.
ConstantPattern
);
10876
N(SyntaxKind.
ConstantPattern
);
10893
N(SyntaxKind.
ConstantPattern
);
10933
N(SyntaxKind.
ConstantPattern
);
10950
N(SyntaxKind.
ConstantPattern
);
10994
N(SyntaxKind.
ConstantPattern
);
11002
N(SyntaxKind.
ConstantPattern
);
11058
N(SyntaxKind.
ConstantPattern
);
11150
N(SyntaxKind.
ConstantPattern
);
11222
N(SyntaxKind.
ConstantPattern
);
11636
N(SyntaxKind.
ConstantPattern
);
11644
N(SyntaxKind.
ConstantPattern
);
11653
N(SyntaxKind.
ConstantPattern
);
11694
N(SyntaxKind.
ConstantPattern
);
11702
N(SyntaxKind.
ConstantPattern
);
11711
N(SyntaxKind.
ConstantPattern
);
11920
N(SyntaxKind.
ConstantPattern
);
11931
M(SyntaxKind.
ConstantPattern
);
12009
N(SyntaxKind.
ConstantPattern
);
12020
M(SyntaxKind.
ConstantPattern
);
12546
N(SyntaxKind.
ConstantPattern
);
12738
N(SyntaxKind.
ConstantPattern
);
Parsing\PatternParsingTests_ListPatterns.cs (15)
118
N(SyntaxKind.
ConstantPattern
);
126
N(SyntaxKind.
ConstantPattern
);
134
N(SyntaxKind.
ConstantPattern
);
165
M(SyntaxKind.
ConstantPattern
);
605
N(SyntaxKind.
ConstantPattern
);
640
N(SyntaxKind.
ConstantPattern
);
648
N(SyntaxKind.
ConstantPattern
);
683
N(SyntaxKind.
ConstantPattern
);
694
N(SyntaxKind.
ConstantPattern
);
753
N(SyntaxKind.
ConstantPattern
);
888
N(SyntaxKind.
ConstantPattern
);
1213
N(SyntaxKind.
ConstantPattern
);
1264
N(SyntaxKind.
ConstantPattern
);
1327
N(SyntaxKind.
ConstantPattern
);
1390
N(SyntaxKind.
ConstantPattern
);
Parsing\PatternParsingTests2.cs (26)
96
N(SyntaxKind.
ConstantPattern
);
149
N(SyntaxKind.
ConstantPattern
);
200
N(SyntaxKind.
ConstantPattern
);
263
N(SyntaxKind.
ConstantPattern
);
317
N(SyntaxKind.
ConstantPattern
);
367
N(SyntaxKind.
ConstantPattern
);
410
N(SyntaxKind.
ConstantPattern
);
423
N(SyntaxKind.
ConstantPattern
);
466
N(SyntaxKind.
ConstantPattern
);
478
N(SyntaxKind.
ConstantPattern
);
520
N(SyntaxKind.
ConstantPattern
);
528
N(SyntaxKind.
ConstantPattern
);
540
N(SyntaxKind.
ConstantPattern
);
582
N(SyntaxKind.
ConstantPattern
);
634
N(SyntaxKind.
ConstantPattern
);
688
N(SyntaxKind.
ConstantPattern
);
753
N(SyntaxKind.
ConstantPattern
);
796
N(SyntaxKind.
ConstantPattern
);
817
N(SyntaxKind.
ConstantPattern
);
877
N(SyntaxKind.
ConstantPattern
);
935
N(SyntaxKind.
ConstantPattern
);
1022
N(SyntaxKind.
ConstantPattern
);
1120
N(SyntaxKind.
ConstantPattern
);
1196
N(SyntaxKind.
ConstantPattern
);
1240
N(SyntaxKind.
ConstantPattern
);
1338
N(SyntaxKind.
ConstantPattern
);
Parsing\RangeExpressionParsingTests.cs (1)
237
N(SyntaxKind.
ConstantPattern
);
Parsing\StatementParsingTests.cs (1)
4668
N(SyntaxKind.
ConstantPattern
);
Parsing\SwitchExpressionParsingTests.cs (58)
43
N(SyntaxKind.
ConstantPattern
);
59
N(SyntaxKind.
ConstantPattern
);
110
N(SyntaxKind.
ConstantPattern
);
126
N(SyntaxKind.
ConstantPattern
);
177
N(SyntaxKind.
ConstantPattern
);
193
N(SyntaxKind.
ConstantPattern
);
250
N(SyntaxKind.
ConstantPattern
);
266
N(SyntaxKind.
ConstantPattern
);
348
N(SyntaxKind.
ConstantPattern
);
526
M(SyntaxKind.
ConstantPattern
);
611
M(SyntaxKind.
ConstantPattern
);
700
M(SyntaxKind.
ConstantPattern
);
783
M(SyntaxKind.
ConstantPattern
);
862
N(SyntaxKind.
ConstantPattern
);
950
N(SyntaxKind.
ConstantPattern
);
966
M(SyntaxKind.
ConstantPattern
);
1045
N(SyntaxKind.
ConstantPattern
);
1127
N(SyntaxKind.
ConstantPattern
);
1206
N(SyntaxKind.
ConstantPattern
);
1300
N(SyntaxKind.
ConstantPattern
);
1316
M(SyntaxKind.
ConstantPattern
);
1407
N(SyntaxKind.
ConstantPattern
);
1423
N(SyntaxKind.
ConstantPattern
);
1502
N(SyntaxKind.
ConstantPattern
);
1581
N(SyntaxKind.
ConstantPattern
);
1664
N(SyntaxKind.
ConstantPattern
);
1741
N(SyntaxKind.
ConstantPattern
);
1815
N(SyntaxKind.
ConstantPattern
);
1891
N(SyntaxKind.
ConstantPattern
);
1967
N(SyntaxKind.
ConstantPattern
);
2047
N(SyntaxKind.
ConstantPattern
);
2133
N(SyntaxKind.
ConstantPattern
);
2149
M(SyntaxKind.
ConstantPattern
);
2200
N(SyntaxKind.
ConstantPattern
);
2216
N(SyntaxKind.
ConstantPattern
);
2267
N(SyntaxKind.
ConstantPattern
);
2283
N(SyntaxKind.
ConstantPattern
);
2325
N(SyntaxKind.
ConstantPattern
);
2341
N(SyntaxKind.
ConstantPattern
);
2389
N(SyntaxKind.
ConstantPattern
);
2405
N(SyntaxKind.
ConstantPattern
);
2447
N(SyntaxKind.
ConstantPattern
);
2463
N(SyntaxKind.
ConstantPattern
);
2517
N(SyntaxKind.
ConstantPattern
);
2533
N(SyntaxKind.
ConstantPattern
);
2599
N(SyntaxKind.
ConstantPattern
);
2615
N(SyntaxKind.
ConstantPattern
);
2692
N(SyntaxKind.
ConstantPattern
);
2708
N(SyntaxKind.
ConstantPattern
);
2752
N(SyntaxKind.
ConstantPattern
);
2768
N(SyntaxKind.
ConstantPattern
);
2820
N(SyntaxKind.
ConstantPattern
);
2836
N(SyntaxKind.
ConstantPattern
);
4182
N(SyntaxKind.
ConstantPattern
);
4208
N(SyntaxKind.
ConstantPattern
);
4354
N(SyntaxKind.
ConstantPattern
);
4419
N(SyntaxKind.
ConstantPattern
);
4853
N(SyntaxKind.
ConstantPattern
);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
177
if (current.Kind() == SyntaxKind.
ConstantPattern
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
188
if (expression.IsParentKind(SyntaxKind.
ConstantPattern
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (2)
40
var parentExpression = nodeParent.IsKind(SyntaxKind.
ConstantPattern
)
250
if (nodeParent.IsKind(SyntaxKind.
ConstantPattern
) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
124
public int? ConstantPattern => (int)SyntaxKind.
ConstantPattern
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
300
if (currentOriginalNode.Kind() is SyntaxKind.CaseSwitchLabel or SyntaxKind.
ConstantPattern
)