equal
deleted
inserted
replaced
33 val span: Thy_Syntax.Span) |
33 val span: Thy_Syntax.Span) |
34 extends Session.Entity |
34 extends Session.Entity |
35 { |
35 { |
36 /* classification */ |
36 /* classification */ |
37 |
37 |
38 def is_command: Boolean = !span.isEmpty && span.first.is_command |
38 def is_command: Boolean = !span.isEmpty && span.head.is_command |
39 def is_ignored: Boolean = span.forall(_.is_ignored) |
39 def is_ignored: Boolean = span.forall(_.is_ignored) |
40 def is_malformed: Boolean = !is_command && !is_ignored |
40 def is_malformed: Boolean = !is_command && !is_ignored |
41 |
41 |
42 def name: String = if (is_command) span.first.content else "" |
42 def name: String = if (is_command) span.head.content else "" |
43 override def toString = if (is_command) name else if (is_ignored) "<ignored>" else "<malformed>" |
43 override def toString = if (is_command) name else if (is_ignored) "<ignored>" else "<malformed>" |
44 |
44 |
45 |
45 |
46 /* source text */ |
46 /* source text */ |
47 |
47 |