rust/src/libsyntax/ext
Marvin Löbel 26a39f23ce Refactored syntax::fold.
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]
2014-07-29 12:31:53 +02:00
..
deriving Fixed lifetimes on syntax deriving structs, implemented Clone 2014-07-19 17:33:17 -04:00
tt Add a ton of ignore-lexer-test 2014-07-21 18:38:40 -07:00
asm.rs std: Rename the ToStr trait to ToString, and to_str to to_string. 2014-07-08 13:01:43 -07:00
base.rs Refactoring: Only use MacroExpander for expanding outside of 2014-07-22 01:00:03 +02:00
build.rs Implement new mod import sugar 2014-07-20 12:40:08 +02:00
bytes.rs Revert bytes!() docstring change, and fix a typo. 2014-06-18 17:02:23 -07:00
cfg.rs Simplify creating a parser from a token tree 2014-07-03 12:54:52 -07:00
concat.rs Add a b'x' byte literal of type u8. 2014-06-17 23:41:03 +02:00
concat_idents.rs rustc: Obsolete the @ syntax entirely 2014-06-14 10:45:37 -07:00
env.rs std: Rename the ToStr trait to ToString, and to_str to to_string. 2014-07-08 13:01:43 -07:00
expand.rs Refactored syntax::fold. 2014-07-29 12:31:53 +02:00
fmt.rs Change static.rust-lang.org to doc.rust-lang.org 2014-05-21 19:55:39 -07:00
format.rs auto merge of #15871 : dotdash/rust/unnamed_fmtstr, r=pcwalton 2014-07-22 09:01:17 +00:00
log_syntax.rs std: Rename the ToStr trait to ToString, and to_str to to_string. 2014-07-08 13:01:43 -07:00
mtwt.rs Fix all the test fallout 2014-07-09 00:49:54 -07:00
quote.rs syntax: Add ToTokens impl for Method 2014-07-17 08:54:43 -04:00
source_util.rs Fix errors 2014-07-15 20:34:16 +02:00
trace_macros.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00