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

232 lines
7.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 42,
"end": 220,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 42,
"end": 220,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 58,
"end": 220,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 62,
"end": 218,
"ctxt": 0
},
"argument": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 69,
"end": 218,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 81,
"end": 96,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 88,
"end": 91,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 94,
"end": 95,
"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": 101,
"end": 214,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 108,
"end": 214,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 116,
"end": 208,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 122,
"end": 208,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 126,
"end": 208,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 142,
"end": 157,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 149,
"end": 152,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 155,
"end": 156,
"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": "StaticBlock",
"span": {
"start": 166,
"end": 200,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 173,
"end": 200,
"ctxt": 0
},
"stmts": []
}
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"definite": false
}
]
}
]
}
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}