rust/src/libsyntax
bors cdd6346f45 auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, r=alexcrichton
Our AST definition can include macro invocations, which can expand into all kinds of things. Macro invocations are expanded away during expansion time, and the rest of the compiler doesn't have to deal with them. However, we have no way of enforcing this.

This patch adds two protective mechanisms.

First, it adds a (quick) explicit check that ensures there are no macro invocations remaining in the AST after expansion. Second, it updates the visit and fold mechanisms so that by default, they will not traverse macro invocations. It's easy enough to add this, if desired (it's documented in the source, and examples appear, e.g. in the IdentFinder.

Along the way, I also consulted with @sfackler to refactor the macro export mechanism so that it stores macro text spans in a side table, rather than leaving them in the AST.
2014-07-12 11:06:39 +00:00
..
diagnostics Add scaffolding for assigning alpha-numeric codes to rustc diagnostics 2014-07-11 00:32:00 +02:00
ext auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, r=alexcrichton 2014-07-12 11:06:39 +00:00
parse auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, r=alexcrichton 2014-07-12 11:06:39 +00:00
print Register new snapshots 2014-07-09 10:57:58 -07:00
util Fix all the test fallout 2014-07-09 00:49:54 -07:00
abi.rs libsyntax: Remove uses of advance. 2014-07-09 15:51:58 -07:00
ast.rs auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, r=alexcrichton 2014-07-12 11:06:39 +00:00
ast_map.rs make walk/visit_mac opt-in only 2014-07-11 10:32:41 -07:00
ast_util.rs libsyntax: Remove uses of advance. 2014-07-09 15:51:58 -07:00
attr.rs syntax: doc comments all the things 2014-07-09 00:06:27 -07:00
codemap.rs syntax: don't parse numeric literals in the lexer 2014-07-09 00:06:29 -07:00
crateid.rs Remove unnecessary to_string calls 2014-06-26 08:56:49 +02:00
diagnostic.rs Add scaffolding for assigning alpha-numeric codes to rustc diagnostics 2014-07-11 00:32:00 +02:00
fold.rs make walk/visit_mac opt-in only 2014-07-11 10:32:41 -07:00
lib.rs Add scaffolding for assigning alpha-numeric codes to rustc diagnostics 2014-07-11 00:32:00 +02:00
owned_slice.rs Rename all raw pointers as necessary 2014-06-28 11:53:58 -07:00
visit.rs make walk/visit_mac opt-in only 2014-07-11 10:32:41 -07:00