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

238 lines
6.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 112,
"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": 112,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 30,
"end": 61,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 30,
"end": 61,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 36,
"end": 61,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 46,
"end": 55,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 53,
"end": 54,
"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
},
{
"type": "ClassMethod",
"span": {
"start": 66,
"end": 110,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 66,
"end": 104,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 76,
"end": 98,
"ctxt": 0
},
"object": {
"type": "ObjectExpression",
"span": {
"start": 76,
"end": 95,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 78,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 79,
"end": 89,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 79,
"end": 87,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 79,
"end": 83,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 84,
"end": 87,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"property": {
"type": "Computed",
"span": {
"start": 95,
"end": 98,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"value": 0.0
}
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 66,
"end": 110,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 107,
"end": 110,
"ctxt": 0
},
"stmts": []
},
"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
}