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

327 lines
8.3 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 29,
"end": 188,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 29,
"end": 188,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 43,
"end": 57,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 50,
"end": 52,
"ctxt": 0
},
"value": "s1",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "StaticBlock",
"span": {
"start": 63,
"end": 140,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 70,
"end": 140,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 80,
"end": 88,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 80,
"end": 87,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 80,
"end": 84,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 85,
"end": 87,
"ctxt": 0
},
"value": "s1",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 97,
"end": 102,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 97,
"end": 101,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 99,
"end": 101,
"ctxt": 0
},
"value": "s1",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 112,
"end": 120,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 112,
"end": 119,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 112,
"end": 116,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 117,
"end": 119,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 129,
"end": 134,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 129,
"end": 133,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 131,
"end": 133,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
}
]
}
},
{
"type": "ClassProperty",
"span": {
"start": 146,
"end": 160,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 153,
"end": 155,
"ctxt": 0
},
"value": "s2",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 165,
"end": 186,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 172,
"end": 175,
"ctxt": 0
},
"value": "ss2",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 178,
"end": 185,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 178,
"end": 182,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 183,
"end": 185,
"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
}