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

264 lines
6.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 21,
"end": 115,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 21,
"end": 96,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 35,
"end": 58,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 46,
"end": 57,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 46,
"end": 55,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 48,
"end": 55,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 49,
"end": 55,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "PrivateMethod",
"span": {
"start": 63,
"end": 94,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 70,
"end": 77,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 71,
"end": 77,
"ctxt": 0
},
"value": "method",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 63,
"end": 94,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 80,
"end": 94,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 82,
"end": 92,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 89,
"end": 91,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
}
}
]
},
"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": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 98,
"end": 115,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 98,
"end": 114,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 98,
"end": 109,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 98,
"end": 105,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 106,
"end": 109,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 110,
"end": 113,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}