159 references to SwitchExpression
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder_Expressions.cs (1)
699
case SyntaxKind.
SwitchExpression
:
Compilation\MemberSemanticModel.cs (1)
329
else if (kind == SyntaxKind.
SwitchExpression
)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
536
SynthesizedLocalKind.Spill => awaitSyntaxOpt.IsKind(SyntaxKind.AwaitExpression) || awaitSyntaxOpt.IsKind(SyntaxKind.
SwitchExpression
),
Parser\LanguageParser.cs (3)
10797
case SyntaxKind.
SwitchExpression
:
11136
if (operatorExpressionKind == SyntaxKind.
SwitchExpression
)
11229
return (token1Kind, SyntaxKind.
SwitchExpression
);
Syntax\LambdaUtilities.cs (1)
430
case SyntaxKind.
SwitchExpression
:
Syntax\SyntaxNodeExtensions.cs (1)
95
case SyntaxKind.
SwitchExpression
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
844
case SyntaxKind.
SwitchExpression
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
340
=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.
SwitchExpression
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
227
if (node.IsLambdaBodyBlock() || node.IsAnonymousMethodBlock() || node.Kind() is SyntaxKind.PropertyPatternClause or SyntaxKind.
SwitchExpression
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
217
if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent.IsKind(SyntaxKind.
SwitchExpression
))
439
if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent.IsKind(SyntaxKind.
SwitchExpression
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
88
if (node.IsKind(SyntaxKind.
SwitchExpression
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
783
if (newExpression.IsKind(SyntaxKind.
SwitchExpression
) &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1391
if (leftToken.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.
SwitchExpression
))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
224
SyntaxKind.
SwitchExpression
)
Microsoft.CodeAnalysis.CSharp.Features (3)
EditAndContinue\BreakpointSpans.cs (1)
302
case SyntaxKind.
SwitchExpression
when
EditAndContinue\SyntaxComparer.cs (1)
434
case SyntaxKind.
SwitchExpression
:
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
430
case SyntaxKind.
SwitchExpression
:
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (129)
Parsing\CollectionExpressionParsingTests.cs (3)
1255
N(SyntaxKind.
SwitchExpression
);
1322
N(SyntaxKind.
SwitchExpression
);
1413
N(SyntaxKind.
SwitchExpression
);
Parsing\FunctionPointerTests.cs (1)
2672
N(SyntaxKind.
SwitchExpression
);
Parsing\LambdaAttributeParsingTests.cs (5)
1662
N(SyntaxKind.
SwitchExpression
);
1702
N(SyntaxKind.
SwitchExpression
);
1999
N(SyntaxKind.
SwitchExpression
);
2054
N(SyntaxKind.
SwitchExpression
);
2113
N(SyntaxKind.
SwitchExpression
);
Parsing\LambdaParameterParsingTests.cs (2)
3667
N(SyntaxKind.
SwitchExpression
);
3919
N(SyntaxKind.
SwitchExpression
);
Parsing\LambdaReturnTypeParsingTests.cs (7)
3447
N(SyntaxKind.
SwitchExpression
);
3503
N(SyntaxKind.
SwitchExpression
);
4278
N(SyntaxKind.
SwitchExpression
);
4339
N(SyntaxKind.
SwitchExpression
);
4407
N(SyntaxKind.
SwitchExpression
);
4476
N(SyntaxKind.
SwitchExpression
);
4574
N(SyntaxKind.
SwitchExpression
);
Parsing\PatternParsingTests.cs (49)
2462
N(SyntaxKind.
SwitchExpression
);
2499
N(SyntaxKind.
SwitchExpression
);
2573
N(SyntaxKind.
SwitchExpression
);
2655
N(SyntaxKind.
SwitchExpression
);
5416
N(SyntaxKind.
SwitchExpression
);
5460
N(SyntaxKind.
SwitchExpression
);
5714
N(SyntaxKind.
SwitchExpression
);
5958
N(SyntaxKind.
SwitchExpression
);
6701
N(SyntaxKind.
SwitchExpression
);
6744
N(SyntaxKind.
SwitchExpression
);
6974
N(SyntaxKind.
SwitchExpression
);
7446
N(SyntaxKind.
SwitchExpression
);
7448
N(SyntaxKind.
SwitchExpression
);
7508
N(SyntaxKind.
SwitchExpression
);
7535
N(SyntaxKind.
SwitchExpression
);
7575
N(SyntaxKind.
SwitchExpression
);
7617
N(SyntaxKind.
SwitchExpression
);
7657
N(SyntaxKind.
SwitchExpression
);
7682
N(SyntaxKind.
SwitchExpression
);
7700
N(SyntaxKind.
SwitchExpression
);
7721
N(SyntaxKind.
SwitchExpression
);
7747
N(SyntaxKind.
SwitchExpression
);
7777
N(SyntaxKind.
SwitchExpression
);
7801
N(SyntaxKind.
SwitchExpression
);
7821
N(SyntaxKind.
SwitchExpression
);
7841
N(SyntaxKind.
SwitchExpression
);
7861
N(SyntaxKind.
SwitchExpression
);
7885
N(SyntaxKind.
SwitchExpression
);
7920
N(SyntaxKind.
SwitchExpression
);
7968
N(SyntaxKind.
SwitchExpression
);
8001
N(SyntaxKind.
SwitchExpression
);
8042
N(SyntaxKind.
SwitchExpression
);
8094
N(SyntaxKind.
SwitchExpression
);
8526
N(SyntaxKind.
SwitchExpression
);
8696
N(SyntaxKind.
SwitchExpression
);
8870
N(SyntaxKind.
SwitchExpression
);
9029
N(SyntaxKind.
SwitchExpression
);
9305
N(SyntaxKind.
SwitchExpression
);
9473
N(SyntaxKind.
SwitchExpression
);
9531
N(SyntaxKind.
SwitchExpression
);
9597
N(SyntaxKind.
SwitchExpression
);
9659
N(SyntaxKind.
SwitchExpression
);
11414
N(SyntaxKind.
SwitchExpression
);
12054
N(SyntaxKind.
SwitchExpression
);
12135
N(SyntaxKind.
SwitchExpression
);
12230
N(SyntaxKind.
SwitchExpression
);
12336
N(SyntaxKind.
SwitchExpression
);
12431
N(SyntaxKind.
SwitchExpression
);
12536
N(SyntaxKind.
SwitchExpression
);
Parsing\RecordParsing.cs (2)
1570
N(SyntaxKind.
SwitchExpression
);
1784
N(SyntaxKind.
SwitchExpression
);
Parsing\StatementAttributeParsingTests.cs (1)
6253
N(SyntaxKind.
SwitchExpression
);
Parsing\SwitchExpressionParsingTests.cs (59)
33
N(SyntaxKind.
SwitchExpression
);
100
N(SyntaxKind.
SwitchExpression
);
167
N(SyntaxKind.
SwitchExpression
);
240
N(SyntaxKind.
SwitchExpression
);
338
N(SyntaxKind.
SwitchExpression
);
516
N(SyntaxKind.
SwitchExpression
);
601
N(SyntaxKind.
SwitchExpression
);
690
N(SyntaxKind.
SwitchExpression
);
773
N(SyntaxKind.
SwitchExpression
);
852
N(SyntaxKind.
SwitchExpression
);
940
N(SyntaxKind.
SwitchExpression
);
1035
N(SyntaxKind.
SwitchExpression
);
1117
N(SyntaxKind.
SwitchExpression
);
1196
N(SyntaxKind.
SwitchExpression
);
1290
N(SyntaxKind.
SwitchExpression
);
1397
N(SyntaxKind.
SwitchExpression
);
1492
N(SyntaxKind.
SwitchExpression
);
1571
N(SyntaxKind.
SwitchExpression
);
1654
N(SyntaxKind.
SwitchExpression
);
1731
N(SyntaxKind.
SwitchExpression
);
1805
N(SyntaxKind.
SwitchExpression
);
1881
N(SyntaxKind.
SwitchExpression
);
1957
N(SyntaxKind.
SwitchExpression
);
2037
N(SyntaxKind.
SwitchExpression
);
2123
N(SyntaxKind.
SwitchExpression
);
2190
N(SyntaxKind.
SwitchExpression
);
2257
N(SyntaxKind.
SwitchExpression
);
2315
N(SyntaxKind.
SwitchExpression
);
2379
N(SyntaxKind.
SwitchExpression
);
2437
N(SyntaxKind.
SwitchExpression
);
2507
N(SyntaxKind.
SwitchExpression
);
2589
N(SyntaxKind.
SwitchExpression
);
2682
N(SyntaxKind.
SwitchExpression
);
2742
N(SyntaxKind.
SwitchExpression
);
2810
N(SyntaxKind.
SwitchExpression
);
2878
N(SyntaxKind.
SwitchExpression
);
3001
N(SyntaxKind.
SwitchExpression
);
3124
N(SyntaxKind.
SwitchExpression
);
3253
N(SyntaxKind.
SwitchExpression
);
3382
N(SyntaxKind.
SwitchExpression
);
3547
N(SyntaxKind.
SwitchExpression
);
3694
N(SyntaxKind.
SwitchExpression
);
3757
N(SyntaxKind.
SwitchExpression
);
3820
N(SyntaxKind.
SwitchExpression
);
3899
N(SyntaxKind.
SwitchExpression
);
3978
N(SyntaxKind.
SwitchExpression
);
4073
N(SyntaxKind.
SwitchExpression
);
4157
N(SyntaxKind.
SwitchExpression
);
4245
N(SyntaxKind.
SwitchExpression
);
4290
N(SyntaxKind.
SwitchExpression
);
4344
N(SyntaxKind.
SwitchExpression
);
4409
N(SyntaxKind.
SwitchExpression
);
4460
N(SyntaxKind.
SwitchExpression
);
4521
N(SyntaxKind.
SwitchExpression
);
4579
N(SyntaxKind.
SwitchExpression
);
4644
N(SyntaxKind.
SwitchExpression
);
4706
N(SyntaxKind.
SwitchExpression
);
4776
N(SyntaxKind.
SwitchExpression
);
4843
N(SyntaxKind.
SwitchExpression
);
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
Classification\ClassificationHelpers.cs (1)
126
case SyntaxKind.
SwitchExpression
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
844
case SyntaxKind.
SwitchExpression
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
340
=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.
SwitchExpression
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
227
if (node.IsLambdaBodyBlock() || node.IsAnonymousMethodBlock() || node.Kind() is SyntaxKind.PropertyPatternClause or SyntaxKind.
SwitchExpression
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
217
if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent.IsKind(SyntaxKind.
SwitchExpression
))
439
if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent.IsKind(SyntaxKind.
SwitchExpression
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
88
if (node.IsKind(SyntaxKind.
SwitchExpression
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
783
if (newExpression.IsKind(SyntaxKind.
SwitchExpression
) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1391
if (leftToken.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.
SwitchExpression
))
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1177
case CSharp.SyntaxKind.
SwitchExpression
: