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