src/Pure/PIDE/command_span.scala
changeset 58802 3cc68ec558b0
parent 57910 a50837b637dc
child 59683 d6824d8490be
--- a/src/Pure/PIDE/command_span.scala	Tue Oct 28 13:52:54 2014 +0100
+++ b/src/Pure/PIDE/command_span.scala	Tue Oct 28 16:19:04 2014 +0100
@@ -26,6 +26,8 @@
 
   sealed case class Span(kind: Kind, content: List[Token])
   {
+    def length: Int = (0 /: content)(_ + _.source.length)
+
     def compact_source: (String, Span) =
     {
       val source: String =