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

282 lines
6.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 113,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 46,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 45,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 26,
"ctxt": 0
},
"value": "Symbol",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 26,
"end": 45,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 28,
"end": 45,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 30,
"end": 43,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 30,
"end": 38,
"ctxt": 0
},
"value": "iterator",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 38,
"end": 43,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 40,
"end": 43,
"ctxt": 0
},
"kind": "any"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 48,
"end": 87,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 62,
"end": 85,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 62,
"end": 79,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 63,
"end": 78,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 63,
"end": 69,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 70,
"end": 78,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 62,
"end": 85,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 82,
"end": 85,
"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": 89,
"end": 113,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 89,
"end": 113,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 89,
"end": 96,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 90,
"end": 95,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
}
},
"property": {
"type": "Computed",
"span": {
"start": 96,
"end": 113,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 97,
"end": 112,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 97,
"end": 103,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 104,
"end": 112,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
}
}
}
],
"interpreter": null
}