Change SourcePosition definition + minor cleanup.

This commit is contained in:
Eugene Vigdorchik
2012-01-24 13:32:21 +04:00
parent 051e02e48a
commit a3fa54be2c
+2 -10
View File
@@ -259,16 +259,8 @@ trait Init[Scope]
override def toString = "setting(" + key + ") at " + pos
}
trait SourcePosition {
def fileName: String
def line: Int
}
case object NoPosition extends SourcePosition {
override def fileName = throw new UnsupportedOperationException("NoPosition")
override def line = throw new UnsupportedOperationException("NoPosition")
}
sealed trait SourcePosition
case object NoPosition extends SourcePosition
case class SourceCoord(fileName: String, line: Int) extends SourcePosition
// mainly for reducing generated class count