Skip to content

Parser

The Oxc parser is designed to be the fastest and most conformant JavaScript and TypeScript parser available. Contributing to the parser requires understanding both the implementation details and the extensive test infrastructure.

Architecture Overview

The parser follows a traditional compiler frontend architecture:

Source Text → Lexer → Tokens → Parser → AST
``````bash
# Run parser tests
cargo test -p oxc_parser

# Run conformance tests
just c  # or `just coverage`

crates/oxc_parser/ ├── src/ │ ├── lib.rs # Public API │ ├── lexer/ # Tokenization │ ├── parser/ # Parsing logic │ ├── cursor.rs # Token stream management │ └── diagnostics.rs # Error handling ├── tests/ # Unit tests └── examples/ # Usage examples

bash
just c
```