Commit Graph

200 Commits

Author SHA1 Message Date
강동윤
a75dbdf2f2 Update references 2019-02-25 19:47:53 +09:00
강동윤
b6a4d1548a FIx 2019-02-25 19:14:23 +09:00
강동윤
27cd169522 More works for ast node serialization 2019-02-25 19:07:20 +09:00
강동윤
3e2750ba5e Make const_module pass parse expressions itself 2019-02-25 12:42:23 +09:00
강동윤
906d6a0625 Fix codegen of yield, break, continue. Fixes #275. 2019-02-25 11:42:50 +09:00
강동윤
dff2cb8f75
Implement deserialize for ast nodes (#274)
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
2019-02-24 14:12:04 +09:00
강동윤
78f4b25480
Bug Fixes (#273)
swc_ecma_transforms:
 - fix spread pass (#270)
 - add babel's fixture tests for spreads
 - change order of passes (#271)
 - handle updates of private class fields (#272)
2019-02-23 21:56:12 +09:00
강동윤
7dcb2e34af Add test for #269. 2019-02-22 15:55:04 +09:00
강동윤
a785ecc960
Add const_modules pass (#268)
swc_ecma_transforms:
 - use fxhash for inline_globals pass
 - handle member expression in inlne_globals pass
 - add const_modules pass
2019-02-22 15:42:27 +09:00
강동윤
c1de0a5c86
Improve codegen of binary expression which contains unary expression. (#267)
swc_ecma_codegen:
 - improve codegen of binary expression which contains unary expression (#266)
2019-02-22 12:04:41 +09:00
강동윤
8f932c374e Fix visibillity 2019-02-21 22:29:06 +09:00
강동윤
07e2cffb43
Fixes (#265)
swc_ecma_parsr:
 - fix parsing of invalid utf8 characters (#261)
 - fix parsing of function body (#257)
 - fix parsing of  () => (x = true) (#259)

swc_ecma_transforms:
 - fix default arguments in arrow expression (#254)
 - fix assignment pattern in array pattern (#260)
 - make amd / umd configurable. (#262)
2019-02-21 22:21:48 +09:00
강동윤
e9b06c5de2
Improve fixer (#263)
swc_ecma_transforms:
 - fixer does not breaks cast to boolean (#252)
 - fixer does not break conditional expression with comma expressions (#255)
2019-02-21 14:49:13 +09:00
강동윤
162dee5518
Fix bugs (#251)
swc_ecma_transforms:
 - don't convert typeof to _typeof if not necessary (#250)
 - fix imports of `@swc/helpers` (#248).
2019-02-20 20:02:22 +09:00
강동윤
601f0feb14 Hoist functions in block scoped function pass.
Fix #245.
2019-02-20 12:10:28 +09:00
강동윤
76ce98b685
Implement serialize for ast nodes (#244)
swc_common:
 - implement Serialize / Deserialize for span

swc_ecma_parser:
 - use json instead of {:#?} while testing
 - update test references
2019-02-20 11:35:41 +09:00
강동윤
7d5316463d
Fixes (#241)
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)
2019-02-19 15:20:02 +09:00
강동윤
4fddea0bbd swc_ecma_transforms:
- remove this parameter from typescript::strip pass (fixes #236)
2019-02-19 14:30:26 +09:00
강동윤
4dc10d849e
Fixes (#237)
swc_ecma_transforms:
 - handle pattern correctly in coomon_js pass (#235)
 - fix object rest in arrow expression (#233)
2019-02-19 12:52:03 +09:00
Nate Mara
6fd789aa34 Remove dbg! macro call (#232) 2019-02-19 10:34:12 +09:00
강동윤
aa8940c1b0 Fix #226.
Now parser works correctly when either
exportDefaultFrom and exportNamespace is enabled
2019-02-18 23:43:53 +09:00
강동윤
4917bbaf44 Fix test 2019-02-18 22:34:32 +09:00
강동윤
3252988e6a Update fixer.
Fixes #231.
2019-02-18 22:31:50 +09:00
강동윤
59f6a6ffb6 Handle react fragment in top level.
Fixes #229.
2019-02-18 18:08:40 +09:00
강동윤
1368a4a281 Fix #227 2019-02-18 15:05:58 +09:00
강동윤
2b7240c595
Support export * as Foo from 'foo'; (#228)
swc_ecma_parser:
 - support `export * as Foo from 'foo';` (Fix #226)

swc_ecma_transforms:
 - support `export * as Foo from 'foo';` (Fix #226)
2019-02-18 14:01:56 +09:00
강동윤
523307a5da FIx #225 2019-02-18 12:19:40 +09:00
강동윤
d8f9101b30 Fix #227 2019-02-18 11:15:04 +09:00
강동윤
3fc360d870 Make sourcemap optional 2019-02-17 23:25:35 +09:00
강동윤
a00d281704 Make Optional pass 2019-02-17 17:52:48 +09:00
강동윤
e419d7d378
Cache react config (#224)
swc_ecma_transforms:
 - global codemap / parser session for config parsing
 - cache parsing result of react pass
 - InjectHelpers pass does not require source map
2019-02-17 17:11:21 +09:00
강동윤
bbfcca8f2b
External helpers (#223)
swc_ecma_transforms
 - support extenal helpers (#155)
2019-02-17 13:48:18 +09:00
강동윤
33ab0db712
Fix travis (#222)
swc_common:
 - ignore copied doctests

swc_ecma_transforms:
 - fox some tests
2019-02-16 18:58:29 +09:00
강동윤
046788cf78 Add option to disable module analyzer 2019-02-16 14:27:24 +09:00
강동윤
1a1889f437
Fix bugs (#221)
swc_ecmascript_parser:
 - fix parsing of `export default from 'src';`

swc_ecmascript:
 - add a pass which allows injecting helpers before the module pass
2019-02-16 14:18:22 +09:00
강동윤
9108ba7bb7 Don't inline process.env.x if x is not registered as global.
Fix #215.
2019-02-15 14:06:16 +09:00
강동윤
ad49de35b3
Handle foo && yield bar (#218)
Fix #216.
2019-02-15 13:58:10 +09:00
강동윤
1d865b9979
Strip type-only imports (#217)
swc_ecma_transforms:
 - strip type-only imports (#179)
2019-02-15 12:14:28 +09:00
강동윤
34fff56462 Add a test for #211.
Closes #211.
2019-02-14 21:17:01 +09:00
강동윤
9bd7a9c484
Perfect fixer (#212)
swc_ecma_transforms:
 - test fixer using test262
 - make fixer perfect
2019-02-14 21:12:05 +09:00
강동윤
b76c4f26e6 Fix #210. 2019-02-14 17:46:22 +09:00
강동윤
e20998d69b FIx #209 2019-02-14 16:06:54 +09:00
강동윤
631eff9e8c
Bugfixes (#208)
swc_ecma_codegen:
 - fix codegen of shebang (#177)
 - add test for #197.

swc_ecma_transforms:
 - fix object rest spread pass (#162)
2019-02-14 13:24:01 +09:00
강동윤
b27829825e
Fix Bugs (#205)
swc_ecma_codegen:
 - escape characters (#204)

swc_ecma_parser:
 - fix parsing of `<!--`

swc_ecma_transforms:
 - promote VarCollector to crate-level utility
 - fix es3::member_expr_lits (#206)
 - fix es2015::duplicate_keys pass (#203)
 - improve fixer (paren for assignment) (#201)
 - improve fixer (arrow expression) (#207)
 - make typescript pass strip out type-only exports (#196)
2019-02-14 11:03:06 +09:00
강동윤
c1a3cc53c1
React jsx / improve fixer (#202)
swc_ecma_parser:
 - fix parsing of jsx

swc_ecma_transforms:
 - fix fixer (#199)
2019-02-13 19:12:00 +09:00
강동윤
c647cf1bc0
Fix bugs (#193)
swc_ecma_parser:
 - fix lexer
 - better error reporting for jsx reference test

swc_ecma_codegen:
 - Update references
2019-02-13 16:03:38 +09:00
강동윤
fedfea4e09 Fix #190 2019-02-13 14:24:44 +09:00
강동윤
a13e6a09b5
Fix #185 (#187)
swc_ecma_transforms:
 - handle imports correctly (in rhs of assignment)
2019-02-13 12:32:12 +09:00
강동윤
74858c3b66
Fix #167 (#186) 2019-02-13 11:56:45 +09:00
강동윤
bf128d295f Add test for #182.
Closes #182.
2019-02-13 11:33:28 +09:00