(&mut self)
| 152 | } |
| 153 | |
| 154 | fn parse_route_annotation(&mut self) -> RouteAnnotation { |
| 155 | let mut annotation = RouteAnnotation::default(); |
| 156 | let directives = DirectiveParser::new(&mut self.scanner).parse_directives(); |
| 157 | for directive in directives { |
| 158 | let line = directive.line; |
| 159 | if let Err(error) = annotation.parse_directive(directive) { |
| 160 | self.error_with_line(line, &error); |
| 161 | } |
| 162 | } |
| 163 | annotation |
| 164 | } |
| 165 | |
| 166 | fn parse_fields(&mut self) -> Result<Vec<Field>, String> { |
| 167 | self.consume(TokenType::OpenBrace, "Expected '{' after field block")?; |
no test coverage detected