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

154 lines
3.2 KiB
JSON
Raw Normal View History

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