83 references to ForEachKeyword
Microsoft.CodeAnalysis.CSharp (10)
Parser\LanguageParser.cs (8)
7999case SyntaxKind.ForEachKeyword: 8113this.PeekToken(1).Kind == SyntaxKind.ForEachKeyword) 8821case SyntaxKind.ForEachKeyword: 9318Debug.Assert(this.CurrentToken.Kind == SyntaxKind.ForEachKeyword || this.CurrentToken.Kind == SyntaxKind.ForKeyword); 9332skippedForToken = this.AddError(skippedForToken, ErrorCode.ERR_SyntaxError, SyntaxFacts.GetText(SyntaxKind.ForEachKeyword)); 9333@foreach = ConvertToMissingWithTrailingTrivia(skippedForToken, SyntaxKind.ForEachKeyword); 9337@foreach = this.EatToken(SyntaxKind.ForEachKeyword); 10683case SyntaxKind.ForEachKeyword:
Syntax\SyntaxKindFacts.cs (2)
903return SyntaxKind.ForEachKeyword; 1551case SyntaxKind.ForEachKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
35public static readonly SyntaxToken ForEachKeyword = Token(SyntaxKind.ForEachKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
155previousKind == SyntaxKind.ForKeyword || previousKind == SyntaxKind.ForEachKeyword || previousKind == SyntaxKind.CatchKeyword ||
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1832if (previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword or SyntaxKind.UsingKeyword)
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\KeywordRecommenders\ForEachKeywordRecommender.cs (1)
13: base(SyntaxKind.ForEachKeyword)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
201return previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword;
Completion\KeywordRecommenders\ScopedKeywordRecommender.cs (1)
38return previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword;
Highlighting\KeywordHighlighters\LoopHighlighter.cs (1)
28or SyntaxKind.ForEachKeyword
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (61)
Generated\Syntax.Test.xml.Generated.cs (8)
401=> 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()); 404=> 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()); 2304Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind); 2323Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind); 10617=> 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()); 10620=> 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()); 12520Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind()); 12539Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind());
Parsing\AsyncStreamsParsingTests.cs (3)
313N(SyntaxKind.ForEachKeyword); 411N(SyntaxKind.ForEachKeyword); 506N(SyntaxKind.ForEachKeyword);
Parsing\DeclarationExpressionTests.cs (12)
410N(SyntaxKind.ForEachKeyword); 438N(SyntaxKind.ForEachKeyword); 466N(SyntaxKind.ForEachKeyword); 523N(SyntaxKind.ForEachKeyword); 580N(SyntaxKind.ForEachKeyword); 627N(SyntaxKind.ForEachKeyword); 670N(SyntaxKind.ForEachKeyword); 714N(SyntaxKind.ForEachKeyword); 782N(SyntaxKind.ForEachKeyword); 846N(SyntaxKind.ForEachKeyword); 873N(SyntaxKind.ForEachKeyword); 904N(SyntaxKind.ForEachKeyword);
Parsing\DeclarationScopeParsingTests.cs (28)
9665N(SyntaxKind.ForEachKeyword); 9699N(SyntaxKind.ForEachKeyword); 9759N(SyntaxKind.ForEachKeyword); 9800N(SyntaxKind.ForEachKeyword); 9863N(SyntaxKind.ForEachKeyword); 9937N(SyntaxKind.ForEachKeyword); 9986N(SyntaxKind.ForEachKeyword); 10043N(SyntaxKind.ForEachKeyword); 10080N(SyntaxKind.ForEachKeyword); 10144N(SyntaxKind.ForEachKeyword); 10185N(SyntaxKind.ForEachKeyword); 10249N(SyntaxKind.ForEachKeyword); 10298N(SyntaxKind.ForEachKeyword); 10336N(SyntaxKind.ForEachKeyword); 10378N(SyntaxKind.ForEachKeyword); 10421N(SyntaxKind.ForEachKeyword); 10463N(SyntaxKind.ForEachKeyword); 10501N(SyntaxKind.ForEachKeyword); 10539N(SyntaxKind.ForEachKeyword); 10581N(SyntaxKind.ForEachKeyword); 10624N(SyntaxKind.ForEachKeyword); 10658N(SyntaxKind.ForEachKeyword); 10712N(SyntaxKind.ForEachKeyword); 10766N(SyntaxKind.ForEachKeyword); 10824N(SyntaxKind.ForEachKeyword); 10894N(SyntaxKind.ForEachKeyword); 10966N(SyntaxKind.ForEachKeyword); 11042N(SyntaxKind.ForEachKeyword);
Parsing\DeconstructionTests.cs (3)
1439N(SyntaxKind.ForEachKeyword); 1532N(SyntaxKind.ForEachKeyword); 1664N(SyntaxKind.ForEachKeyword);
Parsing\FunctionPointerTests.cs (1)
2948N(SyntaxKind.ForEachKeyword);
Parsing\StatementAttributeParsingTests.cs (2)
1157N(SyntaxKind.ForEachKeyword); 1275N(SyntaxKind.ForEachKeyword);
Parsing\StatementParsingTests.cs (4)
1931Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind()); 1960Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind()); 1993Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind()); 3379Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Classification\ClassificationHelpers.cs (1)
79case SyntaxKind.ForEachKeyword:
Rename\CSharpRenameRewriterLanguageService.cs (1)
1006case SyntaxKind.ForEachKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
35public static readonly SyntaxToken ForEachKeyword = Token(SyntaxKind.ForEachKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
155previousKind == SyntaxKind.ForKeyword || previousKind == SyntaxKind.ForEachKeyword || previousKind == SyntaxKind.CatchKeyword ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1832if (previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword or SyntaxKind.UsingKeyword)