(tk tokenKind, t *token)
| 60 | } |
| 61 | |
| 62 | func (p *parser) unexpectedTokenError(tk tokenKind, t *token) errors.StaticError { |
| 63 | if tk == t.kind { |
| 64 | panic("Unexpectedly expected token kind") |
| 65 | } |
| 66 | return errors.MakeStaticError(fmt.Sprintf("Expected token %v but got %v", tk, t), t.loc) |
| 67 | } |
| 68 | |
| 69 | func (p *parser) popExpect(tk tokenKind) (*token, errors.StaticError) { |
| 70 | t := p.pop() |
no test coverage detected