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

861 lines
19 KiB
JSON

{
"type": "Script",
"span": {
"start": 128,
"end": 415,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 128,
"end": 151,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 128,
"end": 150,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 128,
"end": 137,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 128,
"end": 135,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 140,
"end": 150,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 145,
"end": 148,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 152,
"end": 178,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 152,
"end": 177,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 152,
"end": 164,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 152,
"end": 159,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 159,
"end": 164,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 160,
"end": 163,
"ctxt": 0
},
"value": "b",
"raw": "\"b\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 167,
"end": 177,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 169,
"end": 170,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 172,
"end": 175,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 179,
"end": 211,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 179,
"end": 210,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 179,
"end": 197,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 179,
"end": 186,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 186,
"end": 197,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 187,
"end": 196,
"ctxt": 0
},
"value": "default",
"raw": "\"default\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 200,
"end": 210,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 205,
"end": 208,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 212,
"end": 245,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 212,
"end": 244,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 212,
"end": 231,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 212,
"end": 226,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 212,
"end": 218,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 219,
"end": 226,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Computed",
"span": {
"start": 226,
"end": 231,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 227,
"end": 230,
"ctxt": 0
},
"value": "c",
"raw": "\"c\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 234,
"end": 244,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 239,
"end": 242,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 246,
"end": 274,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 246,
"end": 273,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 246,
"end": 268,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 246,
"end": 263,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 246,
"end": 252,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 252,
"end": 263,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 253,
"end": 262,
"ctxt": 0
},
"value": "exports",
"raw": "\"exports\""
}
}
},
"property": {
"type": "Computed",
"span": {
"start": 263,
"end": 268,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 264,
"end": 267,
"ctxt": 0
},
"value": "d",
"raw": "\"d\""
}
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 271,
"end": 273,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 275,
"end": 304,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 275,
"end": 303,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 275,
"end": 299,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 275,
"end": 297,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 275,
"end": 292,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 275,
"end": 281,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 281,
"end": 292,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 282,
"end": 291,
"ctxt": 0
},
"value": "exports",
"raw": "\"exports\""
}
}
},
"property": {
"type": "Computed",
"span": {
"start": 292,
"end": 297,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 293,
"end": 296,
"ctxt": 0
},
"value": "d",
"raw": "\"d\""
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "e",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 302,
"end": 303,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 328,
"end": 359,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 334,
"end": 358,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 334,
"end": 338,
"ctxt": 0
},
"value": "mod1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 341,
"end": 358,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 341,
"end": 348,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 349,
"end": 357,
"ctxt": 0
},
"value": "./mod1",
"raw": "\"./mod1\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 360,
"end": 367,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 360,
"end": 366,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 360,
"end": 364,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 368,
"end": 375,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 368,
"end": 374,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 368,
"end": 372,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 373,
"end": 374,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 376,
"end": 383,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 376,
"end": 382,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 376,
"end": 380,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 381,
"end": 382,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 384,
"end": 391,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 384,
"end": 390,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 384,
"end": 388,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 389,
"end": 390,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 392,
"end": 401,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 392,
"end": 400,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 392,
"end": 398,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 392,
"end": 396,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 397,
"end": 398,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 399,
"end": 400,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 402,
"end": 415,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 402,
"end": 414,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 402,
"end": 406,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 407,
"end": 414,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
}
],
"interpreter": null
}