swc/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.2.json
Donny/강동윤 3958f1792c
refactor(es/ast): Remove unused fields (#7518)
**Related issue:**

 - Closes #7347.
 - Closes #7487.
2023-06-12 08:02:34 +00:00

441 lines
12 KiB
JSON

{
"type": "Script",
"span": {
"start": 168,
"end": 316,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 168,
"end": 178,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 179,
"end": 236,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 179,
"end": 235,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 179,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 180,
"end": 232,
"ctxt": 0
},
"params": [
{
"type": "AssignmentPattern",
"span": {
"start": 181,
"end": 217,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 181,
"end": 182,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 185,
"end": 217,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 203,
"end": 215,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 214,
"end": 215,
"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
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "C",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 222,
"end": 232,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 224,
"end": 230,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "C",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 238,
"end": 251,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 244,
"end": 250,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 244,
"end": 245,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 248,
"end": 250,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 252,
"end": 316,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 252,
"end": 315,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 252,
"end": 313,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 253,
"end": 312,
"ctxt": 0
},
"params": [
{
"type": "AssignmentPattern",
"span": {
"start": 254,
"end": 290,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 254,
"end": 255,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 258,
"end": 290,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 276,
"end": 288,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 283,
"end": 284,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 287,
"end": 288,
"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
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": "C",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "AssignmentPattern",
"span": {
"start": 292,
"end": 297,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 292,
"end": 293,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 296,
"end": 297,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 302,
"end": 312,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 304,
"end": 310,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}