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:
Identifieris replaced with explicitBindingIdentifier,IdentifierReference,IdentifierName, per ECMAScript Specification.AssignmentExpression.leftPatternis replaced withAssignmentTarget.Literalis replaced withBooleanLiteral,NumericLiteral,StringLiteraletc.
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
"serde"enables support for serde serialization