39 references to ForEachKeyword
Microsoft.CodeAnalysis.CSharp (21)
_generated\0\Syntax.xml.Main.Generated.cs (7)
4396if (forEachKeyword.Kind() != SyntaxKind.ForEachKeyword) throw new ArgumentException(nameof(forEachKeyword)); 4409=> SyntaxFactory.ForEachStatement(attributeLists, default, SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), type, identifier, SyntaxFactory.Token(SyntaxKind.InKeyword), expression, SyntaxFactory.Token(SyntaxKind.CloseParenToken), statement); 4413=> SyntaxFactory.ForEachStatement(default, default, SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), type, identifier, SyntaxFactory.Token(SyntaxKind.InKeyword), expression, SyntaxFactory.Token(SyntaxKind.CloseParenToken), statement); 4417=> SyntaxFactory.ForEachStatement(default, default, SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), type, SyntaxFactory.Identifier(identifier), SyntaxFactory.Token(SyntaxKind.InKeyword), expression, SyntaxFactory.Token(SyntaxKind.CloseParenToken), statement); 4428if (forEachKeyword.Kind() != SyntaxKind.ForEachKeyword) throw new ArgumentException(nameof(forEachKeyword)); 4440=> SyntaxFactory.ForEachVariableStatement(attributeLists, default, SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), variable, SyntaxFactory.Token(SyntaxKind.InKeyword), expression, SyntaxFactory.Token(SyntaxKind.CloseParenToken), statement); 4444=> SyntaxFactory.ForEachVariableStatement(default, default, SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), variable, SyntaxFactory.Token(SyntaxKind.InKeyword), expression, SyntaxFactory.Token(SyntaxKind.CloseParenToken), statement);
_generated\1\Syntax.xml.Internal.Generated.cs (4)
31360if (forEachKeyword.Kind != SyntaxKind.ForEachKeyword) throw new ArgumentException(nameof(forEachKeyword)); 31390if (forEachKeyword.Kind != SyntaxKind.ForEachKeyword) throw new ArgumentException(nameof(forEachKeyword)); 36787if (forEachKeyword.Kind != SyntaxKind.ForEachKeyword) throw new ArgumentException(nameof(forEachKeyword)); 36817if (forEachKeyword.Kind != SyntaxKind.ForEachKeyword) throw new ArgumentException(nameof(forEachKeyword));
Parser\LanguageParser.cs (8)
8376case SyntaxKind.ForEachKeyword: 8489this.PeekToken(1).Kind == SyntaxKind.ForEachKeyword) 9257case SyntaxKind.ForEachKeyword: 9773Debug.Assert(this.CurrentToken.Kind == SyntaxKind.ForEachKeyword || this.CurrentToken.Kind == SyntaxKind.ForKeyword); 9787skippedForToken = this.AddError(skippedForToken, ErrorCode.ERR_SyntaxError, SyntaxFacts.GetText(SyntaxKind.ForEachKeyword)); 9788@foreach = ConvertToMissingWithTrailingTrivia(skippedForToken, SyntaxKind.ForEachKeyword); 9792@foreach = this.EatToken(SyntaxKind.ForEachKeyword); 11197case SyntaxKind.ForEachKeyword:
Syntax\SyntaxKindFacts.cs (2)
933return SyntaxKind.ForEachKeyword; 1634case SyntaxKind.ForEachKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
46public static readonly SyntaxToken ForEachKeyword = Token(SyntaxKind.ForEachKeyword);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1840if (previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword or SyntaxKind.UsingKeyword)
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\KeywordRecommenders\ForEachKeywordRecommender.cs (1)
10internal sealed class ForEachKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.ForEachKeyword)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
243return 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)
29or SyntaxKind.ForEachKeyword
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Classification\ClassificationHelpers.cs (1)
81case SyntaxKind.ForEachKeyword:
Rename\CSharpRenameRewriterLanguageService.cs (1)
975case SyntaxKind.ForEachKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
46public static readonly SyntaxToken ForEachKeyword = Token(SyntaxKind.ForEachKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
155previousKind == SyntaxKind.ForKeyword || previousKind == SyntaxKind.ForEachKeyword || previousKind == SyntaxKind.CatchKeyword ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1840if (previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword or SyntaxKind.UsingKeyword)
Microsoft.CodeAnalysis.Razor.Compiler (3)
Language\Legacy\CSharpCodeParser.cs (2)
81CSharpSyntaxKind.ForEachKeyword, 2133if (At(CSharpSyntaxKind.ForEachKeyword))
Language\Legacy\NativeCSharpTokenizer.cs (1)
90CSharpSyntaxKind.ForEachKeyword,
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
46public static readonly SyntaxToken ForEachKeyword = Token(SyntaxKind.ForEachKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
155previousKind == SyntaxKind.ForKeyword || previousKind == SyntaxKind.ForEachKeyword || previousKind == SyntaxKind.CatchKeyword ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1840if (previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword or SyntaxKind.UsingKeyword)