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

325 lines
8.3 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 28,
"end": 187,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 28,
"end": 187,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 42,
"end": 56,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 49,
"end": 51,
"ctxt": 0
},
"value": "s1",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "StaticBlock",
"span": {
"start": 62,
"end": 139,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 69,
"end": 139,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 79,
"end": 87,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 79,
"end": 86,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 79,
"end": 83,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 84,
"end": 86,
"ctxt": 0
},
"value": "s1",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 96,
"end": 101,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 96,
"end": 100,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 98,
"end": 100,
"ctxt": 0
},
"value": "s1",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 111,
"end": 119,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 111,
"end": 115,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 116,
"end": 118,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 128,
"end": 133,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 128,
"end": 132,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 130,
"end": 132,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
}
]
}
},
{
"type": "ClassProperty",
"span": {
"start": 145,
"end": 159,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 152,
"end": 154,
"ctxt": 0
},
"value": "s2",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": 2.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 164,
"end": 185,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 171,
"end": 174,
"ctxt": 0
},
"value": "ss2",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 177,
"end": 184,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 177,
"end": 181,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 182,
"end": 184,
"ctxt": 0
},
"value": "s1",
"optional": false
}
},
"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
}