Skip to content

Commit d6595fd

Browse files
committed
Updated statements to include ends
1 parent 1844deb commit d6595fd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/scala/scales/coverage.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ case class MeasuredStatement(source: String,
8282
location: Location,
8383
id: Int,
8484
start: Int,
85+
end: Int,
8586
line: Int,
8687
desc: String,
8788
branch: Boolean,

src/main/scala/scales/plugin.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class ScalesComponent(val global: Global)
4747
var location: Location = null
4848

4949
def safeStart(tree: Tree): Int = if (tree.pos.isDefined) tree.pos.startOrPoint else -1
50+
def safeEnd(tree: Tree): Int = if (tree.pos.isDefined) tree.pos.endOrPoint else -1
5051
def safeLine(tree: Tree): Int = if (tree.pos.isDefined) tree.pos.safeLine else -1
5152
def safeSource(tree: Tree): Option[SourceFile] = if (tree.pos.isDefined) Some(tree.pos.source) else None
5253

@@ -89,6 +90,7 @@ class ScalesComponent(val global: Global)
8990
source.path,
9091
location, id,
9192
safeStart(tree),
93+
safeEnd(tree),
9294
safeLine(tree),
9395
tree.toString(),
9496
branch

0 commit comments

Comments
 (0)