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

244 lines
8.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 181,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 17,
"end": 181,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 31,
"end": 179,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 31,
"end": 34,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 31,
"end": 179,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 37,
"end": 179,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 47,
"end": 155,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 47,
"end": 155,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 53,
"end": 155,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 67,
"end": 145,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 71,
"end": 144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 71,
"end": 74,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 77,
"end": 144,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 95,
"end": 107,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 96,
"end": 106,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 96,
"end": 104,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 96,
"end": 100,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 101,
"end": 104,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
"params": [],
"decorators": [],
"span": {
"start": 95,
"end": 113,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 110,
"end": 113,
"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": 164,
"end": 173,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"value": 0.0,
"raw": "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
}