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