-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix span of arrow expression with type params (#1365)
swc_ecma_parser: - Fix span of arrow expression with type params. Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
- Loading branch information
Showing
60 changed files
with
337 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
const a = <T>(value: T): any => {}; |
150 changes: 150 additions & 0 deletions
150
ecmascript/parser/tests/span/ts/expr/arrow-type-params.ts.spans
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
warning: Module | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:1 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: ModuleItem | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:1 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: Stmt | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:1 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: Decl | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:1 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: VarDecl | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:1 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: VarDeclarator | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:7 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: Pat | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:7 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: Ident | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:7 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: Expr | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:11 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: ArrowExpr | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:11 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: Pat | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:15 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^ | ||
|
||
warning: Ident | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:15 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^^^^ | ||
|
||
warning: TsTypeAnn | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:20 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^ | ||
|
||
warning: TsType | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:22 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: TsTypeRef | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:22 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: TsEntityName | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:22 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: Ident | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:22 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: BlockStmtOrExpr | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:33 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^ | ||
|
||
warning: BlockStmt | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:33 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^ | ||
|
||
warning: TsTypeParamDecl | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:11 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^ | ||
|
||
warning: TsTypeParam | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:12 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: Ident | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:12 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^ | ||
|
||
warning: TsTypeAnn | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:24 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^^^ | ||
|
||
warning: TsType | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:26 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^ | ||
|
||
warning: TsKeywordType | ||
--> $DIR/tests/span/ts/expr/arrow-type-params.ts:1:26 | ||
| | ||
1 | const a = <T>(value: T): any => {}; | ||
| ^^^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.