src/Pure/PIDE/text.scala
changeset 65132 60e7072b8dbe
parent 64816 e306cab8edf9
child 65154 ba1929b749f0
equal deleted inserted replaced
65131:5d35f4bccfa7 65132:60e7072b8dbe
   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