Add an API compatible with the [golang.org/x/tools/go/analysis](https://pkg.go.dev/golang.org/x/tools/go/analysis) package. Maybe wait for the API in https://github.com/golang/go/issues/61324 to land.