scoverage.report.StatementWriter.scala Maven / Gradle / Ivy
The newest version!
package scoverage.report
import _root_.scoverage.MeasuredFile
import scala.xml.Node
/** @author Stephen Samuel */
class StatementWriter(mFile: MeasuredFile) {
val GREEN = "#AEF1AE"
val RED = "#F0ADAD"
def output: Node = {
def cellStyle(invoked: Boolean): String = invoked match {
case true => s"background: $GREEN"
case false => s"background: $RED"
}
Line
Stmt Id
Pos
Tree
Symbol
Code
{mFile.statements.toSeq.sortBy(_.line).map(stmt => {
{stmt.line}
{stmt.id}
{stmt.start.toString}
-
{stmt.end.toString}
{stmt.treeName}
{stmt.symbolName}
{stmt.desc}
})}
}
}