76 references to IfKeyword
Microsoft.CodeAnalysis.CSharp (14)
Parser\DirectiveParser.cs (1)
55
case SyntaxKind.
IfKeyword
:
Parser\LanguageParser.cs (8)
7403
case SyntaxKind.
IfKeyword
:
8217
case SyntaxKind.
IfKeyword
:
8442
if (keywordKind == SyntaxKind.WhenKeyword || keywordKind == SyntaxKind.
IfKeyword
)
8445
if (keywordKind == SyntaxKind.
IfKeyword
)
8970
Debug.Assert(this.CurrentToken.Kind == SyntaxKind.
IfKeyword
);
8974
this.EatToken(SyntaxKind.
IfKeyword
),
8988
this.EatToken(SyntaxKind.
IfKeyword
, ErrorCode.ERR_ElseCannotStartStatement),
10004
case SyntaxKind.
IfKeyword
:
Syntax\SyntaxKindFacts.cs (4)
75
case SyntaxKind.
IfKeyword
:
867
return SyntaxKind.
IfKeyword
;
1091
return SyntaxKind.
IfKeyword
;
1507
case SyntaxKind.
IfKeyword
:
Syntax\SyntaxNormalizer.cs (1)
268
return nextToken.Kind() != SyntaxKind.
IfKeyword
? 1 : 0;
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
66
SyntaxKind.
IfKeyword
or
CSharpSyntaxKinds.cs (1)
61
public int IfKeyword => (int)SyntaxKind.
IfKeyword
;
ElasticTriviaFormattingRule.cs (1)
349
return currentToken.Kind() != SyntaxKind.
IfKeyword
? 1 : 0;
SpacingFormattingRule.cs (1)
156
(previousKind == SyntaxKind.
IfKeyword
|| previousKind == SyntaxKind.WhileKeyword || previousKind == SyntaxKind.SwitchKeyword ||
TokenBasedFormattingRule.cs (1)
149
if (previousToken.Kind() == SyntaxKind.ElseKeyword && currentToken.Kind() != SyntaxKind.
IfKeyword
)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
325
if (targetToken.Kind() is SyntaxKind.
IfKeyword
or
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
2652
token.GetPreviousToken(includeSkipped: true).IsKind(SyntaxKind.
IfKeyword
))
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
113
SyntaxKind.
IfKeyword
or
Completion\KeywordRecommenders\IfKeywordRecommender.cs (1)
13
: base(SyntaxKind.
IfKeyword
, isValidInPreprocessorContext: true)
CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
66
SyntaxKind.
IfKeyword
or
InitializeParameter\CSharpAddParameterCheckCodeRefactoringProvider.cs (1)
85
ifKeyword: Token(SyntaxKind.
IfKeyword
),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (43)
Generated\Syntax.Test.xml.Generated.cs (8)
410
=> InternalSyntaxFactory.IfStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.
IfKeyword
), InternalSyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock(), null);
668
=> InternalSyntaxFactory.IfDirectiveTrivia(InternalSyntaxFactory.Token(SyntaxKind.HashToken), InternalSyntaxFactory.Token(SyntaxKind.
IfKeyword
), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool(), new bool(), new bool());
2350
Assert.Equal(SyntaxKind.
IfKeyword
, node.IfKeyword.Kind);
3512
Assert.Equal(SyntaxKind.
IfKeyword
, node.IfKeyword.Kind);
10386
=> SyntaxFactory.IfStatement(new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.
IfKeyword
), SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock(), default(ElseClauseSyntax));
10644
=> SyntaxFactory.IfDirectiveTrivia(SyntaxFactory.Token(SyntaxKind.HashToken), SyntaxFactory.Token(SyntaxKind.
IfKeyword
), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool(), new bool(), new bool());
12326
Assert.Equal(SyntaxKind.
IfKeyword
, node.IfKeyword.Kind());
13488
Assert.Equal(SyntaxKind.
IfKeyword
, node.IfKeyword.Kind());
Parsing\DeclarationExpressionTests.cs (4)
66
N(SyntaxKind.
IfKeyword
);
100
N(SyntaxKind.
IfKeyword
);
150
N(SyntaxKind.
IfKeyword
);
193
N(SyntaxKind.
IfKeyword
);
Parsing\DeconstructionTests.cs (2)
2698
N(SyntaxKind.
IfKeyword
);
2760
N(SyntaxKind.
IfKeyword
);
Parsing\PatternParsingTests.cs (13)
2893
N(SyntaxKind.
IfKeyword
);
3101
N(SyntaxKind.
IfKeyword
);
3159
N(SyntaxKind.
IfKeyword
);
3219
N(SyntaxKind.
IfKeyword
);
3284
N(SyntaxKind.
IfKeyword
);
3351
N(SyntaxKind.
IfKeyword
);
3409
N(SyntaxKind.
IfKeyword
);
3469
N(SyntaxKind.
IfKeyword
);
3534
N(SyntaxKind.
IfKeyword
);
3601
N(SyntaxKind.
IfKeyword
);
3675
N(SyntaxKind.
IfKeyword
);
3751
N(SyntaxKind.
IfKeyword
);
3832
N(SyntaxKind.
IfKeyword
);
Parsing\StatementAttributeParsingTests.cs (2)
2205
N(SyntaxKind.
IfKeyword
);
3212
N(SyntaxKind.
IfKeyword
);
Parsing\StatementParsingTests.cs (11)
2024
Assert.Equal(SyntaxKind.
IfKeyword
, ss.IfKeyword.Kind());
2047
Assert.Equal(SyntaxKind.
IfKeyword
, ss.IfKeyword.Kind());
2073
Assert.Equal(SyntaxKind.
IfKeyword
, ss.IfKeyword.Kind());
2087
Assert.Equal(SyntaxKind.
IfKeyword
, subIf.IfKeyword.Kind());
3615
M(SyntaxKind.
IfKeyword
);
3690
M(SyntaxKind.
IfKeyword
);
3717
M(SyntaxKind.
IfKeyword
);
3776
N(SyntaxKind.
IfKeyword
);
3800
M(SyntaxKind.
IfKeyword
);
3856
N(SyntaxKind.
IfKeyword
);
3865
M(SyntaxKind.
IfKeyword
);
Syntax\SyntaxNodeTests.cs (3)
246
Assert.Equal(SyntaxKind.
IfKeyword
, nodesAndTokens[2].Kind());
283
Assert.Equal(SyntaxKind.
IfKeyword
, nodesAndTokens[3].Kind());
655
Assert.Equal(SyntaxKind.
IfKeyword
, token.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Classification\ClassificationHelpers.cs (1)
75
case SyntaxKind.
IfKeyword
:
CSharpSyntaxKinds.cs (1)
61
public int IfKeyword => (int)SyntaxKind.
IfKeyword
;
ElasticTriviaFormattingRule.cs (1)
349
return currentToken.Kind() != SyntaxKind.
IfKeyword
? 1 : 0;
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
325
if (targetToken.Kind() is SyntaxKind.
IfKeyword
or
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
2652
token.GetPreviousToken(includeSkipped: true).IsKind(SyntaxKind.
IfKeyword
))
SpacingFormattingRule.cs (1)
156
(previousKind == SyntaxKind.
IfKeyword
|| previousKind == SyntaxKind.WhileKeyword || previousKind == SyntaxKind.SwitchKeyword ||
TokenBasedFormattingRule.cs (1)
149
if (previousToken.Kind() == SyntaxKind.ElseKeyword && currentToken.Kind() != SyntaxKind.
IfKeyword
)
Microsoft.CodeAnalysis.UnitTests (1)
CommonSyntaxTests.cs (1)
188
var token = CSharp.SyntaxFactory.Token(CSharp.SyntaxKind.
IfKeyword
);