Skip to main content

Module visit

Module visit 

Source

Enums§

NodeAction
Result of visiting one node. Walker consumes this when iterating the parent’s children Vec.

Traits§

Visitor
Implemented by transform passes to react to each node. The default impl keeps every node and recurses, so override only the variants you care about.

Functions§

walk_children_mut
Recurse into the per-variant inner children of parent. Leaf variants (Text, InlineCode, CodeBlock, Image, JsxExpression, …) are no-ops.
walk_root
Drive the visitor over a Vec<Node>, honoring every NodeAction variant. Replacements aren’t re-visited but are descended into on a later pass if the visitor returns Keep.