Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/pipeline-operator/smart-proposal-do-transform-switch-statement-and-topic-in-switch-head/output.json

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