54 references to Statement
Microsoft.CodeAnalysis.CSharp (15)
Binder\ForLoopBinder.cs (1)
126
var body = originalBinder.BindPossibleEmbeddedStatement(node.
Statement
, diagnostics);
Binder\LocalBinderFactory.cs (1)
637
VisitPossibleEmbeddedStatement(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)
7647
if (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
)
7658
public 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
);
7659
public 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
);
7660
public 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
);
7661
public 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
);
7662
public 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
);
7663
public 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
);
7664
public 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
);
7665
public 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
);
7666
public 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
);
7667
public 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)
400
return GetFirstExcludedToken(((ForStatementSyntax)statement).
Statement
);
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
167
return CheckLoop(forStatement, forStatement.
Statement
, defAssignedWhenTrue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
137
ForStatementSyntax n => n.
Statement
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
319
if (node is ForStatementSyntax forStatement && forStatement.
Statement
!= null && !(forStatement.
Statement
is BlockSyntax))
321
AddEmbeddedStatementsIndentationOperation(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)
1279
forStatement.
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
];
129
forStatement.
Statement
);
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
252
AddLastStatementOfConstruct((statement as ForStatementSyntax).
Statement
);
EditAndContinue\BreakpointSpans.cs (1)
659
return TryCreateSpanForStatement(forStatement.
Statement
, position);
EditAndContinue\SyntaxComparer.cs (2)
1178
var statementDistance = ComputeDistance(left.
Statement
, right.
Statement
);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
245
.WithStatement(ReplaceStatementIfNeeded(node.
Statement
));
Snippets\AbstractCSharpForLoopSnippetProvider.cs (2)
119
static s => (BlockSyntax)s.
Statement
,
126
static s => (BlockSyntax)s.
Statement
,
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
167
return CheckLoop(forStatement, forStatement.
Statement
, defAssignedWhenTrue);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (12)
Generated\Syntax.Test.xml.Generated.cs (2)
12651
Assert.NotNull(node.
Statement
);
12652
var 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)
1537
Assert.NotNull(fs.
Statement
);
1574
Assert.NotNull(fs.
Statement
);
1613
Assert.NotNull(fs.
Statement
);
1658
Assert.NotNull(fs.
Statement
);
1751
Assert.NotNull(fs.
Statement
);
1781
Assert.NotNull(fs.
Statement
);
1811
Assert.NotNull(fs.
Statement
);
1841
Assert.NotNull(fs.
Statement
);
1872
Assert.NotNull(fs.
Statement
);
1915
Assert.NotNull(fs.
Statement
);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Rename\LocalConflictVisitor.cs (1)
80
Visit(node.
Statement
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
137
ForStatementSyntax n => n.
Statement
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
319
if (node is ForStatementSyntax forStatement && forStatement.
Statement
!= null && !(forStatement.
Statement
is BlockSyntax))
321
AddEmbeddedStatementsIndentationOperation(list, forStatement.
Statement
);
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
137
ForStatementSyntax n => n.
Statement
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (3)
319
if (node is ForStatementSyntax forStatement && forStatement.
Statement
!= null && !(forStatement.
Statement
is BlockSyntax))
321
AddEmbeddedStatementsIndentationOperation(list, forStatement.
Statement
);