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

234 lines
13 KiB
C#

using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
public sealed class LineSpanDirectiveTriviaSyntax : LineOrSpanDirectiveTriviaSyntax
{
private LineDirectivePositionSyntax? start;
private LineDirectivePositionSyntax? end;
public override SyntaxToken HashToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LineSpanDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).hashToken, ((SyntaxNode)this).Position, 0);
public override SyntaxToken LineKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LineSpanDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).lineKeyword, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1));
public LineDirectivePositionSyntax Start => ((SyntaxNode)this).GetRed<LineDirectivePositionSyntax>(ref start, 2);
public SyntaxToken MinusToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LineSpanDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).minusToken, ((SyntaxNode)this).GetChildPosition(3), ((SyntaxNode)this).GetChildIndex(3));
public LineDirectivePositionSyntax End => ((SyntaxNode)this).GetRed<LineDirectivePositionSyntax>(ref end, 4);
public SyntaxToken CharacterOffset
{
get
{
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: 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)
SyntaxToken characterOffset = ((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LineSpanDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).characterOffset;
if (characterOffset == null)
{
return default(SyntaxToken);
}
return new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)characterOffset, ((SyntaxNode)this).GetChildPosition(5), ((SyntaxNode)this).GetChildIndex(5));
}
}
public override SyntaxToken File => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LineSpanDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).file, ((SyntaxNode)this).GetChildPosition(6), ((SyntaxNode)this).GetChildIndex(6));
public override SyntaxToken EndOfDirectiveToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LineSpanDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).endOfDirectiveToken, ((SyntaxNode)this).GetChildPosition(7), ((SyntaxNode)this).GetChildIndex(7));
public override bool IsActive => ((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LineSpanDirectiveTriviaSyntax)(object)((SyntaxNode)this).Green).IsActive;
internal LineSpanDirectiveTriviaSyntax(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
{
2 => ((SyntaxNode)this).GetRed<LineDirectivePositionSyntax>(ref start, 2),
4 => ((SyntaxNode)this).GetRed<LineDirectivePositionSyntax>(ref end, 4),
_ => null,
});
}
internal override SyntaxNode? GetCachedSlot(int index)
{
return (SyntaxNode?)(index switch
{
2 => start,
4 => end,
_ => null,
});
}
public override void Accept(CSharpSyntaxVisitor visitor)
{
visitor.VisitLineSpanDirectiveTrivia(this);
}
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
{
return visitor.VisitLineSpanDirectiveTrivia(this);
}
public LineSpanDirectiveTriviaSyntax Update(SyntaxToken hashToken, SyntaxToken lineKeyword, LineDirectivePositionSyntax start, SyntaxToken minusToken, LineDirectivePositionSyntax end, SyntaxToken characterOffset, SyntaxToken file, 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_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: 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_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_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
if (hashToken != HashToken || lineKeyword != LineKeyword || start != Start || minusToken != MinusToken || end != End || characterOffset != CharacterOffset || file != File || endOfDirectiveToken != EndOfDirectiveToken)
{
LineSpanDirectiveTriviaSyntax lineSpanDirectiveTriviaSyntax = SyntaxFactory.LineSpanDirectiveTrivia(hashToken, lineKeyword, start, minusToken, end, characterOffset, file, endOfDirectiveToken, isActive);
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
if (annotations == null || annotations.Length == 0)
{
return lineSpanDirectiveTriviaSyntax;
}
return lineSpanDirectiveTriviaSyntax.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 LineSpanDirectiveTriviaSyntax 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_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(hashToken, LineKeyword, Start, MinusToken, End, CharacterOffset, File, EndOfDirectiveToken, IsActive);
}
internal override LineOrSpanDirectiveTriviaSyntax WithLineKeywordCore(SyntaxToken lineKeyword)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithLineKeyword(lineKeyword);
}
public new LineSpanDirectiveTriviaSyntax WithLineKeyword(SyntaxToken lineKeyword)
{
//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_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, lineKeyword, Start, MinusToken, End, CharacterOffset, File, EndOfDirectiveToken, IsActive);
}
public LineSpanDirectiveTriviaSyntax WithStart(LineDirectivePositionSyntax start)
{
//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_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, LineKeyword, start, MinusToken, End, CharacterOffset, File, EndOfDirectiveToken, IsActive);
}
public LineSpanDirectiveTriviaSyntax WithMinusToken(SyntaxToken minusToken)
{
//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_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, LineKeyword, Start, minusToken, End, CharacterOffset, File, EndOfDirectiveToken, IsActive);
}
public LineSpanDirectiveTriviaSyntax WithEnd(LineDirectivePositionSyntax end)
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, LineKeyword, Start, MinusToken, end, CharacterOffset, File, EndOfDirectiveToken, IsActive);
}
public LineSpanDirectiveTriviaSyntax WithCharacterOffset(SyntaxToken characterOffset)
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, LineKeyword, Start, MinusToken, End, characterOffset, File, EndOfDirectiveToken, IsActive);
}
internal override LineOrSpanDirectiveTriviaSyntax WithFileCore(SyntaxToken file)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return WithFile(file);
}
public new LineSpanDirectiveTriviaSyntax WithFile(SyntaxToken file)
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: 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_0027: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, LineKeyword, Start, MinusToken, End, CharacterOffset, file, 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 LineSpanDirectiveTriviaSyntax 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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: 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_002b: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, LineKeyword, Start, MinusToken, End, CharacterOffset, File, endOfDirectiveToken, IsActive);
}
public LineSpanDirectiveTriviaSyntax 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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: 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_002c: Unknown result type (might be due to invalid IL or missing references)
return Update(HashToken, LineKeyword, Start, MinusToken, End, CharacterOffset, File, EndOfDirectiveToken, isActive);
}
}