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

154 lines
3.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 171,
"end": 205,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 171,
"end": 177,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "A",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 178,
"end": 185,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 178,
"end": 184,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 178,
"end": 179,
"ctxt": 0
},
"value": "A",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 182,
"end": 184,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 186,
"end": 205,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 186,
"end": 204,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 186,
"end": 199,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 186,
"end": 197,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 188,
"end": 197,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 202,
"end": 204,
"ctxt": 0
},
"properties": []
}
}
}
],
"interpreter": null
}