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

159 lines
3.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 29,
"end": 63,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 29,
"end": 42,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 33,
"end": 41,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"value": "arr",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 39,
"end": 41,
"ctxt": 0
},
"elements": []
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 43,
"end": 63,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 43,
"end": 62,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 43,
"end": 57,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 43,
"end": 54,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 43,
"end": 49,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 43,
"end": 46,
"ctxt": 0
},
"value": "arr",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 46,
"end": 49,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 50,
"end": 54,
"ctxt": 0
},
"value": "prop",
"optional": false
}
},
"property": {
"type": "Computed",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 60,
"end": 62,
"ctxt": 0
},
"properties": []
}
}
}
],
"interpreter": null
}