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

315 lines
7.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 96,
"end": 263,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 96,
"end": 108,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 102,
"end": 107,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 109,
"end": 121,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 115,
"end": 120,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 123,
"end": 263,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "StaticBlock",
"span": {
"start": 137,
"end": 196,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 144,
"end": 196,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 154,
"end": 167,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 160,
"end": 166,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 164,
"end": 166,
"ctxt": 0
},
"value": 11.0,
"raw": "11"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 177,
"end": 179,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 188,
"end": 190,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 188,
"end": 189,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
},
{
"type": "StaticBlock",
"span": {
"start": 202,
"end": 261,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 209,
"end": 261,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 219,
"end": 232,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 225,
"end": 231,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 229,
"end": 231,
"ctxt": 0
},
"value": 11.0,
"raw": "11"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 242,
"end": 244,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 253,
"end": 255,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 253,
"end": 254,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
}
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}