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