Struct OriginalSourceSpan
Represents a span in user-authored original source text.
public readonly struct OriginalSourceSpan
- Inherited Members
Remarks
Unlike SourceSpan, this type is not relative to an arbitrary parsed source view. It always points at an OriginalSourceDocument.
Constructors
OriginalSourceSpan(OriginalSourceDocument, int, int)
Represents a span in user-authored original source text.
public OriginalSourceSpan(OriginalSourceDocument document, int start, int length)
Parameters
documentOriginalSourceDocumentThe original source document.
startintThe zero-based start offset.
lengthintThe span length.
Remarks
Unlike SourceSpan, this type is not relative to an arbitrary parsed source view. It always points at an OriginalSourceDocument.
Properties
Document
Gets the original source document that owns this span.
public OriginalSourceDocument Document { get; }
Property Value
- OriginalSourceDocument
The original source document.
End
Gets the exclusive end offset.
public int End { get; }
Property Value
- int
The exclusive end offset.
Length
Gets the span length.
public int Length { get; }
Property Value
- int
The span length.
Start
Gets the zero-based start offset.
public int Start { get; }
Property Value
- int
The zero-based start offset.