81 references to ForEachKeyword
Microsoft.CodeAnalysis.CSharp (10)
Parser\LanguageParser.cs (8)
7399
case SyntaxKind.
ForEachKeyword
:
7508
this.PeekToken(1).Kind == SyntaxKind.
ForEachKeyword
)
8215
case SyntaxKind.
ForEachKeyword
:
8720
Debug.Assert(this.CurrentToken.Kind == SyntaxKind.
ForEachKeyword
|| this.CurrentToken.Kind == SyntaxKind.ForKeyword);
8734
skippedForToken = this.AddError(skippedForToken, ErrorCode.ERR_SyntaxError, SyntaxFacts.GetText(SyntaxKind.
ForEachKeyword
));
8735
@foreach = ConvertToMissingWithTrailingTrivia(skippedForToken, SyntaxKind.
ForEachKeyword
);
8739
@foreach = this.EatToken(SyntaxKind.
ForEachKeyword
);
10002
case SyntaxKind.
ForEachKeyword
:
Syntax\SyntaxKindFacts.cs (2)
875
return SyntaxKind.
ForEachKeyword
;
1515
case SyntaxKind.
ForEachKeyword
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
SpacingFormattingRule.cs (1)
157
previousKind == SyntaxKind.ForKeyword || previousKind == SyntaxKind.
ForEachKeyword
|| previousKind == SyntaxKind.CatchKeyword ||
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1817
previous.IsKind(SyntaxKind.
ForEachKeyword
) ||
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\KeywordRecommenders\ForEachKeywordRecommender.cs (1)
13
: base(SyntaxKind.
ForEachKeyword
)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
172
|| previous.IsKind(SyntaxKind.
ForEachKeyword
);
Completion\KeywordRecommenders\ScopedKeywordRecommender.cs (1)
46
return previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.
ForEachKeyword
;
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (1)
120
SyntaxFactory.Token(SyntaxKind.
ForEachKeyword
).WithTriviaFrom(forStatement.ForKeyword),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (61)
Generated\Syntax.Test.xml.Generated.cs (8)
389
=> InternalSyntaxFactory.ForEachStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), null, InternalSyntaxFactory.Token(SyntaxKind.
ForEachKeyword
), InternalSyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), InternalSyntaxFactory.Identifier("Identifier"), InternalSyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock());
392
=> InternalSyntaxFactory.ForEachVariableStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), null, InternalSyntaxFactory.Token(SyntaxKind.
ForEachKeyword
), InternalSyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock());
2243
Assert.Equal(SyntaxKind.
ForEachKeyword
, node.ForEachKeyword.Kind);
2262
Assert.Equal(SyntaxKind.
ForEachKeyword
, node.ForEachKeyword.Kind);
10365
=> SyntaxFactory.ForEachStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.
ForEachKeyword
), SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), SyntaxFactory.Identifier("Identifier"), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock());
10368
=> SyntaxFactory.ForEachVariableStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.
ForEachKeyword
), SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock());
12219
Assert.Equal(SyntaxKind.
ForEachKeyword
, node.ForEachKeyword.Kind());
12238
Assert.Equal(SyntaxKind.
ForEachKeyword
, node.ForEachKeyword.Kind());
Parsing\AsyncStreamsParsingTests.cs (3)
313
N(SyntaxKind.
ForEachKeyword
);
411
N(SyntaxKind.
ForEachKeyword
);
506
N(SyntaxKind.
ForEachKeyword
);
Parsing\DeclarationExpressionTests.cs (12)
373
N(SyntaxKind.
ForEachKeyword
);
401
N(SyntaxKind.
ForEachKeyword
);
429
N(SyntaxKind.
ForEachKeyword
);
486
N(SyntaxKind.
ForEachKeyword
);
543
N(SyntaxKind.
ForEachKeyword
);
590
N(SyntaxKind.
ForEachKeyword
);
633
N(SyntaxKind.
ForEachKeyword
);
677
N(SyntaxKind.
ForEachKeyword
);
745
N(SyntaxKind.
ForEachKeyword
);
809
N(SyntaxKind.
ForEachKeyword
);
836
N(SyntaxKind.
ForEachKeyword
);
867
N(SyntaxKind.
ForEachKeyword
);
Parsing\DeclarationScopeParsingTests.cs (28)
9978
N(SyntaxKind.
ForEachKeyword
);
10012
N(SyntaxKind.
ForEachKeyword
);
10072
N(SyntaxKind.
ForEachKeyword
);
10113
N(SyntaxKind.
ForEachKeyword
);
10183
N(SyntaxKind.
ForEachKeyword
);
10264
N(SyntaxKind.
ForEachKeyword
);
10313
N(SyntaxKind.
ForEachKeyword
);
10370
N(SyntaxKind.
ForEachKeyword
);
10407
N(SyntaxKind.
ForEachKeyword
);
10471
N(SyntaxKind.
ForEachKeyword
);
10512
N(SyntaxKind.
ForEachKeyword
);
10583
N(SyntaxKind.
ForEachKeyword
);
10632
N(SyntaxKind.
ForEachKeyword
);
10670
N(SyntaxKind.
ForEachKeyword
);
10712
N(SyntaxKind.
ForEachKeyword
);
10755
N(SyntaxKind.
ForEachKeyword
);
10797
N(SyntaxKind.
ForEachKeyword
);
10835
N(SyntaxKind.
ForEachKeyword
);
10873
N(SyntaxKind.
ForEachKeyword
);
10915
N(SyntaxKind.
ForEachKeyword
);
10958
N(SyntaxKind.
ForEachKeyword
);
10992
N(SyntaxKind.
ForEachKeyword
);
11046
N(SyntaxKind.
ForEachKeyword
);
11100
N(SyntaxKind.
ForEachKeyword
);
11158
N(SyntaxKind.
ForEachKeyword
);
11228
N(SyntaxKind.
ForEachKeyword
);
11300
N(SyntaxKind.
ForEachKeyword
);
11376
N(SyntaxKind.
ForEachKeyword
);
Parsing\DeconstructionTests.cs (3)
1439
N(SyntaxKind.
ForEachKeyword
);
1532
N(SyntaxKind.
ForEachKeyword
);
1664
N(SyntaxKind.
ForEachKeyword
);
Parsing\FunctionPointerTests.cs (1)
2948
N(SyntaxKind.
ForEachKeyword
);
Parsing\StatementAttributeParsingTests.cs (2)
1156
N(SyntaxKind.
ForEachKeyword
);
1274
N(SyntaxKind.
ForEachKeyword
);
Parsing\StatementParsingTests.cs (4)
1931
Assert.Equal(SyntaxKind.
ForEachKeyword
, fs.ForEachKeyword.Kind());
1960
Assert.Equal(SyntaxKind.
ForEachKeyword
, fs.ForEachKeyword.Kind());
1993
Assert.Equal(SyntaxKind.
ForEachKeyword
, fs.ForEachKeyword.Kind());
3376
Assert.Equal(SyntaxKind.
ForEachKeyword
, fs.ForEachKeyword.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\ClassificationHelpers.cs (1)
79
case SyntaxKind.
ForEachKeyword
:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1817
previous.IsKind(SyntaxKind.
ForEachKeyword
) ||
Rename\CSharpRenameRewriterLanguageService.cs (1)
1014
case SyntaxKind.
ForEachKeyword
:
SpacingFormattingRule.cs (1)
157
previousKind == SyntaxKind.ForKeyword || previousKind == SyntaxKind.
ForEachKeyword
|| previousKind == SyntaxKind.CatchKeyword ||