crates/oxc_traverse/README.md
Advanced AST traversal with parent context and efficient tree navigation.
This crate provides sophisticated AST traversal capabilities that allow visitors to read up the tree from any node. Unlike traditional visitors that only provide downward traversal, oxc_traverse enables accessing parent nodes and sibling contexts during traversal.
The TraverseCtx provides rich information during traversal:
The traversal system prevents Rust aliasing violations through:
Most traversal code is generated to ensure:
The traverse system enables sophisticated transformations that would be difficult or impossible with traditional visitor patterns, while maintaining Rust's safety guarantees.