kgraphql / com.apurebase.kgraphql.schema.model.ast / Location

Location

class Location

Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.

Constructors

<init>

Location(startToken: Token, endToken: Token, source: Source)

Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.

Location(start: Int, end: Int, startToken: Token, endToken: Token, source: Source)

Properties

end

The character offset at which this Node ends.

val end: Int

endToken

The Token at which this Node ends.

val endToken: Token

source

The Source document the AST represents.

val source: Source

start

The character offset at which this Node begins.

val start: Int

startToken

The Token at which this Node begins.

val startToken: Token

Functions

printLocation

fun printLocation(): String

Companion Object Functions

getLocation

fun getLocation(source: Source, position: Int): LocationSource