55 references to ElseKeyword
Microsoft.CodeAnalysis.CSharp (16)
Parser\DirectiveParser.cs (1)
61case SyntaxKind.ElseKeyword:
Parser\LanguageParser.cs (8)
7987case SyntaxKind.ElseKeyword: 8806case SyntaxKind.ElseKeyword: 9557var elseKeyword = this.CurrentToken.Kind != SyntaxKind.ElseKeyword ? 9559this.EatToken(SyntaxKind.ElseKeyword); 9609Debug.Assert(this.CurrentToken.Kind == SyntaxKind.ElseKeyword); 9623return this.CurrentToken.Kind != SyntaxKind.ElseKeyword 9626this.EatToken(SyntaxKind.ElseKeyword), 10662case SyntaxKind.ElseKeyword:
Syntax\SyntaxKindFacts.cs (4)
87case SyntaxKind.ElseKeyword: 897return SyntaxKind.ElseKeyword; 1121return SyntaxKind.ElseKeyword; 1545case SyntaxKind.ElseKeyword:
Syntax\SyntaxNormalizer.cs (3)
267case SyntaxKind.ElseKeyword: 297case SyntaxKind.ElseKeyword: 396case SyntaxKind.ElseKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (3)
361case SyntaxKind.ElseKeyword: 389case SyntaxKind.ElseKeyword: 432SyntaxKind.ElseKeyword)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
84&& currentToken.IsKind(SyntaxKind.ElseKeyword) 274if (previousToken.IsKind(SyntaxKind.CloseBraceToken) && currentToken.IsKind(SyntaxKind.ElseKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (2)
151if (previousToken.Kind() == SyntaxKind.ElseKeyword && currentToken.Kind() != SyntaxKind.IfKeyword) 188(currentToken.Kind() == SyntaxKind.CaseKeyword || currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
173case SyntaxKind.ElseKeyword:
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
132SyntaxKind.ElseKeyword or
Completion\KeywordRecommenders\ElseKeywordRecommender.cs (1)
15: base(SyntaxKind.ElseKeyword, isValidInPreprocessorContext: true)
Highlighting\KeywordHighlighters\IfStatementHighlighter.cs (1)
28=> tokens.Any(static t => t.Kind() is SyntaxKind.IfKeyword or SyntaxKind.ElseKeyword);
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
48case SyntaxKind.ElseKeyword:
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (18)
Generated\Syntax.Test.xml.Generated.cs (8)
425=> InternalSyntaxFactory.ElseClause(InternalSyntaxFactory.Token(SyntaxKind.ElseKeyword), GenerateBlock()); 692=> InternalSyntaxFactory.ElseDirectiveTrivia(InternalSyntaxFactory.Token(SyntaxKind.HashToken), InternalSyntaxFactory.Token(SyntaxKind.ElseKeyword), InternalSyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool(), new bool()); 2426Assert.Equal(SyntaxKind.ElseKeyword, node.ElseKeyword.Kind); 3628Assert.Equal(SyntaxKind.ElseKeyword, node.ElseKeyword.Kind); 10641=> SyntaxFactory.ElseClause(SyntaxFactory.Token(SyntaxKind.ElseKeyword), GenerateBlock()); 10908=> SyntaxFactory.ElseDirectiveTrivia(SyntaxFactory.Token(SyntaxKind.HashToken), SyntaxFactory.Token(SyntaxKind.ElseKeyword), SyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool(), new bool()); 12642Assert.Equal(SyntaxKind.ElseKeyword, node.ElseKeyword.Kind()); 13844Assert.Equal(SyntaxKind.ElseKeyword, node.ElseKeyword.Kind());
Parsing\StatementParsingTests.cs (8)
2056Assert.Equal(SyntaxKind.ElseKeyword, ss.Else.ElseKeyword.Kind()); 2082Assert.Equal(SyntaxKind.ElseKeyword, ss.Else.ElseKeyword.Kind()); 3633N(SyntaxKind.ElseKeyword); 3708N(SyntaxKind.ElseKeyword); 3735N(SyntaxKind.ElseKeyword); 3791N(SyntaxKind.ElseKeyword); 3818N(SyntaxKind.ElseKeyword); 3883N(SyntaxKind.ElseKeyword);
Syntax\SyntaxNodeTests.cs (2)
1938var zeroWidth = SyntaxFactory.ElseDirectiveTrivia(SyntaxFactory.MissingToken(SyntaxKind.HashToken), SyntaxFactory.MissingToken(SyntaxKind.ElseKeyword), SyntaxFactory.MissingToken(SyntaxKind.EndOfDirectiveToken), false, false); 1980var zeroWidth = SyntaxFactory.ElseDirectiveTrivia(SyntaxFactory.MissingToken(SyntaxKind.HashToken), SyntaxFactory.MissingToken(SyntaxKind.ElseKeyword), SyntaxFactory.MissingToken(SyntaxKind.EndOfDirectiveToken), false, false);
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
Classification\ClassificationHelpers.cs (1)
77case SyntaxKind.ElseKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (3)
361case SyntaxKind.ElseKeyword: 389case SyntaxKind.ElseKeyword: 432SyntaxKind.ElseKeyword)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
84&& currentToken.IsKind(SyntaxKind.ElseKeyword) 274if (previousToken.IsKind(SyntaxKind.CloseBraceToken) && currentToken.IsKind(SyntaxKind.ElseKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (2)
151if (previousToken.Kind() == SyntaxKind.ElseKeyword && currentToken.Kind() != SyntaxKind.IfKeyword) 188(currentToken.Kind() == SyntaxKind.CaseKeyword || currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
173case SyntaxKind.ElseKeyword: