SyntaxErr creates a generic syntax error which explains what was found and what was expected.
(expected string)
| 415 | // SyntaxErr creates a generic syntax error which explains what was |
| 416 | // found and what was expected. |
| 417 | func (d *Dispenser) SyntaxErr(expected string) error { |
| 418 | msg := fmt.Sprintf("syntax error: unexpected token '%s', expecting '%s', at %s:%d import chain: ['%s']", d.Val(), expected, d.File(), d.Line(), strings.Join(d.Token().imports, "','")) |
| 419 | return errors.New(msg) |
| 420 | } |
| 421 | |
| 422 | // EOFErr returns an error indicating that the dispenser reached |
| 423 | // the end of the input when searching for the next token. |
no test coverage detected