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

166 lines
4.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 36,
"end": 123,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 36,
"end": 123,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 40,
"end": 123,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 44,
"end": 123,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 50,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 51,
"end": 58,
"ctxt": 0
},
"value": "hello",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
"params": [],
"decorators": [],
"span": {
"start": 50,
"end": 84,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 62,
"end": 84,
"ctxt": 0
},
"stmts": [
{
"type": "DebuggerStatement",
"span": {
"start": 72,
"end": 81,
"ctxt": 0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "GetterProperty",
"span": {
"start": 87,
"end": 121,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 91,
"end": 102,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 92,
"end": 101,
"ctxt": 0
},
"value": "goodbye",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
"typeAnnotation": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 105,
"end": 121,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 109,
"end": 118,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"value": 0.0
}
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}