Parse a list of function definitions. This is the top-level parse function matching the whole contents of a file.
(&mut self)
| 1200 | /// |
| 1201 | /// This is the top-level parse function matching the whole contents of a file. |
| 1202 | pub fn parse_function_list(&mut self) -> ParseResult<Vec<(Function, Details<'a>)>> { |
| 1203 | let mut list = Vec::new(); |
| 1204 | while self.token().is_some() { |
| 1205 | list.push(self.parse_function()?); |
| 1206 | } |
| 1207 | if let Some(err) = self.lex_error { |
| 1208 | return match err { |
| 1209 | LexError::InvalidChar => err!(self.loc, "invalid character"), |
| 1210 | }; |
| 1211 | } |
| 1212 | Ok(list) |
| 1213 | } |
| 1214 | |
| 1215 | // Parse a whole function definition. |
| 1216 | // |
no test coverage detected