rust/src/libsyntax/ext
Huon Wilson 99dd5911a1 syntax: unify all MacResult's into a single trait.
There's now one unified way to return things from a macro, instead of
being able to choose the `AnyMacro` trait or the `MRItem`/`MRExpr`
variants of the `MacResult` enum. This does simplify the logic handling
the expansions, but the biggest value of this is it makes macros in (for
example) type position easier to implement, as there's this single thing
to modify.

By my measurements (using `-Z time-passes` on libstd and librustc etc.),
this appears to have little-to-no impact on expansion speed. There are
presumably larger costs than the small number of extra allocations and
virtual calls this adds (notably, all `macro_rules!`-defined macros have
not changed in behaviour, since they had to use the `AnyMacro` trait
anyway).
2014-04-16 17:53:27 +10:00
..
deriving auto merge of #13440 : huonw/rust/strbuf, r=alexcrichton 2014-04-10 21:01:41 -07:00
tt syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
asm.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
base.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
build.rs Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalFn and updated associated variable and function names. 2014-04-10 15:22:00 -07:00
bytes.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
cfg.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
concat.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
concat_idents.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
env.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
expand.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
fmt.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
format.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
log_syntax.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
mtwt.rs syntax: Fix fallout of removing get() 2014-03-22 08:48:20 -07:00
quote.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
registrar.rs rustc: Don't link in syntax extensions 2014-04-13 11:29:28 -07:00
source_util.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00
trace_macros.rs syntax: unify all MacResult's into a single trait. 2014-04-16 17:53:27 +10:00