Module syntax::visitExperimental
[-]
[+]
[src]
AST walker. Each overridden visit method has full control over what
happens with its node, it can do its own traversal of the node's children,
call visit::walk_* to apply the default traversal algorithm, or prevent
deeper traversal by doing nothing.
Note: it is an important invariant that the default visitor walks the body of a function in "execution order" (more concretely, reverse post-order with respect to the CFG implied by the AST), meaning that if AST node A may execute before AST node B, then A is visited first. The borrow checker in particular relies on this property.
Note: walking an AST before macro expansion is probably a bad idea. For instance, a walker looking for item names in a module will miss all of those that are created by the expansion of a macro.
Reexports
pub use self::FnKind::*; |
Enums
| FnKind |
Traits
| Visitor | Each method of the Visitor trait is a hook to be potentially
overridden. Each method's default implementation recursively visits
the substructure of the input via the corresponding |
Functions
| skip_ty | |
| walk_arm | |
| walk_assoc_type_binding | |
| walk_block | |
| walk_crate | |
| walk_decl | |
| walk_enum_def | |
| walk_explicit_self | |
| walk_expr | |
| walk_expr_opt | |
| walk_exprs | |
| walk_fn | |
| walk_fn_decl | |
| walk_fn_ret_ty | |
| walk_foreign_item | |
| walk_generics | |
| walk_inlined_item | |
| walk_item | |
| walk_lifetime_bound | |
| walk_lifetime_decls_helper | |
| walk_lifetime_def | |
| walk_lifetime_ref | |
| walk_local | |
| walk_mac | |
| walk_method_helper | |
| walk_mod | |
| walk_pat | |
| walk_path | |
| walk_path_parameters | |
| walk_path_segment | |
| walk_poly_trait_ref | Like with walk_method_helper this doesn't correspond to a method in Visitor, and so it gets a _helper suffix. |
| walk_stmt | |
| walk_struct_def | |
| walk_struct_field | |
| walk_trait_item | |
| walk_trait_ref | Like with walk_method_helper this doesn't correspond to a method in Visitor, and so it gets a _helper suffix. |
| walk_ty | |
| walk_ty_method | |
| walk_ty_param | |
| walk_ty_param_bound | |
| walk_ty_param_bounds_helper | |
| walk_variant | |
| walk_view_item |