SourceLocation

class SourceLocation(val start: Int, val end: Int, val line: Int, val column: Int, val filePath: String?)

Parameters

start

the offset where the symbol starts, inclusive, starting at 0 Note that because the parser works on UTF16 Strings, the offset is in terms of UTF16 chars and not unicode Chars

end

the offset where the symbol ends, exclusive Because end is exclusive, you can use str.substring(start, end) to get the symbol text Note that because the parser works on UTF16 Strings, the offset is in terms of UTF16 chars and not unicode Chars

line

the line where the symbol starts, starting at 1

column

the column where the symbol starts, starting at 1 Note that because the parser works on UTF16 Strings, the column is in terms of UTF16 chars and not unicode Chars

filePath

The path to the document containing the node Might be null if the document origin is not known (parsing from a String for an example)

Constructors

Link copied to clipboard
constructor(start: Int, end: Int, line: Int, column: Int, filePath: String?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val column: Int
Link copied to clipboard
val end: Int
Link copied to clipboard
Link copied to clipboard
val line: Int
Link copied to clipboard
val start: Int

Functions

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