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

146 lines
3.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 55,
"end": 111,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 55,
"end": 111,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 67,
"end": 81,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 74,
"end": 76,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "StaticBlock",
"span": {
"start": 87,
"end": 109,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 94,
"end": 109,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 100,
"end": 105,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 100,
"end": 104,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 102,
"end": 104,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 103,
"end": 104,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
}
]
}
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}