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

148 lines
5.5 KiB
C#

using System.Collections.Generic;
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
public sealed class IncompleteMemberSyntax : MemberDeclarationSyntax
{
private SyntaxNode? attributeLists;
private TypeSyntax? type;
public override SyntaxList<AttributeListSyntax> AttributeLists => new SyntaxList<AttributeListSyntax>(((SyntaxNode)this).GetRed(ref attributeLists, 0));
public override SyntaxTokenList Modifiers
{
get
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
GreenNode slot = ((SyntaxNode)this).Green.GetSlot(1);
if (slot == null)
{
return default(SyntaxTokenList);
}
return new SyntaxTokenList((SyntaxNode)(object)this, slot, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1));
}
}
public TypeSyntax? Type => ((SyntaxNode)this).GetRed<TypeSyntax>(ref type, 2);
internal IncompleteMemberSyntax(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),
2 => ((SyntaxNode)this).GetRed<TypeSyntax>(ref type, 2),
_ => null,
});
}
internal override SyntaxNode? GetCachedSlot(int index)
{
return (SyntaxNode?)(index switch
{
0 => attributeLists,
2 => type,
_ => null,
});
}
public override void Accept(CSharpSyntaxVisitor visitor)
{
visitor.VisitIncompleteMember(this);
}
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
{
return visitor.VisitIncompleteMember(this);
}
public IncompleteMemberSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, TypeSyntax? type)
{
//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_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: 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)
if (attributeLists != AttributeLists || modifiers != Modifiers || type != Type)
{
IncompleteMemberSyntax incompleteMemberSyntax = SyntaxFactory.IncompleteMember(attributeLists, modifiers, type);
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
if (annotations == null || annotations.Length == 0)
{
return incompleteMemberSyntax;
}
return incompleteMemberSyntax.WithAnnotations(annotations);
}
return this;
}
internal override MemberDeclarationSyntax WithAttributeListsCore(SyntaxList<AttributeListSyntax> attributeLists)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithAttributeLists(attributeLists);
}
public new IncompleteMemberSyntax 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)
return Update(attributeLists, Modifiers, Type);
}
internal override MemberDeclarationSyntax WithModifiersCore(SyntaxTokenList modifiers)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithModifiers(modifiers);
}
public new IncompleteMemberSyntax WithModifiers(SyntaxTokenList modifiers)
{
//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)
return Update(AttributeLists, modifiers, Type);
}
public IncompleteMemberSyntax WithType(TypeSyntax? type)
{
//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)
return Update(AttributeLists, Modifiers, type);
}
internal override MemberDeclarationSyntax AddAttributeListsCore(params AttributeListSyntax[] items)
{
return AddAttributeLists(items);
}
public new IncompleteMemberSyntax 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));
}
internal override MemberDeclarationSyntax AddModifiersCore(params SyntaxToken[] items)
{
return AddModifiers(items);
}
public new IncompleteMemberSyntax AddModifiers(params SyntaxToken[] 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)
SyntaxTokenList modifiers = Modifiers;
return WithModifiers(((SyntaxTokenList)(ref modifiers)).AddRange((IEnumerable<SyntaxToken>)items));
}
}