src/Pure/PIDE/markup_tree.scala
changeset 52642 84eb792224a8
parent 51618 a3577cd80c41
child 52889 ea3338812e67
equal deleted inserted replaced
52641:c56b6fa636e8 52642:84eb792224a8
   182           }
   182           }
   183         }
   183         }
   184     }
   184     }
   185   }
   185   }
   186 
   186 
       
   187   def ++ (other: Markup_Tree): Markup_Tree =
       
   188     (this /: other.branches)({ case (tree, (range, entry)) =>
       
   189       ((tree ++ entry.subtree) /: entry.markup)({ case (t, elem) => t + Text.Info(range, elem) }) })
       
   190 
   187   def to_XML(root_range: Text.Range, text: CharSequence, filter: XML.Elem => Boolean): XML.Body =
   191   def to_XML(root_range: Text.Range, text: CharSequence, filter: XML.Elem => Boolean): XML.Body =
   188   {
   192   {
   189     def make_text(start: Text.Offset, stop: Text.Offset): XML.Body =
   193     def make_text(start: Text.Offset, stop: Text.Offset): XML.Body =
   190       if (start == stop) Nil
   194       if (start == stop) Nil
   191       else List(XML.Text(text.subSequence(start, stop).toString))
   195       else List(XML.Text(text.subSequence(start, stop).toString))