(keyword string)
| 78 | } |
| 79 | |
| 80 | func (p *Parser) expectKeyword(keyword string) error { |
| 81 | if !p.matchKeyword(keyword) { |
| 82 | return fmt.Errorf("expected keyword: %s, but got %s", keyword, p.lastTokenKind()) |
| 83 | } |
| 84 | _ = p.lexer.consumeToken() |
| 85 | return nil |
| 86 | } |
| 87 | |
| 88 | func (p *Parser) tryConsumeKeywords(keywords ...string) bool { |
| 89 | savedState := p.lexer.saveState() |
no test coverage detected