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

225 lines
5.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 41,
"end": 137,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 41,
"end": 137,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 55,
"end": 77,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 62,
"end": 65,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "BinaryExpression",
"span": {
"start": 68,
"end": 77,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 68,
"end": 73,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 70,
"end": 73,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 76,
"end": 77,
"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": 82,
"end": 115,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 89,
"end": 115,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 99,
"end": 109,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 99,
"end": 108,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 99,
"end": 104,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 101,
"end": 104,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
]
}
},
{
"type": "ClassProperty",
"span": {
"start": 120,
"end": 135,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 127,
"end": 130,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 133,
"end": 134,
"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
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}