Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":59,"index":59}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":59,"index":59}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExpressionStatement",
12 "start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":59,"index":59}},
13 "expression": {
14 "type": "BinaryExpression",
15 "start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":59,"index":59}},
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":59,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":59,"index":59}},
25 "expression": {
26 "type": "DoExpression",
27 "start":9,"end":59,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":59,"index":59}},
28 "async": false,
29 "body": {
30 "type": "BlockStatement",
31 "start":12,"end":59,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":59,"index":59}},
32 "body": [
33 {
34 "type": "ForStatement",
35 "start":14,"end":57,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":57,"index":57}},
36 "init": {
37 "type": "VariableDeclaration",
38 "start":19,"end":28,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":28,"index":28}},
39 "declarations": [
40 {
41 "type": "VariableDeclarator",
42 "start":23,"end":28,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":28,"index":28}},
43 "id": {
44 "type": "Identifier",
45 "start":23,"end":24,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":24,"index":24},"identifierName":"i"},
46 "name": "i"
47 },
48 "init": {
49 "type": "PipelinePrimaryTopicReference",
50 "start":27,"end":28,"loc":{"start":{"line":1,"column":27,"index":27},"end":{"line":1,"column":28,"index":28}}
51 }
52 }
53 ],
54 "kind": "let"
55 },
56 "test": {
57 "type": "CallExpression",
58 "start":30,"end":45,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":45,"index":45}},
59 "callee": {
60 "type": "Identifier",
61 "start":30,"end":39,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":39,"index":39},"identifierName":"predicate"},
62 "name": "predicate"
63 },
64 "arguments": [
65 {
66 "type": "Identifier",
67 "start":40,"end":41,"loc":{"start":{"line":1,"column":40,"index":40},"end":{"line":1,"column":41,"index":41},"identifierName":"i"},
68 "name": "i"
69 },
70 {
71 "type": "PipelinePrimaryTopicReference",
72 "start":43,"end":44,"loc":{"start":{"line":1,"column":43,"index":43},"end":{"line":1,"column":44,"index":44}}
73 }
74 ]
75 },
76 "update": {
77 "type": "AssignmentExpression",
78 "start":47,"end":53,"loc":{"start":{"line":1,"column":47,"index":47},"end":{"line":1,"column":53,"index":53}},
79 "operator": "+=",
80 "left": {
81 "type": "Identifier",
82 "start":47,"end":48,"loc":{"start":{"line":1,"column":47,"index":47},"end":{"line":1,"column":48,"index":48},"identifierName":"i"},
83 "name": "i"
84 },
85 "right": {
86 "type": "PipelinePrimaryTopicReference",
87 "start":52,"end":53,"loc":{"start":{"line":1,"column":52,"index":52},"end":{"line":1,"column":53,"index":53}}
88 }
89 },
90 "body": {
91 "type": "ExpressionStatement",
92 "start":55,"end":57,"loc":{"start":{"line":1,"column":55,"index":55},"end":{"line":1,"column":57,"index":57}},
93 "expression": {
94 "type": "Identifier",
95 "start":55,"end":56,"loc":{"start":{"line":1,"column":55,"index":55},"end":{"line":1,"column":56,"index":56},"identifierName":"i"},
96 "name": "i"
97 }
98 }
99 }
100 ],
101 "directives": []
102 }
103 }
104 }
105 }
106 }
107 ],
108 "directives": []
109 }
110 }