Section

data class Section(source: Source, lineNumber: Int, lineIndex: Int, length: Int)

Represents a span of characters.

Author

An Tran

Parameters

source

The section's source.

lineNumber

The section's line number.

lineIndex

The section's line index.

length

The section's length.

Constructors

Section
Link copied to clipboard
common
fun Section(source: Source, lineNumber: Int, lineIndex: Int, length: Int)
The section's source.

Functions

span
Link copied to clipboard
common
fun span(other: Section): Section
Creates a new section which spans across this and another section.
toString
Link copied to clipboard
common
open override fun toString(): String
Returns a string representation of the section.

Properties

length
Link copied to clipboard
common
val length: Int
The section's length.
line
Link copied to clipboard
common
val line: String
The line of this section.
lineIndex
Link copied to clipboard
common
val lineIndex: Int
The section's line index.
lineNumber
Link copied to clipboard
common
val lineNumber: Int
The section's line number.
source
Link copied to clipboard
common
val source: Source
The section's source.
substring
Link copied to clipboard
common
val substring: String
The substring this section represents.