134 references to ForStatement
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder_Deconstruct.cs (2)
49case SyntaxKind.ForStatement: 197case SyntaxKind.ForStatement:
Binder\Binder_Expressions.cs (2)
4599variableDeclaration.Parent.IsKind(SyntaxKind.ForStatement); 11007case SyntaxKind.ForStatement:
Binder\Binder_Statements.cs (2)
87case SyntaxKind.ForStatement: 363case SyntaxKind.ForStatement:
Compilation\MemberSemanticModel.cs (1)
398case SyntaxKind.ForStatement:
Lowering\ClosureConversion\ClosureConversion.cs (1)
1772case SyntaxKind.ForStatement:
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (1)
121case SyntaxKind.ForStatement:
Lowering\Instrumentation\Instrumenter.cs (2)
180Debug.Assert(original.Syntax.Kind() == SyntaxKind.ForStatement); 187Debug.Assert(original.Syntax.Kind() == SyntaxKind.ForStatement);
Symbols\Source\SourceLocalSymbol.cs (1)
174new[] { SyntaxKind.LocalDeclarationStatement, SyntaxKind.ForStatement, SyntaxKind.UsingStatement, SyntaxKind.FixedStatement }.
Syntax\LambdaUtilities.cs (2)
395case SyntaxKind.ForStatement: 447case SyntaxKind.ForStatement:
Syntax\LookupPosition.cs (2)
336case SyntaxKind.ForStatement: 399case SyntaxKind.ForStatement:
Syntax\SyntaxNodeExtensions.cs (1)
126case SyntaxKind.ForStatement:
Syntax\SyntaxNormalizer.cs (1)
417if (currentToken.Parent.IsKind(SyntaxKind.ForStatement))
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
36SyntaxKind.ForStatement,
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
328case SyntaxKind.ForStatement:
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
148case SyntaxKind.ForStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
400case SyntaxKind.ForStatement: 415case SyntaxKind.ForStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
60case SyntaxKind.ForStatement: 468&& (previousToken.Parent is StatementSyntax && !previousToken.Parent.IsKind(SyntaxKind.ForStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
177if (previousParentKind == SyntaxKind.ForStatement 614SyntaxKind.ForStatement or SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
145public int ForStatement => (int)SyntaxKind.ForStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
360SyntaxKind.ForStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (1)
108SyntaxKind.ForStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
86typeName.Parent.Parent is (kind: SyntaxKind.LocalDeclarationStatement or SyntaxKind.ForStatement or SyntaxKind.UsingStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
109SyntaxKind.ForStatement or
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
164is SyntaxKind.ForStatement
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1803SyntaxKind.ForStatement or 2537token.Parent.IsKind(SyntaxKind.ForStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
2180if (variableDeclaration.IsParentKind(SyntaxKind.ForStatement))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
CompleteStatement\CompleteStatementCommandHandler.cs (2)
356case SyntaxKind.ForStatement: 524case SyntaxKind.ForStatement:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\LocalSlotMappingTests.cs (1)
3698ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.ForStatement, SyntaxKind.VariableDeclarator))));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\OutVarTests.cs (1)
1187case SyntaxKind.ForStatement:
Microsoft.CodeAnalysis.CSharp.Features (16)
BraceCompletion\CurlyBraceCompletionService.cs (1)
217case SyntaxKind.ForStatement:
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
199case SyntaxKind.ForStatement: 251case SyntaxKind.ForStatement:
EditAndContinue\BreakpointSpans.cs (2)
625case SyntaxKind.ForStatement: 957case SyntaxKind.ForStatement:
EditAndContinue\SyntaxComparer.cs (5)
245if (node != null && node.Parent.IsKind(SyntaxKind.ForStatement) && node is ExpressionSyntax) 379case SyntaxKind.ForStatement: 739case SyntaxKind.ForStatement: 785case SyntaxKind.ForStatement: 1058case SyntaxKind.ForStatement:
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
36SyntaxKind.ForStatement,
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
328case SyntaxKind.ForStatement:
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
148case SyntaxKind.ForStatement:
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (2)
395case SyntaxKind.ForStatement: 447case SyntaxKind.ForStatement:
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
202SyntaxKind.ForStatement => BlockTypes.Loop,
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (60)
Parsing\DeclarationScopeParsingTests.cs (26)
8360N(SyntaxKind.ForStatement); 8397N(SyntaxKind.ForStatement); 8445N(SyntaxKind.ForStatement); 8490N(SyntaxKind.ForStatement); 8531N(SyntaxKind.ForStatement); 8580N(SyntaxKind.ForStatement); 8629N(SyntaxKind.ForStatement); 8670N(SyntaxKind.ForStatement); 8721N(SyntaxKind.ForStatement); 8761N(SyntaxKind.ForStatement); 8819N(SyntaxKind.ForStatement); 8863N(SyntaxKind.ForStatement); 8931N(SyntaxKind.ForStatement); 8980N(SyntaxKind.ForStatement); 9021N(SyntaxKind.ForStatement); 9066N(SyntaxKind.ForStatement); 9112N(SyntaxKind.ForStatement); 9157N(SyntaxKind.ForStatement); 9198N(SyntaxKind.ForStatement); 9247N(SyntaxKind.ForStatement); 9288N(SyntaxKind.ForStatement); 9334N(SyntaxKind.ForStatement); 9380N(SyntaxKind.ForStatement); 9417N(SyntaxKind.ForStatement); 9462N(SyntaxKind.ForStatement); 9503N(SyntaxKind.ForStatement);
Parsing\DeconstructionTests.cs (4)
546N(SyntaxKind.ForStatement); 1254N(SyntaxKind.ForStatement); 1352N(SyntaxKind.ForStatement); 2039Assert.True(statement.Kind() == SyntaxKind.ForStatement);
Parsing\ExpressionParsingTests.cs (1)
6345N(SyntaxKind.ForStatement);
Parsing\ForStatementParsingTest.cs (7)
18N(SyntaxKind.ForStatement); 93N(SyntaxKind.ForStatement); 158N(SyntaxKind.ForStatement); 226N(SyntaxKind.ForStatement); 280N(SyntaxKind.ForStatement); 319N(SyntaxKind.ForStatement); 389N(SyntaxKind.ForStatement);
Parsing\FunctionPointerTests.cs (1)
2987N(SyntaxKind.ForStatement);
Parsing\ParsingErrorRecoveryTests.cs (9)
4369Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4391Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4417Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4444Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4465Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4488Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4513Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4538Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind()); 4560Assert.Equal(SyntaxKind.ForStatement, ms.Body.Statements[0].Kind());
Parsing\StatementAttributeParsingTests.cs (1)
1049N(SyntaxKind.ForStatement);
Parsing\StatementParsingTests.cs (11)
1521Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1547Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1584Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1623Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1668N(SyntaxKind.ForStatement); 1732Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1761Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1791Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1821Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1851Assert.Equal(SyntaxKind.ForStatement, statement.Kind()); 1882Assert.Equal(SyntaxKind.ForStatement, statement.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (17)
Classification\ClassificationHelpers.cs (1)
107case SyntaxKind.ForStatement:
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
184case SyntaxKind.ForStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
400case SyntaxKind.ForStatement: 415case SyntaxKind.ForStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
60case SyntaxKind.ForStatement: 468&& (previousToken.Parent is StatementSyntax && !previousToken.Parent.IsKind(SyntaxKind.ForStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
177if (previousParentKind == SyntaxKind.ForStatement 614SyntaxKind.ForStatement or SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
145public int ForStatement => (int)SyntaxKind.ForStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
360SyntaxKind.ForStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (1)
108SyntaxKind.ForStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
86typeName.Parent.Parent is (kind: SyntaxKind.LocalDeclarationStatement or SyntaxKind.ForStatement or SyntaxKind.UsingStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
109SyntaxKind.ForStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
164is SyntaxKind.ForStatement
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1803SyntaxKind.ForStatement or 2537token.Parent.IsKind(SyntaxKind.ForStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
2180if (variableDeclaration.IsParentKind(SyntaxKind.ForStatement))
Microsoft.ML.InternalCodeAnalyzer (1)
SingleVariableDeclarationAnalyzer.cs (1)
44if (vars.Count <= 1 || node.Parent.IsKind(SyntaxKind.ForStatement))