Skip to content

Commit

Permalink
document module lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Sep 27, 2024
1 parent 2e718cd commit 468533f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/docs/guide/usage/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ The Rust crate `oxc_parser` is production ready.
## Features

- 3x faster than swc parser ([benchmark][url-benchmark]).
- parses `.js(x)` and `.ts(x)`.
- passes all parser tests from Test262 and 99% from Babel and TypeScript.
- Parses `.js(x)` and `.ts(x)`.
- Passes all parser tests from Test262 and 99% from Babel and TypeScript.
- Utility for extracting ESM import and export data - a better [`es-module-lexer`](https://github.com/guybedford/es-module-lexer).
- [✅ works with checker.ts](https://x.com/robpalmer2/status/1805502964435505559)

## Installation
Expand All @@ -31,6 +32,11 @@ Rust usage example can be found [here](https://github.com/oxc-project/oxc/blob/m

Use the experimental node binding [oxc-parser][url-oxc-parser-npm].

### ESM Module Lexer

- Use the npm package `oxc-parser` with the API `moduleLexerSync`.
- Use the crate [oxc_module_lexer](https://crates.io/crates/oxc_module_lexer).

<!-- Links -->

[url-swc]: https://swc.rs
Expand Down

0 comments on commit 468533f

Please sign in to comment.