(&mut self)
| 31 | } |
| 32 | |
| 33 | fn parse_docs(&mut self) -> String { |
| 34 | let mut docs = String::new(); |
| 35 | if self.match_token(TokenType::Doc) { |
| 36 | let lines = self |
| 37 | .previous |
| 38 | .lexeme |
| 39 | .lines() |
| 40 | .map(|line| line.trim()) |
| 41 | .collect::<Vec<_>>(); |
| 42 | docs = lines.join("\n"); |
| 43 | } |
| 44 | docs |
| 45 | } |
| 46 | |
| 47 | pub fn parse_route(&mut self) -> Result<Route, String> { |
| 48 | let annotation = self.parse_route_annotation(); |
no test coverage detected