Struct SourceLine

Namespace
Pixie.Code
Assembly
Pixie.dll

Represents one display line in an original source document.

public readonly struct SourceLine
Inherited Members

Remarks

Source lines belong to OriginalSourceDocument because only original documents have a user-facing line grid. Derived documents expose offsets in their assembled text and resolve those offsets back to original source for diagnostic display.

Constructors

SourceLine(OriginalSourceDocument, int, int, int)

Represents one display line in an original source document.

public SourceLine(OriginalSourceDocument document, int index, int start, int length)

Parameters

document OriginalSourceDocument

The original source document that owns the line.

index int

The zero-based line index.

start int

The zero-based offset of the first character in the line.

length int

The line length, excluding line terminators.

Remarks

Source lines belong to OriginalSourceDocument because only original documents have a user-facing line grid. Derived documents expose offsets in their assembled text and resolve those offsets back to original source for diagnostic display.

Properties

Document

Gets the original source document that owns this line.

public OriginalSourceDocument Document { get; }

Property Value

OriginalSourceDocument

The original source document.

End

Gets the exclusive end offset of the line, excluding line terminators.

public int End { get; }

Property Value

int

The exclusive end offset.

Index

Gets the zero-based line index.

public int Index { get; }

Property Value

int

The zero-based line index.

Length

Gets the line length, excluding line terminators.

public int Length { get; }

Property Value

int

The line length.

Start

Gets the zero-based offset of the first character in the line.

public int Start { get; }

Property Value

int

The zero-based start offset.

Text

Gets the line text, excluding line terminators.

public string Text { get; }

Property Value

string

The line text.