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

303 lines
8.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 39,
"end": 149,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 39,
"end": 149,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 43,
"end": 149,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 47,
"end": 149,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 53,
"end": 62,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 54,
"end": 61,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 54,
"end": 56,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "StringLiteral",
"span": {
"start": 59,
"end": 61,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 64,
"end": 65,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 71,
"end": 80,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 72,
"end": 79,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 72,
"end": 74,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "StringLiteral",
"span": {
"start": 77,
"end": 79,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"params": [],
"decorators": [],
"span": {
"start": 71,
"end": 86,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 83,
"end": 86,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "GetterProperty",
"span": {
"start": 92,
"end": 121,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 96,
"end": 105,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 97,
"end": 104,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 97,
"end": 99,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "StringLiteral",
"span": {
"start": 102,
"end": 104,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"typeAnnotation": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 108,
"end": 121,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 110,
"end": 119,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 117,
"end": 118,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
},
{
"type": "SetterProperty",
"span": {
"start": 127,
"end": 147,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 131,
"end": 140,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 132,
"end": 139,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 132,
"end": 134,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "StringLiteral",
"span": {
"start": 137,
"end": 139,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"param": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"body": {
"type": "BlockStatement",
"span": {
"start": 144,
"end": 147,
"ctxt": 0
},
"stmts": []
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}