108 lines
5.3 KiB
C#
108 lines
5.3 KiB
C#
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
|
|
|
|
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
|
public sealed class WarningDirectiveTriviaSyntax : DirectiveTriviaSyntax
|
|
{
|
|
public override SyntaxToken HashToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.WarningDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).hashToken, ((SyntaxNode)this).Position, 0);
|
|
|
|
public SyntaxToken WarningKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.WarningDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).warningKeyword, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1));
|
|
|
|
public override SyntaxToken EndOfDirectiveToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.WarningDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).endOfDirectiveToken, ((SyntaxNode)this).GetChildPosition(2), ((SyntaxNode)this).GetChildIndex(2));
|
|
|
|
public override bool IsActive => ((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.WarningDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).IsActive;
|
|
|
|
internal WarningDirectiveTriviaSyntax(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.VisitWarningDirectiveTrivia(this);
|
|
}
|
|
|
|
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
|
|
{
|
|
return visitor.VisitWarningDirectiveTrivia(this);
|
|
}
|
|
|
|
public WarningDirectiveTriviaSyntax Update(SyntaxToken hashToken, SyntaxToken warningKeyword, SyntaxToken endOfDirectiveToken, bool isActive)
|
|
{
|
|
//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_002a: 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)
|
|
//IL_002c: 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)
|
|
if (hashToken != HashToken || warningKeyword != WarningKeyword || endOfDirectiveToken != EndOfDirectiveToken)
|
|
{
|
|
WarningDirectiveTriviaSyntax warningDirectiveTriviaSyntax = SyntaxFactory.WarningDirectiveTrivia(hashToken, warningKeyword, endOfDirectiveToken, isActive);
|
|
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
|
|
if (annotations == null || annotations.Length == 0)
|
|
{
|
|
return warningDirectiveTriviaSyntax;
|
|
}
|
|
return warningDirectiveTriviaSyntax.WithAnnotations(annotations);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
internal override DirectiveTriviaSyntax WithHashTokenCore(SyntaxToken hashToken)
|
|
{
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
|
return WithHashToken(hashToken);
|
|
}
|
|
|
|
public new WarningDirectiveTriviaSyntax WithHashToken(SyntaxToken hashToken)
|
|
{
|
|
//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)
|
|
return Update(hashToken, WarningKeyword, EndOfDirectiveToken, IsActive);
|
|
}
|
|
|
|
public WarningDirectiveTriviaSyntax WithWarningKeyword(SyntaxToken warningKeyword)
|
|
{
|
|
//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)
|
|
return Update(HashToken, warningKeyword, EndOfDirectiveToken, IsActive);
|
|
}
|
|
|
|
internal override DirectiveTriviaSyntax WithEndOfDirectiveTokenCore(SyntaxToken endOfDirectiveToken)
|
|
{
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
|
return WithEndOfDirectiveToken(endOfDirectiveToken);
|
|
}
|
|
|
|
public new WarningDirectiveTriviaSyntax WithEndOfDirectiveToken(SyntaxToken endOfDirectiveToken)
|
|
{
|
|
//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)
|
|
return Update(HashToken, WarningKeyword, endOfDirectiveToken, IsActive);
|
|
}
|
|
|
|
public WarningDirectiveTriviaSyntax WithIsActive(bool isActive)
|
|
{
|
|
//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)
|
|
return Update(HashToken, WarningKeyword, EndOfDirectiveToken, isActive);
|
|
}
|
|
}
|