81 references to ForEachKeyword
Microsoft.CodeAnalysis.CSharp (10)
Parser\LanguageParser.cs (8)
7399case SyntaxKind.ForEachKeyword: 7508this.PeekToken(1).Kind == SyntaxKind.ForEachKeyword) 8215case SyntaxKind.ForEachKeyword: 8720Debug.Assert(this.CurrentToken.Kind == SyntaxKind.ForEachKeyword || this.CurrentToken.Kind == SyntaxKind.ForKeyword); 8734skippedForToken = this.AddError(skippedForToken, ErrorCode.ERR_SyntaxError, SyntaxFacts.GetText(SyntaxKind.ForEachKeyword)); 8735@foreach = ConvertToMissingWithTrailingTrivia(skippedForToken, SyntaxKind.ForEachKeyword); 8739@foreach = this.EatToken(SyntaxKind.ForEachKeyword); 10002case SyntaxKind.ForEachKeyword:
Syntax\SyntaxKindFacts.cs (2)
875return SyntaxKind.ForEachKeyword; 1515case SyntaxKind.ForEachKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
SpacingFormattingRule.cs (1)
157previousKind == 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)
1817previous.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)
46return previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword;
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (1)
120SyntaxFactory.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()); 2243Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind); 2262Assert.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()); 12219Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind()); 12238Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind());
Parsing\AsyncStreamsParsingTests.cs (3)
313N(SyntaxKind.ForEachKeyword); 411N(SyntaxKind.ForEachKeyword); 506N(SyntaxKind.ForEachKeyword);
Parsing\DeclarationExpressionTests.cs (12)
373N(SyntaxKind.ForEachKeyword); 401N(SyntaxKind.ForEachKeyword); 429N(SyntaxKind.ForEachKeyword); 486N(SyntaxKind.ForEachKeyword); 543N(SyntaxKind.ForEachKeyword); 590N(SyntaxKind.ForEachKeyword); 633N(SyntaxKind.ForEachKeyword); 677N(SyntaxKind.ForEachKeyword); 745N(SyntaxKind.ForEachKeyword); 809N(SyntaxKind.ForEachKeyword); 836N(SyntaxKind.ForEachKeyword); 867N(SyntaxKind.ForEachKeyword);
Parsing\DeclarationScopeParsingTests.cs (28)
9978N(SyntaxKind.ForEachKeyword); 10012N(SyntaxKind.ForEachKeyword); 10072N(SyntaxKind.ForEachKeyword); 10113N(SyntaxKind.ForEachKeyword); 10183N(SyntaxKind.ForEachKeyword); 10264N(SyntaxKind.ForEachKeyword); 10313N(SyntaxKind.ForEachKeyword); 10370N(SyntaxKind.ForEachKeyword); 10407N(SyntaxKind.ForEachKeyword); 10471N(SyntaxKind.ForEachKeyword); 10512N(SyntaxKind.ForEachKeyword); 10583N(SyntaxKind.ForEachKeyword); 10632N(SyntaxKind.ForEachKeyword); 10670N(SyntaxKind.ForEachKeyword); 10712N(SyntaxKind.ForEachKeyword); 10755N(SyntaxKind.ForEachKeyword); 10797N(SyntaxKind.ForEachKeyword); 10835N(SyntaxKind.ForEachKeyword); 10873N(SyntaxKind.ForEachKeyword); 10915N(SyntaxKind.ForEachKeyword); 10958N(SyntaxKind.ForEachKeyword); 10992N(SyntaxKind.ForEachKeyword); 11046N(SyntaxKind.ForEachKeyword); 11100N(SyntaxKind.ForEachKeyword); 11158N(SyntaxKind.ForEachKeyword); 11228N(SyntaxKind.ForEachKeyword); 11300N(SyntaxKind.ForEachKeyword); 11376N(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)
1156N(SyntaxKind.ForEachKeyword); 1274N(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()); 3376Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\ClassificationHelpers.cs (1)
79case SyntaxKind.ForEachKeyword:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1817previous.IsKind(SyntaxKind.ForEachKeyword) ||
Rename\CSharpRenameRewriterLanguageService.cs (1)
1014case SyntaxKind.ForEachKeyword:
SpacingFormattingRule.cs (1)
157previousKind == SyntaxKind.ForKeyword || previousKind == SyntaxKind.ForEachKeyword || previousKind == SyntaxKind.CatchKeyword ||