func removeErrorField(ityp *ast.InterfaceType) {
	list := ityp.Methods.List  
	j := 0
	for _, field := range list {
		keepField := true
		if n := len(field.Names); n == 0 {
			if fname, _ := baseTypeName(field.Type); fname == "error" {
				keepField = false
			}
		}
		if keepField {
			list[j] = field
			j++
		}
	}
	if j < len(list) {
		ityp.Incomplete = true
	}
	ityp.Methods.List = list[0:j]
}
removeErrorField removes anonymous fields named "error" from an interface.
This is called when "error" has been determined to be a local name,
not the predeclared type.
package doc
import (
	"github.com/tcard/sgo/sgo/ast"
	"github.com/tcard/sgo/sgo/token"
)
func filterIdentList(list []*ast.Ident) []*ast.Ident {
	j := 0
	for _, x := range list {
		if ast.IsExported(x.Name) {
			list[j] = x
			j++
		}
	}
	return list[0:j]
}
func hasExportedName(list []*ast.Ident) bool {
	for _, x := range list {
		if x.IsExported() {
			return true
		}
	}
	return false
}