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