swc/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesDeclarationEmit1_ES6.json
2022-03-22 07:54:08 +00:00

297 lines
7.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 38,
"end": 128,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 44,
"end": 45,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 38,
"end": 128,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 52,
"end": 67,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 52,
"end": 61,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 53,
"end": 60,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 53,
"end": 55,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "StringLiteral",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 52,
"end": 67,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 64,
"end": 67,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 72,
"end": 101,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 76,
"end": 85,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 77,
"end": 84,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 77,
"end": 79,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "StringLiteral",
"span": {
"start": 82,
"end": 84,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 72,
"end": 101,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 88,
"end": 101,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 90,
"end": 99,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": 0.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 106,
"end": 126,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 110,
"end": 119,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 111,
"end": 113,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "StringLiteral",
"span": {
"start": 116,
"end": 118,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 106,
"end": 126,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 123,
"end": 126,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}