Module syntex_syntax::fold [] [src]

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.

Traits

Folder

Functions

fold_attrs
fold_thin_attrs
noop_fold_angle_bracketed_parameter_data
noop_fold_arg
noop_fold_arm
noop_fold_attribute
noop_fold_block
noop_fold_crate
noop_fold_decl
noop_fold_explicit_self
noop_fold_explicit_self_underscore
noop_fold_expr
noop_fold_exprs
noop_fold_field
noop_fold_fn_decl
noop_fold_foreign_item
noop_fold_foreign_mod
noop_fold_generics
noop_fold_ident
noop_fold_impl_item
noop_fold_interpolated

apply folder to elements of interpolated nodes

noop_fold_item
noop_fold_item_simple
noop_fold_item_underscore
noop_fold_lifetime
noop_fold_lifetime_def
noop_fold_lifetime_defs
noop_fold_lifetimes
noop_fold_local
noop_fold_mac
noop_fold_meta_item
noop_fold_meta_items
noop_fold_method_sig
noop_fold_mod
noop_fold_mt
noop_fold_opt_bounds
noop_fold_opt_expr
noop_fold_opt_lifetime
noop_fold_parenthesized_parameter_data
noop_fold_pat
noop_fold_path
noop_fold_path_parameters
noop_fold_poly_trait_ref
noop_fold_stmt
noop_fold_struct_field
noop_fold_token
noop_fold_trait_item
noop_fold_trait_ref
noop_fold_tt
noop_fold_tts
noop_fold_ty
noop_fold_ty_binding
noop_fold_ty_param
noop_fold_ty_param_bound
noop_fold_ty_params
noop_fold_usize
noop_fold_variant
noop_fold_variant_data
noop_fold_view_path
noop_fold_where_clause
noop_fold_where_predicate