isTokenMatch checks if the current token matches the given keyword This handles both keyword tokens and identifier tokens with matching literal values (needed because some keywords like DATA, NO may be tokenized as identifiers)
(keyword string)
| 33 | // This handles both keyword tokens and identifier tokens with matching literal values |
| 34 | // (needed because some keywords like DATA, NO may be tokenized as identifiers) |
| 35 | func (p *Parser) isTokenMatch(keyword string) bool { |
| 36 | // Check if token literal matches the keyword (case-insensitive) |
| 37 | return strings.EqualFold(p.currentToken.Token.Value, keyword) |
| 38 | } |
| 39 | |
| 40 | // parseCreateStatement parses CREATE statements (TABLE, VIEW, MATERIALIZED VIEW, INDEX) |
| 41 | func (p *Parser) parseCreateStatement() (ast.Statement, error) { |
no outgoing calls
no test coverage detected