equal
deleted
inserted
replaced
29 def name: String = |
29 def name: String = |
30 kind match { case Command_Span(name, _) => name case _ => "" } |
30 kind match { case Command_Span(name, _) => name case _ => "" } |
31 |
31 |
32 def position: Position.T = |
32 def position: Position.T = |
33 kind match { case Command_Span(_, pos) => pos case _ => Position.none } |
33 kind match { case Command_Span(_, pos) => pos case _ => Position.none } |
|
34 |
|
35 def keyword_pos(start: Token.Pos): Token.Pos = |
|
36 kind match { |
|
37 case _: Command_Span => |
|
38 (start /: content.iterator.takeWhile(tok => !tok.is_command))(_.advance(_)) |
|
39 case _ => start |
|
40 } |
34 |
41 |
35 def is_begin: Boolean = content.exists(_.is_begin) |
42 def is_begin: Boolean = content.exists(_.is_begin) |
36 def is_end: Boolean = content.exists(_.is_end) |
43 def is_end: Boolean = content.exists(_.is_end) |
37 |
44 |
38 def length: Int = (0 /: content)(_ + _.source.length) |
45 def length: Int = (0 /: content)(_ + _.source.length) |