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": "throwingFunctionAsParameter1.ets" 16 }, 17 "end": { 18 "line": 1, 19 "column": 1, 20 "program": "throwingFunctionAsParameter1.ets" 21 } 22 } 23 }, 24 "superClass": null, 25 "implements": [], 26 "body": [ 27 { 28 "type": "MethodDefinition", 29 "key": { 30 "type": "Identifier", 31 "name": "main", 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": "main", 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": "throwingFunctionAsParameter1.ets" 125 }, 126 "end": { 127 "line": 1, 128 "column": 1, 129 "program": "throwingFunctionAsParameter1.ets" 130 } 131 } 132 }, 133 { 134 "type": "MethodDefinition", 135 "key": { 136 "type": "Identifier", 137 "name": "_$init$_", 138 "decorators": [], 139 "loc": { 140 "start": { 141 "line": 1, 142 "column": 1, 143 "program": null 144 }, 145 "end": { 146 "line": 1, 147 "column": 1, 148 "program": null 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": "_$init$_", 164 "decorators": [], 165 "loc": { 166 "start": { 167 "line": 1, 168 "column": 1, 169 "program": null 170 }, 171 "end": { 172 "line": 1, 173 "column": 1, 174 "program": null 175 } 176 } 177 }, 178 "generator": false, 179 "async": false, 180 "expression": false, 181 "params": [], 182 "body": { 183 "type": "BlockStatement", 184 "statements": [], 185 "loc": { 186 "start": { 187 "line": 1, 188 "column": 1, 189 "program": null 190 }, 191 "end": { 192 "line": 1, 193 "column": 1, 194 "program": null 195 } 196 } 197 }, 198 "loc": { 199 "start": { 200 "line": 1, 201 "column": 1, 202 "program": null 203 }, 204 "end": { 205 "line": 1, 206 "column": 1, 207 "program": null 208 } 209 } 210 }, 211 "loc": { 212 "start": { 213 "line": 1, 214 "column": 1, 215 "program": null 216 }, 217 "end": { 218 "line": 1, 219 "column": 1, 220 "program": null 221 } 222 } 223 }, 224 "overloads": [], 225 "decorators": [], 226 "loc": { 227 "start": { 228 "line": 1, 229 "column": 1, 230 "program": "throwingFunctionAsParameter1.ets" 231 }, 232 "end": { 233 "line": 1, 234 "column": 1, 235 "program": "throwingFunctionAsParameter1.ets" 236 } 237 } 238 }, 239 { 240 "type": "MethodDefinition", 241 "key": { 242 "type": "Identifier", 243 "name": "RethrowingFunc", 244 "decorators": [], 245 "loc": { 246 "start": { 247 "line": 16, 248 "column": 10, 249 "program": "throwingFunctionAsParameter1.ets" 250 }, 251 "end": { 252 "line": 16, 253 "column": 24, 254 "program": "throwingFunctionAsParameter1.ets" 255 } 256 } 257 }, 258 "kind": "method", 259 "accessibility": "public", 260 "static": true, 261 "optional": false, 262 "computed": false, 263 "value": { 264 "type": "FunctionExpression", 265 "function": { 266 "type": "ScriptFunction", 267 "id": { 268 "type": "Identifier", 269 "name": "RethrowingFunc", 270 "decorators": [], 271 "loc": { 272 "start": { 273 "line": 16, 274 "column": 10, 275 "program": "throwingFunctionAsParameter1.ets" 276 }, 277 "end": { 278 "line": 16, 279 "column": 24, 280 "program": "throwingFunctionAsParameter1.ets" 281 } 282 } 283 }, 284 "generator": false, 285 "async": false, 286 "expression": false, 287 "params": [ 288 { 289 "type": "ETSParameterExpression", 290 "name": { 291 "type": "Identifier", 292 "name": "func", 293 "typeAnnotation": { 294 "type": "ETSFunctionType", 295 "params": [], 296 "returnType": { 297 "type": "ETSPrimitiveType", 298 "loc": { 299 "start": { 300 "line": 16, 301 "column": 37, 302 "program": "throwingFunctionAsParameter1.ets" 303 }, 304 "end": { 305 "line": 16, 306 "column": 41, 307 "program": "throwingFunctionAsParameter1.ets" 308 } 309 } 310 }, 311 "throwMarker": "throws", 312 "loc": { 313 "start": { 314 "line": 16, 315 "column": 31, 316 "program": "throwingFunctionAsParameter1.ets" 317 }, 318 "end": { 319 "line": 16, 320 "column": 41, 321 "program": "throwingFunctionAsParameter1.ets" 322 } 323 } 324 }, 325 "decorators": [], 326 "loc": { 327 "start": { 328 "line": 16, 329 "column": 25, 330 "program": "throwingFunctionAsParameter1.ets" 331 }, 332 "end": { 333 "line": 16, 334 "column": 41, 335 "program": "throwingFunctionAsParameter1.ets" 336 } 337 } 338 }, 339 "loc": { 340 "start": { 341 "line": 16, 342 "column": 25, 343 "program": "throwingFunctionAsParameter1.ets" 344 }, 345 "end": { 346 "line": 16, 347 "column": 41, 348 "program": "throwingFunctionAsParameter1.ets" 349 } 350 } 351 } 352 ], 353 "returnType": { 354 "type": "ETSPrimitiveType", 355 "loc": { 356 "start": { 357 "line": 16, 358 "column": 51, 359 "program": "throwingFunctionAsParameter1.ets" 360 }, 361 "end": { 362 "line": 16, 363 "column": 55, 364 "program": "throwingFunctionAsParameter1.ets" 365 } 366 } 367 }, 368 "body": { 369 "type": "BlockStatement", 370 "statements": [ 371 { 372 "type": "ExpressionStatement", 373 "expression": { 374 "type": "CallExpression", 375 "callee": { 376 "type": "Identifier", 377 "name": "func", 378 "decorators": [], 379 "loc": { 380 "start": { 381 "line": 17, 382 "column": 3, 383 "program": "throwingFunctionAsParameter1.ets" 384 }, 385 "end": { 386 "line": 17, 387 "column": 7, 388 "program": "throwingFunctionAsParameter1.ets" 389 } 390 } 391 }, 392 "arguments": [], 393 "optional": false, 394 "loc": { 395 "start": { 396 "line": 17, 397 "column": 3, 398 "program": "throwingFunctionAsParameter1.ets" 399 }, 400 "end": { 401 "line": 17, 402 "column": 9, 403 "program": "throwingFunctionAsParameter1.ets" 404 } 405 } 406 }, 407 "loc": { 408 "start": { 409 "line": 17, 410 "column": 3, 411 "program": "throwingFunctionAsParameter1.ets" 412 }, 413 "end": { 414 "line": 17, 415 "column": 10, 416 "program": "throwingFunctionAsParameter1.ets" 417 } 418 } 419 } 420 ], 421 "loc": { 422 "start": { 423 "line": 16, 424 "column": 65, 425 "program": "throwingFunctionAsParameter1.ets" 426 }, 427 "end": { 428 "line": 18, 429 "column": 2, 430 "program": "throwingFunctionAsParameter1.ets" 431 } 432 } 433 }, 434 "throwMarker": "rethrows", 435 "loc": { 436 "start": { 437 "line": 16, 438 "column": 10, 439 "program": "throwingFunctionAsParameter1.ets" 440 }, 441 "end": { 442 "line": 18, 443 "column": 2, 444 "program": "throwingFunctionAsParameter1.ets" 445 } 446 } 447 }, 448 "loc": { 449 "start": { 450 "line": 16, 451 "column": 10, 452 "program": "throwingFunctionAsParameter1.ets" 453 }, 454 "end": { 455 "line": 18, 456 "column": 2, 457 "program": "throwingFunctionAsParameter1.ets" 458 } 459 } 460 }, 461 "overloads": [], 462 "decorators": [], 463 "loc": { 464 "start": { 465 "line": 16, 466 "column": 1, 467 "program": "throwingFunctionAsParameter1.ets" 468 }, 469 "end": { 470 "line": 18, 471 "column": 2, 472 "program": "throwingFunctionAsParameter1.ets" 473 } 474 } 475 }, 476 { 477 "type": "MethodDefinition", 478 "key": { 479 "type": "Identifier", 480 "name": "NonThrowingFunc", 481 "decorators": [], 482 "loc": { 483 "start": { 484 "line": 20, 485 "column": 10, 486 "program": "throwingFunctionAsParameter1.ets" 487 }, 488 "end": { 489 "line": 20, 490 "column": 25, 491 "program": "throwingFunctionAsParameter1.ets" 492 } 493 } 494 }, 495 "kind": "method", 496 "accessibility": "public", 497 "static": true, 498 "optional": false, 499 "computed": false, 500 "value": { 501 "type": "FunctionExpression", 502 "function": { 503 "type": "ScriptFunction", 504 "id": { 505 "type": "Identifier", 506 "name": "NonThrowingFunc", 507 "decorators": [], 508 "loc": { 509 "start": { 510 "line": 20, 511 "column": 10, 512 "program": "throwingFunctionAsParameter1.ets" 513 }, 514 "end": { 515 "line": 20, 516 "column": 25, 517 "program": "throwingFunctionAsParameter1.ets" 518 } 519 } 520 }, 521 "generator": false, 522 "async": false, 523 "expression": false, 524 "params": [ 525 { 526 "type": "ETSParameterExpression", 527 "name": { 528 "type": "Identifier", 529 "name": "func", 530 "typeAnnotation": { 531 "type": "ETSFunctionType", 532 "params": [], 533 "returnType": { 534 "type": "ETSPrimitiveType", 535 "loc": { 536 "start": { 537 "line": 20, 538 "column": 38, 539 "program": "throwingFunctionAsParameter1.ets" 540 }, 541 "end": { 542 "line": 20, 543 "column": 42, 544 "program": "throwingFunctionAsParameter1.ets" 545 } 546 } 547 }, 548 "throwMarker": "throws", 549 "loc": { 550 "start": { 551 "line": 20, 552 "column": 32, 553 "program": "throwingFunctionAsParameter1.ets" 554 }, 555 "end": { 556 "line": 20, 557 "column": 42, 558 "program": "throwingFunctionAsParameter1.ets" 559 } 560 } 561 }, 562 "decorators": [], 563 "loc": { 564 "start": { 565 "line": 20, 566 "column": 26, 567 "program": "throwingFunctionAsParameter1.ets" 568 }, 569 "end": { 570 "line": 20, 571 "column": 42, 572 "program": "throwingFunctionAsParameter1.ets" 573 } 574 } 575 }, 576 "loc": { 577 "start": { 578 "line": 20, 579 "column": 26, 580 "program": "throwingFunctionAsParameter1.ets" 581 }, 582 "end": { 583 "line": 20, 584 "column": 42, 585 "program": "throwingFunctionAsParameter1.ets" 586 } 587 } 588 } 589 ], 590 "returnType": { 591 "type": "ETSPrimitiveType", 592 "loc": { 593 "start": { 594 "line": 20, 595 "column": 52, 596 "program": "throwingFunctionAsParameter1.ets" 597 }, 598 "end": { 599 "line": 20, 600 "column": 56, 601 "program": "throwingFunctionAsParameter1.ets" 602 } 603 } 604 }, 605 "body": { 606 "type": "BlockStatement", 607 "statements": [ 608 { 609 "type": "TryStatement", 610 "block": { 611 "type": "BlockStatement", 612 "statements": [ 613 { 614 "type": "ExpressionStatement", 615 "expression": { 616 "type": "CallExpression", 617 "callee": { 618 "type": "Identifier", 619 "name": "func", 620 "decorators": [], 621 "loc": { 622 "start": { 623 "line": 22, 624 "column": 5, 625 "program": "throwingFunctionAsParameter1.ets" 626 }, 627 "end": { 628 "line": 22, 629 "column": 9, 630 "program": "throwingFunctionAsParameter1.ets" 631 } 632 } 633 }, 634 "arguments": [], 635 "optional": false, 636 "loc": { 637 "start": { 638 "line": 22, 639 "column": 5, 640 "program": "throwingFunctionAsParameter1.ets" 641 }, 642 "end": { 643 "line": 22, 644 "column": 11, 645 "program": "throwingFunctionAsParameter1.ets" 646 } 647 } 648 }, 649 "loc": { 650 "start": { 651 "line": 22, 652 "column": 5, 653 "program": "throwingFunctionAsParameter1.ets" 654 }, 655 "end": { 656 "line": 22, 657 "column": 12, 658 "program": "throwingFunctionAsParameter1.ets" 659 } 660 } 661 } 662 ], 663 "loc": { 664 "start": { 665 "line": 21, 666 "column": 7, 667 "program": "throwingFunctionAsParameter1.ets" 668 }, 669 "end": { 670 "line": 23, 671 "column": 4, 672 "program": "throwingFunctionAsParameter1.ets" 673 } 674 } 675 }, 676 "handler": [ 677 { 678 "type": "CatchClause", 679 "body": { 680 "type": "BlockStatement", 681 "statements": [], 682 "loc": { 683 "start": { 684 "line": 23, 685 "column": 15, 686 "program": "throwingFunctionAsParameter1.ets" 687 }, 688 "end": { 689 "line": 23, 690 "column": 17, 691 "program": "throwingFunctionAsParameter1.ets" 692 } 693 } 694 }, 695 "param": { 696 "type": "Identifier", 697 "name": "e", 698 "decorators": [], 699 "loc": { 700 "start": { 701 "line": 23, 702 "column": 12, 703 "program": "throwingFunctionAsParameter1.ets" 704 }, 705 "end": { 706 "line": 23, 707 "column": 13, 708 "program": "throwingFunctionAsParameter1.ets" 709 } 710 } 711 }, 712 "loc": { 713 "start": { 714 "line": 23, 715 "column": 5, 716 "program": "throwingFunctionAsParameter1.ets" 717 }, 718 "end": { 719 "line": 23, 720 "column": 17, 721 "program": "throwingFunctionAsParameter1.ets" 722 } 723 } 724 } 725 ], 726 "finalizer": null, 727 "loc": { 728 "start": { 729 "line": 21, 730 "column": 3, 731 "program": "throwingFunctionAsParameter1.ets" 732 }, 733 "end": { 734 "line": 23, 735 "column": 17, 736 "program": "throwingFunctionAsParameter1.ets" 737 } 738 } 739 } 740 ], 741 "loc": { 742 "start": { 743 "line": 20, 744 "column": 57, 745 "program": "throwingFunctionAsParameter1.ets" 746 }, 747 "end": { 748 "line": 24, 749 "column": 2, 750 "program": "throwingFunctionAsParameter1.ets" 751 } 752 } 753 }, 754 "loc": { 755 "start": { 756 "line": 20, 757 "column": 10, 758 "program": "throwingFunctionAsParameter1.ets" 759 }, 760 "end": { 761 "line": 24, 762 "column": 2, 763 "program": "throwingFunctionAsParameter1.ets" 764 } 765 } 766 }, 767 "loc": { 768 "start": { 769 "line": 20, 770 "column": 10, 771 "program": "throwingFunctionAsParameter1.ets" 772 }, 773 "end": { 774 "line": 24, 775 "column": 2, 776 "program": "throwingFunctionAsParameter1.ets" 777 } 778 } 779 }, 780 "overloads": [], 781 "decorators": [], 782 "loc": { 783 "start": { 784 "line": 20, 785 "column": 1, 786 "program": "throwingFunctionAsParameter1.ets" 787 }, 788 "end": { 789 "line": 24, 790 "column": 2, 791 "program": "throwingFunctionAsParameter1.ets" 792 } 793 } 794 } 795 ], 796 "loc": { 797 "start": { 798 "line": 1, 799 "column": 1, 800 "program": "throwingFunctionAsParameter1.ets" 801 }, 802 "end": { 803 "line": 1, 804 "column": 1, 805 "program": "throwingFunctionAsParameter1.ets" 806 } 807 } 808 }, 809 "loc": { 810 "start": { 811 "line": 1, 812 "column": 1, 813 "program": "throwingFunctionAsParameter1.ets" 814 }, 815 "end": { 816 "line": 1, 817 "column": 1, 818 "program": "throwingFunctionAsParameter1.ets" 819 } 820 } 821 } 822 ], 823 "loc": { 824 "start": { 825 "line": 1, 826 "column": 1, 827 "program": "throwingFunctionAsParameter1.ets" 828 }, 829 "end": { 830 "line": 25, 831 "column": 1, 832 "program": "throwingFunctionAsParameter1.ets" 833 } 834 } 835} 836