@@ -22,7 +22,7 @@ extends interfaces.SourcePosition with Showable {
22
22
23
23
def point : Int = span.point
24
24
25
- def line : Int = if (source.exists) source.offsetToLine(point) else - 1
25
+ def line : Int = if (source.file. exists) source.offsetToLine(point) else - 1
26
26
27
27
/** Extracts the lines from the underlying source file as `Array[Char]`*/
28
28
def linesSlice : Array [Char ] =
@@ -42,16 +42,16 @@ extends interfaces.SourcePosition with Showable {
42
42
def beforeAndAfterPoint : (List [Int ], List [Int ]) =
43
43
lineOffsets.partition(_ <= point)
44
44
45
- def column : Int = if (source.exists) source.column(point) else - 1
45
+ def column : Int = if (source.file. exists) source.column(point) else - 1
46
46
47
47
def start : Int = span.start
48
- def startLine : Int = if (source.exists) source.offsetToLine(start) else - 1
49
- def startColumn : Int = if (source.exists) source.column(start) else - 1
48
+ def startLine : Int = if (source.file. exists) source.offsetToLine(start) else - 1
49
+ def startColumn : Int = if (source.file. exists) source.column(start) else - 1
50
50
def startColumnPadding : String = source.startColumnPadding(start)
51
51
52
52
def end : Int = span.end
53
- def endLine : Int = if (source.exists) source.offsetToLine(end) else - 1
54
- def endColumn : Int = if (source.exists) source.column(end) else - 1
53
+ def endLine : Int = if (source.file. exists) source.offsetToLine(end) else - 1
54
+ def endColumn : Int = if (source.file. exists) source.column(end) else - 1
55
55
56
56
def withOuter (outer : SourcePosition ): SourcePosition = SourcePosition (source, span, outer)
57
57
def withSpan (range : Span ) = SourcePosition (source, range, outer)
0 commit comments