blob: 277d35ec390e296e9ed8bbb9b9fd2f3e4d7d2efa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package scala.tools.nsc.interactive
import ast.Trees
import scala.tools.nsc.util.{SourceFile, Position, RangePosition, OffsetPosition, NoPosition, SyntheticOffsetPosition, WorkScheduler}
import scala.collection.mutable.ListBuffer
trait Positions {
self: nsc.Global =>
def rangePos(source: SourceFile, start: Int, point: Int, end: Int) =
new OffsetPosition(source, point)
/** A position that wraps the non-empty set of trees.
* The point of the wrapping position is the point of the first trees' position.
* If all some the trees are non-synthetic, returns a range position enclosing the non-synthetic trees
* Otherwise returns a synthetic offset position to point.
*/
def wrappingPos(trees: List[Tree]): Position = trees.head.pos
def makeTransparent(pos: Position) = pos
def validatePositions(tree: Tree) {}
}
|