Span

data class Span(val start: Int, val end: Int, val source: CodeSource)

A span of text in a CodeSource.

Constructors

Link copied to clipboard
constructor(start: Int, end: Int, source: CodeSource)

Properties

Link copied to clipboard
val col: Int
Link copied to clipboard
val end: Int

The end index of the span.

Link copied to clipboard
val length: Int

The length of the span.

Link copied to clipboard
val line: Int
Link copied to clipboard

The CodeSource the span is in.

Link copied to clipboard
val start: Int

The start index of the span.

Functions

Link copied to clipboard

Returns a "fancy" string representation of the span as used in error messages.

Link copied to clipboard
operator fun plus(other: Span): Span

Merges this span with another span.