func (e *encoded) findKeyword(keyword string, start, end token.Pos) token.Pos {
	offset := int(start) - e.pgf.Tok.Base()
	last := int(end) - e.pgf.Tok.Base()
	buf := e.pgf.Src
	idx := bytes.Index(buf[offset:last], []byte(keyword))
	if idx != -1 {
		return start + token.Pos(idx)
	}
	// can't happen
	e.unexpected(fmt.Sprintf("not found:%s %v", keyword, e.fset.PositionFor(start, false)))
	return token.NoPos
}
// findKeyword finds a keyword rather than guessing its location
findKeyword finds a keyword rather than guessing its location
// findKeyword finds a keyword rather than guessing its location
func (e *encoded) findKeyword(keyword string, start, end token.Pos) token.Pos {
	offset := int(start) - e.pgf.Tok.Base()
	last := int(end) - e.pgf.Tok.Base()
	buf := e.pgf.Src
	idx := bytes.Index(buf[offset:last], []byte(keyword))
	if idx != -1 {
		return start + token.Pos(idx)
	}
	e.unexpected(fmt.Sprintf("not found:%s %v", keyword, e.fset.PositionFor(start, false)))
	return token.NoPos
}
func ( e * encoded ) findKeyword ( keyword string , start , end token . Pos ) token . Pos { offset := int ( start ) - e . pgf . Tok . Base ( ) last := int ( end ) - e . pgf . Tok . Base ( ) buf := e . pgf . Src idx := bytes . Index ( buf [ offset : last ] , [ ] byte ( keyword ) ) if idx != - 1 { return start + token . Pos ( idx ) } e . unexpected ( fmt . Sprintf ( " " , keyword , e . fset . PositionFor ( start , false ) ) ) return token . NoPos }
findKeyword finds a keyword rather than guessing its location
findKeyword finds a keyword rather than guessing its location
// can't happen