Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/pipeline-operator/hack-percent-proposal-no-topic-function-expression/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}},
4 "errors": [
5 "SyntaxError: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:9)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ExpressionStatement",
15 "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}},
16 "expression": {
17 "type": "BinaryExpression",
18 "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}},
19 "left": {
20 "type": "Identifier",
21 "start":0,"end":5,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":5,"index":5},"identifierName":"value"},
22 "name": "value"
23 },
24 "operator": "|>",
25 "right": {
26 "type": "FunctionExpression",
27 "start":9,"end":33,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":33,"index":33}},
28 "id": null,
29 "generator": false,
30 "async": false,
31 "params": [
32 {
33 "type": "Identifier",
34 "start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20},"identifierName":"x"},
35 "name": "x"
36 }
37 ],
38 "body": {
39 "type": "BlockStatement",
40 "start":22,"end":33,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":33,"index":33}},
41 "body": [
42 {
43 "type": "ReturnStatement",
44 "start":24,"end":31,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":31,"index":31}},
45 "argument": null
46 }
47 ],
48 "directives": []
49 }
50 }
51 }
52 }
53 ],
54 "directives": []
55 }
56 }