• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "ClassDeclaration",
6      "definition": {
7        "id": {
8          "type": "Identifier",
9          "name": "ETSGLOBAL",
10          "decorators": [],
11          "loc": {
12            "start": {
13              "line": 1,
14              "column": 1,
15              "program": "switch_alive_1.ets"
16            },
17            "end": {
18              "line": 1,
19              "column": 1,
20              "program": "switch_alive_1.ets"
21            }
22          }
23        },
24        "superClass": null,
25        "implements": [],
26        "body": [
27          {
28            "type": "MethodDefinition",
29            "key": {
30              "type": "Identifier",
31              "name": "_$init$_",
32              "decorators": [],
33              "loc": {
34                "start": {
35                  "line": 1,
36                  "column": 1,
37                  "program": null
38                },
39                "end": {
40                  "line": 1,
41                  "column": 1,
42                  "program": null
43                }
44              }
45            },
46            "kind": "method",
47            "accessibility": "public",
48            "static": true,
49            "optional": false,
50            "computed": false,
51            "value": {
52              "type": "FunctionExpression",
53              "function": {
54                "type": "ScriptFunction",
55                "id": {
56                  "type": "Identifier",
57                  "name": "_$init$_",
58                  "decorators": [],
59                  "loc": {
60                    "start": {
61                      "line": 1,
62                      "column": 1,
63                      "program": null
64                    },
65                    "end": {
66                      "line": 1,
67                      "column": 1,
68                      "program": null
69                    }
70                  }
71                },
72                "generator": false,
73                "async": false,
74                "expression": false,
75                "params": [],
76                "body": {
77                  "type": "BlockStatement",
78                  "statements": [],
79                  "loc": {
80                    "start": {
81                      "line": 1,
82                      "column": 1,
83                      "program": null
84                    },
85                    "end": {
86                      "line": 1,
87                      "column": 1,
88                      "program": null
89                    }
90                  }
91                },
92                "loc": {
93                  "start": {
94                    "line": 1,
95                    "column": 1,
96                    "program": null
97                  },
98                  "end": {
99                    "line": 1,
100                    "column": 1,
101                    "program": null
102                  }
103                }
104              },
105              "loc": {
106                "start": {
107                  "line": 1,
108                  "column": 1,
109                  "program": null
110                },
111                "end": {
112                  "line": 1,
113                  "column": 1,
114                  "program": null
115                }
116              }
117            },
118            "overloads": [],
119            "decorators": [],
120            "loc": {
121              "start": {
122                "line": 1,
123                "column": 1,
124                "program": "switch_alive_1.ets"
125              },
126              "end": {
127                "line": 1,
128                "column": 1,
129                "program": "switch_alive_1.ets"
130              }
131            }
132          },
133          {
134            "type": "MethodDefinition",
135            "key": {
136              "type": "Identifier",
137              "name": "main",
138              "decorators": [],
139              "loc": {
140                "start": {
141                  "line": 16,
142                  "column": 10,
143                  "program": "switch_alive_1.ets"
144                },
145                "end": {
146                  "line": 16,
147                  "column": 14,
148                  "program": "switch_alive_1.ets"
149                }
150              }
151            },
152            "kind": "method",
153            "accessibility": "public",
154            "static": true,
155            "optional": false,
156            "computed": false,
157            "value": {
158              "type": "FunctionExpression",
159              "function": {
160                "type": "ScriptFunction",
161                "id": {
162                  "type": "Identifier",
163                  "name": "main",
164                  "decorators": [],
165                  "loc": {
166                    "start": {
167                      "line": 16,
168                      "column": 10,
169                      "program": "switch_alive_1.ets"
170                    },
171                    "end": {
172                      "line": 16,
173                      "column": 14,
174                      "program": "switch_alive_1.ets"
175                    }
176                  }
177                },
178                "generator": false,
179                "async": false,
180                "expression": false,
181                "params": [],
182                "returnType": {
183                  "type": "ETSPrimitiveType",
184                  "loc": {
185                    "start": {
186                      "line": 16,
187                      "column": 18,
188                      "program": "switch_alive_1.ets"
189                    },
190                    "end": {
191                      "line": 16,
192                      "column": 21,
193                      "program": "switch_alive_1.ets"
194                    }
195                  }
196                },
197                "body": {
198                  "type": "BlockStatement",
199                  "statements": [
200                    {
201                      "type": "VariableDeclaration",
202                      "declarations": [
203                        {
204                          "type": "VariableDeclarator",
205                          "id": {
206                            "type": "Identifier",
207                            "name": "a",
208                            "typeAnnotation": {
209                              "type": "ETSPrimitiveType",
210                              "loc": {
211                                "start": {
212                                  "line": 17,
213                                  "column": 9,
214                                  "program": "switch_alive_1.ets"
215                                },
216                                "end": {
217                                  "line": 17,
218                                  "column": 12,
219                                  "program": "switch_alive_1.ets"
220                                }
221                              }
222                            },
223                            "decorators": [],
224                            "loc": {
225                              "start": {
226                                "line": 17,
227                                "column": 6,
228                                "program": "switch_alive_1.ets"
229                              },
230                              "end": {
231                                "line": 17,
232                                "column": 7,
233                                "program": "switch_alive_1.ets"
234                              }
235                            }
236                          },
237                          "init": {
238                            "type": "NumberLiteral",
239                            "value": 2,
240                            "loc": {
241                              "start": {
242                                "line": 17,
243                                "column": 15,
244                                "program": "switch_alive_1.ets"
245                              },
246                              "end": {
247                                "line": 17,
248                                "column": 16,
249                                "program": "switch_alive_1.ets"
250                              }
251                            }
252                          },
253                          "loc": {
254                            "start": {
255                              "line": 17,
256                              "column": 6,
257                              "program": "switch_alive_1.ets"
258                            },
259                            "end": {
260                              "line": 17,
261                              "column": 16,
262                              "program": "switch_alive_1.ets"
263                            }
264                          }
265                        }
266                      ],
267                      "kind": "let",
268                      "loc": {
269                        "start": {
270                          "line": 17,
271                          "column": 2,
272                          "program": "switch_alive_1.ets"
273                        },
274                        "end": {
275                          "line": 17,
276                          "column": 17,
277                          "program": "switch_alive_1.ets"
278                        }
279                      }
280                    },
281                    {
282                      "type": "SwitchStatement",
283                      "discriminant": {
284                        "type": "Identifier",
285                        "name": "a",
286                        "decorators": [],
287                        "loc": {
288                          "start": {
289                            "line": 18,
290                            "column": 10,
291                            "program": "switch_alive_1.ets"
292                          },
293                          "end": {
294                            "line": 18,
295                            "column": 11,
296                            "program": "switch_alive_1.ets"
297                          }
298                        }
299                      },
300                      "cases": [
301                        {
302                          "type": "SwitchCase",
303                          "test": {
304                            "type": "NumberLiteral",
305                            "value": 1,
306                            "loc": {
307                              "start": {
308                                "line": 19,
309                                "column": 8,
310                                "program": "switch_alive_1.ets"
311                              },
312                              "end": {
313                                "line": 19,
314                                "column": 9,
315                                "program": "switch_alive_1.ets"
316                              }
317                            }
318                          },
319                          "consequent": [
320                            {
321                              "type": "ReturnStatement",
322                              "argument": {
323                                "type": "NumberLiteral",
324                                "value": 1,
325                                "loc": {
326                                  "start": {
327                                    "line": 20,
328                                    "column": 11,
329                                    "program": "switch_alive_1.ets"
330                                  },
331                                  "end": {
332                                    "line": 20,
333                                    "column": 12,
334                                    "program": "switch_alive_1.ets"
335                                  }
336                                }
337                              },
338                              "loc": {
339                                "start": {
340                                  "line": 20,
341                                  "column": 4,
342                                  "program": "switch_alive_1.ets"
343                                },
344                                "end": {
345                                  "line": 20,
346                                  "column": 13,
347                                  "program": "switch_alive_1.ets"
348                                }
349                              }
350                            }
351                          ],
352                          "loc": {
353                            "start": {
354                              "line": 19,
355                              "column": 3,
356                              "program": "switch_alive_1.ets"
357                            },
358                            "end": {
359                              "line": 20,
360                              "column": 13,
361                              "program": "switch_alive_1.ets"
362                            }
363                          }
364                        },
365                        {
366                          "type": "SwitchCase",
367                          "test": {
368                            "type": "NumberLiteral",
369                            "value": 2,
370                            "loc": {
371                              "start": {
372                                "line": 21,
373                                "column": 8,
374                                "program": "switch_alive_1.ets"
375                              },
376                              "end": {
377                                "line": 21,
378                                "column": 9,
379                                "program": "switch_alive_1.ets"
380                              }
381                            }
382                          },
383                          "consequent": [
384                            {
385                              "type": "ReturnStatement",
386                              "argument": {
387                                "type": "NumberLiteral",
388                                "value": 2,
389                                "loc": {
390                                  "start": {
391                                    "line": 22,
392                                    "column": 11,
393                                    "program": "switch_alive_1.ets"
394                                  },
395                                  "end": {
396                                    "line": 22,
397                                    "column": 12,
398                                    "program": "switch_alive_1.ets"
399                                  }
400                                }
401                              },
402                              "loc": {
403                                "start": {
404                                  "line": 22,
405                                  "column": 4,
406                                  "program": "switch_alive_1.ets"
407                                },
408                                "end": {
409                                  "line": 22,
410                                  "column": 13,
411                                  "program": "switch_alive_1.ets"
412                                }
413                              }
414                            }
415                          ],
416                          "loc": {
417                            "start": {
418                              "line": 21,
419                              "column": 3,
420                              "program": "switch_alive_1.ets"
421                            },
422                            "end": {
423                              "line": 22,
424                              "column": 13,
425                              "program": "switch_alive_1.ets"
426                            }
427                          }
428                        },
429                        {
430                          "type": "SwitchCase",
431                          "test": null,
432                          "consequent": [
433                            {
434                              "type": "ReturnStatement",
435                              "argument": {
436                                "type": "NumberLiteral",
437                                "value": 255,
438                                "loc": {
439                                  "start": {
440                                    "line": 24,
441                                    "column": 11,
442                                    "program": "switch_alive_1.ets"
443                                  },
444                                  "end": {
445                                    "line": 24,
446                                    "column": 14,
447                                    "program": "switch_alive_1.ets"
448                                  }
449                                }
450                              },
451                              "loc": {
452                                "start": {
453                                  "line": 24,
454                                  "column": 4,
455                                  "program": "switch_alive_1.ets"
456                                },
457                                "end": {
458                                  "line": 24,
459                                  "column": 15,
460                                  "program": "switch_alive_1.ets"
461                                }
462                              }
463                            }
464                          ],
465                          "loc": {
466                            "start": {
467                              "line": 23,
468                              "column": 3,
469                              "program": "switch_alive_1.ets"
470                            },
471                            "end": {
472                              "line": 24,
473                              "column": 15,
474                              "program": "switch_alive_1.ets"
475                            }
476                          }
477                        }
478                      ],
479                      "loc": {
480                        "start": {
481                          "line": 18,
482                          "column": 2,
483                          "program": "switch_alive_1.ets"
484                        },
485                        "end": {
486                          "line": 25,
487                          "column": 3,
488                          "program": "switch_alive_1.ets"
489                        }
490                      }
491                    }
492                  ],
493                  "loc": {
494                    "start": {
495                      "line": 16,
496                      "column": 22,
497                      "program": "switch_alive_1.ets"
498                    },
499                    "end": {
500                      "line": 26,
501                      "column": 2,
502                      "program": "switch_alive_1.ets"
503                    }
504                  }
505                },
506                "loc": {
507                  "start": {
508                    "line": 16,
509                    "column": 10,
510                    "program": "switch_alive_1.ets"
511                  },
512                  "end": {
513                    "line": 26,
514                    "column": 2,
515                    "program": "switch_alive_1.ets"
516                  }
517                }
518              },
519              "loc": {
520                "start": {
521                  "line": 16,
522                  "column": 10,
523                  "program": "switch_alive_1.ets"
524                },
525                "end": {
526                  "line": 26,
527                  "column": 2,
528                  "program": "switch_alive_1.ets"
529                }
530              }
531            },
532            "overloads": [],
533            "decorators": [],
534            "loc": {
535              "start": {
536                "line": 16,
537                "column": 1,
538                "program": "switch_alive_1.ets"
539              },
540              "end": {
541                "line": 26,
542                "column": 2,
543                "program": "switch_alive_1.ets"
544              }
545            }
546          }
547        ],
548        "loc": {
549          "start": {
550            "line": 1,
551            "column": 1,
552            "program": "switch_alive_1.ets"
553          },
554          "end": {
555            "line": 1,
556            "column": 1,
557            "program": "switch_alive_1.ets"
558          }
559        }
560      },
561      "loc": {
562        "start": {
563          "line": 1,
564          "column": 1,
565          "program": "switch_alive_1.ets"
566        },
567        "end": {
568          "line": 1,
569          "column": 1,
570          "program": "switch_alive_1.ets"
571        }
572      }
573    }
574  ],
575  "loc": {
576    "start": {
577      "line": 1,
578      "column": 1,
579      "program": "switch_alive_1.ets"
580    },
581    "end": {
582      "line": 27,
583      "column": 1,
584      "program": "switch_alive_1.ets"
585    }
586  }
587}
588