(&mut self, kw: &str)
| 41 | } |
| 42 | |
| 43 | pub(super) fn expect_kw(&mut self, kw: &str) -> Result<()> { |
| 44 | match self.peek() { |
| 45 | Some(Tok::Ident(s)) if s.eq_ignore_ascii_case(kw) => { |
| 46 | self.i += 1; |
| 47 | Ok(()) |
| 48 | } |
| 49 | other => Err(self.err(format!("expected keyword `{kw}`, got {other:?}"))), |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | pub(super) fn match_kw(&mut self, kw: &str) -> bool { |
| 54 | match self.peek() { |
no test coverage detected