Source Location
data class SourceLocation(line: Int, offset: Int, length: Int, lengthLegacy: Int)
Content copied to clipboard
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)
Content copied to clipboard