1.1 --- a/src/Pure/PIDE/document.scala Mon May 24 23:01:51 2010 +0200
1.2 +++ b/src/Pure/PIDE/document.scala Mon May 24 23:19:40 2010 +0200
1.3 @@ -7,6 +7,9 @@
1.4 package isabelle
1.5
1.6
1.7 +import scala.annotation.tailrec
1.8 +
1.9 +
1.10 object Document
1.11 {
1.12 /* command start positions */
1.13 @@ -80,7 +83,7 @@
1.14
1.15 /* phase 2: recover command spans */
1.16
1.17 - def parse_spans(commands: Linear_Set[Command]): Linear_Set[Command] =
1.18 + @tailrec def parse_spans(commands: Linear_Set[Command]): Linear_Set[Command] =
1.19 {
1.20 commands.iterator.find(is_unparsed) match {
1.21 case Some(first_unparsed) =>