swc/crates/swc_ecma_parser/tests/tsc/classStaticBlock1.json
2022-02-04 17:08:38 +09:00

157 lines
3.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 40,
"end": 117,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 40,
"end": 52,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 46,
"end": 51,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"value": 2.0
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 54,
"end": 117,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "StaticBlock",
"span": {
"start": 68,
"end": 115,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 75,
"end": 115,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 85,
"end": 97,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 91,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": 1.0
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 107,
"end": 109,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
}
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}