Expand description
§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
Re-exports§
Modules§
- AST Definitions
 - AST node factories
 - Expression precedence trait implementations.
 
Macros§
- Macro for matching
AssignmentTarget’s variants. IncludesSimpleAssignmentTarget’s andAssignmentTargetPattern’s variants. - Macro for matching
AssignmentTargetPattern’s variants. - Macro for matching
Declaration’s variants. - Macro for matching
Expression’s variants. IncludesMemberExpression’s variants. - Macro for matching
MemberExpression’s variants. - Macro for matching
ModuleDeclaration’s variants. - Macro for matching
SimpleAssignmentTarget’s variants. IncludesMemberExpression’s variants - Macro for matching
TSType’s variants. - Macro for matching
TSTypeName’s variants. 
Structs§
- AST builder for creating AST nodes
 - A big unsigned integer type.
 - A comment in source code.
 - Double-ended iterator over a range of comments, by starting position.
 - Type that can be used in any AST builder method call which requires an
IntoIn<'a, Anything<'a>>. PassNONEinstead ofNone::<Anything<'a>>. 
Enums§
- Untyped AST Node Kind
 - Indicates a line or block comment.
 - Information about a comment’s position relative to a token.