equal
deleted
inserted
replaced
126 |
126 |
127 sealed case class Info[A](range: Text.Range, info: A) |
127 sealed case class Info[A](range: Text.Range, info: A) |
128 { |
128 { |
129 def restrict(r: Text.Range): Info[A] = Info(range.restrict(r), info) |
129 def restrict(r: Text.Range): Info[A] = Info(range.restrict(r), info) |
130 def try_restrict(r: Text.Range): Option[Info[A]] = range.try_restrict(r).map(Info(_, info)) |
130 def try_restrict(r: Text.Range): Option[Info[A]] = range.try_restrict(r).map(Info(_, info)) |
|
131 |
|
132 def map[B](f: A => B): Info[B] = Info(range, f(info)) |
131 } |
133 } |
132 |
134 |
133 type Markup = Info[XML.Elem] |
135 type Markup = Info[XML.Elem] |
134 |
136 |
135 |
137 |