more token discriminators;
authorwenzelm
Tue Jan 05 15:44:32 2010 +0100 (2010-01-05)
changeset 34265dc932fc1b906
parent 34264 b5025782a4ed
child 34266 bfe8d6998734
more token discriminators;
src/Pure/Isar/outer_lex.scala
     1.1 --- a/src/Pure/Isar/outer_lex.scala	Tue Jan 05 15:44:06 2010 +0100
     1.2 +++ b/src/Pure/Isar/outer_lex.scala	Tue Jan 05 15:44:32 2010 +0100
     1.3 @@ -33,6 +33,7 @@
     1.4  
     1.5    sealed case class Token(val kind: Token_Kind.Value, val source: String)
     1.6    {
     1.7 +    def is_command: Boolean = kind == Token_Kind.COMMAND
     1.8      def is_delimited: Boolean =
     1.9        kind == Token_Kind.STRING ||
    1.10        kind == Token_Kind.ALT_STRING ||
    1.11 @@ -48,6 +49,7 @@
    1.12      def is_space: Boolean = kind == Token_Kind.SPACE
    1.13      def is_comment: Boolean = kind == Token_Kind.COMMENT
    1.14      def is_proper: Boolean = !(is_space || is_comment)
    1.15 +    def is_unparsed: Boolean = kind == Token_Kind.UNPARSED
    1.16  
    1.17      def content: String =
    1.18        if (kind == Token_Kind.STRING) Scan.Lexicon.empty.quoted_content("\"", source)