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

391 lines
11 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 171,
"end": 357,
"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": 357,
"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": 357,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 227,
"end": 275,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 227,
"end": 238,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 241,
"end": 275,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 251,
"end": 269,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 251,
"end": 268,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 251,
"end": 261,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 251,
"end": 255,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 255,
"end": 261,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 256,
"end": 260,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 264,
"end": 268,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
]
},
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 281,
"end": 355,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 281,
"end": 287,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 281,
"end": 355,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 290,
"end": 355,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 300,
"end": 319,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 300,
"end": 318,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 300,
"end": 310,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 300,
"end": 304,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 304,
"end": 310,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 305,
"end": 309,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 313,
"end": 318,
"ctxt": 0
},
"value": "yep",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 328,
"end": 349,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 334,
"end": 348,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 334,
"end": 335,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 338,
"end": 348,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 338,
"end": 342,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 342,
"end": 348,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 343,
"end": 347,
"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
}