Wrapper over `parse_expr` that requires an expression to be present and returns an error with `msg` otherwise.
(&mut self, msg: &'static str)
| 1011 | /// Wrapper over `parse_expr` that requires an expression to be present and returns an error |
| 1012 | /// with `msg` otherwise. |
| 1013 | fn parse_required_expr(&mut self, msg: &'static str) -> Result<Expr> { |
| 1014 | let next_pos = self.lexer.peek()?.pos; |
| 1015 | match self.parse_expr(None)? { |
| 1016 | Some(expr) => Ok(expr), |
| 1017 | None => Err(Error::Bad(next_pos, msg.to_owned())), |
| 1018 | } |
| 1019 | } |
| 1020 | |
| 1021 | /// Parses a `GOSUB` statement. |
| 1022 | fn parse_gosub(&mut self) -> Result<Statement> { |
no test coverage detected