bleep.nosbt.util.Positions.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bleep-nosbt_3 Show documentation
Show all versions of bleep-nosbt_3 Show documentation
A bleeping fast scala build tool!
package bleep.nosbt.util
/*
* sbt
* Copyright 2011 - 2018, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under Apache License 2.0 (see LICENSE)
*/
sealed trait SourcePosition
sealed trait FilePosition extends SourcePosition {
def path: String
def startLine: Int
}
case object NoPosition extends SourcePosition
final case class LinePosition(path: String, startLine: Int) extends FilePosition
final case class LineRange(start: Int, end: Int) {
def shift(n: Int) = new LineRange(start + n, end + n)
}
final case class RangePosition(path: String, range: LineRange) extends FilePosition {
def startLine = range.start
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy