Consumes the [`Parser`] and returns the parsed [`Parsed`].
(mut self)
| 181 | |
| 182 | /// Consumes the [`Parser`] and returns the parsed [`Parsed`]. |
| 183 | pub(crate) fn parse(mut self) -> Parsed<Mod> { |
| 184 | let syntax = stacker::maybe_grow(STACK_RED_ZONE, STACK_SIZE, || match self.options.mode { |
| 185 | Mode::Expression | Mode::ParenthesizedExpression => { |
| 186 | Mod::Expression(self.parse_single_expression()) |
| 187 | } |
| 188 | Mode::Module | Mode::Ipython => Mod::Module(self.parse_module()), |
| 189 | }); |
| 190 | |
| 191 | self.finish(syntax) |
| 192 | } |
| 193 | |
| 194 | /// Parses a single expression. |
| 195 | /// |