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

159 lines
4.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 37,
"end": 124,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 37,
"end": 124,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 41,
"end": 124,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 45,
"end": 124,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 51,
"end": 60,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 52,
"end": 59,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
"params": [],
"decorators": [],
"span": {
"start": 51,
"end": 85,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 63,
"end": 85,
"ctxt": 0
},
"stmts": [
{
"type": "DebuggerStatement",
"span": {
"start": 73,
"end": 82,
"ctxt": 0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "GetterProperty",
"span": {
"start": 88,
"end": 122,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 92,
"end": 103,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 93,
"end": 102,
"ctxt": 0
},
"value": "goodbye",
"raw": "\"goodbye\""
}
},
"typeAnnotation": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 106,
"end": 122,
"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"
}
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}