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

362 lines
9.0 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 36,
"end": 222,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 36,
"end": 222,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 50,
"end": 79,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 57,
"end": 74,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 58,
"end": 73,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 58,
"end": 64,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 65,
"end": 73,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 84,
"end": 124,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 91,
"end": 118,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 92,
"end": 117,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 92,
"end": 98,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 99,
"end": 117,
"ctxt": 0
},
"value": "isConcatSpreadable",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 84,
"end": 124,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 121,
"end": 124,
"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": 129,
"end": 177,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 140,
"end": 160,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 141,
"end": 159,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 141,
"end": 147,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 148,
"end": 159,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 129,
"end": 177,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 163,
"end": 177,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 165,
"end": 175,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 172,
"end": 174,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 182,
"end": 220,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 193,
"end": 213,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 194,
"end": 212,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 194,
"end": 200,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 201,
"end": 212,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 182,
"end": 220,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 217,
"end": 220,
"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
}