SourceRange

data class SourceRange(val start: SourcePosition, val end: SourcePosition)

Denotes a nonempty set of consecutive characters in a source file. Empty ranges are not allowed, since there is no column number that corresponds to a single position.

Parameters

start

position that comes just before the characters in the range

end

position that comes just after the characters in the range

Constructors

Link copied to clipboard

Functions

Link copied to clipboard

Combines two ranges to create a range that spans both.

Link copied to clipboard
fun showInSource(highlightStyle: Style, contextLines: Int = if (start.line == end.line) 0 else 1): Document

Displays the portions of the source file containing this location and highlights the region corresponding to this location.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
Link copied to clipboard

Description of where the source file came from.

Link copied to clipboard