• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "VariableDeclaration",
6      "declarations": [
7        {
8          "type": "VariableDeclarator",
9          "id": {
10            "type": "Identifier",
11            "name": "arg",
12            "decorators": [],
13            "loc": {
14              "start": {
15                "line": 16,
16                "column": 5,
17                "program": "switch_statement.ts"
18              },
19              "end": {
20                "line": 16,
21                "column": 8,
22                "program": "switch_statement.ts"
23              }
24            }
25          },
26          "init": {
27            "type": "UnaryExpression",
28            "operator": "-",
29            "prefix": true,
30            "argument": {
31              "type": "NumberLiteral",
32              "value": 1,
33              "loc": {
34                "start": {
35                  "line": 16,
36                  "column": 12,
37                  "program": "switch_statement.ts"
38                },
39                "end": {
40                  "line": 16,
41                  "column": 13,
42                  "program": "switch_statement.ts"
43                }
44              }
45            },
46            "loc": {
47              "start": {
48                "line": 16,
49                "column": 11,
50                "program": "switch_statement.ts"
51              },
52              "end": {
53                "line": 16,
54                "column": 13,
55                "program": "switch_statement.ts"
56              }
57            }
58          },
59          "loc": {
60            "start": {
61              "line": 16,
62              "column": 5,
63              "program": "switch_statement.ts"
64            },
65            "end": {
66              "line": 16,
67              "column": 13,
68              "program": "switch_statement.ts"
69            }
70          }
71        }
72      ],
73      "kind": "var",
74      "loc": {
75        "start": {
76          "line": 16,
77          "column": 1,
78          "program": "switch_statement.ts"
79        },
80        "end": {
81          "line": 16,
82          "column": 14,
83          "program": "switch_statement.ts"
84        }
85      }
86    },
87    {
88      "type": "SwitchStatement",
89      "discriminant": {
90        "type": "Identifier",
91        "name": "arg",
92        "decorators": [],
93        "loc": {
94          "start": {
95            "line": 17,
96            "column": 9,
97            "program": "switch_statement.ts"
98          },
99          "end": {
100            "line": 17,
101            "column": 12,
102            "program": "switch_statement.ts"
103          }
104        }
105      },
106      "cases": [
107        {
108          "type": "SwitchCase",
109          "test": {
110            "type": "NumberLiteral",
111            "value": 0,
112            "loc": {
113              "start": {
114                "line": 18,
115                "column": 6,
116                "program": "switch_statement.ts"
117              },
118              "end": {
119                "line": 18,
120                "column": 7,
121                "program": "switch_statement.ts"
122              }
123            }
124          },
125          "consequent": [],
126          "loc": {
127            "start": {
128              "line": 18,
129              "column": 1,
130              "program": "switch_statement.ts"
131            },
132            "end": {
133              "line": 18,
134              "column": 8,
135              "program": "switch_statement.ts"
136            }
137          }
138        },
139        {
140          "type": "SwitchCase",
141          "test": {
142            "type": "NumberLiteral",
143            "value": 1,
144            "loc": {
145              "start": {
146                "line": 19,
147                "column": 6,
148                "program": "switch_statement.ts"
149              },
150              "end": {
151                "line": 19,
152                "column": 7,
153                "program": "switch_statement.ts"
154              }
155            }
156          },
157          "consequent": [],
158          "loc": {
159            "start": {
160              "line": 19,
161              "column": 1,
162              "program": "switch_statement.ts"
163            },
164            "end": {
165              "line": 19,
166              "column": 8,
167              "program": "switch_statement.ts"
168            }
169          }
170        },
171        {
172          "type": "SwitchCase",
173          "test": null,
174          "consequent": [
175            {
176              "type": "ExpressionStatement",
177              "expression": {
178                "type": "AssignmentExpression",
179                "operator": "=",
180                "left": {
181                  "type": "Identifier",
182                  "name": "arg",
183                  "decorators": [],
184                  "loc": {
185                    "start": {
186                      "line": 21,
187                      "column": 4,
188                      "program": "switch_statement.ts"
189                    },
190                    "end": {
191                      "line": 21,
192                      "column": 7,
193                      "program": "switch_statement.ts"
194                    }
195                  }
196                },
197                "right": {
198                  "type": "NumberLiteral",
199                  "value": 1,
200                  "loc": {
201                    "start": {
202                      "line": 21,
203                      "column": 8,
204                      "program": "switch_statement.ts"
205                    },
206                    "end": {
207                      "line": 21,
208                      "column": 9,
209                      "program": "switch_statement.ts"
210                    }
211                  }
212                },
213                "loc": {
214                  "start": {
215                    "line": 21,
216                    "column": 4,
217                    "program": "switch_statement.ts"
218                  },
219                  "end": {
220                    "line": 21,
221                    "column": 9,
222                    "program": "switch_statement.ts"
223                  }
224                }
225              },
226              "loc": {
227                "start": {
228                  "line": 21,
229                  "column": 4,
230                  "program": "switch_statement.ts"
231                },
232                "end": {
233                  "line": 21,
234                  "column": 9,
235                  "program": "switch_statement.ts"
236                }
237              }
238            },
239            {
240              "type": "BreakStatement",
241              "label": null,
242              "loc": {
243                "start": {
244                  "line": 22,
245                  "column": 4,
246                  "program": "switch_statement.ts"
247                },
248                "end": {
249                  "line": 22,
250                  "column": 10,
251                  "program": "switch_statement.ts"
252                }
253              }
254            }
255          ],
256          "loc": {
257            "start": {
258              "line": 20,
259              "column": 1,
260              "program": "switch_statement.ts"
261            },
262            "end": {
263              "line": 22,
264              "column": 10,
265              "program": "switch_statement.ts"
266            }
267          }
268        }
269      ],
270      "loc": {
271        "start": {
272          "line": 17,
273          "column": 1,
274          "program": "switch_statement.ts"
275        },
276        "end": {
277          "line": 23,
278          "column": 2,
279          "program": "switch_statement.ts"
280        }
281      }
282    }
283  ],
284  "loc": {
285    "start": {
286      "line": 1,
287      "column": 1,
288      "program": "switch_statement.ts"
289    },
290    "end": {
291      "line": 24,
292      "column": 1,
293      "program": "switch_statement.ts"
294    }
295  }
296}
297