(&mut self)
| 61 | } |
| 62 | |
| 63 | pub(super) fn expect_ident(&mut self) -> Result<String> { |
| 64 | match self.bump().map(|t| &t.tok) { |
| 65 | Some(Tok::Ident(s)) => Ok(s.clone()), |
| 66 | other => Err(self.err(format!("expected identifier, got {other:?}"))), |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | pub(super) fn expect(&mut self, want: &Tok) -> Result<()> { |
| 71 | if self.peek() == Some(want) { |
no test coverage detected