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

446 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 20,
"end": 329,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "X",
"optional": false
},
"declare": false,
"span": {
"start": 20,
"end": 329,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 34,
"end": 53,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 41,
"end": 43,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "f",
"optional": false
}
},
"value": {
"type": "CallExpression",
"span": {
"start": 46,
"end": 52,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 46,
"end": 50,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "X",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 48,
"end": 50,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": "m",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 58,
"end": 93,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 58,
"end": 69,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 72,
"end": 93,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 80,
"end": 87,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 80,
"end": 86,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 80,
"end": 84,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "X",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 82,
"end": 84,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "m",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
},
{
"type": "PrivateMethod",
"span": {
"start": 98,
"end": 325,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 105,
"end": 107,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": "m",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 98,
"end": 325,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 110,
"end": 325,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 118,
"end": 136,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 124,
"end": 135,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 124,
"end": 125,
"ctxt": 0
},
"value": "X",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 125,
"end": 130,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 127,
"end": 130,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 133,
"end": 135,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 163,
"end": 182,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 169,
"end": 181,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 169,
"end": 171,
"ctxt": 0
},
"value": "_a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 171,
"end": 176,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 173,
"end": 176,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 179,
"end": 181,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 223,
"end": 230,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 223,
"end": 229,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 223,
"end": 227,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": "X",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 225,
"end": 227,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 226,
"end": 227,
"ctxt": 0
},
"value": "m",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 310,
"end": 319,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 317,
"end": 318,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}