Commit Graph

77 Commits

Author SHA1 Message Date
Alexander Akait
e91f271873
feat(es/ast): Add raw to BigInt (#4218) 2022-04-02 06:04:14 +00:00
William Tetlow
99a0d34a1e
fix(es/parser): Fix parsing of an arrow and a conditional expression (#4199) 2022-03-30 22:01:31 +00:00
David Sherret
cffe5ca58e
feat(es/parser): Allow parsing files with missing close braces (#4187) 2022-03-30 20:31:24 +00:00
David Sherret
1759567fc4
chore(es/parser): Add span tests back (#4186) 2022-03-30 06:07:40 +00:00
Alexander Akait
fcf67c4570
fix(es): Consume surrogate pairs (#4115) 2022-03-28 12:18:06 +00:00
Hannes Bornö
cd7112b18b
feat(es/parser): Report more errors for invalid patterns (#4145) 2022-03-24 11:15:28 +00:00
magic-akari
f5ce79a72c
fix(es/parser): Fix logic for consuming ts modifiers (#4137) 2022-03-24 04:20:53 +00:00
William Tetlow
ab4ea9f0cb
fix(es/parser): Allow arrows without parenthesized param in typescript (#4138) 2022-03-23 22:31:19 +00:00
magic-akari
bf1924d1a8
feat(es/typescript): Support optional variance annotations (#4008) 2022-03-23 14:36:37 +00:00
Alexander Akait
634d732803
feat(es/ast): Add raw to Str (#4071) 2022-03-22 07:54:08 +00:00
Austaras
9a8fc2776e
fix(es/parser): Make let a reserved word in strict mode (#4113) 2022-03-22 04:52:10 +00:00
Donny/강동윤
61f1a37492
fix(es/codegen): Fix codes related to sourcemap (#4106) 2022-03-21 05:14:45 +00:00
Hannes Bornö
d38117d4cb
fix(es/parser): Allow parentheses in assignment target (#4105) 2022-03-20 11:56:22 +00:00
Donny/강동윤
b31ead5cbe chore: Fix CI 2022-03-20 15:25:35 +09:00
Donny/강동윤
565a7202ed chore: Fix CI 2022-03-20 00:15:03 +09:00
Edwin Coronado
57802cfcce
fix(common): Fix the line number of errors (#4082) 2022-03-19 23:56:12 +09:00
Donny/강동윤
792ab2ca25
test(es/parser): Add a test for a fixed issue (#4085) 2022-03-19 06:14:13 +00:00
Austaras
bbe8f3d8fe
fix(es/ast): Revert removal of definite in PrivateProp (#4051) 2022-03-17 05:33:37 +00:00
Austaras
120d2a534e
fix(es/parser): Emit an error for multiple constructors with body (#4031) 2022-03-15 16:18:19 +00:00
Donny/강동윤
e19a60aad4
fix(es/compat): Change pass ordering of es2015 (#4029)
**Description:**

We should apply `regenerator` after `block_scoping` because `regenerator` does not know how to handle `const`s.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/3006
2022-03-15 14:17:03 +00:00
Sahil mobaidin
f8d6127dd1
fix(es/parser): Report an error if LeftHandSideExpression is invalid (#4001) 2022-03-15 14:24:19 +09:00
Donny/강동윤
ee9a841f33
test(*): Print diagnostics to stderr while testing (#4003)
**Description:**

This will make debugging stack overflow and parser issues easier because it writes to stderrr right away, instead of holding a buffer for it.
2022-03-14 02:06:34 +00:00
Donny/강동윤
40b8a4e596
feat(common): Implement a pretty error reporter (#3946) 2022-03-13 19:07:18 +00:00
Donny/강동윤
76e646804a
fix(es/parser): Parse if-else chain iteratively (#3961) 2022-03-11 09:10:54 +00:00
Donny/강동윤
4b4aef3270
fix(es/parser): Fix the logic for token contexts (#3926) 2022-03-09 12:53:47 +00:00
Austaras
16182d586f
feat(es/parser): Report errors for non-abstract members in an abstract class (#3917) 2022-03-08 07:38:12 +00:00
Donny/강동윤
8d3c9d39f0
test(es): Add tests for fixed issues (#3875)
**Description:**

Adds tests for fixed issues.
This commit modifies one type because the previous type makes transform flaky.

**BREAKING CHANGE:**

To preserve order, the type `swc::Paths` is now `IndexMap` instead of `HashMap`.
2022-03-06 02:27:08 +00:00
Austaras
26abc6ba7e
refactor(es/ast): Remove useless fields in private property (#3868) 2022-03-05 23:51:04 +09:00
Donny/강동윤
44262508c6
fix(es/parser): Use unicode id instead of xid (#3867) 2022-03-05 12:24:45 +00:00
Satish Srinivasan
2aa3b2123f
feat(es/parser): Raise a syntax error on an invalid shorthand assignment (#3734) 2022-03-01 12:24:41 +00:00
Donny/강동윤
3798436201
chore: Update rustc (#3768) 2022-02-28 16:12:28 +09:00
William Tetlow
342dccce47
fix(es/parser): Handle trailing comma and bracket after an arrow function in conditional (#3685) 2022-02-25 12:50:04 +00:00
Austaras
05de029cfa
fix(es/compat): Fix handling of private getters and setters (#3695) 2022-02-25 06:08:35 +00:00
Donny/강동윤
8b87bb4870
fix(es/parser): Don't attach comments to ; (#3720) 2022-02-24 07:23:53 +00:00
David Sherret
4318a2e73b
fix(es/parser): Fix the span of an export declaration containing a const enum (#3701) 2022-02-24 04:36:05 +00:00
Pig Fang
010fe048c2
fix(es/parser): Fix a typescript instantiation expression followed by EOF (#3699) 2022-02-23 15:48:17 +00:00
Pig Fang
d6522f3a37
fix(es/parser): Disallow using reserved words as an expression in typescript (#3697) 2022-02-23 14:57:01 +00:00
magic-akari
d499b8c14f
fix(es/parser): Allow Expr::TsInstantiation in extends clause (#3696) 2022-02-23 14:20:06 +00:00
Austaras
6a9d77808b
fix(es/parser): Emit an error for non-last rest element in an object pattern (#3675) 2022-02-23 13:08:46 +09:00
Donny/강동윤
68a155165b
fix(es/ast): Fix definition of Expr::TsInstantiation (#3657) 2022-02-21 13:03:11 +00:00
Austaras
2cb66ae075
refactor(es/ast): Change definition of optional chaining expressions (#3645) 2022-02-21 07:12:09 +00:00
Pig Fang
581b63cf36
fix(es/parser): Allow type arguments inside optional chaining (#3653) 2022-02-21 01:51:44 +00:00
Pig Fang
61e711c912
feat(es/ast): Support TypeScript Instantiation Expression (#3642) 2022-02-20 15:51:31 +00:00
Donny/강동윤
a2f9c88b62
test(es/parser): Add a test for #2417 (#3588) 2022-02-16 12:34:25 +00:00
Donny/강동윤
9b76783281
refactor(common): Cleanup & rustfmt (#3495)
swc_common:
 - Merge identical source codes.

swc_css_parser:
 - Deny `clippy::all`.
 - Fix lints.
2022-02-09 06:33:32 +00:00
Austaras
26565b1ae9
feat(es/parser): Disallow assignment to optional chaining expressions (#3483) 2022-02-08 12:51:26 +00:00
Donny/강동윤
8bf5cf4d03
chore(es): Fix clippy warnings (#3482) 2022-02-08 19:50:22 +09:00
Donny/강동윤
397a96a1cf
test(es/parser): Fix crlf (#3451) 2022-02-04 20:17:42 +09:00
Donny/강동윤
5a806c5b81
fix(es/parser): Fix parsing of decorators (#3449)
swc_ecma_parser:
 - Parse decorators using `parse_subscripts`.
2022-02-04 17:54:03 +09:00
Donny/강동윤
8b7c38c80c
test(es): Update tsc test suite (#3448) 2022-02-04 17:08:38 +09:00