mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 13:18:59 +00:00
Fold constant addition expressions. Handles string concatenation and addition, both with implicit casting. For example, ```ts let x = 1 + 1 let y = "hello " + "world" ``` now becomes ```ts let x = 2 let y = "hello world" ``` ## Extra Goodies - test(minifier): add `test_snapshot` helper to perform snapshot tests with `insta` - up(hir): implement `std::ops::Add` for `NumericValue` - up(span): impl `TryFrom<Cow<'_, &str>>` for `Atom` |
||
|---|---|---|
| .. | ||
| babel@d062d47d57 | ||
| misc | ||
| src | ||
| test262@c4642dd714 | ||
| typescript@2f34e57ed3 | ||
| Cargo.toml | ||
| formatter_babel.snap | ||
| formatter_test262.snap | ||
| minifier_babel.snap | ||
| minifier_test262.snap | ||
| parser_babel.snap | ||
| parser_misc.snap | ||
| parser_test262.snap | ||
| parser_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'