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

860 lines
19 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 127,
"end": 414,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 127,
"end": 150,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 127,
"end": 149,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 127,
"end": 136,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 127,
"end": 134,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 139,
"end": 149,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 144,
"end": 147,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 151,
"end": 177,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 151,
"end": 176,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 151,
"end": 163,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 151,
"end": 158,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 158,
"end": 163,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 159,
"end": 162,
"ctxt": 0
},
"value": "b",
"raw": "\"b\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 166,
"end": 176,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 171,
"end": 174,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 178,
"end": 210,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 178,
"end": 209,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 178,
"end": 196,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 178,
"end": 185,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 185,
"end": 196,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 186,
"end": 195,
"ctxt": 0
},
"value": "default",
"raw": "\"default\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 199,
"end": 209,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 201,
"end": 202,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 204,
"end": 207,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 211,
"end": 244,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 211,
"end": 243,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 211,
"end": 230,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 211,
"end": 225,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 211,
"end": 217,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 218,
"end": 225,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Computed",
"span": {
"start": 225,
"end": 230,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 226,
"end": 229,
"ctxt": 0
},
"value": "c",
"raw": "\"c\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 233,
"end": 243,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 238,
"end": 241,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 245,
"end": 273,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 245,
"end": 272,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 245,
"end": 267,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 245,
"end": 262,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 245,
"end": 251,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 251,
"end": 262,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 252,
"end": 261,
"ctxt": 0
},
"value": "exports",
"raw": "\"exports\""
}
}
},
"property": {
"type": "Computed",
"span": {
"start": 262,
"end": 267,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 263,
"end": 266,
"ctxt": 0
},
"value": "d",
"raw": "\"d\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 270,
"end": 272,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 274,
"end": 303,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 274,
"end": 302,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 274,
"end": 298,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 274,
"end": 296,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 274,
"end": 291,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 274,
"end": 280,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 280,
"end": 291,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 281,
"end": 290,
"ctxt": 0
},
"value": "exports",
"raw": "\"exports\""
}
}
},
"property": {
"type": "Computed",
"span": {
"start": 291,
"end": 296,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 292,
"end": 295,
"ctxt": 0
},
"value": "d",
"raw": "\"d\""
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": "e",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 301,
"end": 302,
"ctxt": 0
},
"value": 0.0
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 327,
"end": 358,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 333,
"end": 357,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 333,
"end": 337,
"ctxt": 0
},
"value": "mod1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 340,
"end": 357,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 340,
"end": 347,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 348,
"end": 356,
"ctxt": 0
},
"value": "./mod1",
"raw": "\"./mod1\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 359,
"end": 366,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 359,
"end": 365,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 359,
"end": 363,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 364,
"end": 365,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 367,
"end": 374,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 367,
"end": 373,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 367,
"end": 371,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 372,
"end": 373,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 375,
"end": 382,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 375,
"end": 381,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 375,
"end": 379,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 383,
"end": 390,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 383,
"end": 389,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 383,
"end": 387,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 391,
"end": 400,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 391,
"end": 399,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 391,
"end": 397,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 391,
"end": 395,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 396,
"end": 397,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 398,
"end": 399,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 401,
"end": 414,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 401,
"end": 413,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 401,
"end": 405,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 406,
"end": 413,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
}
],
"interpreter": null
}