SourceLocation

data class SourceLocation(line: Int, offset: Int, length: Int, lengthLegacy: Int)

SourceLocation represents the span of a given grammar rule; which corresponds to an AST subtree.

TODO Fix Source Location Tests https://github.com/partiql/partiql-lang-kotlin/issues/1114 Unfortunately several mistakes were made that are hard to undo altogether. The legacy parser incorrectly used the first token length rather than rule span for source location length. Then we have asserted on these incorrect SourceLocations in many unit tests unrelated to SourceLocations.

Constructors

Link copied to clipboard
fun SourceLocation(line: Int, offset: Int, length: Int, lengthLegacy: Int = 0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val length: Int
Link copied to clipboard
val lengthLegacy: Int = 0
Link copied to clipboard
val line: Int
Link copied to clipboard
val offset: Int