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