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