MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / peek_keywords_lookahead

Method peek_keywords_lookahead

src/sql-parser/src/parser.rs:1764–1773  ·  view source on GitHub ↗

Returns whether the sequence of keywords is found at any point before the end of the unprocessed tokens.

(&self, keywords: &[Keyword])

Source from the content-addressed store, hash-verified

1762 /// Returns whether the sequence of keywords is found at any point before
1763 /// the end of the unprocessed tokens.
1764 fn peek_keywords_lookahead(&self, keywords: &[Keyword]) -> bool {
1765 let mut index = 0;
1766 while index < self.tokens.len() {
1767 if self.peek_keywords_from(index, keywords) {
1768 return true;
1769 }
1770 index += 1;
1771 }
1772 false
1773 }
1774
1775 /// Return the nth token that has not yet been processed.
1776 fn peek_nth_token(&self, n: usize) -> Option<Token> {

Callers 1

parse_createMethod · 0.80

Calls 2

peek_keywords_fromMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected