Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/pipeline-operator/hack-double-at-proposal-do-transform-switch-statement-and-topic-in-switch-body/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":97,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":97}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":97,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":97}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExpressionStatement",
12 "start":0,"end":97,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":97}},
13 "expression": {
14 "type": "BinaryExpression",
15 "start":0,"end":97,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":97}},
16 "left": {
17 "type": "Identifier",
18 "start":0,"end":5,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":5,"index":5},"identifierName":"value"},
19 "name": "value"
20 },
21 "operator": "|>",
22 "right": {
23 "type": "DoExpression",
24 "start":9,"end":97,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":7,"column":1,"index":97}},
25 "async": false,
26 "body": {
27 "type": "BlockStatement",
28 "start":12,"end":97,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":7,"column":1,"index":97}},
29 "body": [
30 {
31 "type": "SwitchStatement",
32 "start":16,"end":95,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":6,"column":3,"index":95}},
33 "discriminant": {
34 "type": "Identifier",
35 "start":24,"end":30,"loc":{"start":{"line":2,"column":10,"index":24},"end":{"line":2,"column":16,"index":30},"identifierName":"number"},
36 "name": "number"
37 },
38 "cases": [
39 {
40 "type": "SwitchCase",
41 "start":38,"end":49,"loc":{"start":{"line":3,"column":4,"index":38},"end":{"line":3,"column":15,"index":49}},
42 "consequent": [
43 {
44 "type": "ExpressionStatement",
45 "start":46,"end":49,"loc":{"start":{"line":3,"column":12,"index":46},"end":{"line":3,"column":15,"index":49}},
46 "expression": {
47 "type": "TopicReference",
48 "start":46,"end":48,"loc":{"start":{"line":3,"column":12,"index":46},"end":{"line":3,"column":14,"index":48}}
49 }
50 }
51 ],
52 "test": {
53 "type": "NumericLiteral",
54 "start":43,"end":44,"loc":{"start":{"line":3,"column":9,"index":43},"end":{"line":3,"column":10,"index":44}},
55 "extra": {
56 "rawValue": 0,
57 "raw": "0"
58 },
59 "value": 0
60 }
61 },
62 {
63 "type": "SwitchCase",
64 "start":54,"end":69,"loc":{"start":{"line":4,"column":4,"index":54},"end":{"line":4,"column":19,"index":69}},
65 "consequent": [
66 {
67 "type": "ExpressionStatement",
68 "start":62,"end":69,"loc":{"start":{"line":4,"column":12,"index":62},"end":{"line":4,"column":19,"index":69}},
69 "expression": {
70 "type": "BinaryExpression",
71 "start":62,"end":68,"loc":{"start":{"line":4,"column":12,"index":62},"end":{"line":4,"column":18,"index":68}},
72 "left": {
73 "type": "TopicReference",
74 "start":62,"end":64,"loc":{"start":{"line":4,"column":12,"index":62},"end":{"line":4,"column":14,"index":64}}
75 },
76 "operator": "+",
77 "right": {
78 "type": "NumericLiteral",
79 "start":67,"end":68,"loc":{"start":{"line":4,"column":17,"index":67},"end":{"line":4,"column":18,"index":68}},
80 "extra": {
81 "rawValue": 1,
82 "raw": "1"
83 },
84 "value": 1
85 }
86 }
87 }
88 ],
89 "test": {
90 "type": "NumericLiteral",
91 "start":59,"end":60,"loc":{"start":{"line":4,"column":9,"index":59},"end":{"line":4,"column":10,"index":60}},
92 "extra": {
93 "rawValue": 1,
94 "raw": "1"
95 },
96 "value": 1
97 }
98 },
99 {
100 "type": "SwitchCase",
101 "start":74,"end":91,"loc":{"start":{"line":5,"column":4,"index":74},"end":{"line":5,"column":21,"index":91}},
102 "consequent": [
103 {
104 "type": "ExpressionStatement",
105 "start":83,"end":91,"loc":{"start":{"line":5,"column":13,"index":83},"end":{"line":5,"column":21,"index":91}},
106 "expression": {
107 "type": "BinaryExpression",
108 "start":83,"end":90,"loc":{"start":{"line":5,"column":13,"index":83},"end":{"line":5,"column":20,"index":90}},
109 "left": {
110 "type": "TopicReference",
111 "start":83,"end":85,"loc":{"start":{"line":5,"column":13,"index":83},"end":{"line":5,"column":15,"index":85}}
112 },
113 "operator": "+",
114 "right": {
115 "type": "NumericLiteral",
116 "start":88,"end":90,"loc":{"start":{"line":5,"column":18,"index":88},"end":{"line":5,"column":20,"index":90}},
117 "extra": {
118 "rawValue": 10,
119 "raw": "10"
120 },
121 "value": 10
122 }
123 }
124 }
125 ],
126 "test": null
127 }
128 ]
129 }
130 ],
131 "directives": []
132 }
133 }
134 }
135 }
136 ],
137 "directives": []
138 }
139 }