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

243 lines
8.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 180,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 180,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 30,
"end": 178,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 30,
"end": 178,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 36,
"end": 178,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 46,
"end": 154,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 46,
"end": 154,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 52,
"end": 154,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 66,
"end": 144,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 70,
"end": 143,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 70,
"end": 73,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 76,
"end": 143,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 94,
"end": 106,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 95,
"end": 105,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 95,
"end": 103,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 95,
"end": 99,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 100,
"end": 103,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
"params": [],
"decorators": [],
"span": {
"start": 94,
"end": 112,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 109,
"end": 112,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 163,
"end": 172,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": 0.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}