38 references to SwitchKeyword
Microsoft.CodeAnalysis.CSharp (22)
_generated\0\Syntax.xml.Main.Generated.cs (4)
4597if (switchKeyword.Kind() != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword)); 4672if (switchKeyword.Kind() != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword)); 4680=> SyntaxFactory.SwitchExpression(governingExpression, SyntaxFactory.Token(SyntaxKind.SwitchKeyword), SyntaxFactory.Token(SyntaxKind.OpenBraceToken), arms, SyntaxFactory.Token(SyntaxKind.CloseBraceToken)); 4684=> SyntaxFactory.SwitchExpression(governingExpression, SyntaxFactory.Token(SyntaxKind.SwitchKeyword), SyntaxFactory.Token(SyntaxKind.OpenBraceToken), default, SyntaxFactory.Token(SyntaxKind.CloseBraceToken));
_generated\1\Syntax.xml.Internal.Generated.cs (4)
31555if (switchKeyword.Kind != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword)); 31662if (switchKeyword.Kind != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword)); 36982if (switchKeyword.Kind != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword)); 37089if (switchKeyword.Kind != SyntaxKind.SwitchKeyword) throw new ArgumentException(nameof(switchKeyword));
Parser\LanguageParser.cs (9)
8294|| (this.CurrentToken.ContextualKind is SyntaxKind.SwitchKeyword or SyntaxKind.WithKeyword && this.PeekToken(1).Kind is SyntaxKind.OpenBraceToken); 8389case SyntaxKind.SwitchKeyword: 9289case SyntaxKind.SwitchKeyword: 10203Debug.Assert(this.CurrentToken.Kind is SyntaxKind.SwitchKeyword or SyntaxKind.CaseKeyword); 10232switchKeyword = EatToken(SyntaxKind.SwitchKeyword); 10240switchKeyword = this.EatToken(SyntaxKind.SwitchKeyword); 11203case SyntaxKind.SwitchKeyword: 11821if (token1Kind == SyntaxKind.SwitchKeyword && this.PeekToken(1).Kind == SyntaxKind.OpenBraceToken) 13262case SyntaxKind.SwitchKeyword:
Syntax\SyntaxFactory.cs (1)
2776SyntaxFactory.Token(SyntaxKind.SwitchKeyword),
Syntax\SyntaxKindFacts.cs (2)
937return SyntaxKind.SwitchKeyword; 1638case 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)
2653token.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)
2653token.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)
2653token.GetPreviousToken(includeSkipped: true).IsKind(SyntaxKind.SwitchKeyword))