Skip to content

Commit

Permalink
fix perf
Browse files Browse the repository at this point in the history
  • Loading branch information
ahirreddy committed Dec 20, 2023
1 parent 0a1253a commit f653e53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sjsonnet/src/sjsonnet/Error.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ trait EvalErrorScope {
def prettyIndex(pos: Position): Option[(Int, Int)] = {
importer.read(pos.currentFile).map { s =>
val Array(line, col) = {
// TODO: Reading in the whole string here is inefficient
new IndexedParserInput(s.readString()).prettyIndex(pos.offset).split(':')
s.getParserInput().prettyIndex(pos.offset).split(':')
}
(line.toInt, col.toInt)
}
Expand Down

0 comments on commit f653e53

Please sign in to comment.