The commit will help
- Better testing
- Preventing regression like #785.
- **Implementing spack** (It requires access to neon api because of the plugin system)
This pr introduces some cargo features. For `swc_common` and `swc_ecma_ast`, it introduces a feature flag `fold`.
`Fold` and `Visit` traits exist only if the feature is enabled.
For `swc_ecma_parser`, flag called `verify` is added. When disabled, we skip checking of validity of some expressions.
e.g. `{foo = bar}`
Verification is disabled by default it requires nightly compiler
* Remove CanIUse trait, which will be reimpplemented in future
using Visitor.
* Remove some other unused stuffs.
* Change public path of swc_common::fold::* to swc_common::*.
- Parser and lexer for lastest ecma spec https://tc39.github.io/ecma262
- Lexer is currently very inefficient
- Use https://github.com/tc39/test262-parser-tests/ for testing.
- Implement proc-macro based ast folder and assert_eq_ignore_span! based on it.
- Some utilities for proc macro at /macros/common