171 lines
7.9 KiB
C#
171 lines
7.9 KiB
C#
using System.Collections.Generic;
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
|
|
|
|
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
|
public sealed class XmlTextAttributeSyntax : XmlAttributeSyntax
|
|
{
|
|
private XmlNameSyntax? name;
|
|
|
|
public override XmlNameSyntax Name => ((SyntaxNode)this).GetRedAtZero<XmlNameSyntax>(ref name);
|
|
|
|
public override SyntaxToken EqualsToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.XmlTextAttributeSyntax)(object)((SyntaxNode)this).Green).equalsToken, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1));
|
|
|
|
public override SyntaxToken StartQuoteToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.XmlTextAttributeSyntax)(object)((SyntaxNode)this).Green).startQuoteToken, ((SyntaxNode)this).GetChildPosition(2), ((SyntaxNode)this).GetChildIndex(2));
|
|
|
|
public SyntaxTokenList TextTokens
|
|
{
|
|
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(3);
|
|
if (slot == null)
|
|
{
|
|
return default(SyntaxTokenList);
|
|
}
|
|
return new SyntaxTokenList((SyntaxNode)(object)this, slot, ((SyntaxNode)this).GetChildPosition(3), ((SyntaxNode)this).GetChildIndex(3));
|
|
}
|
|
}
|
|
|
|
public override SyntaxToken EndQuoteToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.XmlTextAttributeSyntax)(object)((SyntaxNode)this).Green).endQuoteToken, ((SyntaxNode)this).GetChildPosition(4), ((SyntaxNode)this).GetChildIndex(4));
|
|
|
|
internal XmlTextAttributeSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position)
|
|
: base(green, parent, position)
|
|
{
|
|
}
|
|
|
|
internal override SyntaxNode? GetNodeSlot(int index)
|
|
{
|
|
if (index != 0)
|
|
{
|
|
return null;
|
|
}
|
|
return (SyntaxNode?)(object)((SyntaxNode)this).GetRedAtZero<XmlNameSyntax>(ref name);
|
|
}
|
|
|
|
internal override SyntaxNode? GetCachedSlot(int index)
|
|
{
|
|
if (index != 0)
|
|
{
|
|
return null;
|
|
}
|
|
return (SyntaxNode?)(object)name;
|
|
}
|
|
|
|
public override void Accept(CSharpSyntaxVisitor visitor)
|
|
{
|
|
visitor.VisitXmlTextAttribute(this);
|
|
}
|
|
|
|
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
|
|
{
|
|
return visitor.VisitXmlTextAttribute(this);
|
|
}
|
|
|
|
public XmlTextAttributeSyntax Update(XmlNameSyntax name, SyntaxToken equalsToken, SyntaxToken startQuoteToken, SyntaxTokenList textTokens, SyntaxToken endQuoteToken)
|
|
{
|
|
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
|
|
//IL_0045: 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_0048: 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_000b: Unknown result type (might be due to invalid IL or missing references)
|
|
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
|
|
//IL_0019: 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_0028: Unknown result type (might be due to invalid IL or missing references)
|
|
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
|
|
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
|
|
if (name != Name || equalsToken != EqualsToken || startQuoteToken != StartQuoteToken || textTokens != TextTokens || endQuoteToken != EndQuoteToken)
|
|
{
|
|
XmlTextAttributeSyntax xmlTextAttributeSyntax = SyntaxFactory.XmlTextAttribute(name, equalsToken, startQuoteToken, textTokens, endQuoteToken);
|
|
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
|
|
if (annotations == null || annotations.Length == 0)
|
|
{
|
|
return xmlTextAttributeSyntax;
|
|
}
|
|
return xmlTextAttributeSyntax.WithAnnotations(annotations);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
internal override XmlAttributeSyntax WithNameCore(XmlNameSyntax name)
|
|
{
|
|
return WithName(name);
|
|
}
|
|
|
|
public new XmlTextAttributeSyntax WithName(XmlNameSyntax name)
|
|
{
|
|
//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_0015: Unknown result type (might be due to invalid IL or missing references)
|
|
return Update(name, EqualsToken, StartQuoteToken, TextTokens, EndQuoteToken);
|
|
}
|
|
|
|
internal override XmlAttributeSyntax WithEqualsTokenCore(SyntaxToken equalsToken)
|
|
{
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
|
return WithEqualsToken(equalsToken);
|
|
}
|
|
|
|
public new XmlTextAttributeSyntax WithEqualsToken(SyntaxToken equalsToken)
|
|
{
|
|
//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_0015: Unknown result type (might be due to invalid IL or missing references)
|
|
return Update(Name, equalsToken, StartQuoteToken, TextTokens, EndQuoteToken);
|
|
}
|
|
|
|
internal override XmlAttributeSyntax WithStartQuoteTokenCore(SyntaxToken startQuoteToken)
|
|
{
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
|
return WithStartQuoteToken(startQuoteToken);
|
|
}
|
|
|
|
public new XmlTextAttributeSyntax WithStartQuoteToken(SyntaxToken startQuoteToken)
|
|
{
|
|
//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_0015: Unknown result type (might be due to invalid IL or missing references)
|
|
return Update(Name, EqualsToken, startQuoteToken, TextTokens, EndQuoteToken);
|
|
}
|
|
|
|
public XmlTextAttributeSyntax WithTextTokens(SyntaxTokenList textTokens)
|
|
{
|
|
//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_0015: Unknown result type (might be due to invalid IL or missing references)
|
|
return Update(Name, EqualsToken, StartQuoteToken, textTokens, EndQuoteToken);
|
|
}
|
|
|
|
internal override XmlAttributeSyntax WithEndQuoteTokenCore(SyntaxToken endQuoteToken)
|
|
{
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
|
return WithEndQuoteToken(endQuoteToken);
|
|
}
|
|
|
|
public new XmlTextAttributeSyntax WithEndQuoteToken(SyntaxToken endQuoteToken)
|
|
{
|
|
//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_0019: Unknown result type (might be due to invalid IL or missing references)
|
|
return Update(Name, EqualsToken, StartQuoteToken, TextTokens, endQuoteToken);
|
|
}
|
|
|
|
public XmlTextAttributeSyntax AddTextTokens(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 textTokens = TextTokens;
|
|
return WithTextTokens(((SyntaxTokenList)(ref textTokens)).AddRange((IEnumerable<SyntaxToken>)items));
|
|
}
|
|
}
|