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

345 lines
11 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 246,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 23,
"end": 27,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 17,
"end": 67,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 34,
"end": 65,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 34,
"end": 37,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 34,
"end": 65,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 40,
"end": 65,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 50,
"end": 59,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 57,
"end": 58,
"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": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 68,
"end": 246,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 95,
"end": 244,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 95,
"end": 98,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 95,
"end": 244,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 101,
"end": 244,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 111,
"end": 220,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 111,
"end": 220,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 117,
"end": 220,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 131,
"end": 210,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 135,
"end": 209,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 135,
"end": 138,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 141,
"end": 209,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 159,
"end": 172,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 160,
"end": 171,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 160,
"end": 169,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 160,
"end": 165,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 166,
"end": 169,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
"params": [],
"decorators": [],
"span": {
"start": 159,
"end": 178,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 175,
"end": 178,
"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": 229,
"end": 238,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 236,
"end": 237,
"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": {
"type": "Identifier",
"span": {
"start": 84,
"end": 88,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}