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