MCPcopy Create free account
hub / github.com/AfterShip/clickhouse-sql-parser / parseFrameDirection

Method parseFrameDirection

parser/parser_query.go:795–804  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

793}
794
795func (p *Parser) parseFrameDirection() (string, error) {
796 switch {
797 case p.matchKeyword(KeywordPreceding), p.matchKeyword(KeywordFollowing):
798 direction := p.last().String
799 _ = p.lexer.consumeToken()
800 return direction, nil
801 default:
802 return "", fmt.Errorf("expected PRECEDING or FOLLOWING, got %s", p.lastTokenKind())
803 }
804}
805
806func (p *Parser) parseFrameDirectionWithEnd() (string, Pos, error) {
807 if !p.matchKeyword(KeywordPreceding) && !p.matchKeyword(KeywordFollowing) {

Callers 1

parseFrameUnboundedMethod · 0.95

Calls 4

matchKeywordMethod · 0.95
lastMethod · 0.95
lastTokenKindMethod · 0.95
consumeTokenMethod · 0.80

Tested by

no test coverage detected