(f LexItem, e ...lexItemType)
| 46 | } |
| 47 | |
| 48 | func (p *Parser) errorUnexpectedLex(f LexItem, e ...lexItemType) { |
| 49 | s := "" |
| 50 | for _, ei := range e { |
| 51 | s += "'" + ei.String() + "' " |
| 52 | } |
| 53 | |
| 54 | p.err = fmt.Errorf("found '%s'; expected '%#v' at byte: %d", f.Type.String(), s, f.Pos) |
| 55 | } |
| 56 | |
| 57 | func (p *Parser) errorUnexpectedEOF() { |
| 58 | p.err = fmt.Errorf("unexpected eof") |
no test coverage detected