class

SourceSpan

@Js
const class SourceSpan : Obj

References a snippet of text from the source input.

It has a starting positiont (line and column index) and a length of how many characters it spans.

constructors of

fields len

Length of the span in characters

inputIndex

0-based index in whole input

lineIndex

0-based line index, e.g

columnIndex

0-based index of column (i.e

methods toStr

equals

subSpan

hash

columnIndex const Int : columnIndex

0-based index of column (i.e. character on line) in source, e.g. 0 for the first character of a line, 1 for the second character, etc.

equals virtual Bool equals(Obj? obj)

hash virtual Int hash()

inputIndex const Int : inputIndex

0-based index in whole input

len const Int : len

Length of the span in characters

lineIndex const Int : lineIndex

0-based line index, e.g. 0 for first line, 1 for second line, etc.

of new of(Int lineIndex, Int columnIndex, Int inputIndex, Int len)

subSpan SourceSpan subSpan(Int beginIndex, Int endIndex)

toStr virtual Str toStr()

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST