81 releases (breaking)
Uses new Rust 2024
| new 0.111.0 | Jan 26, 2026 |
|---|---|
| 0.109.0 | Jan 19, 2026 |
| 0.106.0 | Dec 29, 2025 |
| 0.99.0 | Nov 24, 2025 |
| 0.61.2 | Mar 23, 2025 |
#1690 in Programming languages
53,010 downloads per month
Used in 137 crates
(18 directly)
3MB
58K
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
~94K SLoC