]> git.lizzy.rs Git - rust.git/commit
Add an ItemModifier syntax extension type
authorSteven Fackler <sfackler@gmail.com>
Fri, 28 Feb 2014 07:49:25 +0000 (23:49 -0800)
committerSteven Fackler <sfackler@gmail.com>
Tue, 11 Mar 2014 07:28:25 +0000 (00:28 -0700)
commiteb4cbd55a859be68d381ce4fdb597b0893c18c04
treef4240852dd1c31e8494306acfd331a9946f0c0d6
parent294d3ddb89c86a91b0ac7298a31e729a9192171f
Add an ItemModifier syntax extension type

Where ItemDecorator creates new items given a single item, ItemModifier
alters the tagged item in place. The expansion rules for this are a bit
weird, but I think are the most reasonable option available.

When an item is expanded, all ItemModifier attributes are stripped from
it and the item is folded through all ItemModifiers. At that point, the
process repeats until there are no ItemModifiers in the new item.
src/libstd/vec_ng.rs
src/libsyntax/ext/base.rs
src/libsyntax/ext/expand.rs
src/test/auxiliary/macro_crate_test.rs
src/test/run-pass-fulldeps/macro-crate.rs