@@ -4581,13 +4581,7 @@ impl<'a> Parser<'a> {
45814581 ///
45824582 /// Returns true if the current token matches the expected keyword.
45834583 pub fn peek_keyword(&self, expected: Keyword) -> bool {
4584- self.peek_keyword_one_of(&[expected])
4585- }
4586-
4587- #[must_use]
4588- /// Checks whether the current token is one of the expected keywords without consuming it.
4589- fn peek_keyword_one_of(&self, expected: &[Keyword]) -> bool {
4590- matches!(&self.peek_token_ref().token, Token::Word(w) if expected.contains(&w.keyword))
4584+ matches!(&self.peek_token_ref().token, Token::Word(w) if expected == w.keyword)
45914585 }
45924586
45934587 /// If the current token is the `expected` keyword followed by
@@ -17237,7 +17231,7 @@ impl<'a> Parser<'a> {
1723717231
1723817232 let table_alias = if dialect_of!(self is OracleDialect) {
1723917233 if !self.peek_sub_query()
17240- && ! self.peek_keyword_one_of (&[Keyword::DEFAULT, Keyword::VALUES])
17234+ && self.peek_one_of_keywords (&[Keyword::DEFAULT, Keyword::VALUES]).is_none( )
1724117235 {
1724217236 self.maybe_parse(|parser| parser.parse_identifier())?
1724317237 .map(|alias| InsertTableAlias {
@@ -19495,7 +19489,7 @@ impl<'a> Parser<'a> {
1949519489
1949619490 /// Returns true if the next keyword indicates a sub query, i.e. SELECT or WITH
1949719491 fn peek_sub_query(&mut self) -> bool {
19498- self.peek_keyword_one_of (&[Keyword::SELECT, Keyword::WITH])
19492+ self.peek_one_of_keywords (&[Keyword::SELECT, Keyword::WITH]).is_some( )
1949919493 }
1950019494
1950119495 pub(crate) fn parse_show_stmt_options(&mut self) -> Result<ShowStatementOptions, ParserError> {
0 commit comments