string_enum:
- #[derive(StringEnum)] now derives `Deserialize`
swc_ecma_ast:
- implement deserialize for ast nodes.
- change ast to make it serialized / deserialized correctly
swc_ecma_parser:
- jsx, test262, typescript tests now verify serialization and deserialization of module
swc_ecma_transforms:
- handle constructor from object_rest_spread pass (#239)
- typescript::strip pass now removes signature-only constructor
swc_ecma_parser:
- fix parsing of do while statement (#242)
swc_ecma_codegen:
- fix codegen of do while statement (#242)
swc_ecma_ast:
- Support `export v from 'foo';`
swc_ecma_parser:
- Support `export v from 'foo';`
swc_ecma_codegen:
- Fix codegen of side-effect imports
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
swc_atoms:
- add some atoms
swc_ecma_ast:
- ast nodes for typescript
- `ClassMethod` -> `Method`, `ClassMethodKind` -> `MethodKind`
- private class method / class property
- use separate type for tagged template literals
- add `declare` field to `Decl`s
- make function body optional
swc_ecma_parser:
- rename Type to TokenContext
- support decorators
Note: error reporting for invalid decorator is not implemented yet
- merge `Config` into `Syntax`
- Use DiagnosticBuilder for error type
This is to make backtracking cheaper.
swc_ecma_transforms:
- add `strip` pass
swc_ecma_parser:
- improve parser's tests
It now shows the code failed to parse
- allow rest pattern in catch clause
- fix parsing of named export (semicolon)
swc_ecma_transforms:
- implement array spread
- add helper methods (objectWithoutProperties)
- add some fast paths
- make es2015::parameters handle catch clauses
- don't show helpers when execution failed
- export fixer
swc_common:
- update rustc-ap crates to v313
swc_ecma_ast:
- use bool instead of Option<Span>
swc_ecma_parser:
- remove LexerInput
- use uncons_while
- assert only on debug mode
- use Visit instead of Fold while verifying
- replace debug! with trace!
- disable logging while benchmarking
- drop slog
swc_ecma_transforms:
- classes: fold Decl instead of Stmt
swc:
- add nodejs binding
swc_common:
- implement VisitWith for &T and [T]
swc_ecma_ast:
- fix codegen of `===`
swc_ecma_parser:
- fix parsing of array pattern
swc_ecma_transforms:
- implement es2015::destructuring
- implement es2015::computed_properties
- implement es2015::duplicate_keys
- implement es2015::parameters
- fix `InjectHelper` pass
Note that getters / setters in class are not supported yet
- Run execution tests via jest
- ignore es2016::exponentation tests
swc_ecma_transforms:
- implement es2015::block_scoped_functions
- implement tagged template literal without escape handling
- hygiene: rename to different number
- scope: handle pattern by folding children
swc_ecma_ast:
- use Str instead of String for template literal
swc_ecma_parser:
- fix lexer tests
- handle template literal correctly
template literals now have cooked field
swc_ecma_codegen:
- escape newline character and backslash ('\')
testing:
- preserve context of the span in `::testing::DropSpan`
swc_ecma_codegen:
- disable get_text_of_node to avoid deoptimization
swc_ecma_transforms:
- allow using this inside arrow expression
- implement es2015::block_scoping with hygiene ident
ecma_transforms:
- implement es2015::instanceof
- implement es2015::typeof_symbol
- implement inline_globals pass
ecma_parser:
- `PResult<T>` is now `Result<T, ()>` and `Err(())` means that an error is emitted.
- add docs
- rename packages to be consistent
- `swc_macros` is removed. Now macros are imported with `extern crate macro_name` instead of `extern crate swc_macros`.
- manage atoms with words.txt file
common:
- upgrade rustc-ap crates to 297
- swc_common does not reexport sourcemap anymore
- update rustfmt to 0.99.6
simplifier:
- make some tests success when source code is equavalent
- implement fixer to fix ast broken by simplifier
- implement bit shift operators
- fix str.length
- ignore some tests
compat:
- fix `**=`
- fix es3::prop_lits
* constructor codegen
* Update string_cache to 0.7
* make swc_common not depend on sourcemap
* Remove unused dependencies
* update either to 1.5.0
* update rustc-ap crates to 297
* remove unused dependency (fnv)
common:
- rename `Folder` to `Fold`
- folder.then()
- impl Fold for Box<F>
- impl Fold<T> for &mut F where F: Fold<T>
transforms:
- make Simplifier private
- organize compat
codegen:
- use `Mark` to avoid deoptimization
swc:
- upgrade rayon and use global thread pool instead