Module util

Source
Expand description

Internal utilities for parser.

Re-exports§

pub use duration::display_duration;
pub use duration::parse_duration;
pub use number::parse_str_radix;

Modules§

duration
number

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.

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.