mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
> A Use Strict Directive may not contain an EscapeSequence or LineContinuation. It is `Use Strict Directive` spec, but the `expression` of `Directive` isn't original string value, it has error if using it to codegen, so here using `directive` of `Directive` to codegen and not to escape it. Here is crashed test cases. ``` js 'use str\ ict'; ``` The babel will print the original string, I follow it and avoid using `print_str` because it will escape string. I also changed some code using the `expression` of `Directive` to check `Use Strict Directive` . |
||
|---|---|---|
| .. | ||
| babel@eccbd20338 | ||
| misc | ||
| src | ||
| test262@17ba9aea47 | ||
| typescript@64d2eeea7b | ||
| Cargo.toml | ||
| codegen_babel.snap | ||
| codegen_misc.snap | ||
| codegen_runtime_test262.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 | ||
| 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'