Skip to main content

Module visitor

Module visitor 

Source

Traits§

ExprVisitor
Trait that implements the Visitor pattern for a depth first walk on Expr AST. pre_visit is called before any children are visited, and then post_visit is called after all children have been visited. Only pre_visit is required.
ExprVisitorMut
Trait that implements the Visitor pattern for a depth first walk on Expr AST. pre_visit is called before any children are visited, and then post_visit is called after all children have been visited. Only pre_visit is required.

Functions§

walk_expr
A util function that traverses an AST Expr in depth-first order. Returns Ok(true) if all nodes were visited, and Ok(false) if any call to pre_visit or post_visit returned Ok(false) and may have cut short the recursion.
walk_expr_mut
A util function that traverses an AST Expr mutably in depth-first order. Returns Ok(true) if all nodes were visited, and Ok(false) if any call to pre_visit or post_visit returned Ok(false) and may have cut short the recursion.