swc/crates/swc_ecma_parser/tests/tsc/superSymbolIndexedAccess3.json
2022-04-05 12:46:35 +00:00

339 lines
8.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 185,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 50,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 49,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 25,
"ctxt": 0
},
"value": "symbol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 28,
"end": 49,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 28,
"end": 38,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 28,
"end": 34,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 35,
"end": 38,
"ctxt": 0
},
"value": "for",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 39,
"end": 48,
"ctxt": 0
},
"value": "myThing",
"raw": "'myThing'"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 58,
"end": 61,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 52,
"end": 106,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 68,
"end": 104,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 68,
"end": 76,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"value": "symbol",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 68,
"end": 104,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 79,
"end": 104,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 89,
"end": 98,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 96,
"end": 97,
"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": 114,
"end": 117,
"ctxt": 0
},
"value": "Bar",
"optional": false
},
"declare": false,
"span": {
"start": 108,
"end": 185,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 136,
"end": 183,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 136,
"end": 144,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 137,
"end": 143,
"ctxt": 0
},
"value": "symbol",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 136,
"end": 183,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 147,
"end": 183,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 157,
"end": 177,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 164,
"end": 176,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 164,
"end": 174,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 164,
"end": 169,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 169,
"end": 174,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 170,
"end": 173,
"ctxt": 0
},
"value": "Bar",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"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": 126,
"end": 129,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}