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