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