1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "ClassDeclaration", 6 "definition": { 7 "id": { 8 "type": "Identifier", 9 "name": "foo", 10 "decorators": [], 11 "loc": { 12 "start": { 13 "line": 16, 14 "column": 7 15 }, 16 "end": { 17 "line": 16, 18 "column": 10 19 } 20 } 21 }, 22 "superClass": null, 23 "implements": [], 24 "body": [ 25 { 26 "type": "MethodDefinition", 27 "key": { 28 "type": "Identifier", 29 "name": "bar", 30 "decorators": [], 31 "loc": { 32 "start": { 33 "line": 17, 34 "column": 10 35 }, 36 "end": { 37 "line": 17, 38 "column": 13 39 } 40 } 41 }, 42 "kind": "method", 43 "accessibility": "public", 44 "static": false, 45 "optional": false, 46 "computed": false, 47 "value": { 48 "type": "FunctionExpression", 49 "function": { 50 "type": "ScriptFunction", 51 "id": { 52 "type": "Identifier", 53 "name": "bar", 54 "decorators": [], 55 "loc": { 56 "start": { 57 "line": 17, 58 "column": 10 59 }, 60 "end": { 61 "line": 17, 62 "column": 13 63 } 64 } 65 }, 66 "generator": false, 67 "async": false, 68 "expression": false, 69 "params": [], 70 "returnType": { 71 "type": "ETSTypeReference", 72 "part": { 73 "type": "ETSTypeReferencePart", 74 "name": { 75 "type": "Identifier", 76 "name": "foo", 77 "decorators": [], 78 "loc": { 79 "start": { 80 "line": 17, 81 "column": 17 82 }, 83 "end": { 84 "line": 17, 85 "column": 20 86 } 87 } 88 }, 89 "loc": { 90 "start": { 91 "line": 17, 92 "column": 17 93 }, 94 "end": { 95 "line": 17, 96 "column": 22 97 } 98 } 99 }, 100 "loc": { 101 "start": { 102 "line": 17, 103 "column": 17 104 }, 105 "end": { 106 "line": 17, 107 "column": 22 108 } 109 } 110 }, 111 "body": { 112 "type": "BlockStatement", 113 "statements": [ 114 { 115 "type": "ReturnStatement", 116 "argument": { 117 "type": "CallExpression", 118 "callee": { 119 "type": "MemberExpression", 120 "object": { 121 "type": "ThisExpression", 122 "loc": { 123 "start": { 124 "line": 18, 125 "column": 12 126 }, 127 "end": { 128 "line": 18, 129 "column": 16 130 } 131 } 132 }, 133 "property": { 134 "type": "Identifier", 135 "name": "baz", 136 "decorators": [], 137 "loc": { 138 "start": { 139 "line": 18, 140 "column": 17 141 }, 142 "end": { 143 "line": 18, 144 "column": 20 145 } 146 } 147 }, 148 "computed": false, 149 "optional": false, 150 "loc": { 151 "start": { 152 "line": 18, 153 "column": 12 154 }, 155 "end": { 156 "line": 18, 157 "column": 20 158 } 159 } 160 }, 161 "arguments": [ 162 { 163 "type": "ThisExpression", 164 "loc": { 165 "start": { 166 "line": 18, 167 "column": 21 168 }, 169 "end": { 170 "line": 18, 171 "column": 25 172 } 173 } 174 } 175 ], 176 "optional": false, 177 "loc": { 178 "start": { 179 "line": 18, 180 "column": 12 181 }, 182 "end": { 183 "line": 18, 184 "column": 26 185 } 186 } 187 }, 188 "loc": { 189 "start": { 190 "line": 18, 191 "column": 5 192 }, 193 "end": { 194 "line": 18, 195 "column": 27 196 } 197 } 198 } 199 ], 200 "loc": { 201 "start": { 202 "line": 17, 203 "column": 21 204 }, 205 "end": { 206 "line": 19, 207 "column": 4 208 } 209 } 210 }, 211 "loc": { 212 "start": { 213 "line": 17, 214 "column": 13 215 }, 216 "end": { 217 "line": 19, 218 "column": 4 219 } 220 } 221 }, 222 "loc": { 223 "start": { 224 "line": 17, 225 "column": 13 226 }, 227 "end": { 228 "line": 19, 229 "column": 4 230 } 231 } 232 }, 233 "overloads": [], 234 "decorators": [], 235 "loc": { 236 "start": { 237 "line": 17, 238 "column": 3 239 }, 240 "end": { 241 "line": 19, 242 "column": 4 243 } 244 } 245 }, 246 { 247 "type": "MethodDefinition", 248 "key": { 249 "type": "Identifier", 250 "name": "baz", 251 "decorators": [], 252 "loc": { 253 "start": { 254 "line": 21, 255 "column": 10 256 }, 257 "end": { 258 "line": 21, 259 "column": 13 260 } 261 } 262 }, 263 "kind": "method", 264 "accessibility": "public", 265 "static": false, 266 "optional": false, 267 "computed": false, 268 "value": { 269 "type": "FunctionExpression", 270 "function": { 271 "type": "ScriptFunction", 272 "id": { 273 "type": "Identifier", 274 "name": "baz", 275 "decorators": [], 276 "loc": { 277 "start": { 278 "line": 21, 279 "column": 10 280 }, 281 "end": { 282 "line": 21, 283 "column": 13 284 } 285 } 286 }, 287 "generator": false, 288 "async": false, 289 "expression": false, 290 "params": [ 291 { 292 "type": "ETSParameterExpression", 293 "name": { 294 "type": "Identifier", 295 "name": "x", 296 "typeAnnotation": { 297 "type": "ETSTypeReference", 298 "part": { 299 "type": "ETSTypeReferencePart", 300 "name": { 301 "type": "Identifier", 302 "name": "foo", 303 "decorators": [], 304 "loc": { 305 "start": { 306 "line": 21, 307 "column": 17 308 }, 309 "end": { 310 "line": 21, 311 "column": 20 312 } 313 } 314 }, 315 "loc": { 316 "start": { 317 "line": 21, 318 "column": 17 319 }, 320 "end": { 321 "line": 21, 322 "column": 21 323 } 324 } 325 }, 326 "loc": { 327 "start": { 328 "line": 21, 329 "column": 17 330 }, 331 "end": { 332 "line": 21, 333 "column": 21 334 } 335 } 336 }, 337 "decorators": [], 338 "loc": { 339 "start": { 340 "line": 21, 341 "column": 14 342 }, 343 "end": { 344 "line": 21, 345 "column": 21 346 } 347 } 348 }, 349 "loc": { 350 "start": { 351 "line": 21, 352 "column": 14 353 }, 354 "end": { 355 "line": 21, 356 "column": 21 357 } 358 } 359 } 360 ], 361 "returnType": { 362 "type": "ETSTypeReference", 363 "part": { 364 "type": "ETSTypeReferencePart", 365 "name": { 366 "type": "Identifier", 367 "name": "foo", 368 "decorators": [], 369 "loc": { 370 "start": { 371 "line": 21, 372 "column": 23 373 }, 374 "end": { 375 "line": 21, 376 "column": 26 377 } 378 } 379 }, 380 "loc": { 381 "start": { 382 "line": 21, 383 "column": 23 384 }, 385 "end": { 386 "line": 21, 387 "column": 28 388 } 389 } 390 }, 391 "loc": { 392 "start": { 393 "line": 21, 394 "column": 23 395 }, 396 "end": { 397 "line": 21, 398 "column": 28 399 } 400 } 401 }, 402 "body": { 403 "type": "BlockStatement", 404 "statements": [ 405 { 406 "type": "ReturnStatement", 407 "argument": { 408 "type": "Identifier", 409 "name": "x", 410 "decorators": [], 411 "loc": { 412 "start": { 413 "line": 22, 414 "column": 12 415 }, 416 "end": { 417 "line": 22, 418 "column": 13 419 } 420 } 421 }, 422 "loc": { 423 "start": { 424 "line": 22, 425 "column": 5 426 }, 427 "end": { 428 "line": 22, 429 "column": 14 430 } 431 } 432 } 433 ], 434 "loc": { 435 "start": { 436 "line": 21, 437 "column": 27 438 }, 439 "end": { 440 "line": 23, 441 "column": 4 442 } 443 } 444 }, 445 "loc": { 446 "start": { 447 "line": 21, 448 "column": 13 449 }, 450 "end": { 451 "line": 23, 452 "column": 4 453 } 454 } 455 }, 456 "loc": { 457 "start": { 458 "line": 21, 459 "column": 13 460 }, 461 "end": { 462 "line": 23, 463 "column": 4 464 } 465 } 466 }, 467 "overloads": [], 468 "decorators": [], 469 "loc": { 470 "start": { 471 "line": 21, 472 "column": 3 473 }, 474 "end": { 475 "line": 23, 476 "column": 4 477 } 478 } 479 }, 480 { 481 "type": "MethodDefinition", 482 "key": { 483 "type": "Identifier", 484 "name": "bar2", 485 "decorators": [], 486 "loc": { 487 "start": { 488 "line": 25, 489 "column": 10 490 }, 491 "end": { 492 "line": 25, 493 "column": 14 494 } 495 } 496 }, 497 "kind": "method", 498 "accessibility": "public", 499 "static": false, 500 "optional": false, 501 "computed": false, 502 "value": { 503 "type": "FunctionExpression", 504 "function": { 505 "type": "ScriptFunction", 506 "id": { 507 "type": "Identifier", 508 "name": "bar2", 509 "decorators": [], 510 "loc": { 511 "start": { 512 "line": 25, 513 "column": 10 514 }, 515 "end": { 516 "line": 25, 517 "column": 14 518 } 519 } 520 }, 521 "generator": false, 522 "async": false, 523 "expression": false, 524 "params": [], 525 "returnType": { 526 "type": "ETSTypeReference", 527 "part": { 528 "type": "ETSTypeReferencePart", 529 "name": { 530 "type": "Identifier", 531 "name": "foo", 532 "decorators": [], 533 "loc": { 534 "start": { 535 "line": 25, 536 "column": 18 537 }, 538 "end": { 539 "line": 25, 540 "column": 21 541 } 542 } 543 }, 544 "loc": { 545 "start": { 546 "line": 25, 547 "column": 18 548 }, 549 "end": { 550 "line": 25, 551 "column": 23 552 } 553 } 554 }, 555 "loc": { 556 "start": { 557 "line": 25, 558 "column": 18 559 }, 560 "end": { 561 "line": 25, 562 "column": 23 563 } 564 } 565 }, 566 "body": { 567 "type": "BlockStatement", 568 "statements": [ 569 { 570 "type": "ReturnStatement", 571 "argument": { 572 "type": "CallExpression", 573 "callee": { 574 "type": "MemberExpression", 575 "object": { 576 "type": "ThisExpression", 577 "loc": { 578 "start": { 579 "line": 26, 580 "column": 12 581 }, 582 "end": { 583 "line": 26, 584 "column": 16 585 } 586 } 587 }, 588 "property": { 589 "type": "Identifier", 590 "name": "baz2", 591 "decorators": [], 592 "loc": { 593 "start": { 594 "line": 26, 595 "column": 17 596 }, 597 "end": { 598 "line": 26, 599 "column": 21 600 } 601 } 602 }, 603 "computed": false, 604 "optional": false, 605 "loc": { 606 "start": { 607 "line": 26, 608 "column": 12 609 }, 610 "end": { 611 "line": 26, 612 "column": 21 613 } 614 } 615 }, 616 "arguments": [ 617 { 618 "type": "ThisExpression", 619 "loc": { 620 "start": { 621 "line": 26, 622 "column": 22 623 }, 624 "end": { 625 "line": 26, 626 "column": 26 627 } 628 } 629 }, 630 { 631 "type": "NumberLiteral", 632 "value": 1, 633 "loc": { 634 "start": { 635 "line": 26, 636 "column": 28 637 }, 638 "end": { 639 "line": 26, 640 "column": 29 641 } 642 } 643 } 644 ], 645 "optional": false, 646 "loc": { 647 "start": { 648 "line": 26, 649 "column": 12 650 }, 651 "end": { 652 "line": 26, 653 "column": 30 654 } 655 } 656 }, 657 "loc": { 658 "start": { 659 "line": 26, 660 "column": 5 661 }, 662 "end": { 663 "line": 26, 664 "column": 31 665 } 666 } 667 } 668 ], 669 "loc": { 670 "start": { 671 "line": 25, 672 "column": 22 673 }, 674 "end": { 675 "line": 27, 676 "column": 4 677 } 678 } 679 }, 680 "loc": { 681 "start": { 682 "line": 25, 683 "column": 14 684 }, 685 "end": { 686 "line": 27, 687 "column": 4 688 } 689 } 690 }, 691 "loc": { 692 "start": { 693 "line": 25, 694 "column": 14 695 }, 696 "end": { 697 "line": 27, 698 "column": 4 699 } 700 } 701 }, 702 "overloads": [], 703 "decorators": [], 704 "loc": { 705 "start": { 706 "line": 25, 707 "column": 3 708 }, 709 "end": { 710 "line": 27, 711 "column": 4 712 } 713 } 714 }, 715 { 716 "type": "MethodDefinition", 717 "key": { 718 "type": "Identifier", 719 "name": "baz2", 720 "decorators": [], 721 "loc": { 722 "start": { 723 "line": 29, 724 "column": 10 725 }, 726 "end": { 727 "line": 29, 728 "column": 14 729 } 730 } 731 }, 732 "kind": "method", 733 "accessibility": "public", 734 "static": false, 735 "optional": false, 736 "computed": false, 737 "value": { 738 "type": "FunctionExpression", 739 "function": { 740 "type": "ScriptFunction", 741 "id": { 742 "type": "Identifier", 743 "name": "baz2", 744 "decorators": [], 745 "loc": { 746 "start": { 747 "line": 29, 748 "column": 10 749 }, 750 "end": { 751 "line": 29, 752 "column": 14 753 } 754 } 755 }, 756 "generator": false, 757 "async": false, 758 "expression": false, 759 "params": [ 760 { 761 "type": "ETSParameterExpression", 762 "name": { 763 "type": "Identifier", 764 "name": "x", 765 "typeAnnotation": { 766 "type": "ETSTypeReference", 767 "part": { 768 "type": "ETSTypeReferencePart", 769 "name": { 770 "type": "Identifier", 771 "name": "foo", 772 "decorators": [], 773 "loc": { 774 "start": { 775 "line": 29, 776 "column": 18 777 }, 778 "end": { 779 "line": 29, 780 "column": 21 781 } 782 } 783 }, 784 "loc": { 785 "start": { 786 "line": 29, 787 "column": 18 788 }, 789 "end": { 790 "line": 29, 791 "column": 22 792 } 793 } 794 }, 795 "loc": { 796 "start": { 797 "line": 29, 798 "column": 18 799 }, 800 "end": { 801 "line": 29, 802 "column": 22 803 } 804 } 805 }, 806 "decorators": [], 807 "loc": { 808 "start": { 809 "line": 29, 810 "column": 15 811 }, 812 "end": { 813 "line": 29, 814 "column": 22 815 } 816 } 817 }, 818 "loc": { 819 "start": { 820 "line": 29, 821 "column": 15 822 }, 823 "end": { 824 "line": 29, 825 "column": 22 826 } 827 } 828 }, 829 { 830 "type": "ETSParameterExpression", 831 "name": { 832 "type": "Identifier", 833 "name": "y", 834 "typeAnnotation": { 835 "type": "ETSPrimitiveType", 836 "loc": { 837 "start": { 838 "line": 29, 839 "column": 26 840 }, 841 "end": { 842 "line": 29, 843 "column": 29 844 } 845 } 846 }, 847 "decorators": [], 848 "loc": { 849 "start": { 850 "line": 29, 851 "column": 23 852 }, 853 "end": { 854 "line": 29, 855 "column": 29 856 } 857 } 858 }, 859 "loc": { 860 "start": { 861 "line": 29, 862 "column": 23 863 }, 864 "end": { 865 "line": 29, 866 "column": 29 867 } 868 } 869 } 870 ], 871 "returnType": { 872 "type": "ETSTypeReference", 873 "part": { 874 "type": "ETSTypeReferencePart", 875 "name": { 876 "type": "Identifier", 877 "name": "foo", 878 "decorators": [], 879 "loc": { 880 "start": { 881 "line": 29, 882 "column": 32 883 }, 884 "end": { 885 "line": 29, 886 "column": 35 887 } 888 } 889 }, 890 "loc": { 891 "start": { 892 "line": 29, 893 "column": 32 894 }, 895 "end": { 896 "line": 29, 897 "column": 37 898 } 899 } 900 }, 901 "loc": { 902 "start": { 903 "line": 29, 904 "column": 32 905 }, 906 "end": { 907 "line": 29, 908 "column": 37 909 } 910 } 911 }, 912 "body": { 913 "type": "BlockStatement", 914 "statements": [ 915 { 916 "type": "ReturnStatement", 917 "argument": { 918 "type": "Identifier", 919 "name": "x", 920 "decorators": [], 921 "loc": { 922 "start": { 923 "line": 30, 924 "column": 12 925 }, 926 "end": { 927 "line": 30, 928 "column": 13 929 } 930 } 931 }, 932 "loc": { 933 "start": { 934 "line": 30, 935 "column": 5 936 }, 937 "end": { 938 "line": 30, 939 "column": 14 940 } 941 } 942 } 943 ], 944 "loc": { 945 "start": { 946 "line": 29, 947 "column": 36 948 }, 949 "end": { 950 "line": 31, 951 "column": 4 952 } 953 } 954 }, 955 "loc": { 956 "start": { 957 "line": 29, 958 "column": 14 959 }, 960 "end": { 961 "line": 31, 962 "column": 4 963 } 964 } 965 }, 966 "loc": { 967 "start": { 968 "line": 29, 969 "column": 14 970 }, 971 "end": { 972 "line": 31, 973 "column": 4 974 } 975 } 976 }, 977 "overloads": [], 978 "decorators": [], 979 "loc": { 980 "start": { 981 "line": 29, 982 "column": 3 983 }, 984 "end": { 985 "line": 31, 986 "column": 4 987 } 988 } 989 }, 990 { 991 "type": "MethodDefinition", 992 "key": { 993 "type": "Identifier", 994 "name": "constructor", 995 "decorators": [], 996 "loc": { 997 "start": { 998 "line": 1, 999 "column": 1 1000 }, 1001 "end": { 1002 "line": 1, 1003 "column": 1 1004 } 1005 } 1006 }, 1007 "kind": "constructor", 1008 "static": false, 1009 "optional": false, 1010 "computed": false, 1011 "value": { 1012 "type": "FunctionExpression", 1013 "function": { 1014 "type": "ScriptFunction", 1015 "id": { 1016 "type": "Identifier", 1017 "name": "constructor", 1018 "decorators": [], 1019 "loc": { 1020 "start": { 1021 "line": 1, 1022 "column": 1 1023 }, 1024 "end": { 1025 "line": 1, 1026 "column": 1 1027 } 1028 } 1029 }, 1030 "generator": false, 1031 "async": false, 1032 "expression": false, 1033 "params": [], 1034 "body": { 1035 "type": "BlockStatement", 1036 "statements": [], 1037 "loc": { 1038 "start": { 1039 "line": 1, 1040 "column": 1 1041 }, 1042 "end": { 1043 "line": 1, 1044 "column": 1 1045 } 1046 } 1047 }, 1048 "loc": { 1049 "start": { 1050 "line": 1, 1051 "column": 1 1052 }, 1053 "end": { 1054 "line": 1, 1055 "column": 1 1056 } 1057 } 1058 }, 1059 "loc": { 1060 "start": { 1061 "line": 1, 1062 "column": 1 1063 }, 1064 "end": { 1065 "line": 1, 1066 "column": 1 1067 } 1068 } 1069 }, 1070 "overloads": [], 1071 "decorators": [], 1072 "loc": { 1073 "start": { 1074 "line": 32, 1075 "column": 2 1076 }, 1077 "end": { 1078 "line": 32, 1079 "column": 2 1080 } 1081 } 1082 } 1083 ], 1084 "loc": { 1085 "start": { 1086 "line": 16, 1087 "column": 11 1088 }, 1089 "end": { 1090 "line": 32, 1091 "column": 2 1092 } 1093 } 1094 }, 1095 "loc": { 1096 "start": { 1097 "line": 16, 1098 "column": 1 1099 }, 1100 "end": { 1101 "line": 32, 1102 "column": 2 1103 } 1104 } 1105 }, 1106 { 1107 "type": "ClassDeclaration", 1108 "definition": { 1109 "id": { 1110 "type": "Identifier", 1111 "name": "ETSGLOBAL", 1112 "decorators": [], 1113 "loc": { 1114 "start": { 1115 "line": 1, 1116 "column": 1 1117 }, 1118 "end": { 1119 "line": 1, 1120 "column": 1 1121 } 1122 } 1123 }, 1124 "superClass": null, 1125 "implements": [], 1126 "body": [ 1127 { 1128 "type": "MethodDefinition", 1129 "key": { 1130 "type": "Identifier", 1131 "name": "_$init$_", 1132 "decorators": [], 1133 "loc": { 1134 "start": { 1135 "line": 1, 1136 "column": 1 1137 }, 1138 "end": { 1139 "line": 1, 1140 "column": 1 1141 } 1142 } 1143 }, 1144 "kind": "method", 1145 "accessibility": "public", 1146 "static": true, 1147 "optional": false, 1148 "computed": false, 1149 "value": { 1150 "type": "FunctionExpression", 1151 "function": { 1152 "type": "ScriptFunction", 1153 "id": { 1154 "type": "Identifier", 1155 "name": "_$init$_", 1156 "decorators": [], 1157 "loc": { 1158 "start": { 1159 "line": 1, 1160 "column": 1 1161 }, 1162 "end": { 1163 "line": 1, 1164 "column": 1 1165 } 1166 } 1167 }, 1168 "generator": false, 1169 "async": false, 1170 "expression": false, 1171 "params": [], 1172 "body": { 1173 "type": "BlockStatement", 1174 "statements": [], 1175 "loc": { 1176 "start": { 1177 "line": 1, 1178 "column": 1 1179 }, 1180 "end": { 1181 "line": 1, 1182 "column": 1 1183 } 1184 } 1185 }, 1186 "loc": { 1187 "start": { 1188 "line": 1, 1189 "column": 1 1190 }, 1191 "end": { 1192 "line": 1, 1193 "column": 1 1194 } 1195 } 1196 }, 1197 "loc": { 1198 "start": { 1199 "line": 1, 1200 "column": 1 1201 }, 1202 "end": { 1203 "line": 1, 1204 "column": 1 1205 } 1206 } 1207 }, 1208 "overloads": [], 1209 "decorators": [], 1210 "loc": { 1211 "start": { 1212 "line": 1, 1213 "column": 1 1214 }, 1215 "end": { 1216 "line": 1, 1217 "column": 1 1218 } 1219 } 1220 } 1221 ], 1222 "loc": { 1223 "start": { 1224 "line": 1, 1225 "column": 1 1226 }, 1227 "end": { 1228 "line": 1, 1229 "column": 1 1230 } 1231 } 1232 }, 1233 "loc": { 1234 "start": { 1235 "line": 1, 1236 "column": 1 1237 }, 1238 "end": { 1239 "line": 1, 1240 "column": 1 1241 } 1242 } 1243 } 1244 ], 1245 "loc": { 1246 "start": { 1247 "line": 1, 1248 "column": 1 1249 }, 1250 "end": { 1251 "line": 33, 1252 "column": 1 1253 } 1254 } 1255} 1256