96 releases (breaking)
Uses new Rust 2024
| new 0.126.0 | Apr 16, 2026 |
|---|---|
| 0.124.0 | Apr 7, 2026 |
| 0.123.0 | Mar 30, 2026 |
| 0.106.0 | Dec 29, 2025 |
| 0.61.2 | Mar 23, 2025 |
#1967 in Programming languages
149,437 downloads per month
Used in 200 crates
(33 directly)
3.5MB
63K
SLoC
Oxc AST Visit
Visitor pattern implementations for traversing and mutating AST nodes.
Overview
This crate provides visitor traits and implementations for systematically traversing AST nodes. It supports both immutable visitation (Visit) and mutable transformation (VisitMut).
Key Features
Visittrait: Immutable AST traversal for analysisVisitMuttrait: Mutable AST traversal for transformations- Generated implementations: Most visitor code is auto-generated for consistency
- UTF-8 to UTF-16 conversion: Special visitors for span conversion
Architecture
The visitor pattern is designed for:
- Analysis: Static analysis, linting, and code inspection
- Transformation: Code modification and transpilation
- Consistency: Systematic traversal of all AST nodes
- Performance: Efficient traversal with minimal overhead
Most visitor implementations are generated by oxc_ast_tools to ensure all AST nodes are covered and traversal is consistent.
Dependencies
~5.5MB
~93K SLoC