swc/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.3.json

556 lines
17 KiB
JSON

{
"type": "Script",
"span": {
"start": 155,
"end": 327,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 161,
"end": 162,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 155,
"end": 165,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 166,
"end": 235,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 166,
"end": 234,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 166,
"end": 232,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 167,
"end": 231,
"ctxt": 0
},
"params": [
{
"type": "ObjectPattern",
"span": {
"start": 168,
"end": 216,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 170,
"end": 206,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 171,
"end": 205,
"ctxt": 0
},
"object": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 171,
"end": 203,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 189,
"end": 201,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "C",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"property": {
"type": "Identifier",
"span": {
"start": 204,
"end": 205,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 208,
"end": 214,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 208,
"end": 209,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 212,
"end": 214,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 221,
"end": 231,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 223,
"end": 229,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 227,
"end": 228,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 227,
"end": 228,
"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": 237,
"end": 250,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 243,
"end": 249,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 243,
"end": 244,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 247,
"end": 249,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 251,
"end": 327,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 251,
"end": 326,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 251,
"end": 324,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 252,
"end": 323,
"ctxt": 0
},
"params": [
{
"type": "ObjectPattern",
"span": {
"start": 253,
"end": 301,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 255,
"end": 291,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 256,
"end": 290,
"ctxt": 0
},
"object": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 256,
"end": 288,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 274,
"end": 286,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 281,
"end": 282,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 285,
"end": 286,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "C",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"property": {
"type": "Identifier",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 293,
"end": 299,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 297,
"end": 299,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
},
{
"type": "AssignmentPattern",
"span": {
"start": 303,
"end": 308,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 307,
"end": 308,
"ctxt": 0
},
"value": "x",
"optional": false
},
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 313,
"end": 323,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 315,
"end": 321,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 319,
"end": 320,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 319,
"end": 320,
"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
}