108 releases (62 breaking)
Uses new Rust 2024
new 0.62.0 | Apr 2, 2025 |
---|---|
0.61.2 | Mar 23, 2025 |
0.60.0 | Mar 18, 2025 |
0.44.0 | Dec 25, 2024 |
0.0.1 | Mar 30, 2023 |
#14 in #typescript-parser
90,078 downloads per month
Used in 49 crates
(20 directly)
3MB
53K
SLoC
Oxc AST (Abstract Syntax Tree) Nodes
Supports JavaScript, TypeScript and JSX.
Types
AST types are similar to estree and typescript-eslint's definition, with a few notable exceptions:
Identifier
is replaced with explicitBindingIdentifier
,IdentifierReference
,IdentifierName
, per ECMAScript Specification.AssignmentExpression
.left
Pattern
is replaced withAssignmentTarget
.Literal
is replaced withBooleanLiteral
,NumericLiteral
,StringLiteral
etc.
Field order of types follows "Evaluation order" defined by ECMAScript spec. For TypeScript types, we follow how field order is defined in tsc.
Oxc's visitors (Visit
, VisitMut
, Traverse
) visit AST node fields in same order
as they are defined in the types here.
Parsing
You can obtain an AST by parsing source code with a Parser
from oxc_parser
.
Cargo Features
"serialize"
enables support for serialization to ESTree JSON
Dependencies
~5MB
~82K SLoC