()
| 793 | } |
| 794 | |
| 795 | func (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 | |
| 806 | func (p *Parser) parseFrameDirectionWithEnd() (string, Pos, error) { |
| 807 | if !p.matchKeyword(KeywordPreceding) && !p.matchKeyword(KeywordFollowing) { |
no test coverage detected