-
由 Marvin Löbel 提交于
Prior to this, the code there had a few issues: - Default implementations inconsistently either had the prefix `noop_` or not. - Some default methods where implemented in terms of a public noop function for user code to call, others where implemented directly on the trait and did not allow users of the trait to reuse the code. - Some of the default implementations where private, and thus not reusable for other implementors. - There where some bugs where default implementations called other default implementations directly, rather than to the underlying Folder, with the result of some AST nodes never being visited even if the user implemented that method. (For example, the current Folder never folded struct fields) This commit solves this situation somewhat radically by making _all_ `fold_...` functions in the module into Folder methods, and implementing them all in terms of public `noop_...` functions for other implementors to call out to. Some public functions had to be renamed to fit the new system, so this is a breaking change. [breaking-change]
26a39f23