Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 55831a4

Browse files
committed
xsbti.Position: add startOffset and endOffset
A position now has a start, an end, and a point (the existing `offset`), just like it does in the Scala compiler. This information is especially useful for displaying squiggly lines in an IDE. This commit and the next one are required for sbt/zinc#571
1 parent 0c4cf7c commit 55831a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/xsbti/Position.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ public interface Position
1818

1919
Optional<String> sourcePath();
2020
Optional<File> sourceFile();
21+
22+
// Default values to avoid breaking binary compatibility
23+
default Optional<Integer> startOffset() { return Optional.empty(); }
24+
default Optional<Integer> endOffset() { return Optional.empty(); }
2125
}

0 commit comments

Comments
 (0)