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

Method next_token

src/sql-parser/src/parser.rs:1785–1789  ·  view source on GitHub ↗

Return the next token that has not yet been processed, or None if reached end-of-file, and mark it as processed. OK to call repeatedly after reaching EOF.

(&mut self)

Source from the content-addressed store, hash-verified

1783 /// reached end-of-file, and mark it as processed. OK to call repeatedly
1784 /// after reaching EOF.
1785 fn next_token(&mut self) -> Option<Token> {
1786 let token = self.tokens.get(self.index).map(|token| token.kind.clone());
1787 self.index += 1;
1788 token
1789 }
1790
1791 /// Push back the last one non-whitespace token. Must be called after
1792 /// `next_token()`, otherwise might panic. OK to call after

Callers 15

parse_exprFunction · 0.80
parse_data_typeFunction · 0.80
parse_item_nameFunction · 0.80
parse_statement_innerMethod · 0.80
parse_prefixMethod · 0.80
parse_extract_exprMethod · 0.80
parse_infixMethod · 0.80
parse_operatorMethod · 0.80
parse_keywordMethod · 0.80
parse_one_of_keywordsMethod · 0.80
consume_tokenMethod · 0.80
expect_one_of_tokensMethod · 0.80

Calls 3

mapMethod · 0.45
getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected