Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/pipeline-operator/smart-proposal-do-transform-while-loop-topic-in-loop-body/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":38,"index":38}},
4 "errors": [
5 "SyntaxError: Topic reference was used in a lexical context without topic binding. (1:34)",
6 "SyntaxError: Pipeline is in topic style but does not use topic reference. (1:9)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":38,"index":38}},
11 "sourceType": "script",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ExpressionStatement",
16 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":38,"index":38}},
17 "expression": {
18 "type": "BinaryExpression",
19 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":38,"index":38}},
20 "left": {
21 "type": "Identifier",
22 "start":0,"end":5,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":5,"index":5},"identifierName":"value"},
23 "name": "value"
24 },
25 "operator": "|>",
26 "right": {
27 "type": "PipelineTopicExpression",
28 "start":9,"end":38,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":38,"index":38}},
29 "expression": {
30 "type": "DoExpression",
31 "start":9,"end":38,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":38,"index":38}},
32 "async": false,
33 "body": {
34 "type": "BlockStatement",
35 "start":12,"end":38,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":38,"index":38}},
36 "body": [
37 {
38 "type": "WhileStatement",
39 "start":14,"end":36,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":36,"index":36}},
40 "test": {
41 "type": "BinaryExpression",
42 "start":21,"end":27,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":27,"index":27}},
43 "left": {
44 "type": "Identifier",
45 "start":21,"end":22,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":22,"index":22},"identifierName":"x"},
46 "name": "x"
47 },
48 "operator": "<",
49 "right": {
50 "type": "NumericLiteral",
51 "start":25,"end":27,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":27,"index":27}},
52 "extra": {
53 "rawValue": 50,
54 "raw": "50"
55 },
56 "value": 50
57 }
58 },
59 "body": {
60 "type": "ExpressionStatement",
61 "start":29,"end":36,"loc":{"start":{"line":1,"column":29,"index":29},"end":{"line":1,"column":36,"index":36}},
62 "expression": {
63 "type": "AssignmentExpression",
64 "start":29,"end":35,"loc":{"start":{"line":1,"column":29,"index":29},"end":{"line":1,"column":35,"index":35}},
65 "operator": "+=",
66 "left": {
67 "type": "Identifier",
68 "start":29,"end":30,"loc":{"start":{"line":1,"column":29,"index":29},"end":{"line":1,"column":30,"index":30},"identifierName":"x"},
69 "name": "x"
70 },
71 "right": {
72 "type": "PipelinePrimaryTopicReference",
73 "start":34,"end":35,"loc":{"start":{"line":1,"column":34,"index":34},"end":{"line":1,"column":35,"index":35}}
74 }
75 }
76 }
77 }
78 ],
79 "directives": []
80 }
81 }
82 }
83 }
84 }
85 ],
86 "directives": []
87 }
88 }