swc/crates/swc_ecma_parser/tests/tsc/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.json

404 lines
12 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 116,
"end": 340,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 116,
"end": 235,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 116,
"end": 235,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 116,
"end": 130,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 116,
"end": 122,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 123,
"end": 130,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 133,
"end": 235,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 186,
"end": 233,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 186,
"end": 197,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 201,
"end": 233,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 211,
"end": 227,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 211,
"end": 226,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 211,
"end": 217,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 211,
"end": 215,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "t",
"optional": false
}
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 220,
"end": 222,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"right": {
"type": "Identifier",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": "p",
"optional": false
}
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 236,
"end": 340,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 236,
"end": 340,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 236,
"end": 254,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 236,
"end": 250,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 236,
"end": 242,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 243,
"end": 250,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 251,
"end": 254,
"ctxt": 0
},
"value": "Sub",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 257,
"end": 340,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 269,
"end": 338,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 269,
"end": 280,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 283,
"end": 338,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 293,
"end": 332,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 293,
"end": 331,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 293,
"end": 306,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 293,
"end": 297,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 298,
"end": 306,
"ctxt": 0
},
"value": "instance",
"optional": false
}
},
"right": {
"type": "NewExpression",
"span": {
"start": 309,
"end": 331,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 313,
"end": 327,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 313,
"end": 319,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 320,
"end": 327,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 328,
"end": 330,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
}
}
],
"typeArguments": null
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
}
],
"interpreter": null
}