Unfortunately, most people agree that the ast package is a mess. It isn't used by the actual compiler. There is some talk of eventually deprecating it and publishing the internal ast/parser/type-checker packages.
https://github.com/placeybordeaux/panic-attack
The package works fine, but I can't say it was fun to work with.