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