weaponregex.model.Location.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weapon-regex_2.12 Show documentation
Show all versions of weapon-regex_2.12 Show documentation
Weapon regeX mutates regular expressions for use in mutation testing.
The newest version!
package weaponregex.model
import scala.scalajs.js.annotation.*
/** A location in the source code which can span multiple lines and/or columns.
*
* @param start
* start [[weaponregex.model.Position]] (inclusive)
* @param end
* end [[weaponregex.model.Position]] (exclusive)
*/
@JSExportAll
case class Location(start: Position, end: Position) {
def show: String = s"[${start.show}, ${end.show})"
}
/** Companion object for [[weaponregex.model.Location]]
*/
object Location {
def apply(startLine: Int, startColumn: Int)(endLine: Int, endColumn: Int): Location =
Location(Position(startLine, startColumn), Position(endLine, endColumn))
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy