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

2101 lines
61 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 176,
"end": 1401,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 176,
"end": 477,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 183,
"end": 185,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 186,
"end": 477,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 192,
"end": 227,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 197,
"end": 203,
"ctxt": 0
},
"value": "EImpl1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 217,
"end": 218,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 217,
"end": 218,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 233,
"end": 272,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 238,
"end": 244,
"ctxt": 0
},
"value": "EImpl1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 255,
"end": 260,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 256,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 262,
"end": 263,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 262,
"end": 263,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 265,
"end": 266,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 265,
"end": 266,
"ctxt": 0
},
"value": "F",
"optional": false
},
"init": null
}
]
},
{
"type": "ExportDeclaration",
"span": {
"start": 278,
"end": 333,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 285,
"end": 333,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 290,
"end": 297,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 308,
"end": 313,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": 3.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 315,
"end": 320,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 319,
"end": 320,
"ctxt": 0
},
"value": 2.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 322,
"end": 327,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 322,
"end": 323,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 326,
"end": 327,
"ctxt": 0
},
"value": 1.0
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 339,
"end": 394,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 346,
"end": 394,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 351,
"end": 358,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 369,
"end": 374,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 369,
"end": 370,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 373,
"end": 374,
"ctxt": 0
},
"value": 7.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 376,
"end": 381,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 376,
"end": 377,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": 9.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 383,
"end": 388,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 383,
"end": 384,
"ctxt": 0
},
"value": "F",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 387,
"end": 388,
"ctxt": 0
},
"value": 8.0
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 400,
"end": 475,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 404,
"end": 474,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 404,
"end": 405,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 408,
"end": 474,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 409,
"end": 418,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 409,
"end": 416,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 417,
"end": 418,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 420,
"end": 429,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 420,
"end": 427,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 428,
"end": 429,
"ctxt": 0
},
"value": "B",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 431,
"end": 440,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 431,
"end": 438,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 439,
"end": 440,
"ctxt": 0
},
"value": "C",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 442,
"end": 451,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 442,
"end": 449,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"value": "D",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 453,
"end": 462,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 453,
"end": 460,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 461,
"end": 462,
"ctxt": 0
},
"value": "E",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 464,
"end": 473,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 464,
"end": 471,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 472,
"end": 473,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
}
]
},
"definite": false
}
]
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 563,
"end": 836,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 570,
"end": 572,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 573,
"end": 836,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 579,
"end": 666,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 586,
"end": 666,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 591,
"end": 597,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 608,
"end": 624,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 608,
"end": 609,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 612,
"end": 624,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 612,
"end": 617,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"property": {
"type": "Identifier",
"span": {
"start": 618,
"end": 624,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 626,
"end": 642,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 626,
"end": 627,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 630,
"end": 642,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 630,
"end": 635,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"property": {
"type": "Identifier",
"span": {
"start": 636,
"end": 642,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 644,
"end": 660,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 644,
"end": 645,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 648,
"end": 660,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 648,
"end": 653,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"property": {
"type": "Identifier",
"span": {
"start": 654,
"end": 660,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 672,
"end": 759,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 679,
"end": 759,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 684,
"end": 690,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 701,
"end": 717,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 701,
"end": 702,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 705,
"end": 717,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 705,
"end": 710,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"property": {
"type": "Identifier",
"span": {
"start": 711,
"end": 717,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 719,
"end": 735,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 719,
"end": 720,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 723,
"end": 735,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 723,
"end": 728,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"property": {
"type": "Identifier",
"span": {
"start": 729,
"end": 735,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 737,
"end": 753,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 737,
"end": 738,
"ctxt": 0
},
"value": "F",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 741,
"end": 753,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 741,
"end": 746,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"property": {
"type": "Identifier",
"span": {
"start": 747,
"end": 753,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 765,
"end": 834,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 769,
"end": 833,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 769,
"end": 770,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 773,
"end": 833,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 774,
"end": 782,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 774,
"end": 780,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 781,
"end": 782,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 784,
"end": 792,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 784,
"end": 790,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 791,
"end": 792,
"ctxt": 0
},
"value": "B",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 794,
"end": 802,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 794,
"end": 800,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 801,
"end": 802,
"ctxt": 0
},
"value": "C",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 804,
"end": 812,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 804,
"end": 810,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 811,
"end": 812,
"ctxt": 0
},
"value": "D",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 814,
"end": 822,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 814,
"end": 820,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 821,
"end": 822,
"ctxt": 0
},
"value": "E",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 824,
"end": 832,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 824,
"end": 830,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 831,
"end": 832,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
}
]
},
"definite": false
}
]
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 943,
"end": 1044,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 950,
"end": 952,
"ctxt": 0
},
"value": "M3",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 953,
"end": 1044,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 959,
"end": 998,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 964,
"end": 969,
"ctxt": 0
},
"value": "EInit",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 980,
"end": 981,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 980,
"end": 981,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 991,
"end": 992,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 991,
"end": 992,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1004,
"end": 1042,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1009,
"end": 1014,
"ctxt": 0
},
"value": "EInit",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1025,
"end": 1030,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1025,
"end": 1026,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 1029,
"end": 1030,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 1032,
"end": 1033,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1032,
"end": 1033,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1035,
"end": 1036,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1035,
"end": 1036,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": null
}
]
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1096,
"end": 1152,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1103,
"end": 1105,
"ctxt": 0
},
"value": "M4",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1106,
"end": 1152,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1112,
"end": 1150,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1119,
"end": 1150,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1124,
"end": 1129,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1132,
"end": 1135,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1132,
"end": 1135,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1137,
"end": 1142,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1137,
"end": 1142,
"ctxt": 0
},
"value": "Green",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1144,
"end": 1148,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1144,
"end": 1148,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1153,
"end": 1209,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1160,
"end": 1162,
"ctxt": 0
},
"value": "M5",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1163,
"end": 1209,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1169,
"end": 1207,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1176,
"end": 1207,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1181,
"end": 1186,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1189,
"end": 1192,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1189,
"end": 1192,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1194,
"end": 1199,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1194,
"end": 1199,
"ctxt": 0
},
"value": "Green",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1201,
"end": 1205,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1201,
"end": 1205,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1211,
"end": 1269,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1218,
"end": 1220,
"ctxt": 0
},
"value": "M6",
"optional": false
},
"body": {
"type": "TsNamespaceDeclaration",
"span": {
"start": 1221,
"end": 1269,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1221,
"end": 1222,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1223,
"end": 1269,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1229,
"end": 1267,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1236,
"end": 1267,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1241,
"end": 1246,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1249,
"end": 1252,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1249,
"end": 1252,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1254,
"end": 1259,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1254,
"end": 1259,
"ctxt": 0
},
"value": "Green",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1261,
"end": 1265,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1261,
"end": 1265,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
}
]
}
}
]
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1270,
"end": 1401,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1277,
"end": 1279,
"ctxt": 0
},
"value": "M6",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1280,
"end": 1401,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1286,
"end": 1350,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 1293,
"end": 1350,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1300,
"end": 1301,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1302,
"end": 1350,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1312,
"end": 1344,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1319,
"end": 1344,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1324,
"end": 1329,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1332,
"end": 1342,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1332,
"end": 1338,
"ctxt": 0
},
"value": "Yellow",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 1341,
"end": 1342,
"ctxt": 0
},
"value": 1.0
}
}
]
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1355,
"end": 1378,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1359,
"end": 1377,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1359,
"end": 1360,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1363,
"end": 1377,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1363,
"end": 1370,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1363,
"end": 1364,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1365,
"end": 1370,
"ctxt": 0
},
"value": "Color",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1371,
"end": 1377,
"ctxt": 0
},
"value": "Yellow",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1383,
"end": 1399,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1383,
"end": 1398,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1383,
"end": 1384,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "MemberExpression",
"span": {
"start": 1387,
"end": 1398,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1387,
"end": 1394,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1387,
"end": 1388,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1389,
"end": 1394,
"ctxt": 0
},
"value": "Color",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1395,
"end": 1398,
"ctxt": 0
},
"value": "Red",
"optional": false
}
}
}
}
]
}
}
],
"interpreter": null
}