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

376 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 168,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 16,
"end": 139,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 25,
"end": 139,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 31,
"end": 47,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 35,
"end": 46,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"value": "Symbol",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 41,
"end": 46,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 43,
"end": 46,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExportDeclaration",
"span": {
"start": 53,
"end": 107,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 60,
"end": 107,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 78,
"end": 101,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 78,
"end": 95,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 79,
"end": 94,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 79,
"end": 85,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 86,
"end": 94,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 78,
"end": 101,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"stmts": []
},
"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": "ExpressionStatement",
"span": {
"start": 112,
"end": 137,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 112,
"end": 136,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 112,
"end": 119,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 113,
"end": 118,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 117,
"end": 118,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
}
},
"property": {
"type": "Computed",
"span": {
"start": 119,
"end": 136,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 120,
"end": 135,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 120,
"end": 126,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 127,
"end": 135,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
}
}
}
]
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 141,
"end": 168,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 141,
"end": 167,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 141,
"end": 150,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 142,
"end": 149,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 146,
"end": 149,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"value": "M",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "C",
"optional": false
}
},
"arguments": null,
"typeArguments": null
}
},
"property": {
"type": "Computed",
"span": {
"start": 150,
"end": 167,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 151,
"end": 166,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 151,
"end": 157,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 158,
"end": 166,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
}
}
}
],
"interpreter": null
}