Files
2026-08-27 10:56:38 -06:00

299 lines
17 KiB
C#

using System.Collections.Generic;
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
public sealed class ForEachVariableStatementSyntax : CommonForEachStatementSyntax
{
private SyntaxNode? attributeLists;
private ExpressionSyntax? variable;
private ExpressionSyntax? expression;
private StatementSyntax? statement;
public override SyntaxList<AttributeListSyntax> AttributeLists => new SyntaxList<AttributeListSyntax>(((SyntaxNode)this).GetRed(ref attributeLists, 0));
public override SyntaxToken AwaitKeyword
{
get
{
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
SyntaxToken awaitKeyword = ((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ForEachVariableStatementSyntax)(object)((SyntaxNode)this).Green).awaitKeyword;
if (awaitKeyword == null)
{
return default(SyntaxToken);
}
return new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)awaitKeyword, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1));
}
}
public override SyntaxToken ForEachKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ForEachVariableStatementSyntax)(object)((SyntaxNode)this).Green).forEachKeyword, ((SyntaxNode)this).GetChildPosition(2), ((SyntaxNode)this).GetChildIndex(2));
public override SyntaxToken OpenParenToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ForEachVariableStatementSyntax)(object)((SyntaxNode)this).Green).openParenToken, ((SyntaxNode)this).GetChildPosition(3), ((SyntaxNode)this).GetChildIndex(3));
public ExpressionSyntax Variable => ((SyntaxNode)this).GetRed<ExpressionSyntax>(ref variable, 4);
public override SyntaxToken InKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ForEachVariableStatementSyntax)(object)((SyntaxNode)this).Green).inKeyword, ((SyntaxNode)this).GetChildPosition(5), ((SyntaxNode)this).GetChildIndex(5));
public override ExpressionSyntax Expression => ((SyntaxNode)this).GetRed<ExpressionSyntax>(ref expression, 6);
public override SyntaxToken CloseParenToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ForEachVariableStatementSyntax)(object)((SyntaxNode)this).Green).closeParenToken, ((SyntaxNode)this).GetChildPosition(7), ((SyntaxNode)this).GetChildIndex(7));
public override StatementSyntax Statement => ((SyntaxNode)this).GetRed<StatementSyntax>(ref statement, 8);
public ForEachVariableStatementSyntax Update(SyntaxToken forEachKeyword, SyntaxToken openParenToken, ExpressionSyntax variable, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
return Update(AwaitKeyword, forEachKeyword, openParenToken, variable, inKeyword, expression, closeParenToken, statement);
}
public ForEachVariableStatementSyntax Update(SyntaxToken awaitKeyword, SyntaxToken forEachKeyword, SyntaxToken openParenToken, ExpressionSyntax variable, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, awaitKeyword, forEachKeyword, openParenToken, variable, inKeyword, expression, closeParenToken, statement);
}
internal ForEachVariableStatementSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position)
: base(green, parent, position)
{
}
internal override SyntaxNode? GetNodeSlot(int index)
{
return (SyntaxNode?)(index switch
{
0 => ((SyntaxNode)this).GetRedAtZero(ref attributeLists),
4 => ((SyntaxNode)this).GetRed<ExpressionSyntax>(ref variable, 4),
6 => ((SyntaxNode)this).GetRed<ExpressionSyntax>(ref expression, 6),
8 => ((SyntaxNode)this).GetRed<StatementSyntax>(ref statement, 8),
_ => null,
});
}
internal override SyntaxNode? GetCachedSlot(int index)
{
return (SyntaxNode?)(index switch
{
0 => attributeLists,
4 => variable,
6 => expression,
8 => statement,
_ => null,
});
}
public override void Accept(CSharpSyntaxVisitor visitor)
{
visitor.VisitForEachVariableStatement(this);
}
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
{
return visitor.VisitForEachVariableStatement(this);
}
public ForEachVariableStatementSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken awaitKeyword, SyntaxToken forEachKeyword, SyntaxToken openParenToken, ExpressionSyntax variable, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
if (attributeLists != AttributeLists || awaitKeyword != AwaitKeyword || forEachKeyword != ForEachKeyword || openParenToken != OpenParenToken || variable != Variable || inKeyword != InKeyword || expression != Expression || closeParenToken != CloseParenToken || statement != Statement)
{
ForEachVariableStatementSyntax forEachVariableStatementSyntax = SyntaxFactory.ForEachVariableStatement(attributeLists, awaitKeyword, forEachKeyword, openParenToken, variable, inKeyword, expression, closeParenToken, statement);
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
if (annotations == null || annotations.Length == 0)
{
return forEachVariableStatementSyntax;
}
return forEachVariableStatementSyntax.WithAnnotations(annotations);
}
return this;
}
internal override StatementSyntax WithAttributeListsCore(SyntaxList<AttributeListSyntax> attributeLists)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithAttributeLists(attributeLists);
}
public new ForEachVariableStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(attributeLists, AwaitKeyword, ForEachKeyword, OpenParenToken, Variable, InKeyword, Expression, CloseParenToken, Statement);
}
internal override CommonForEachStatementSyntax WithAwaitKeywordCore(SyntaxToken awaitKeyword)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithAwaitKeyword(awaitKeyword);
}
public new ForEachVariableStatementSyntax WithAwaitKeyword(SyntaxToken awaitKeyword)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, awaitKeyword, ForEachKeyword, OpenParenToken, Variable, InKeyword, Expression, CloseParenToken, Statement);
}
internal override CommonForEachStatementSyntax WithForEachKeywordCore(SyntaxToken forEachKeyword)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithForEachKeyword(forEachKeyword);
}
public new ForEachVariableStatementSyntax WithForEachKeyword(SyntaxToken forEachKeyword)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, AwaitKeyword, forEachKeyword, OpenParenToken, Variable, InKeyword, Expression, CloseParenToken, Statement);
}
internal override CommonForEachStatementSyntax WithOpenParenTokenCore(SyntaxToken openParenToken)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithOpenParenToken(openParenToken);
}
public new ForEachVariableStatementSyntax WithOpenParenToken(SyntaxToken openParenToken)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, AwaitKeyword, ForEachKeyword, openParenToken, Variable, InKeyword, Expression, CloseParenToken, Statement);
}
public ForEachVariableStatementSyntax WithVariable(ExpressionSyntax variable)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, AwaitKeyword, ForEachKeyword, OpenParenToken, variable, InKeyword, Expression, CloseParenToken, Statement);
}
internal override CommonForEachStatementSyntax WithInKeywordCore(SyntaxToken inKeyword)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithInKeyword(inKeyword);
}
public new ForEachVariableStatementSyntax WithInKeyword(SyntaxToken inKeyword)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, AwaitKeyword, ForEachKeyword, OpenParenToken, Variable, inKeyword, Expression, CloseParenToken, Statement);
}
internal override CommonForEachStatementSyntax WithExpressionCore(ExpressionSyntax expression)
{
return WithExpression(expression);
}
public new ForEachVariableStatementSyntax WithExpression(ExpressionSyntax expression)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, AwaitKeyword, ForEachKeyword, OpenParenToken, Variable, InKeyword, expression, CloseParenToken, Statement);
}
internal override CommonForEachStatementSyntax WithCloseParenTokenCore(SyntaxToken closeParenToken)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithCloseParenToken(closeParenToken);
}
public new ForEachVariableStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, AwaitKeyword, ForEachKeyword, OpenParenToken, Variable, InKeyword, Expression, closeParenToken, Statement);
}
internal override CommonForEachStatementSyntax WithStatementCore(StatementSyntax statement)
{
return WithStatement(statement);
}
public new ForEachVariableStatementSyntax WithStatement(StatementSyntax statement)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
return Update(AttributeLists, AwaitKeyword, ForEachKeyword, OpenParenToken, Variable, InKeyword, Expression, CloseParenToken, statement);
}
internal override StatementSyntax AddAttributeListsCore(params AttributeListSyntax[] items)
{
return AddAttributeLists(items);
}
public new ForEachVariableStatementSyntax AddAttributeLists(params AttributeListSyntax[] items)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
return WithAttributeLists(AttributeLists.AddRange((IEnumerable<AttributeListSyntax>)items));
}
}