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

Method peek_pos

src/sql-parser/src/parser.rs:1801–1806  ·  view source on GitHub ↗

Return the byte position within the query string at which the next token starts.

(&self)

Source from the content-addressed store, hash-verified

1799 /// Return the byte position within the query string at which the
1800 /// next token starts.
1801 fn peek_pos(&self) -> usize {
1802 match self.tokens.get(self.index) {
1803 Some(token) => token.offset,
1804 None => self.sql.len(),
1805 }
1806 }
1807
1808 /// Return the byte position within the query string at which the previous
1809 /// token starts.

Callers 15

parse_statementsMethod · 0.80
parse_statementMethod · 0.80
parse_subexpr_seededMethod · 0.80
parse_infixMethod · 0.80
expect_keywordMethod · 0.80
expect_tokenMethod · 0.80
expect_one_of_tokensMethod · 0.80
parse_createMethod · 0.80
parse_formatMethod · 0.80

Calls 2

getMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected