rust/src/libsyntax
bors 8c00357f9d auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis
Note: This PR is motivated by an attempt to write an custom syntax extension that tried to use `syntax::fold`, and that could only do so by fixing bugs in it and copying out private functions.

---

Refactored `syntax::fold`

Prior to this, the code there had a few issues:

- Default implementations inconsistenly 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 implemntations called other default
  implementations directly, rather than to the underlying Folder, with the
  result of some ast nodes never being visted 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.

---

Also added a few trait implementations to `ast` types
2014-07-31 16:41:36 +00:00
..
ast_map Refactored syntax::fold. 2014-07-29 12:31:53 +02:00
diagnostics Register new snapshots 2014-07-19 20:38:00 -07:00
ext auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis 2014-07-31 16:41:36 +00:00
parse syntax: add support for quoting arms 2014-07-29 16:01:36 -07:00
print auto merge of #15915 : erickt/rust/master, r=alexcrichton 2014-07-30 14:41:18 +00:00
util Fix all the test fallout 2014-07-09 00:49:54 -07:00
abi.rs Fix trailing whitespace 2014-07-31 02:01:16 +02:00
ast_util.rs Implement new mod import sugar 2014-07-20 12:40:08 +02:00
ast.rs auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis 2014-07-31 16:41:36 +00:00
attr.rs
codemap.rs ignore-lexer-test to broken files and remove some tray hyphens 2014-07-21 10:59:58 -07:00
crateid.rs
diagnostic.rs Convert a first batch of diagnostics to have error codes 2014-07-12 21:53:34 +02:00
fold.rs Refactored syntax::fold. 2014-07-29 12:31:53 +02:00
lib.rs Implement new mod import sugar 2014-07-20 12:40:08 +02:00
owned_slice.rs libsyntax::ast: Derive Show impls 2014-07-15 18:54:47 -04:00
visit.rs libsyntax: Remove ~self and mut ~self from the language. 2014-07-24 07:26:03 -07:00