AST transformer that extracts minErr errors