unconditional recovery from bad context (e.g. Quoted with malformed quoted_body);
authorwenzelm
Fri, 17 Jun 2011 14:31:13 +0200
changeset 43420 a26e514c92b2
parent 43419 6ed49c52d463
child 43424 eeba70379f1a
unconditional recovery from bad context (e.g. Quoted with malformed quoted_body);
src/Pure/General/scan.scala
--- a/src/Pure/General/scan.scala	Fri Jun 17 13:55:53 2011 +0200
+++ b/src/Pure/General/scan.scala	Fri Jun 17 14:31:13 2011 +0200
@@ -388,12 +388,7 @@
         quoted_context("`", ctxt) ^^ { case (x, c) => (Token(Token.Kind.ALT_STRING, x), c) }
       val verb = verbatim_context(ctxt) ^^ { case (x, c) => (Token(Token.Kind.VERBATIM, x), c) }
       val cmt = comment_context(ctxt) ^^ { case (x, c) => (Token(Token.Kind.COMMENT, x), c) }
-
-      val other: Parser[(Token, Context)] =
-        ctxt match {
-          case Finished => other_token(symbols, is_command) ^^ { case x => (x, Finished) }
-          case _ => failure("")
-        }
+      val other = other_token(symbols, is_command) ^^ { case x => (x, Finished) }
 
       string | (alt_string | (verb | (cmt | other)))
     }