55 references to ElseKeyword
Microsoft.CodeAnalysis.CSharp (16)
Parser\DirectiveParser.cs (1)
66
case SyntaxKind.
ElseKeyword
:
Parser\LanguageParser.cs (8)
7953
case SyntaxKind.
ElseKeyword
:
8772
case SyntaxKind.
ElseKeyword
:
9529
var elseKeyword = this.CurrentToken.Kind != SyntaxKind.
ElseKeyword
?
9531
this.EatToken(SyntaxKind.
ElseKeyword
);
9581
Debug.Assert(this.CurrentToken.Kind == SyntaxKind.
ElseKeyword
);
9595
return this.CurrentToken.Kind != SyntaxKind.
ElseKeyword
9598
this.EatToken(SyntaxKind.
ElseKeyword
),
10621
case SyntaxKind.
ElseKeyword
:
Syntax\SyntaxKindFacts.cs (4)
87
case SyntaxKind.
ElseKeyword
:
897
return SyntaxKind.
ElseKeyword
;
1121
return SyntaxKind.
ElseKeyword
;
1545
case SyntaxKind.
ElseKeyword
:
Syntax\SyntaxNormalizer.cs (3)
267
case SyntaxKind.
ElseKeyword
:
297
case SyntaxKind.
ElseKeyword
:
396
case SyntaxKind.
ElseKeyword
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (3)
361
case SyntaxKind.
ElseKeyword
:
389
case SyntaxKind.
ElseKeyword
:
432
SyntaxKind.
ElseKeyword
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
84
&& currentToken.IsKind(SyntaxKind.
ElseKeyword
)
274
if (previousToken.IsKind(SyntaxKind.CloseBraceToken) && currentToken.IsKind(SyntaxKind.
ElseKeyword
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (2)
151
if (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)
173
case SyntaxKind.
ElseKeyword
:
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
132
SyntaxKind.
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)
48
case 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());
2426
Assert.Equal(SyntaxKind.
ElseKeyword
, node.ElseKeyword.Kind);
3628
Assert.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());
12642
Assert.Equal(SyntaxKind.
ElseKeyword
, node.ElseKeyword.Kind());
13844
Assert.Equal(SyntaxKind.
ElseKeyword
, node.ElseKeyword.Kind());
Parsing\StatementParsingTests.cs (8)
2056
Assert.Equal(SyntaxKind.
ElseKeyword
, ss.Else.ElseKeyword.Kind());
2082
Assert.Equal(SyntaxKind.
ElseKeyword
, ss.Else.ElseKeyword.Kind());
3633
N(SyntaxKind.
ElseKeyword
);
3708
N(SyntaxKind.
ElseKeyword
);
3735
N(SyntaxKind.
ElseKeyword
);
3791
N(SyntaxKind.
ElseKeyword
);
3818
N(SyntaxKind.
ElseKeyword
);
3883
N(SyntaxKind.
ElseKeyword
);
Syntax\SyntaxNodeTests.cs (2)
1915
var zeroWidth = SyntaxFactory.ElseDirectiveTrivia(SyntaxFactory.MissingToken(SyntaxKind.HashToken), SyntaxFactory.MissingToken(SyntaxKind.
ElseKeyword
), SyntaxFactory.MissingToken(SyntaxKind.EndOfDirectiveToken), false, false);
1957
var 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)
77
case SyntaxKind.
ElseKeyword
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (3)
361
case SyntaxKind.
ElseKeyword
:
389
case SyntaxKind.
ElseKeyword
:
432
SyntaxKind.
ElseKeyword
)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
84
&& currentToken.IsKind(SyntaxKind.
ElseKeyword
)
274
if (previousToken.IsKind(SyntaxKind.CloseBraceToken) && currentToken.IsKind(SyntaxKind.
ElseKeyword
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (2)
151
if (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)
173
case SyntaxKind.
ElseKeyword
: