type

SourceSpan

src @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

fields

columnIndex

0-based index of column (i.e.

len

Length of the span in characters

lineIndex

0-based index of line in source

methods

Slot Details

columnIndex

src const Int columnIndex

0-based index of column (i.e. character on line) in source

equals

src virtual override Bool equals(Obj? obj)

hash

src virtual override Int hash()

len

src const Int len

Length of the span in characters

lineIndex

src const Int lineIndex

0-based index of line in source

make

src new make(Int lineIndex, Int columnIndex, Int len)

toStr

src virtual override Str toStr()