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

138 lines
3.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 121,
"end": 320,
"ctxt": 0
},
"body": [
{
"type": "BlockStatement",
"span": {
"start": 121,
"end": 320,
"ctxt": 0
},
"stmts": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 276,
"end": 277,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 267,
"end": 306,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 280,
"end": 306,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 290,
"end": 300,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 290,
"end": 300,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 290,
"end": 296,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 290,
"end": 294,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 295,
"end": 296,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 311,
"end": 318,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 311,
"end": 318,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
}
],
"interpreter": null
}