equal
deleted
inserted
replaced
48 } |
48 } |
49 } |
49 } |
50 |
50 |
51 object Range |
51 object Range |
52 { |
52 { |
53 def apply(range: Text.Range): T = Offset(range.start) ++ Offset(range.stop) |
53 def apply(range: Text.Range): T = Offset(range.start) ::: Offset(range.stop) |
54 def unapply(pos: T): Option[Text.Range] = |
54 def unapply(pos: T): Option[Text.Range] = |
55 (pos, pos) match { |
55 (pos, pos) match { |
56 case (Offset(start), End_Offset(stop)) if start <= stop => Some(Text.Range(start, stop)) |
56 case (Offset(start), End_Offset(stop)) if start <= stop => Some(Text.Range(start, stop)) |
57 case (Offset(start), _) => Some(Text.Range(start, start + 1)) |
57 case (Offset(start), _) => Some(Text.Range(start, start + 1)) |
58 case _ => None |
58 case _ => None |