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