34 references to SwitchKeyword
Microsoft.CodeAnalysis.CSharp (18)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Syntax.xml.Main.Generated.cs (4)
4622if (switchKeyword.Kind() != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword)); 4697if (switchKeyword.Kind() != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword)); 4705=> SyntaxFactory.SwitchExpression(governingExpression, SyntaxFactory.Token(SyntaxKind.SwitchKeyword), SyntaxFactory.Token(SyntaxKind.OpenBraceToken), arms, SyntaxFactory.Token(SyntaxKind.CloseBraceToken)); 4709=> SyntaxFactory.SwitchExpression(governingExpression, SyntaxFactory.Token(SyntaxKind.SwitchKeyword), SyntaxFactory.Token(SyntaxKind.OpenBraceToken), default, SyntaxFactory.Token(SyntaxKind.CloseBraceToken));
Parser\LanguageParser.cs (9)
8235|| (this.CurrentToken.ContextualKind is SyntaxKind.SwitchKeyword or SyntaxKind.WithKeyword && this.PeekToken(1).Kind is SyntaxKind.OpenBraceToken); 8330case SyntaxKind.SwitchKeyword: 9246case SyntaxKind.SwitchKeyword: 10162Debug.Assert(this.CurrentToken.Kind is SyntaxKind.SwitchKeyword or SyntaxKind.CaseKeyword); 10191switchKeyword = EatToken(SyntaxKind.SwitchKeyword); 10199switchKeyword = this.EatToken(SyntaxKind.SwitchKeyword); 11163case SyntaxKind.SwitchKeyword: 11782if (token1Kind == SyntaxKind.SwitchKeyword && this.PeekToken(1).Kind == SyntaxKind.OpenBraceToken) 13237case SyntaxKind.SwitchKeyword:
Syntax\SyntaxFactory.cs (1)
2776SyntaxFactory.Token(SyntaxKind.SwitchKeyword),
Syntax\SyntaxKindFacts.cs (2)
939return SyntaxKind.SwitchKeyword; 1640case SyntaxKind.SwitchKeyword:
Syntax\SyntaxNormalizer.cs (2)
291case SyntaxKind.SwitchKeyword when currentToken.Parent is SwitchExpressionSyntax: 693if (next.IsKind(SyntaxKind.SwitchKeyword) && next.Parent is SwitchExpressionSyntax)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
99public static readonly SyntaxToken SwitchKeyword = Token(SyntaxKind.SwitchKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
154(previousKind == SyntaxKind.IfKeyword || previousKind == SyntaxKind.WhileKeyword || previousKind == SyntaxKind.SwitchKeyword ||
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
250Token(leading: default, SyntaxKind.SwitchKeyword, node.CloseParenToken.TrailingTrivia),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2646token.GetPreviousToken(includeSkipped: true).IsKind(SyntaxKind.SwitchKeyword))
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\KeywordRecommenders\SwitchKeywordRecommender.cs (1)
10internal sealed class SwitchKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.SwitchKeyword)
Highlighting\KeywordHighlighters\SwitchStatementHighlighter.cs (1)
28is SyntaxKind.SwitchKeyword
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
250Token(leading: default, SyntaxKind.SwitchKeyword, node.CloseParenToken.TrailingTrivia),
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\ClassificationHelpers.cs (1)
87case SyntaxKind.SwitchKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
99public static readonly SyntaxToken SwitchKeyword = Token(SyntaxKind.SwitchKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
154(previousKind == SyntaxKind.IfKeyword || previousKind == SyntaxKind.WhileKeyword || previousKind == SyntaxKind.SwitchKeyword ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2646token.GetPreviousToken(includeSkipped: true).IsKind(SyntaxKind.SwitchKeyword))
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\Legacy\CSharpCodeParser.cs (1)
83CSharpSyntaxKind.SwitchKeyword,
Language\Legacy\NativeCSharpTokenizer.cs (1)
49CSharpSyntaxKind.SwitchKeyword,
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
99public static readonly SyntaxToken SwitchKeyword = Token(SyntaxKind.SwitchKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
154(previousKind == SyntaxKind.IfKeyword || previousKind == SyntaxKind.WhileKeyword || previousKind == SyntaxKind.SwitchKeyword ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2646token.GetPreviousToken(includeSkipped: true).IsKind(SyntaxKind.SwitchKeyword))