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

628 lines
16 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 237,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 15,
"end": 174,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 29,
"end": 66,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 29,
"end": 46,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 30,
"end": 45,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 30,
"end": 36,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 37,
"end": 45,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 47,
"end": 56,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 47,
"end": 56,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 48,
"end": 56,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 50,
"end": 56,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 29,
"end": 66,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 57,
"end": 65,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 59,
"end": 65,
"ctxt": 0
},
"kind": "string"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 71,
"end": 108,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 71,
"end": 88,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 72,
"end": 87,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 72,
"end": 78,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 79,
"end": 87,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 89,
"end": 98,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 89,
"end": 98,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 90,
"end": 98,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 92,
"end": 98,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 71,
"end": 108,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 99,
"end": 107,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 101,
"end": 107,
"ctxt": 0
},
"kind": "number"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 113,
"end": 172,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 113,
"end": 130,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 114,
"end": 129,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 114,
"end": 120,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 121,
"end": 129,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 131,
"end": 137,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 131,
"end": 137,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 132,
"end": 137,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 134,
"end": 137,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"decorators": [],
"span": {
"start": 113,
"end": 172,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 139,
"end": 172,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 149,
"end": 166,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 156,
"end": 165,
"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": 176,
"end": 190,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 180,
"end": 189,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 180,
"end": 181,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 184,
"end": 189,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 188,
"end": 189,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 191,
"end": 214,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 191,
"end": 213,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 191,
"end": 209,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 192,
"end": 209,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 193,
"end": 208,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 193,
"end": 199,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 200,
"end": 208,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 210,
"end": 212,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 215,
"end": 237,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 215,
"end": 236,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 215,
"end": 233,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 216,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 217,
"end": 232,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 217,
"end": 223,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 224,
"end": 232,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": 0.0
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}