Module syntax::fold [−][src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A Folder represents an AST->AST fold; it accepts an AST piece, and returns a piece of the same type. So, for instance, macro expansion is a Folder that walks over an AST and produces another AST.
Note: using a Folder (other than the MacroExpander Folder) on an AST before macro expansion is probably a bad idea. For instance, a folder renaming item names in a module will miss all of those that are created by the expansion of a macro.
Re-exports
use ast::*; |
use ast; |
use syntax_pos::Span; |
use codemap::Spanned; |
use codemap::respan; |
use parse::token; |
use parse::token::Token; |
use ptr::P; |
use symbol::keywords; |
use tokenstream::*; |
use util::small_vector::SmallVector; |
use util::move_map::MoveMap; |
use rustc_data_structures::sync::Lrc; |
Traits
Folder |
[ Experimental ]
|