# HG changeset patch # User wenzelm # Date 1263230586 -3600 # Node ID f0a6f02ad70594662ae8c56a7aa136de363704b0 # Parent a3d66403f9c92a89a8a5f8bfc6678f81b6e235ba Outer_Lex.is_ignored; diff -r a3d66403f9c9 -r f0a6f02ad705 src/Pure/Isar/outer_lex.scala --- a/src/Pure/Isar/outer_lex.scala Mon Jan 11 10:55:43 2010 +0100 +++ b/src/Pure/Isar/outer_lex.scala Mon Jan 11 18:23:06 2010 +0100 @@ -48,7 +48,7 @@ def is_text: Boolean = is_xname || kind == Token_Kind.VERBATIM def is_space: Boolean = kind == Token_Kind.SPACE def is_comment: Boolean = kind == Token_Kind.COMMENT - def is_proper: Boolean = !(is_space || is_comment) + def is_ignored: Boolean = is_space || is_comment def is_unparsed: Boolean = kind == Token_Kind.UNPARSED def content: String = diff -r a3d66403f9c9 -r f0a6f02ad705 src/Pure/Isar/outer_parse.scala --- a/src/Pure/Isar/outer_parse.scala Mon Jan 11 10:55:43 2010 +0100 +++ b/src/Pure/Isar/outer_parse.scala Mon Jan 11 18:23:06 2010 +0100 @@ -20,7 +20,7 @@ def filter_proper = true private def proper(in: Input): Input = - if (in.atEnd || in.first.is_proper || !filter_proper) in + if (in.atEnd || !in.first.is_ignored || !filter_proper) in else proper(in.rest) def token(s: String, pred: Elem => Boolean): Parser[Elem] = new Parser[Elem] diff -r a3d66403f9c9 -r f0a6f02ad705 src/Pure/Thy/thy_syntax.scala --- a/src/Pure/Thy/thy_syntax.scala Mon Jan 11 10:55:43 2010 +0100 +++ b/src/Pure/Thy/thy_syntax.scala Mon Jan 11 18:23:06 2010 +0100 @@ -15,7 +15,7 @@ val command_span: Parser[Span] = { - val whitespace = token("white space", tok => tok.is_space || tok.is_comment) + val whitespace = token("white space", _.is_ignored) val command = token("command keyword", _.is_command) val body = not(rep(whitespace) ~ (command | eof)) ~> not_eof command ~ rep(body) ^^ { case x ~ ys => x :: ys } | rep1(whitespace) | rep1(body)