swc/crates/swc_ecma_parser/tests/tsc/privateNamesConstructorChain-1.json
2022-02-04 17:08:38 +09:00

410 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 20,
"end": 414,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 26,
"end": 32,
"ctxt": 0
},
"value": "Parent",
"optional": false
},
"declare": false,
"span": {
"start": 20,
"end": 249,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 39,
"end": 48,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 39,
"end": 43,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 40,
"end": 43,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": 3.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 53,
"end": 69,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 60,
"end": 64,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 61,
"end": 64,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": 5.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 74,
"end": 247,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 74,
"end": 90,
"ctxt": 0
},
"value": "accessChildProps",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 74,
"end": 247,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 93,
"end": 247,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 103,
"end": 120,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 103,
"end": 119,
"ctxt": 0
},
"object": {
"type": "NewExpression",
"span": {
"start": 103,
"end": 114,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 107,
"end": 112,
"ctxt": 0
},
"value": "Child",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"property": {
"type": "PrivateName",
"span": {
"start": 115,
"end": 119,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 116,
"end": 119,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 204,
"end": 215,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 204,
"end": 214,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 204,
"end": 209,
"ctxt": 0
},
"value": "Child",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 210,
"end": 214,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 211,
"end": 214,
"ctxt": 0
},
"value": "bar",
"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": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 257,
"end": 262,
"ctxt": 0
},
"value": "Child",
"optional": false
},
"declare": false,
"span": {
"start": 251,
"end": 414,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 284,
"end": 297,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 284,
"end": 288,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 285,
"end": 288,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 291,
"end": 296,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 387,
"end": 400,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 387,
"end": 391,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 388,
"end": 391,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 394,
"end": 399,
"ctxt": 0
},
"value": "bar",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 271,
"end": 277,
"ctxt": 0
},
"value": "Parent",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}