Parse a list of declarations
(&mut self)
| 42 | |
| 43 | /// Parse a list of declarations |
| 44 | pub fn parse_decls(&mut self) -> crate::Result<Vec<Decl>> { |
| 45 | let mut decls = Vec::new(); |
| 46 | |
| 47 | while !self.is_eof() { |
| 48 | decls.push(self.parse_decl()?); |
| 49 | } |
| 50 | |
| 51 | Ok(decls) |
| 52 | } |
| 53 | |
| 54 | /// Parse a single declaration |
| 55 | pub fn parse_decl(&mut self) -> crate::Result<Decl> { |