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

574 lines
17 KiB
JSON

{
"type": "Module",
"span": {
"start": 137,
"end": 397,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 137,
"end": 302,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 144,
"end": 302,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 160,
"end": 209,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 160,
"end": 171,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 174,
"end": 209,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 184,
"end": 203,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 184,
"end": 202,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 184,
"end": 192,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 184,
"end": 188,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 189,
"end": 192,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 195,
"end": 202,
"ctxt": 0
},
"value": "Hello",
"raw": "\"Hello\""
}
}
}
]
},
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 214,
"end": 267,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 214,
"end": 220,
"ctxt": 0
},
"value": "slicey",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 214,
"end": 267,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 223,
"end": 267,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 233,
"end": 261,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 233,
"end": 260,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 233,
"end": 241,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 233,
"end": 237,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 238,
"end": 241,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "CallExpression",
"span": {
"start": 244,
"end": 260,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 244,
"end": 258,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 244,
"end": 252,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 244,
"end": 248,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 249,
"end": 252,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 253,
"end": 258,
"ctxt": 0
},
"value": "slice",
"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
},
{
"type": "ClassMethod",
"span": {
"start": 272,
"end": 300,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 272,
"end": 300,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 276,
"end": 300,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 286,
"end": 294,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 286,
"end": 294,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 286,
"end": 290,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 291,
"end": 294,
"ctxt": 0
},
"value": "foo",
"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": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 327,
"end": 328,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 318,
"end": 397,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 331,
"end": 397,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 337,
"end": 348,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 337,
"end": 347,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 337,
"end": 343,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 337,
"end": 341,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 342,
"end": 343,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 346,
"end": 347,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 353,
"end": 395,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 353,
"end": 395,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 353,
"end": 357,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 358,
"end": 359,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 362,
"end": 395,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 373,
"end": 395,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 375,
"end": 393,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 375,
"end": 392,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 375,
"end": 390,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 375,
"end": 381,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 375,
"end": 379,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 382,
"end": 390,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}