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

477 lines
14 KiB
JSON

{
"type": "Module",
"span": {
"start": 171,
"end": 405,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 171,
"end": 199,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 177,
"end": 198,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 177,
"end": 181,
"ctxt": 0
},
"value": "_sym",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 184,
"end": 198,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 184,
"end": 190,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 191,
"end": 197,
"ctxt": 0
},
"value": "_sym",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExportDeclaration",
"span": {
"start": 200,
"end": 405,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 213,
"end": 220,
"ctxt": 0
},
"value": "MyClass",
"optional": false
},
"declare": false,
"span": {
"start": 207,
"end": 405,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 227,
"end": 299,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 227,
"end": 238,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 241,
"end": 299,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 251,
"end": 266,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 255,
"end": 266,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 259,
"ctxt": 0
},
"value": "self",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ThisExpression",
"span": {
"start": 262,
"end": 266,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 275,
"end": 293,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 275,
"end": 292,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 275,
"end": 285,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 275,
"end": 279,
"ctxt": 0
},
"value": "self",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 279,
"end": 285,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 280,
"end": 284,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 288,
"end": 292,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
]
},
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 305,
"end": 403,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 305,
"end": 311,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 305,
"end": 403,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 314,
"end": 403,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 324,
"end": 339,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 328,
"end": 339,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 328,
"end": 332,
"ctxt": 0
},
"value": "self",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ThisExpression",
"span": {
"start": 335,
"end": 339,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 348,
"end": 367,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 348,
"end": 366,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 348,
"end": 358,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 348,
"end": 352,
"ctxt": 0
},
"value": "self",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 352,
"end": 358,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 353,
"end": 357,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 361,
"end": 366,
"ctxt": 0
},
"value": "yep",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 376,
"end": 397,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 382,
"end": 396,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 382,
"end": 383,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 386,
"end": 396,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 386,
"end": 390,
"ctxt": 0
},
"value": "self",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 390,
"end": 396,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 391,
"end": 395,
"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
}