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

527 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 213,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 31,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 30,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 21,
"end": 30,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 23,
"end": 30,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 32,
"end": 213,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 46,
"end": 68,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 46,
"end": 68,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 56,
"end": 68,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 58,
"end": 67,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"value": 0.0,
"raw": "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": 73,
"end": 97,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 84,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 85,
"end": 89,
"ctxt": 0
},
"value": true
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 73,
"end": 97,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 94,
"end": 97,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 102,
"end": 126,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 106,
"end": 110,
"ctxt": 0
},
"expression": {
"type": "ArrayExpression",
"span": {
"start": 107,
"end": 109,
"ctxt": 0
},
"elements": []
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 102,
"end": 126,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 113,
"end": 126,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 115,
"end": 124,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": 0.0,
"raw": "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": 131,
"end": 146,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 135,
"end": 139,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 136,
"end": 138,
"ctxt": 0
},
"properties": []
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 131,
"end": 146,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 143,
"end": 146,
"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": 151,
"end": 189,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 162,
"end": 173,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 163,
"end": 172,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 151,
"end": 189,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 176,
"end": 189,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 178,
"end": 187,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 194,
"end": 211,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 198,
"end": 204,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 199,
"end": 203,
"ctxt": 0
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 194,
"end": 211,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 208,
"end": 211,
"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
}