(
&mut self,
kind: TokenType,
)
| 352 | // Ref: https://wicg.github.io/urlpattern/#consume-a-required-token |
| 353 | #[inline] |
| 354 | fn consume_required_token( |
| 355 | &mut self, |
| 356 | kind: TokenType, |
| 357 | ) -> Result<Token, Error> { |
| 358 | self.try_consume_token(kind.clone()).ok_or_else(|| { |
| 359 | Error::Parser(ParserError::ExpectedToken( |
| 360 | kind, |
| 361 | self.token_list[self.index].kind.clone(), |
| 362 | self.token_list[self.index].value.to_owned(), |
| 363 | )) |
| 364 | }) |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | // Ref: https://wicg.github.io/urlpattern/#parse-a-pattern-string |
no test coverage detected