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

221 lines
5.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 78,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 16,
"end": 29,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 21,
"end": 23,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "x",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 30,
"end": 43,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 35,
"end": 37,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": "x",
"optional": false
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 44,
"end": 78,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 48,
"end": 77,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": "o",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 52,
"end": 77,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 58,
"end": 72,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 59,
"end": 71,
"ctxt": 0
},
"operator": "||",
"left": {
"type": "MemberExpression",
"span": {
"start": 59,
"end": 63,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 59,
"end": 61,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "MemberExpression",
"span": {
"start": 67,
"end": 71,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 67,
"end": 69,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": 0.0
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}