Pig Fang
aded151b8f
[typescript] 4.1 mapped type 'as' clause ( #1151 )
...
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-10-13 16:44:05 +09:00
강동윤
688d16f228
Import assertion / json modules ( #1100 )
...
swc_atoms:
- Add "assert".
swc_ecma_ast
- Add a field to an import declaration.
swc_ecma_parser:
- Parse assertions in import statements.
- Parse assertions in top-level dynamic imports.
- Parse assertions in non-top-level dynamic imports.
swc_ecma_transforms:
- Fix compilation.
2020-09-23 14:27:27 +09:00
강동윤
0972db98a1
parser: Parse member expression is object patterns ( #1068 )
2020-09-12 18:39:25 +09:00
강동윤
8e237288d7
Migrate to napi ( #1009 )
2020-08-30 15:29:42 +09:00
강동윤
e6191447fe
Typescript 4.0 ( #982 )
...
swc_ecma_parser:
- Add support for optional tuple element (#978 )
2020-08-21 19:31:46 +09:00
강동윤
993b77b325
Improve error messages ( #980 )
...
swc_ecma_parser:
- Improve error messages
2020-08-21 14:57:16 +09:00
강동윤
2fedf32747
swc_bundler ( #943 )
...
swc_bundler:
- Splitted from spack
swc_ecma_parser:
- Fix unexpected eof problem which occurs if log level is trace
swc_ecma_transforms:
- Fix bugs of dce pass
spack:
- Support cyclic dependencies
2020-08-12 22:18:47 +09:00
강동윤
1315d58059
Fix bugs ( #949 )
...
swc_ecma_parser:
- Allow `in` in class properties (#944 )
- Make `delete` with optional chaining valid (#947 )
swc_ecma_transforms:
- Add a `typescript_class_properties` pass (#930 )
2020-08-09 16:45:00 +09:00
강동윤
34d475fbc8
Type annotation in catch binding ( #942 )
...
swc_ecma_parser:
- Support catch binding with type anntation (Closes #941 )
2020-08-07 13:04:35 +09:00
강동윤
76bcd3d7e4
More span tests ( #935 )
2020-08-05 12:34:44 +09:00
강동윤
2de59759de
Reduce size ( #928 )
...
Reduce binary size and make some dependencies optional for deno
2020-08-04 01:33:23 +09:00
강동윤
5baa636a4b
Chores (coverage, documentation, etc..) ( #925 )
2020-08-02 19:10:28 +09:00
강동윤
0ac55ae68b
Improve ux for rust users ( #909 )
...
testing:
- Remove dependency on relative_path
swc_common:
- Span's byte positions are now self-contained and `GLOBALS` is not required while parsing.
- Changed `Comments` into a trait.
- Provide single-threaded implementation of `Comments`
- Cargo feature `tty-emiiter` (To remove tty related stuffs )
- Cargo feature `sourcemap` (To remove sourcemap for web assets)
- Removed dependency on dashmap
swc_ecma_parser:
- No duplicated comments.
- Removed dependency on once_cell and regex
- Add a test suite to visualize and test span of nodes.
swc_ecma_utils:
- Removed dependency on parser
swc:
- Remove dependency on derive_more and path-clean
- Add multi-threaded implementation of `Comments`
swc_ecmascript:
- A new crate contains `ast`, `codegen`, `parser`, `utils`, `visit`.
2020-07-31 18:49:07 +09:00
Bartek Iwańczuk
9cb32cbb75
fix: readonly is not stripped from private prop ( #916 )
...
swc_ecma_codegen:
- Fix printing logic of literals and template literals
- Fix printing of hex
swc_ecma_parser:
- Track raw string correctly
swc_ecma_transforms:
- typescript: Handle class properties (readonly)
- typescript: Handle enums inside function
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-07-30 22:40:43 +09:00
강동윤
727a0aaa25
Remove stupid assertion ( #914 )
2020-07-30 00:55:46 +09:00
강동윤
de1f967d32
Store span of ?. in an optional chaining expression ( #907 )
...
Add OptChainExpr.question_dot_token
2020-07-28 02:15:04 +09:00
강동윤
ea885df521
Fix bugs ( #901 )
...
swc_ecma_parser:
- Accept `export type * from '../typings'` (#896 )
swc_ecma_transforms:
- Ensure that swc does not duplicate classes (#879 )
2020-07-27 20:21:52 +09:00
David Sherret
b72901b5e0
Support parsing declare properties ( #897 )
...
swc_ecma_ast:
- ClassProperty.declare
swc_ecma_parser:
- Parsing for declare class props.
- Error when parsing a private property with a declare modifier.
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-07-26 12:53:41 +09:00
강동윤
a1d33d023a
Improve ux using swc as a rust library ( #893 )
...
swc_ecma_parser:
- Improve parser's error reporting story
- Replace `Session`, `Handler`, `Emitter` with Parser.take_errors()
- Expose `Error`
- Remove useless lifetime parameters
2020-07-25 20:26:04 +09:00
강동윤
c7a5d5fef9
Fix class hygiene issue related to class properties ( #892 )
...
swc_ecma_transforms:
- fixed hygiene bug of class_properties pass
2020-07-24 22:02:29 +09:00
강동윤
9b8bfb2455
Use stable rustc ( #886 )
2020-07-24 02:18:22 +09:00
강동윤
c0917839a5
Add empty to class member ( #875 )
2020-07-05 20:10:33 +09:00
강동윤
38adc49e7e
Bugfixes ( #873 )
...
swc_common:
- Fix new_source_file
swc_ecma_parser:
- Fix parsing of paren expr in lhs of an assignment
2020-07-01 16:31:55 +09:00
강동윤
f500e9528c
Parser for TypeScript 4.0 ( #867 )
...
- Allow rest in non-last elements in tuple type
- Allow labelled ts type element in tuple type
- More operators
2020-06-29 16:23:33 +09:00
강동윤
fe260a02e2
ES2020 ( #855 )
...
Adapt es2020. API is not changed, but config for merged proposals are now noop.
2020-06-20 15:09:57 +09:00
강동윤
d82e6ab69d
Fix parsing of class member named declare ( #822 )
2020-06-04 02:52:40 +09:00
강동윤
f912e9493b
Add some tests for parser ( #819 )
2020-06-03 23:37:15 +09:00
David Sherret
99c164b628
Fix type-only import declaration with empty named imports being parsed as having a default import specifier ( #817 )
...
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-06-03 15:41:24 +09:00
강동윤
d7bb5c18ae
Fix parsing of type annotation ( #816 )
2020-06-03 12:19:05 +09:00
강동윤
0efba88e3f
Improve typescript parser ( #811 )
2020-06-02 19:22:41 +09:00
강동윤
65f2faa339
Reduce stack usage ( #776 )
2020-05-17 18:50:52 +09:00
강동윤
d74f74932e
Support decorators on parameters ( #775 )
...
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2020-05-16 22:36:52 +09:00
David Sherret
8b4fc59805
Support template literals in types ( #767 )
2020-05-16 17:19:48 +09:00
David Sherret
80f81d8cd7
Fix parsing async generator method in object expression ( #749 )
2020-04-22 12:37:17 +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
David Sherret
5a2f9249b2
Fix class declaration with decorators start. ( #711 )
2020-03-10 10:38:56 +09:00
David Sherret
1e13299540
Fix arrow start in conditional expression. ( #712 )
2020-03-10 10:29:34 +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
David Sherret
0e8c5a6c93
Fix assignment pattern start when there is a type annotation ( #693 )
...
- Update dashmap to 3.5.1
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-02-29 10:29:34 +09:00
강동윤
cb43a69e02
implement { Hash, Eq } for ast nodes ( #684 )
...
As NaN is`IIdent` not `Number`, we can use implement Hash and Eq for ast nodes.
2020-02-21 12:47:06 +09:00
David Sherret
0d17f014e3
Fix tagged template span to include tag. ( #677 )
2020-02-19 12:50:07 +09:00
David Sherret
4550f7e1af
Support type predicate "asserts" with no "is" ( #667 )
2020-02-15 10:44:02 +09:00
강동윤
1fc09caa2f
type-only import, exports ( #662 )
2020-02-13 22:56:13 +09:00
David Sherret
1bf81c6e85
Fix span of the ExportNamespaceSpecifer ( #651 )
2020-02-11 11:02:37 +09:00
David Sherret
4b7222cbfe
Support export * as ns from "module"
( #647 )
2020-02-10 11:30:25 +09:00