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

284 lines
8.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 21,
"end": 177,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 21,
"end": 177,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 35,
"end": 67,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 42,
"end": 50,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 43,
"end": 50,
"ctxt": 0
},
"value": "myField",
"optional": false
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 53,
"end": 66,
"ctxt": 0
},
"value": "hello world",
"raw": "\"hello world\""
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 72,
"end": 175,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 72,
"end": 83,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 86,
"end": 175,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 96,
"end": 120,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 96,
"end": 119,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 96,
"end": 107,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 96,
"end": 103,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 104,
"end": 107,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 108,
"end": 118,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 110,
"end": 118,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"value": "myField",
"optional": false
}
}
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 134,
"end": 161,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 134,
"end": 160,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 134,
"end": 145,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 134,
"end": 141,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 142,
"end": 145,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 146,
"end": 159,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 146,
"end": 150,
"ctxt": 0
}
},
"property": {
"type": "PrivateName",
"span": {
"start": 151,
"end": 159,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 152,
"end": 159,
"ctxt": 0
},
"value": "myField",
"optional": false
}
}
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}