unexpectedTokenError returns a syntax error for the given unexpected token.
(tok text.Token)
| 92 | |
| 93 | // unexpectedTokenError returns a syntax error for the given unexpected token. |
| 94 | func (d decoder) unexpectedTokenError(tok text.Token) error { |
| 95 | return d.syntaxError(tok.Pos(), "unexpected token: %s", tok.RawString()) |
| 96 | } |
| 97 | |
| 98 | // syntaxError returns a syntax error for given position. |
| 99 | func (d decoder) syntaxError(pos int, f string, x ...any) error { |
no test coverage detected