mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
868 lines
19 KiB
JSON
868 lines
19 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 24,
|
|
"end": 507,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 33,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 24,
|
|
"end": 76,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "Constructor",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"value": "constructor",
|
|
"optional": false
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsParameterProperty",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 69,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"accessibility": "public",
|
|
"override": false,
|
|
"readonly": false,
|
|
"param": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 60,
|
|
"end": 69,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 61,
|
|
"end": 69,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 63,
|
|
"end": 69,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 71,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"accessibility": null,
|
|
"isOptional": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 84,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Bar",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 78,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "Constructor",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 134,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 101,
|
|
"end": 112,
|
|
"ctxt": 0
|
|
},
|
|
"value": "constructor",
|
|
"optional": false
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsParameterProperty",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"accessibility": "public",
|
|
"override": false,
|
|
"readonly": false,
|
|
"param": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 121,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 123,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 131,
|
|
"end": 134,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"accessibility": "public",
|
|
"isOptional": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 144,
|
|
"end": 147,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Baz",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 138,
|
|
"end": 199,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "Constructor",
|
|
"span": {
|
|
"start": 154,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 164,
|
|
"end": 175,
|
|
"ctxt": 0
|
|
},
|
|
"value": "constructor",
|
|
"optional": false
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsParameterProperty",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 192,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"accessibility": "public",
|
|
"override": false,
|
|
"readonly": false,
|
|
"param": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 183,
|
|
"end": 192,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 184,
|
|
"end": 192,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 192,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"accessibility": "protected",
|
|
"isOptional": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 207,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Qux",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 201,
|
|
"end": 261,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "Constructor",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"value": "constructor",
|
|
"optional": false
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsParameterProperty",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"accessibility": "public",
|
|
"override": false,
|
|
"readonly": false,
|
|
"param": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 245,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 246,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 248,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 256,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"accessibility": "private",
|
|
"isOptional": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 278,
|
|
"end": 290,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 282,
|
|
"end": 289,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 282,
|
|
"end": 283,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 286,
|
|
"end": 289,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 299,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 298,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 292,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 295,
|
|
"end": 298,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Bar",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 300,
|
|
"end": 308,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 300,
|
|
"end": 307,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 300,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 304,
|
|
"end": 307,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Baz",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 335,
|
|
"end": 343,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 335,
|
|
"end": 342,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 335,
|
|
"end": 336,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 339,
|
|
"end": 342,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Qux",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 387,
|
|
"end": 399,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 391,
|
|
"end": 398,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 391,
|
|
"end": 392,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 395,
|
|
"end": 398,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Baz",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 400,
|
|
"end": 408,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 400,
|
|
"end": 407,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 400,
|
|
"end": 401,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 404,
|
|
"end": 407,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 409,
|
|
"end": 417,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 409,
|
|
"end": 416,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 409,
|
|
"end": 410,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 413,
|
|
"end": 416,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Bar",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 418,
|
|
"end": 426,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 418,
|
|
"end": 425,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 418,
|
|
"end": 419,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 422,
|
|
"end": 425,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Qux",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 468,
|
|
"end": 480,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 472,
|
|
"end": 479,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 472,
|
|
"end": 473,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 476,
|
|
"end": 479,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Qux",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 481,
|
|
"end": 489,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 481,
|
|
"end": 488,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 481,
|
|
"end": 482,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 485,
|
|
"end": 488,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 490,
|
|
"end": 498,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 490,
|
|
"end": 497,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 490,
|
|
"end": 491,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 494,
|
|
"end": 497,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Bar",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 499,
|
|
"end": 507,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 499,
|
|
"end": 506,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 499,
|
|
"end": 500,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 503,
|
|
"end": 506,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Baz",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|