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

465 lines
14 KiB
JSON

{
"type": "Module",
"span": {
"start": 172,
"end": 406,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 172,
"end": 200,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 178,
"end": 199,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 178,
"end": 182,
"ctxt": 0
},
"value": "_sym",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 185,
"end": 199,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 185,
"end": 191,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 192,
"end": 198,
"ctxt": 0
},
"value": "_sym",
"raw": "\"_sym\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExportDeclaration",
"span": {
"start": 201,
"end": 406,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 214,
"end": 221,
"ctxt": 0
},
"value": "MyClass",
"optional": false
},
"declare": false,
"span": {
"start": 208,
"end": 406,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 228,
"end": 300,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 228,
"end": 239,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 242,
"end": 300,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 252,
"end": 267,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 256,
"end": 267,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 256,
"end": 260,
"ctxt": 0
},
"value": "self",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ThisExpression",
"span": {
"start": 263,
"end": 267,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 276,
"end": 294,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 276,
"end": 293,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 276,
"end": 286,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 276,
"end": 280,
"ctxt": 0
},
"value": "self",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 280,
"end": 286,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 281,
"end": 285,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 289,
"end": 293,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
}
]
},
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 306,
"end": 404,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 306,
"end": 312,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 306,
"end": 404,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 315,
"end": 404,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 325,
"end": 340,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 329,
"end": 340,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 329,
"end": 333,
"ctxt": 0
},
"value": "self",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ThisExpression",
"span": {
"start": 336,
"end": 340,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 349,
"end": 368,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 349,
"end": 367,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 349,
"end": 359,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 349,
"end": 353,
"ctxt": 0
},
"value": "self",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 354,
"end": 358,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 362,
"end": 367,
"ctxt": 0
},
"value": "yep",
"raw": "\"yep\""
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 377,
"end": 398,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 383,
"end": 397,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 383,
"end": 384,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 387,
"end": 397,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 387,
"end": 391,
"ctxt": 0
},
"value": "self",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 391,
"end": 397,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 392,
"end": 396,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"definite": 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": []
}
}
],
"interpreter": null
}