Files

83 lines
3.2 KiB
C#
Raw Permalink Normal View History

2026-08-27 10:56:38 -06:00
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
public sealed class DefaultSwitchLabelSyntax : SwitchLabelSyntax
{
public override SyntaxToken Keyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.DefaultSwitchLabelSyntax)(object)((SyntaxNode)this).Green).keyword, ((SyntaxNode)this).Position, 0);
public override SyntaxToken ColonToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.DefaultSwitchLabelSyntax)(object)((SyntaxNode)this).Green).colonToken, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1));
internal DefaultSwitchLabelSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position)
: base(green, parent, position)
{
}
internal override SyntaxNode? GetNodeSlot(int index)
{
return null;
}
internal override SyntaxNode? GetCachedSlot(int index)
{
return null;
}
public override void Accept(CSharpSyntaxVisitor visitor)
{
visitor.VisitDefaultSwitchLabel(this);
}
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
{
return visitor.VisitDefaultSwitchLabel(this);
}
public DefaultSwitchLabelSyntax Update(SyntaxToken keyword, SyntaxToken colonToken)
{
//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_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: 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 (keyword != Keyword || colonToken != ColonToken)
{
DefaultSwitchLabelSyntax defaultSwitchLabelSyntax = SyntaxFactory.DefaultSwitchLabel(keyword, colonToken);
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
if (annotations == null || annotations.Length == 0)
{
return defaultSwitchLabelSyntax;
}
return defaultSwitchLabelSyntax.WithAnnotations(annotations);
}
return this;
}
internal override SwitchLabelSyntax WithKeywordCore(SyntaxToken keyword)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithKeyword(keyword);
}
public new DefaultSwitchLabelSyntax WithKeyword(SyntaxToken keyword)
{
//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(keyword, ColonToken);
}
internal override SwitchLabelSyntax WithColonTokenCore(SyntaxToken colonToken)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithColonToken(colonToken);
}
public new DefaultSwitchLabelSyntax WithColonToken(SyntaxToken colonToken)
{
//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(Keyword, colonToken);
}
}