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

222 lines
5.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 40,
"end": 136,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 40,
"end": 136,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 54,
"end": 76,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 61,
"end": 64,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "BinaryExpression",
"span": {
"start": 67,
"end": 76,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 67,
"end": 72,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 69,
"end": 72,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 75,
"end": 76,
"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": 81,
"end": 114,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 88,
"end": 114,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 98,
"end": 108,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 98,
"end": 107,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 98,
"end": 103,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 100,
"end": 103,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": 2.0
}
}
}
]
}
},
{
"type": "ClassProperty",
"span": {
"start": 119,
"end": 134,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 126,
"end": 129,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"value": 1.0
},
"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
}