54 references to Statement
Microsoft.CodeAnalysis.CSharp (15)
Binder\ForLoopBinder.cs (1)
126var body = originalBinder.BindPossibleEmbeddedStatement(node.Statement, diagnostics);
Binder\LocalBinderFactory.cs (1)
637VisitPossibleEmbeddedStatement(node.Statement, binder);
Syntax.xml.Main.Generated.cs (1)
1891=> node.Update(VisitList(node.AttributeLists), VisitToken(node.ForKeyword), VisitToken(node.OpenParenToken), (VariableDeclarationSyntax?)Visit(node.Declaration), VisitList(node.Initializers), VisitToken(node.FirstSemicolonToken), (ExpressionSyntax?)Visit(node.Condition), VisitToken(node.SecondSemicolonToken), VisitList(node.Incrementors), VisitToken(node.CloseParenToken), (StatementSyntax?)Visit(node.Statement) ?? throw new ArgumentNullException("statement"));
Syntax.xml.Syntax.Generated.cs (11)
7647if (attributeLists != this.AttributeLists || forKeyword != this.ForKeyword || openParenToken != this.OpenParenToken || declaration != this.Declaration || initializers != this.Initializers || firstSemicolonToken != this.FirstSemicolonToken || condition != this.Condition || secondSemicolonToken != this.SecondSemicolonToken || incrementors != this.Incrementors || closeParenToken != this.CloseParenToken || statement != this.Statement) 7658public new ForStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7659public ForStatementSyntax WithForKeyword(SyntaxToken forKeyword) => Update(this.AttributeLists, forKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7660public ForStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.ForKeyword, openParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7661public ForStatementSyntax WithDeclaration(VariableDeclarationSyntax? declaration) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7662public ForStatementSyntax WithInitializers(SeparatedSyntaxList<ExpressionSyntax> initializers) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7663public ForStatementSyntax WithFirstSemicolonToken(SyntaxToken firstSemicolonToken) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, firstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7664public ForStatementSyntax WithCondition(ExpressionSyntax? condition) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7665public ForStatementSyntax WithSecondSemicolonToken(SyntaxToken secondSemicolonToken) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, secondSemicolonToken, this.Incrementors, this.CloseParenToken, this.Statement); 7666public ForStatementSyntax WithIncrementors(SeparatedSyntaxList<ExpressionSyntax> incrementors) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, incrementors, this.CloseParenToken, this.Statement); 7667public ForStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, closeParenToken, this.Statement);
Syntax\LookupPosition.cs (1)
400return GetFirstExcludedToken(((ForStatementSyntax)statement).Statement);
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
167return CheckLoop(forStatement, forStatement.Statement, defAssignedWhenTrue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
137ForStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
319if (node is ForStatementSyntax forStatement && forStatement.Statement != null && !(forStatement.Statement is BlockSyntax)) 321AddEmbeddedStatementsIndentationOperation(list, forStatement.Statement);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
673=> forStatementNode.Statement is not BlockSyntax
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\OutVarTests.cs (1)
1279forStatement.Statement.DescendantNodes().OfType<ForStatementSyntax>().Any(f => f.Condition == null))
Microsoft.CodeAnalysis.CSharp.Features (11)
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (3)
37=> forStatement.Statement is BlockSyntax block 39: [forStatement.Statement]; 129forStatement.Statement);
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
252AddLastStatementOfConstruct((statement as ForStatementSyntax).Statement);
EditAndContinue\BreakpointSpans.cs (1)
659return TryCreateSpanForStatement(forStatement.Statement, position);
EditAndContinue\SyntaxComparer.cs (2)
1178var statementDistance = ComputeDistance(left.Statement, right.Statement);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
245.WithStatement(ReplaceStatementIfNeeded(node.Statement));
Snippets\AbstractCSharpForLoopSnippetProvider.cs (2)
119static s => (BlockSyntax)s.Statement, 126static s => (BlockSyntax)s.Statement,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
167return CheckLoop(forStatement, forStatement.Statement, defAssignedWhenTrue);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (12)
Generated\Syntax.Test.xml.Generated.cs (2)
12651Assert.NotNull(node.Statement); 12652var newNode = node.WithAttributeLists(node.AttributeLists).WithForKeyword(node.ForKeyword).WithOpenParenToken(node.OpenParenToken).WithDeclaration(node.Declaration).WithInitializers(node.Initializers).WithFirstSemicolonToken(node.FirstSemicolonToken).WithCondition(node.Condition).WithSecondSemicolonToken(node.SecondSemicolonToken).WithIncrementors(node.Incrementors).WithCloseParenToken(node.CloseParenToken).WithStatement(node.Statement);
Parsing\StatementParsingTests.cs (10)
1537Assert.NotNull(fs.Statement); 1574Assert.NotNull(fs.Statement); 1613Assert.NotNull(fs.Statement); 1658Assert.NotNull(fs.Statement); 1751Assert.NotNull(fs.Statement); 1781Assert.NotNull(fs.Statement); 1811Assert.NotNull(fs.Statement); 1841Assert.NotNull(fs.Statement); 1872Assert.NotNull(fs.Statement); 1915Assert.NotNull(fs.Statement);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Rename\LocalConflictVisitor.cs (1)
80Visit(node.Statement);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
137ForStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
319if (node is ForStatementSyntax forStatement && forStatement.Statement != null && !(forStatement.Statement is BlockSyntax)) 321AddEmbeddedStatementsIndentationOperation(list, forStatement.Statement);
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
137ForStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
319if (node is ForStatementSyntax forStatement && forStatement.Statement != null && !(forStatement.Statement is BlockSyntax)) 321AddEmbeddedStatementsIndentationOperation(list, forStatement.Statement);