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

312 lines
8.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 190,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 26,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 66,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 33,
"end": 64,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 33,
"end": 64,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 39,
"end": 64,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 49,
"end": 58,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 56,
"end": 57,
"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": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 67,
"end": 190,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 94,
"end": 188,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 94,
"end": 97,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 94,
"end": 188,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 100,
"end": 188,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 110,
"end": 164,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 114,
"end": 163,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 114,
"end": 117,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 120,
"end": 163,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 134,
"end": 147,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 135,
"end": 146,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 135,
"end": 144,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 135,
"end": 140,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
"params": [],
"decorators": [],
"span": {
"start": 134,
"end": 153,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
},
{
"type": "ReturnStatement",
"span": {
"start": 173,
"end": 182,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 180,
"end": 181,
"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": {
"type": "Identifier",
"span": {
"start": 83,
"end": 87,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}