MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / peekToken

Method peekToken

pkg/sql/parser/parser.go:864–870  ·  view source on GitHub ↗

peekToken returns the next token without advancing the parser position. Returns an empty TokenWithSpan if at the end of input.

()

Source from the content-addressed store, hash-verified

862// peekToken returns the next token without advancing the parser position.
863// Returns an empty TokenWithSpan if at the end of input.
864func (p *Parser) peekToken() models.TokenWithSpan {
865 nextPos := p.currentPos + 1
866 if nextPos < len(p.tokens) {
867 return p.tokens[nextPos]
868 }
869 return models.TokenWithSpan{}
870}
871
872// =============================================================================
873// Type-based Helper Methods (Fast Int Comparisons)

Callers 15

parseCreateStatementMethod · 0.95
parseCreateTableMethod · 0.95
isSampleKeywordMethod · 0.95
parseColumnDefMethod · 0.95
parseFunctionCallMethod · 0.95
parseGroupByClauseMethod · 0.95
parseOrderByClauseMethod · 0.95
parseInsertStatementMethod · 0.95
parseOnConflictClauseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected