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

489 lines
12 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 271,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 17,
"end": 43,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 21,
"end": 42,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 21,
"end": 31,
"ctxt": 0
},
"value": "methodName",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 34,
"end": 42,
"ctxt": 0
},
"value": "method",
"raw": "\"method\""
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 44,
"end": 74,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 48,
"end": 73,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"value": "accessorName",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 63,
"end": 73,
"ctxt": 0
},
"value": "accessor",
"raw": "\"accessor\""
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 75,
"end": 271,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 89,
"end": 107,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 89,
"end": 101,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 90,
"end": 100,
"ctxt": 0
},
"value": "methodName",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 89,
"end": 107,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 104,
"end": 107,
"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": 112,
"end": 137,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 119,
"end": 131,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 120,
"end": 130,
"ctxt": 0
},
"value": "methodName",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 112,
"end": 137,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 134,
"end": 137,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 142,
"end": 166,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 146,
"end": 160,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 147,
"end": 159,
"ctxt": 0
},
"value": "accessorName",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 142,
"end": 166,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 163,
"end": 166,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 171,
"end": 196,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 175,
"end": 189,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 176,
"end": 188,
"ctxt": 0
},
"value": "accessorName",
"optional": false
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 171,
"end": 196,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 193,
"end": 196,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 201,
"end": 232,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 212,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 213,
"end": 225,
"ctxt": 0
},
"value": "accessorName",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 201,
"end": 232,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 229,
"end": 232,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 237,
"end": 269,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 248,
"end": 262,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 249,
"end": 261,
"ctxt": 0
},
"value": "accessorName",
"optional": false
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 237,
"end": 269,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 266,
"end": 269,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}