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

798 lines
19 KiB
JSON

{
"type": "Module",
"span": {
"start": 76,
"end": 443,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 76,
"end": 98,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 76,
"end": 97,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 76,
"end": 92,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 76,
"end": 90,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 76,
"end": 82,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 83,
"end": 90,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 99,
"end": 153,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 99,
"end": 153,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 99,
"end": 117,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 99,
"end": 115,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 99,
"end": 113,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 99,
"end": 105,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 106,
"end": 113,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 114,
"end": 115,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"value": "K",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "C",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 120,
"end": 153,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 133,
"end": 153,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 139,
"end": 151,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 139,
"end": 150,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 139,
"end": 145,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 139,
"end": 143,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 148,
"end": 150,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 154,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 154,
"end": 233,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 176,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 168,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 154,
"end": 160,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 161,
"end": 168,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 169,
"end": 176,
"ctxt": 0
},
"value": "Classic",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 179,
"end": 233,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 191,
"end": 231,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 191,
"end": 202,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 205,
"end": 231,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 215,
"end": 225,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 215,
"end": 225,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 215,
"end": 221,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 215,
"end": 219,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 256,
"end": 282,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 263,
"end": 269,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 268,
"end": 269,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 275,
"end": 282,
"ctxt": 0
},
"value": "./mod",
"raw": "'./mod'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 284,
"end": 303,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 288,
"end": 303,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 292,
"end": 303,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 296,
"end": 301,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 296,
"end": 299,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 296,
"end": 297,
"ctxt": 0
},
"value": "s",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 300,
"end": 301,
"ctxt": 0
},
"value": "K",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 304,
"end": 307,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 304,
"end": 307,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 304,
"end": 305,
"ctxt": 0
},
"value": "k",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 306,
"end": 307,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 308,
"end": 337,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 312,
"end": 337,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 312,
"end": 319,
"ctxt": 0
},
"value": "classic",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 322,
"end": 337,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 326,
"end": 335,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 326,
"end": 327,
"ctxt": 0
},
"value": "s",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 328,
"end": 335,
"ctxt": 0
},
"value": "Classic",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 404,
"end": 405,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 406,
"end": 407,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 406,
"end": 407,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 409,
"end": 416,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 409,
"end": 416,
"ctxt": 0
},
"value": "classic",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 395,
"end": 443,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 418,
"end": 443,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 424,
"end": 427,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 424,
"end": 427,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 424,
"end": 425,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 426,
"end": 427,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 432,
"end": 441,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 432,
"end": 441,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 432,
"end": 439,
"ctxt": 0
},
"value": "classic",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 440,
"end": 441,
"ctxt": 0
},
"value": "p",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}