func (g *Gen) synError(pos *tok.Token, op string) { e := comperr.New(pos, fmt.Errorf("syntax error for %s", op)) g.errors = append(g.errors, e) }
// err appends an error onto the error list func (p *Parser) err(s string) { e := comperr.New(p.cur(), errors.New(s)) p.errors = append(p.errors, e) }
func (self *Gen) errorf(t *tok.Token, f string, args ...interface{}) { e := comperr.New(t, fmt.Errorf(f, args...)) self.errors = append(self.errors, e) }