47 references to ForKeyword
Microsoft.CodeAnalysis.CSharp (12)
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); 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); 7668public ForStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.ForKeyword, this.OpenParenToken, this.Declaration, this.Initializers, this.FirstSemicolonToken, this.Condition, this.SecondSemicolonToken, this.Incrementors, this.CloseParenToken, statement);
Microsoft.CodeAnalysis.CSharp.Features (3)
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (1)
122ForEachKeyword.WithTriviaFrom(forStatement.ForKeyword),
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1816return TextSpan.FromBounds(forStatement.ForKeyword.SpanStart, forStatement.CloseParenToken.Span.End);
Highlighting\KeywordHighlighters\LoopHighlighter.cs (1)
68=> spans.Add(statement.ForKeyword.Span);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (32)
Generated\Syntax.Test.xml.Generated.cs (2)
12642Assert.Equal(SyntaxKind.ForKeyword, node.ForKeyword.Kind()); 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 (30)
1526Assert.NotEqual(default, fs.ForKeyword); 1527Assert.False(fs.ForKeyword.IsMissing); 1528Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1552Assert.NotEqual(default, fs.ForKeyword); 1553Assert.False(fs.ForKeyword.IsMissing); 1554Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1589Assert.NotEqual(default, fs.ForKeyword); 1590Assert.False(fs.ForKeyword.IsMissing); 1591Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1628Assert.NotEqual(default, fs.ForKeyword); 1629Assert.False(fs.ForKeyword.IsMissing); 1630Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1737Assert.NotEqual(default, fs.ForKeyword); 1738Assert.False(fs.ForKeyword.IsMissing); 1739Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1766Assert.NotEqual(default, fs.ForKeyword); 1767Assert.False(fs.ForKeyword.IsMissing); 1768Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1796Assert.NotEqual(default, fs.ForKeyword); 1797Assert.False(fs.ForKeyword.IsMissing); 1798Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1826Assert.NotEqual(default, fs.ForKeyword); 1827Assert.False(fs.ForKeyword.IsMissing); 1828Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1856Assert.NotEqual(default, fs.ForKeyword); 1857Assert.False(fs.ForKeyword.IsMissing); 1858Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1887Assert.NotEqual(default, fs.ForKeyword); 1888Assert.False(fs.ForKeyword.IsMissing); 1889Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind());