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

Download history 8197/week @ 2025-12-25 9847/week @ 2026-01-01 15923/week @ 2026-01-08 14275/week @ 2026-01-15 16917/week @ 2026-01-22 21293/week @ 2026-01-29 23207/week @ 2026-02-05 24896/week @ 2026-02-12 23065/week @ 2026-02-19 29463/week @ 2026-02-26 31184/week @ 2026-03-05 44088/week @ 2026-03-12 41626/week @ 2026-03-19 37452/week @ 2026-03-26 29284/week @ 2026-04-02 35782/week @ 2026-04-09

149,437 downloads per month
Used in 200 crates (33 directly)

MIT license

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

  • Visit trait: Immutable AST traversal for analysis
  • VisitMut trait: 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