58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
|
|||
|
|
|
||
|
|
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
|
||
|
|
|
||
|
|
public sealed class InterpolatedStringTextSyntax : InterpolatedStringContentSyntax
|
||
|
|
{
|
||
|
|
public SyntaxToken TextToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.InterpolatedStringTextSyntax)(object)((SyntaxNode)this).Green).textToken, ((SyntaxNode)this).Position, 0);
|
||
|
|
|
||
|
|
internal InterpolatedStringTextSyntax(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.VisitInterpolatedStringText(this);
|
||
|
|
}
|
||
|
|
|
||
|
|
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
|
||
|
|
{
|
||
|
|
return visitor.VisitInterpolatedStringText(this);
|
||
|
|
}
|
||
|
|
|
||
|
|
public InterpolatedStringTextSyntax Update(SyntaxToken textToken)
|
||
|
|
{
|
||
|
|
//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_000e: Unknown result type (might be due to invalid IL or missing references)
|
||
|
|
if (textToken != TextToken)
|
||
|
|
{
|
||
|
|
InterpolatedStringTextSyntax interpolatedStringTextSyntax = SyntaxFactory.InterpolatedStringText(textToken);
|
||
|
|
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
|
||
|
|
if (annotations == null || annotations.Length == 0)
|
||
|
|
{
|
||
|
|
return interpolatedStringTextSyntax;
|
||
|
|
}
|
||
|
|
return interpolatedStringTextSyntax.WithAnnotations(annotations);
|
||
|
|
}
|
||
|
|
return this;
|
||
|
|
}
|
||
|
|
|
||
|
|
public InterpolatedStringTextSyntax WithTextToken(SyntaxToken textToken)
|
||
|
|
{
|
||
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
||
|
|
return Update(textToken);
|
||
|
|
}
|
||
|
|
}
|