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": 12
35                },
36                "end": {
37                  "line": 17,
38                  "column": 13
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": 16
54                },
55                "end": {
56                  "line": 17,
57                  "column": 19
58                }
59              }
60            },
61            "definite": false,
62            "decorators": [],
63            "loc": {
64              "start": {
65                "line": 17,
66                "column": 12
67              },
68              "end": {
69                "line": 17,
70                "column": 19
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": 12
84                },
85                "end": {
86                  "line": 18,
87                  "column": 13
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": 16
103                },
104                "end": {
105                  "line": 18,
106                  "column": 19
107                }
108              }
109            },
110            "definite": false,
111            "decorators": [],
112            "loc": {
113              "start": {
114                "line": 18,
115                "column": 12
116              },
117              "end": {
118                "line": 18,
119                "column": 19
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": 28
179                          },
180                          "end": {
181                            "line": 20,
182                            "column": 31
183                          }
184                        }
185                      },
186                      "decorators": [],
187                      "loc": {
188                        "start": {
189                          "line": 20,
190                          "column": 24
191                        },
192                        "end": {
193                          "line": 20,
194                          "column": 31
195                        }
196                      }
197                    },
198                    "loc": {
199                      "start": {
200                        "line": 20,
201                        "column": 24
202                      },
203                      "end": {
204                        "line": 20,
205                        "column": 31
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": 37
220                          },
221                          "end": {
222                            "line": 20,
223                            "column": 40
224                          }
225                        }
226                      },
227                      "decorators": [],
228                      "loc": {
229                        "start": {
230                          "line": 20,
231                          "column": 33
232                        },
233                        "end": {
234                          "line": 20,
235                          "column": 40
236                        }
237                      }
238                    },
239                    "loc": {
240                      "start": {
241                        "line": 20,
242                        "column": 33
243                      },
244                      "end": {
245                        "line": 20,
246                        "column": 40
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": 42
429                    },
430                    "end": {
431                      "line": 23,
432                      "column": 4
433                    }
434                  }
435                },
436                "loc": {
437                  "start": {
438                    "line": 20,
439                    "column": 23
440                  },
441                  "end": {
442                    "line": 23,
443                    "column": 4
444                  }
445                }
446              },
447              "loc": {
448                "start": {
449                  "line": 20,
450                  "column": 23
451                },
452                "end": {
453                  "line": 23,
454                  "column": 4
455                }
456              }
457            },
458            "overloads": [],
459            "decorators": [],
460            "loc": {
461              "start": {
462                "line": 20,
463                "column": 3
464              },
465              "end": {
466                "line": 23,
467                "column": 4
468              }
469            }
470          },
471          {
472            "type": "MethodDefinition",
473            "key": {
474              "type": "Identifier",
475              "name": "foo",
476              "decorators": [],
477              "loc": {
478                "start": {
479                  "line": 25,
480                  "column": 12
481                },
482                "end": {
483                  "line": 25,
484                  "column": 15
485                }
486              }
487            },
488            "kind": "method",
489            "accessibility": "internal",
490            "static": false,
491            "optional": false,
492            "computed": false,
493            "value": {
494              "type": "FunctionExpression",
495              "function": {
496                "type": "ScriptFunction",
497                "id": {
498                  "type": "Identifier",
499                  "name": "foo",
500                  "decorators": [],
501                  "loc": {
502                    "start": {
503                      "line": 25,
504                      "column": 12
505                    },
506                    "end": {
507                      "line": 25,
508                      "column": 15
509                    }
510                  }
511                },
512                "generator": false,
513                "async": false,
514                "expression": false,
515                "params": [],
516                "returnType": {
517                  "type": "ETSPrimitiveType",
518                  "loc": {
519                    "start": {
520                      "line": 25,
521                      "column": 19
522                    },
523                    "end": {
524                      "line": 25,
525                      "column": 23
526                    }
527                  }
528                },
529                "body": {
530                  "type": "BlockStatement",
531                  "statements": [],
532                  "loc": {
533                    "start": {
534                      "line": 25,
535                      "column": 24
536                    },
537                    "end": {
538                      "line": 25,
539                      "column": 26
540                    }
541                  }
542                },
543                "loc": {
544                  "start": {
545                    "line": 25,
546                    "column": 15
547                  },
548                  "end": {
549                    "line": 25,
550                    "column": 26
551                  }
552                }
553              },
554              "loc": {
555                "start": {
556                  "line": 25,
557                  "column": 15
558                },
559                "end": {
560                  "line": 25,
561                  "column": 26
562                }
563              }
564            },
565            "overloads": [],
566            "decorators": [],
567            "loc": {
568              "start": {
569                "line": 25,
570                "column": 3
571              },
572              "end": {
573                "line": 25,
574                "column": 26
575              }
576            }
577          }
578        ],
579        "loc": {
580          "start": {
581            "line": 16,
582            "column": 9
583          },
584          "end": {
585            "line": 26,
586            "column": 2
587          }
588        }
589      },
590      "loc": {
591        "start": {
592          "line": 16,
593          "column": 1
594        },
595        "end": {
596          "line": 26,
597          "column": 2
598        }
599      }
600    },
601    {
602      "type": "ClassDeclaration",
603      "definition": {
604        "id": {
605          "type": "Identifier",
606          "name": "ETSGLOBAL",
607          "decorators": [],
608          "loc": {
609            "start": {
610              "line": 1,
611              "column": 1
612            },
613            "end": {
614              "line": 1,
615              "column": 1
616            }
617          }
618        },
619        "superClass": null,
620        "implements": [],
621        "body": [
622          {
623            "type": "MethodDefinition",
624            "key": {
625              "type": "Identifier",
626              "name": "_$init$_",
627              "decorators": [],
628              "loc": {
629                "start": {
630                  "line": 1,
631                  "column": 1
632                },
633                "end": {
634                  "line": 1,
635                  "column": 1
636                }
637              }
638            },
639            "kind": "method",
640            "accessibility": "public",
641            "static": true,
642            "optional": false,
643            "computed": false,
644            "value": {
645              "type": "FunctionExpression",
646              "function": {
647                "type": "ScriptFunction",
648                "id": {
649                  "type": "Identifier",
650                  "name": "_$init$_",
651                  "decorators": [],
652                  "loc": {
653                    "start": {
654                      "line": 1,
655                      "column": 1
656                    },
657                    "end": {
658                      "line": 1,
659                      "column": 1
660                    }
661                  }
662                },
663                "generator": false,
664                "async": false,
665                "expression": false,
666                "params": [],
667                "body": {
668                  "type": "BlockStatement",
669                  "statements": [],
670                  "loc": {
671                    "start": {
672                      "line": 1,
673                      "column": 1
674                    },
675                    "end": {
676                      "line": 1,
677                      "column": 1
678                    }
679                  }
680                },
681                "loc": {
682                  "start": {
683                    "line": 1,
684                    "column": 1
685                  },
686                  "end": {
687                    "line": 1,
688                    "column": 1
689                  }
690                }
691              },
692              "loc": {
693                "start": {
694                  "line": 1,
695                  "column": 1
696                },
697                "end": {
698                  "line": 1,
699                  "column": 1
700                }
701              }
702            },
703            "overloads": [],
704            "decorators": [],
705            "loc": {
706              "start": {
707                "line": 1,
708                "column": 1
709              },
710              "end": {
711                "line": 1,
712                "column": 1
713              }
714            }
715          },
716          {
717            "type": "MethodDefinition",
718            "key": {
719              "type": "Identifier",
720              "name": "main",
721              "decorators": [],
722              "loc": {
723                "start": {
724                  "line": 28,
725                  "column": 10
726                },
727                "end": {
728                  "line": 28,
729                  "column": 14
730                }
731              }
732            },
733            "kind": "method",
734            "accessibility": "public",
735            "static": true,
736            "optional": false,
737            "computed": false,
738            "value": {
739              "type": "FunctionExpression",
740              "function": {
741                "type": "ScriptFunction",
742                "id": {
743                  "type": "Identifier",
744                  "name": "main",
745                  "decorators": [],
746                  "loc": {
747                    "start": {
748                      "line": 28,
749                      "column": 10
750                    },
751                    "end": {
752                      "line": 28,
753                      "column": 14
754                    }
755                  }
756                },
757                "generator": false,
758                "async": false,
759                "expression": false,
760                "params": [],
761                "returnType": {
762                  "type": "ETSPrimitiveType",
763                  "loc": {
764                    "start": {
765                      "line": 28,
766                      "column": 18
767                    },
768                    "end": {
769                      "line": 28,
770                      "column": 22
771                    }
772                  }
773                },
774                "body": {
775                  "type": "BlockStatement",
776                  "statements": [
777                    {
778                      "type": "VariableDeclaration",
779                      "declarations": [
780                        {
781                          "type": "VariableDeclarator",
782                          "id": {
783                            "type": "Identifier",
784                            "name": "instance",
785                            "typeAnnotation": {
786                              "type": "ETSTypeReference",
787                              "part": {
788                                "type": "ETSTypeReferencePart",
789                                "name": {
790                                  "type": "Identifier",
791                                  "name": "A",
792                                  "decorators": [],
793                                  "loc": {
794                                    "start": {
795                                      "line": 29,
796                                      "column": 18
797                                    },
798                                    "end": {
799                                      "line": 29,
800                                      "column": 19
801                                    }
802                                  }
803                                },
804                                "loc": {
805                                  "start": {
806                                    "line": 29,
807                                    "column": 18
808                                  },
809                                  "end": {
810                                    "line": 29,
811                                    "column": 21
812                                  }
813                                }
814                              },
815                              "loc": {
816                                "start": {
817                                  "line": 29,
818                                  "column": 18
819                                },
820                                "end": {
821                                  "line": 29,
822                                  "column": 21
823                                }
824                              }
825                            },
826                            "decorators": [],
827                            "loc": {
828                              "start": {
829                                "line": 29,
830                                "column": 7
831                              },
832                              "end": {
833                                "line": 29,
834                                "column": 15
835                              }
836                            }
837                          },
838                          "init": {
839                            "type": "ETSNewClassInstanceExpression",
840                            "typeReference": {
841                              "type": "ETSTypeReference",
842                              "part": {
843                                "type": "ETSTypeReferencePart",
844                                "name": {
845                                  "type": "Identifier",
846                                  "name": "A",
847                                  "decorators": [],
848                                  "loc": {
849                                    "start": {
850                                      "line": 29,
851                                      "column": 26
852                                    },
853                                    "end": {
854                                      "line": 29,
855                                      "column": 27
856                                    }
857                                  }
858                                },
859                                "loc": {
860                                  "start": {
861                                    "line": 29,
862                                    "column": 26
863                                  },
864                                  "end": {
865                                    "line": 29,
866                                    "column": 28
867                                  }
868                                }
869                              },
870                              "loc": {
871                                "start": {
872                                  "line": 29,
873                                  "column": 26
874                                },
875                                "end": {
876                                  "line": 29,
877                                  "column": 28
878                                }
879                              }
880                            },
881                            "arguments": [
882                              {
883                                "type": "NumberLiteral",
884                                "value": 2,
885                                "loc": {
886                                  "start": {
887                                    "line": 29,
888                                    "column": 28
889                                  },
890                                  "end": {
891                                    "line": 29,
892                                    "column": 29
893                                  }
894                                }
895                              },
896                              {
897                                "type": "NumberLiteral",
898                                "value": 3,
899                                "loc": {
900                                  "start": {
901                                    "line": 29,
902                                    "column": 31
903                                  },
904                                  "end": {
905                                    "line": 29,
906                                    "column": 32
907                                  }
908                                }
909                              }
910                            ],
911                            "loc": {
912                              "start": {
913                                "line": 29,
914                                "column": 22
915                              },
916                              "end": {
917                                "line": 29,
918                                "column": 34
919                              }
920                            }
921                          },
922                          "loc": {
923                            "start": {
924                              "line": 29,
925                              "column": 7
926                            },
927                            "end": {
928                              "line": 29,
929                              "column": 34
930                            }
931                          }
932                        }
933                      ],
934                      "kind": "let",
935                      "loc": {
936                        "start": {
937                          "line": 29,
938                          "column": 3
939                        },
940                        "end": {
941                          "line": 29,
942                          "column": 34
943                        }
944                      }
945                    }
946                  ],
947                  "loc": {
948                    "start": {
949                      "line": 28,
950                      "column": 23
951                    },
952                    "end": {
953                      "line": 30,
954                      "column": 2
955                    }
956                  }
957                },
958                "loc": {
959                  "start": {
960                    "line": 28,
961                    "column": 14
962                  },
963                  "end": {
964                    "line": 30,
965                    "column": 2
966                  }
967                }
968              },
969              "loc": {
970                "start": {
971                  "line": 28,
972                  "column": 14
973                },
974                "end": {
975                  "line": 30,
976                  "column": 2
977                }
978              }
979            },
980            "overloads": [],
981            "decorators": [],
982            "loc": {
983              "start": {
984                "line": 28,
985                "column": 1
986              },
987              "end": {
988                "line": 30,
989                "column": 2
990              }
991            }
992          }
993        ],
994        "loc": {
995          "start": {
996            "line": 1,
997            "column": 1
998          },
999          "end": {
1000            "line": 1,
1001            "column": 1
1002          }
1003        }
1004      },
1005      "loc": {
1006        "start": {
1007          "line": 1,
1008          "column": 1
1009        },
1010        "end": {
1011          "line": 1,
1012          "column": 1
1013        }
1014      }
1015    }
1016  ],
1017  "loc": {
1018    "start": {
1019      "line": 1,
1020      "column": 1
1021    },
1022    "end": {
1023      "line": 31,
1024      "column": 1
1025    }
1026  }
1027}
1028