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