mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
711 lines
19 KiB
JSON
711 lines
19 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 129,
|
|
"end": 620,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 129,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 135,
|
|
"end": 157,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 135,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TopLevelSym",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 149,
|
|
"end": 157,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 149,
|
|
"end": 155,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 159,
|
|
"end": 185,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 184,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 173,
|
|
"ctxt": 0
|
|
},
|
|
"value": "InnerSym",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 184,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 200,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 192,
|
|
"ctxt": 0
|
|
},
|
|
"value": "module",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 200,
|
|
"ctxt": 0
|
|
},
|
|
"value": "exports",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 203,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "MethodProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TopLevelSym",
|
|
"optional": false
|
|
}
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 229,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 229,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 224,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 227,
|
|
"end": 229,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0,
|
|
"raw": "12"
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 209,
|
|
"end": 256,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 231,
|
|
"end": 256,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 241,
|
|
"end": 250,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 248,
|
|
"end": 249,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 262,
|
|
"end": 267,
|
|
"ctxt": 0
|
|
},
|
|
"value": "items",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 269,
|
|
"end": 321,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 279,
|
|
"end": 289,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 280,
|
|
"end": 288,
|
|
"ctxt": 0
|
|
},
|
|
"value": "InnerSym",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 292,
|
|
"end": 305,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 292,
|
|
"end": 295,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 298,
|
|
"end": 305,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 300,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 302,
|
|
"end": 304,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0,
|
|
"raw": "12"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 310,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 310,
|
|
"end": 313,
|
|
"ctxt": 0
|
|
},
|
|
"value": "arg",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 314,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 349,
|
|
"end": 378,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 355,
|
|
"end": 377,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 355,
|
|
"end": 366,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TopLevelSym",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 369,
|
|
"end": 377,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 369,
|
|
"end": 375,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 379,
|
|
"end": 405,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 385,
|
|
"end": 404,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 385,
|
|
"end": 393,
|
|
"ctxt": 0
|
|
},
|
|
"value": "InnerSym",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 396,
|
|
"end": 404,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 396,
|
|
"end": 402,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 407,
|
|
"end": 620,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 420,
|
|
"end": 427,
|
|
"ctxt": 0
|
|
},
|
|
"value": "MyClass",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 414,
|
|
"end": 620,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 434,
|
|
"end": 460,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 441,
|
|
"end": 454,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 442,
|
|
"end": 453,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TopLevelSym",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 457,
|
|
"end": 459,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0,
|
|
"raw": "12"
|
|
},
|
|
"typeAnnotation": null,
|
|
"isStatic": true,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 465,
|
|
"end": 483,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 465,
|
|
"end": 475,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 466,
|
|
"end": 474,
|
|
"ctxt": 0
|
|
},
|
|
"value": "InnerSym",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 478,
|
|
"end": 482,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ok",
|
|
"raw": "\"ok\""
|
|
},
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "Constructor",
|
|
"span": {
|
|
"start": 560,
|
|
"end": 618,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 560,
|
|
"end": 571,
|
|
"ctxt": 0
|
|
},
|
|
"value": "constructor",
|
|
"optional": false
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 572,
|
|
"end": 585,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "AssignmentPattern",
|
|
"span": {
|
|
"start": 572,
|
|
"end": 585,
|
|
"ctxt": 0
|
|
},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 572,
|
|
"end": 574,
|
|
"ctxt": 0
|
|
},
|
|
"value": "_p",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 577,
|
|
"end": 585,
|
|
"ctxt": 0
|
|
},
|
|
"value": "InnerSym",
|
|
"optional": false
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 587,
|
|
"end": 618,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"accessibility": null,
|
|
"isOptional": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|