update documentation with new `errors` function; expose InvalidAstError