mirror of
https://github.com/danbulant/oxc
synced 2026-05-20 04:38:54 +00:00
The sourcemap implement port from [rust-sourcemap](https://github.com/getsentry/rust-sourcemap), but has some different with it. - Encode sourcemap at parallel, including quote `sourceContent` and encode token to `vlq` mappings. - Avoid `Sourcemap` some methods overhead, like `SourceMap::tokens()` caused extra overhead at common cases. Here using `SourceViewToken` to instead of it. |
||
|---|---|---|
| .. | ||
| misc | ||
| src | ||
| Cargo.toml | ||
| codegen_babel.snap | ||
| codegen_misc.snap | ||
| codegen_runtime_test262.snap | ||
| codegen_sourcemap.snap | ||
| codegen_test262.snap | ||
| codegen_typescript.snap | ||
| minifier_babel.snap | ||
| minifier_test262.snap | ||
| parser_babel.snap | ||
| parser_misc.snap | ||
| parser_test262.snap | ||
| parser_typescript.snap | ||
| prettier_babel.snap | ||
| prettier_misc.snap | ||
| prettier_test262.snap | ||
| prettier_typescript.snap | ||
| README.md | ||
Coverage
The parser is tested against test262, babel and TypeScript for conformance.
Note: tests against regexp are disabled for now.
Clone the test files beforehand:
git submodule update --init
Development
# full run
cargo coverage
cargo coverage js # for test262
cargo coverage babel # for babel
cargo coverage ts # for typescript
# run in watch
cargo watch -x 'coverage js'
# filter for a file path
cargo watch -x 'coverage js --filter filter-file-path'