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

Method peek_nth_token

src/sql-parser/src/parser.rs:1776–1780  ·  view source on GitHub ↗

Return the nth token that has not yet been processed.

(&self, n: usize)

Source from the content-addressed store, hash-verified

1774
1775 /// Return the nth token that has not yet been processed.
1776 fn peek_nth_token(&self, n: usize) -> Option<Token> {
1777 self.tokens
1778 .get(self.index + n)
1779 .map(|token| token.kind.clone())
1780 }
1781
1782 /// Return the next token that has not yet been processed, or None if
1783 /// reached end-of-file, and mark it as processed. OK to call repeatedly

Callers 4

get_next_precedenceMethod · 0.80
peek_tokenMethod · 0.80
peek_keywords_fromMethod · 0.80

Calls 3

mapMethod · 0.45
getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected