oxc/crates/oxc_module_lexer
Boshen 8a788b8f4b feat(parser)!: Build ModuleRecord directly in parser (#7546)
This has the benefit of:

* expose dynamic import / import meta info from parser
* 1 less ast shallow in semantic builder
* no ast walk in oxc's module lexer
* some more benefits coming soon
2024-11-29 14:50:42 +00:00
..
examples chore: make println and eprintln opt-in (#3712) 2024-06-17 10:40:34 +00:00
src chore: Rust v1.83.0 changes (#7535) 2024-11-29 11:59:45 +08:00
tests/integration feat(parser)!: Build ModuleRecord directly in parser (#7546) 2024-11-29 14:50:42 +00:00
Cargo.toml release(crates): v0.38.0 (#7490) 2024-11-26 14:38:47 +08:00
CHANGELOG.md release(crates): v0.35.0 (#7110) 2024-11-04 17:40:05 +08:00
README.md New tool: oxc_module_lexer (#2650) 2024-03-09 23:23:55 +08:00

Oxc Module Lexer

This is not a lexer. The name "lexer" is used for easier recognition.

es-module-lexer

Outputs the list of exports and locations of import specifiers, including dynamic import and import meta handling.

Does not have any limitations mentioned in es-module-lexer.

cjs-module-lexer

  • TODO

Benchmark

This is 2 times slower than es-module-lexer, but will be significantly faster when TypeScript is processed.

The difference is around 10ms vs 20ms on a large file (700k).