Bail out if the following tokens are not the expected sequence of keywords, or consume them if they are.
(&mut self, expected: &[Keyword])
| 1926 | /// Bail out if the following tokens are not the expected sequence of |
| 1927 | /// keywords, or consume them if they are. |
| 1928 | fn expect_keywords(&mut self, expected: &[Keyword]) -> Result<(), ParserError> { |
| 1929 | for kw in expected { |
| 1930 | self.expect_keyword(*kw)?; |
| 1931 | } |
| 1932 | Ok(()) |
| 1933 | } |
| 1934 | |
| 1935 | /// Consume the next token if it matches the expected token, otherwise return false |
| 1936 | #[must_use] |
no test coverage detected