Consumes the [`Parser`] and returns the parsed [`Parsed`].
(mut self)
| 73 | |
| 74 | /// Consumes the [`Parser`] and returns the parsed [`Parsed`]. |
| 75 | pub(crate) fn parse(mut self) -> Parsed<Mod> { |
| 76 | let syntax = match self.mode { |
| 77 | Mode::Expression => Mod::Expression(self.parse_single_expression()), |
| 78 | Mode::Module | Mode::Ipython => Mod::Module(self.parse_module()), |
| 79 | }; |
| 80 | |
| 81 | self.finish(syntax) |
| 82 | } |
| 83 | |
| 84 | /// Parses a single expression. |
| 85 | /// |
no test coverage detected