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

831 lines
21 KiB
JSON

{
"type": "Script",
"span": {
"start": 141,
"end": 840,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 141,
"end": 840,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 186,
"end": 193,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 186,
"end": 188,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 187,
"end": 188,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 231,
"end": 238,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 231,
"end": 233,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 278,
"end": 285,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 278,
"end": 280,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 279,
"end": 280,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 283,
"end": 284,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateMethod",
"span": {
"start": 322,
"end": 346,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 322,
"end": 330,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 323,
"end": 330,
"ctxt": 0
},
"value": "aMethod",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 322,
"end": 346,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 333,
"end": 346,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 335,
"end": 344,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 342,
"end": 343,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 384,
"end": 408,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 384,
"end": 392,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 385,
"end": 392,
"ctxt": 0
},
"value": "bMethod",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 384,
"end": 408,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 395,
"end": 408,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 397,
"end": 406,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 404,
"end": 405,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 448,
"end": 472,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 448,
"end": 456,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 449,
"end": 456,
"ctxt": 0
},
"value": "cMethod",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 448,
"end": 472,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 459,
"end": 472,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 461,
"end": 470,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 468,
"end": 469,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 509,
"end": 535,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 513,
"end": 519,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 514,
"end": 519,
"ctxt": 0
},
"value": "aProp",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 509,
"end": 535,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 522,
"end": 535,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 524,
"end": 533,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 531,
"end": 532,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 571,
"end": 592,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 575,
"end": 581,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 576,
"end": 581,
"ctxt": 0
},
"value": "aProp",
"optional": false
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 582,
"end": 587,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 582,
"end": 587,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 571,
"end": 592,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 589,
"end": 592,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 630,
"end": 656,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 634,
"end": 640,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 635,
"end": 640,
"ctxt": 0
},
"value": "bProp",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 630,
"end": 656,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 643,
"end": 656,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 645,
"end": 654,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 652,
"end": 653,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 693,
"end": 714,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 697,
"end": 703,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 698,
"end": 703,
"ctxt": 0
},
"value": "bProp",
"optional": false
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 704,
"end": 709,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 704,
"end": 709,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 693,
"end": 714,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 711,
"end": 714,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 752,
"end": 778,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 756,
"end": 762,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 757,
"end": 762,
"ctxt": 0
},
"value": "cProp",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 752,
"end": 778,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 765,
"end": 778,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 767,
"end": 776,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 774,
"end": 775,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 817,
"end": 838,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 821,
"end": 827,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 822,
"end": 827,
"ctxt": 0
},
"value": "cProp",
"optional": false
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 828,
"end": 833,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 828,
"end": 833,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 817,
"end": 838,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 835,
"end": 838,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}