Commit Graph

167 Commits

Author SHA1 Message Date
Donny/강동윤
8274cce9a7
test(es/parser): Add a test for a fixed issue (#7467)
**Related issue:**

 - Closes #7456.
2023-05-30 04:35:07 +00:00
Donny/강동윤
77850dd8f0
fix(es/parser): Fix parsing of generic jsx element name (#7449)
**Related issue:**

 - Closes #7444.
2023-05-25 13:52:14 +09:00
Donny/강동윤
a37d59a134
fix(es/parser): Fix parsing of tsx with a type annotation in a conditional expression (#7440)
**Related issue:**

 - Closes #7224.
2023-05-24 15:57:50 +09:00
Donny/강동윤
33a922b6f8
fix(es/parser): Allow using package as a parameter name in interface (#7438)
**Related issue:**

 - Closes #7186.
2023-05-24 06:25:39 +00:00
Donny/강동윤
1cab43f17d
fix(es/parser): Reset class context (#7433)
**Related issue:**

 - Closes #7428.
2023-05-23 05:28:56 +00:00
Donny/강동윤
57ad722d06
fix(es/parser): Fix parsing of > in typescript mode (#7407)
**Related issue:**

 - Closes #7403.
2023-05-18 08:18:27 +00:00
Donny/강동윤
1d3f32056c
fix(es/parser): Fix parsing of module identifier (#7400)
**Related issue:**

 - Closes #4176.
 - Closes #7372.
2023-05-17 04:51:57 +00:00
Donny/강동윤
eaba323581
test(es/parser): Add a test for a fixed issue (#7398)
**Related issue:**

 - Closes #6976.
2023-05-16 12:31:05 +00:00
Austaras
fa7a3521f5
fix(es/parser): Fix >= with type instantiate (#7388) 2023-05-14 05:21:13 +00:00
Donny/강동윤
041b491466
feat(es/parser): Implement explicit resource management (#7322)
**Description:**

 - Add `UsingDecl`.
 - Add `UsingDecl` to `Decl`.
 - Rename `VarDeclOrPat` to `ForHead`.
 - Add `UsingDecl` to `ForHead`.
 - Implement parser for using declarations.

**Related issue:**

 - #7316.
2023-05-10 04:16:44 +00:00
magic-akari
985f0cad06
fix(es/parser): Parse decorators after export (#7340) 2023-04-29 22:26:13 +09:00
Donny/강동윤
603f22de76
test(es): Update tsc test suite (#7323) 2023-04-24 14:59:19 +00:00
Donny/강동윤
6f81cb9c32
fix(es/parser): Fix handling of in and out of typescript (#7308)
**Related issue:**

 - Closes #7305.
2023-04-21 15:11:18 +09:00
David Sherret
6614886192
fix(es/parser): Parse const type parameters in arrow function expressions (#7242) 2023-04-11 02:11:04 +00:00
Donny/강동윤
01db30f91e
fix(es/parser): Reset ctx for cond while parsing a stmt (#7232) 2023-04-10 10:45:49 +00:00
Yukang
b1c40a411f
fix(es/parser): Use a hard error for missing r-paren in an if stmt (#7223)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7104.
2023-04-10 08:46:01 +00:00
Marvin Hagemeister
414e66910d
fix(es/parser): Fix infinite loop on jsx in js (#7191) 2023-04-02 22:14:29 +00:00
Donny/강동윤
0259a7465f
build(cargo): Update rustc to nightly-2023-03-20 (#7170)
**Description:**

This PR also updates `rkyv` to `=0.7.40`.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6807.
2023-03-30 08:06:02 +00:00
Donny/강동윤
12546c853a
build(cargo): Revert rustc upgrade (#7162)
**Description:**

The `rkyv` bug is not fixed.
2023-03-29 17:48:45 +09:00
Donny/강동윤
e445502072
build(cargo): Update rustc to nightly-2023-03-28 (#7154)
**Description:**

This PR also updates `rkyv` to `=0.7.40`.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6807.
2023-03-29 06:24:19 +00:00
Crayon
dd2b16db9e
fix(es/parser): Fix parsing of static accessors (#7108)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7107.
2023-03-21 07:19:45 +00:00
Donny/강동윤
085c6f35f1
fix(es/ast): Fix memory layout (#7062)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7061.
2023-03-12 04:50:28 +00:00
suxin2017
9acaf4deeb
fix(es/parser): Handle class members with accessor as the name (#7046)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7042.
2023-03-10 06:26:14 +00:00
Daiki Nishikawa
a6471f34c0
feat(es/parser): Add an option to disallow ambiguous jsx (#6913) 2023-03-03 02:47:09 +00:00
Donny/강동윤
367ac825f6
refactor(es/parser): Make lexer not generic over Input (#6993)
**Description:**

Currently, it uses `StringInput` as the input type, but I'll refactor it to use `String` or `Vec<u8>` directly to optimize it further.

**Related issue:**

 - https://github.com/swc-project/swc/discussions/6991
2023-02-28 08:20:29 +00:00
Donny/강동윤
37533a23fd
feat(es/parser): Support auto accessors (#6981) 2023-02-28 06:39:25 +00:00
magic-akari
beb38d34a2
feat(es/typescript): Support export type * from "mod" (#6867) 2023-02-28 06:01:37 +00:00
Donny/강동윤
b887b30092
test(es/tsc): Update tsc test suite (#6982)
**Description:**

This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
2023-02-23 07:55:58 +00:00
Daiki Nishikawa
76bc8a2974
feat(bindings/cli): Support for *.mts/*.cts files (#6909)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/4679.
2023-02-07 15:18:10 +00:00
Donny/강동윤
f36d945a33
fix(es/parser): Fix stack overflow due to deeply nested if (#6910)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6813.
2023-02-07 14:33:13 +00:00
Donny/강동윤
60d9403073
fix(es/parser): Fix parsing of generics (#6859)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6851.
2023-01-27 06:57:19 +00:00
magic-akari
019cf37199
feat(es/typescript): Support const modifier on type parameters (#6672)
**Related issue:**

 - https://github.com/microsoft/TypeScript/pull/51865.
2023-01-10 05:08:29 +00:00
Donny/강동윤
65a0d3a310
fix(es/parser): Fix priority of >>> (#6748)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6739.
2023-01-04 07:27:08 +00:00
Alexander Akait
c44f1d0a7f
fix(es/parser): Parse types in CallExpression inside templates (#6611)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6601.
2022-12-10 00:05:25 +00:00
Alexander Akait
ad95ead291
fix(es/parser): Fix parsing of JSX with ASI (#6577)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6522.
2022-12-06 09:50:26 +09:00
Alexander Akait
aa28aa0c7f
fix(es/parser): Fix typeof in TSCallSignatureDeclaration (#6553)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6430
2022-11-30 17:09:53 +00:00
Donny/강동윤
7ee86d1d25
test: Use correct extensions for fixture tests (#6539) 2022-11-29 09:47:56 +00:00
Donny/강동윤
cb157215d2
feat(es/parser): Make error message helpful (#6535)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6525.
2022-11-29 05:57:23 +00:00
Donny/강동윤
b8fe04f720
feat(common): Add contexts to the error messages (#6526)
**Description:**

This PR makes the error reporter print contexts.

**Related issue:**

 - https://github.com/swc-project/swc/issues/6525.
2022-11-29 00:56:47 +09:00
Austaras
c57307d002
refactor(es): Remove settings related to privateInObject (#6468) 2022-11-21 08:34:20 +09:00
Alexander Akait
3e702b9804
fix(es/parser): Fix parsing of regexp (#6469)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6322.
 - Closes https://github.com/swc-project/swc/issues/6323.
2022-11-18 07:16:22 +00:00
Daiki Nishikawa
f6faeb3bad
fix(es/parser): Fix parsing of TS satisfies expressions (#6354) 2022-11-07 03:56:15 +00:00
Alexander Akait
28af15e475
fix(es/parser): Fix parsing of await (#6316) 2022-11-03 04:52:11 +00:00
Maxime
61e63df0a0
chore(es/parser): Typo (#6228) 2022-10-21 23:48:15 +00:00
Donny/강동윤
0ca5ded618
fix(es/parser): Fix parsing of arrow in cond (#6067)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/4911.
2022-10-17 08:31:11 +00:00
Donny/강동윤
2ba88154fc
fix(es/codegen): Align sourcemap with terser (#5657) 2022-09-26 18:12:42 +09:00
Donny/강동윤
5cddb4c734
feat(es/typescript): Support TS 4.9 (#5938)
**Description:**

This PR adds satisfaction expression to the AST and parser.
2022-09-23 16:41:56 +09:00
Donny/강동윤
dfb01bde71
refactor: Refactor code using clippy (#5863)
**Description:**

I temporarily updated rustc to use newer version of `cargo clippy`.
2022-09-14 15:05:59 +00:00
magic-akari
10637b006f
fix(es/parser): Handle more TS1185 (#5834) 2022-09-13 02:16:22 +00:00
IWANABETHATGUY
97729e5d2b
feat(es/parser): Improve jsx lexer (#5805) 2022-09-11 00:03:51 +09:00