equal
deleted
inserted
replaced
13 { |
13 { |
14 override def filter_proper = false |
14 override def filter_proper = false |
15 |
15 |
16 val command_span: Parser[Span] = |
16 val command_span: Parser[Span] = |
17 { |
17 { |
18 val whitespace = token("white space", tok => tok.is_space || tok.is_comment) |
18 val whitespace = token("white space", _.is_ignored) |
19 val command = token("command keyword", _.is_command) |
19 val command = token("command keyword", _.is_command) |
20 val body = not(rep(whitespace) ~ (command | eof)) ~> not_eof |
20 val body = not(rep(whitespace) ~ (command | eof)) ~> not_eof |
21 command ~ rep(body) ^^ { case x ~ ys => x :: ys } | rep1(whitespace) | rep1(body) |
21 command ~ rep(body) ^^ { case x ~ ys => x :: ys } | rep1(whitespace) | rep1(body) |
22 } |
22 } |
23 } |
23 } |