(&mut self)
| 86 | } |
| 87 | |
| 88 | pub(super) fn expect_int(&mut self) -> Result<i64> { |
| 89 | match self.bump().map(|t| &t.tok) { |
| 90 | Some(Tok::Int(n)) => Ok(*n), |
| 91 | other => Err(self.err(format!("expected integer, got {other:?}"))), |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | pub(super) fn expect_float_or_int_as_f64(&mut self) -> Result<f64> { |
| 96 | match self.bump().map(|t| &t.tok) { |
no test coverage detected