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

138 lines
3.3 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 62,
"end": 126,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 62,
"end": 126,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "StaticBlock",
"span": {
"start": 76,
"end": 110,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 83,
"end": 110,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 93,
"end": 104,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 93,
"end": 103,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 93,
"end": 99,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 93,
"end": 97,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"value": 1.0
}
}
}
]
}
},
{
"type": "ClassProperty",
"span": {
"start": 115,
"end": 124,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}