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

625 lines
16 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 238,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 175,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 30,
"end": 67,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 30,
"end": 47,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 31,
"end": 46,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 31,
"end": 37,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 38,
"end": 46,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 48,
"end": 57,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 48,
"end": 57,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 49,
"end": 57,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 51,
"end": 57,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 30,
"end": 67,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 58,
"end": 66,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 60,
"end": 66,
"ctxt": 0
},
"kind": "string"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 72,
"end": 109,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 72,
"end": 89,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 73,
"end": 88,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 73,
"end": 79,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 80,
"end": 88,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 90,
"end": 99,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 90,
"end": 99,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 91,
"end": 99,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 93,
"end": 99,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 72,
"end": 109,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 100,
"end": 108,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 102,
"end": 108,
"ctxt": 0
},
"kind": "number"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 114,
"end": 173,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 114,
"end": 131,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 115,
"end": 130,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 122,
"end": 130,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 132,
"end": 138,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 132,
"end": 138,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 133,
"end": 138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 135,
"end": 138,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"decorators": [],
"span": {
"start": 114,
"end": 173,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 140,
"end": 173,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 150,
"end": 167,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 157,
"end": 166,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"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": "VariableDeclaration",
"span": {
"start": 177,
"end": 191,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 181,
"end": 190,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 181,
"end": 182,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 185,
"end": 190,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 189,
"end": 190,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 192,
"end": 215,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 192,
"end": 214,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 192,
"end": 210,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 193,
"end": 210,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 194,
"end": 209,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 194,
"end": 200,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 201,
"end": 209,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 211,
"end": 213,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 216,
"end": 238,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 216,
"end": 237,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 216,
"end": 234,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 217,
"end": 234,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 218,
"end": 233,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 218,
"end": 224,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 225,
"end": 233,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}