Table of Contents

Class SourceCodeRange

Namespace
Utils.Parser.Source
Assembly
Utils.Parser.Source.dll

Represents a human-readable source-code range for diagnostics, display, and tooling.

public sealed class SourceCodeRange : SourceCodeLocation
Inheritance
SourceCodeRange
Inherited Members
Extension Methods

Remarks

This contract extends SourceCodeLocation with a display/diagnostic length, but intentionally carries no absolute source offset. It must not be treated as equivalent to SourceSpan, which is a runtime/source-buffer range contract.

Constructors

SourceCodeRange(string, int, int, int)

Initializes a new instance of the SourceCodeRange class.

public SourceCodeRange(string filePath, int line, int column, int length)

Parameters

filePath string

Required source file path.

line int

1-based line number.

column int

1-based column number.

length int

Length intended for display or diagnostics for the range.

Properties

Length

Gets the length intended for display or diagnostics for the range.

public int Length { get; }

Property Value

int

Methods

ToString()

public override string ToString()

Returns

string