Commit Graph

74 Commits

Author SHA1 Message Date
강동윤
58823f9590 Add examples 2020-06-02 19:53:20 +09:00
강동윤
0efba88e3f
Improve typescript parser (#811) 2020-06-02 19:22:41 +09:00
강동윤
85f068c011
Reduce stack usage on debug build (#799) 2020-05-27 19:26:50 +09:00
Gurwinder Singh
5f261fcd5c
Rename Import and Export Node names (#777)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-05-17 19:15:31 +09:00
David Sherret
8b4fc59805
Support template literals in types (#767) 2020-05-16 17:19:48 +09:00
강동윤
e1bf60909e
Optimize parser (#774)
Add some short-circuiting
2020-05-16 15:31:19 +09:00
David Sherret
5bd432f7de
Fix ZeroFillRShift tokenized as Gt (#752)
Fixes #751
2020-04-29 22:09:50 +09:00
David Sherret
93ffb9700b
Increase swc_ecma_parser_macros version to 0.4.1 in swc_ecma_parser (#736) 2020-03-28 13:54:53 +09:00
강동윤
2225679ea7
Fix capturing (#731)
Fix token capturing (Closes #728)
2020-03-26 14:56:54 +09:00
강동윤
ebc7070d1f
Fix parser (#727)
- Allow await in an yield expression (fixes #720)
 - Prevent duplicate tokens while capturing (fixes #726)
2020-03-25 17:40:05 +09:00
David Sherret
b17b249fa6
Fix union and intersection type start (#725) 2020-03-22 11:02:41 +09:00
David Sherret
b677115702
Fix async arrow expression and TsIndexSignature param ident spans (#721)
- Fix async arrow expression start.
- Fix TsIndexSignature inner ident and type ann spans.
2020-03-15 08:18:28 +09:00
강동윤
c7b12cd408
Fix bugs (#718)
- Handle inline source map (Closes #706)
 - Fix parsing of conditional expression starting with async (Closes #706)
2020-03-13 23:34:36 +09:00
강동윤
dc2e2fabbd
Allow optional binding pattern in ambient context (#715) 2020-03-10 13:59:32 +09:00
David Sherret
2f47d41f2b
Fix tagged template start to include tag (#714)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-03-10 12:35:42 +09:00
강동윤
6f4e534c88 Bump versions 2020-03-10 10:39:42 +09:00
강동윤
e448a8910c
Fix bugs (#710)
- The parser now supports parsing optional patterns in .d.ts files (Closes #709)
 - The source map is handled properly (Closes #705, Closes #707)
2020-03-09 21:18:41 +09:00
강동윤
8f280c535c
Performance (#696)
- Parser performance is improved by ~15%
 - Codegen performance is improved by ~90% (when comment and source map is enabled)
2020-03-01 20:05:03 +09:00
강동윤
3911ab75b9 Bump version 2020-02-29 10:34:10 +09:00
강동윤
087e768810 Bump version 2020-02-19 12:55:41 +09:00
강동윤
348052b017
Improve optimizer (#660)
Although it's quite naive at the moment, I added two optimization passes.

 - dead code elimination (Closes #607)
 - inlining
2020-02-13 11:45:14 +09:00
kdy1
82e73b1121 Fix bugs (#659)
- Strip out const assertions (Closes #656)
 - Fix exclude of the file matcher (Closes #658) 
 - Automatic typescript detection (Closes #655)
2020-02-12 15:07:45 +00:00
dsherret
55c0258017 Remove empty expression in expression statement with top level await (#630)
Eats the semi-colon.

This doesn't compile (edit: doesn't compile the code in the tests) though because the target of that folder is ES2015. Also, this is kind of strange for me to put the tests in the "typescript" folder. Should we create something more general?

You can take over this PR if you'd like!
2020-02-07 05:33:26 +00:00
alubbe
45604fa6e7 Remove dependency renaming to enable WASM (#625)
This PR supercedes https://github.com/swc-project/swc/pull/621 and tries to remove dependency renaming to enable WASM, as discussed in https://github.com/swc-project/swc/issues/106
2020-02-05 11:20:25 +00:00
강동윤
8afa3413ea
Remove dependency on lazy_static and chashmap (#617)
- `lazy_static` is replaced by `once_cell`
 - `chashmap` is replaced by `dashmap`
2020-01-30 23:29:12 +09:00
kdy1
01659585e4 Fix parsing of jsx attribute values (#616)
Closes #614.
Closes #615.
2020-01-29 06:24:35 +00:00
강동윤
e92923b467 Bump 2020-01-29 12:21:45 +09:00
kdy1
96e1dbe213 Improve hygiene and use JSXAttrValue (#592)
swc_ecmacript:
 - use JSXAttrValue (Fixes #584)

swc_ecma_transforms:
 - make hygiene pass check for exported vars (Fixes #591)
2020-01-17 05:45:33 +00:00
강동윤
916858ae81
Bugfixes (#549)
swc_ecma_ast:
 - fix TsExprWithTypeArgs (closes #548)

swc_ecma_codegen:
 - allow using default import with namespace import (closes #546)

swc_ecma_parser:
 - parse import.meta (closes #545)
2020-01-01 06:57:34 +09:00
강동윤
702800e0d9
Attach comments to correct node (#541) 2019-12-28 22:02:58 +09:00
강동윤
b98f17b84d Bump versions 2019-12-26 08:53:13 +09:00
강동윤
b1e4122b02
Nullish coalescing / optional chaining / comments (#529)
swc_ecma_ast:
 - rename `TsOptChain` to `OptChainExpr` (Fixes #525)
 - add `BinOp::NullishCoalescing`

swc_ecma_parser:
 - parse `??` (Fixes #526)

swc_ecma_transforms:
 - remap comments from fixer (Fixes #528)
2019-12-24 17:01:32 +09:00
강동윤
24b5c44ba3
Numeric separator & Bigint (#523)
swc_ecma_ast:
 - `BigInt` literal

swc_ecma_parser:
 - numeric separators. (#521)
 - parsing of bigint literal
2019-12-22 17:14:04 +09:00
강동윤
51d21af031 Fix #516 2019-12-19 13:08:52 +09:00
강동윤
30af06bb70
Ast (#513)
swc_ecmascript:
 - add `ExprStmt`.
 - change type of regex.expression and regex.flags.
2019-12-16 18:08:21 +09:00
강동윤
332061f44d
Parser: respect jsc.target (#507)
swc:
 - make parser respect `jsc.target`.
2019-12-14 18:51:08 +09:00
강동윤
126b6bc761 Add a test for #503 2019-12-13 08:35:32 +09:00
강동윤
d53c94f1fb Bump parser's version.
Closes #500
2019-12-11 15:56:27 +09:00
Nurbol Alpysbayev
2f4ce50d06 Fix the Wasm blocker for Parser (#495) 2019-12-11 00:02:39 +09:00
강동윤
cd486288b7 Bump version 2019-12-10 07:23:27 +09:00
Zimon Dai
ec086a1dab use 2018 edition syntax (#479) 2019-12-02 17:10:05 +09:00
강동윤
fc9880e4f4 Bump parser's version 2019-11-24 14:42:08 +09:00
강동윤
b46c4ec300
Update dependencies (#464) 2019-11-24 14:17:27 +09:00
강동윤
7d4168f415
Parser performance (#463)
- Update string_cache from 0.7 to 0.8
 - Update unicode_xid from 0.1 to 0.2

swc_ecma_parser:
 - Add benchmarks for lexer
2019-11-23 23:03:19 +09:00
Jasper De Sutter
716bfe05b2 Cleanup (#448)
- cargo fix
- update all crates to 2018 edition
2019-11-17 13:21:53 +09:00
강동윤
167008de6f
Expose tokenizer (#437)
swc_common:
 - Added input::Input

swc_ecma_parser:
 - Made lexer public
 - Make input type of parser generic
 - Added example of using lexer
2019-11-06 13:14:44 +09:00
강동윤
ae3326cd9d
Compiler apis & .swcrc improvement (#434)
- Expose high-level compiler apis (#431)
 - Support multiple entries in .swcrc (#414)
2019-10-25 10:11:24 +09:00
강동윤
2add7a08ef fixup! Bump versions 2019-10-23 22:22:54 +09:00
강동윤
4a41140854 Bump versions 2019-10-23 22:20:00 +09:00
강동윤
c7abda95d4
typescript const assertion (#419)
Fixes #401.
2019-09-18 22:54:12 +09:00