Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/async-do-expressions/conditional-statement/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":83,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":2,"index":83}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":83,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":2,"index":83}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":83,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":2,"index":83}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":4,"end":82,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":5,"column":1,"index":82}},
17 "id": {
18 "type": "Identifier",
19 "start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5},"identifierName":"x"},
20 "name": "x"
21 },
22 "init": {
23 "type": "DoExpression",
24 "start":8,"end":82,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":5,"column":1,"index":82}},
25 "async": true,
26 "body": {
27 "type": "BlockStatement",
28 "start":17,"end":82,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":5,"column":1,"index":82}},
29 "body": [
30 {
31 "type": "IfStatement",
32 "start":21,"end":80,"loc":{"start":{"line":2,"column":2,"index":21},"end":{"line":4,"column":14,"index":80}},
33 "test": {
34 "type": "CallExpression",
35 "start":25,"end":30,"loc":{"start":{"line":2,"column":6,"index":25},"end":{"line":2,"column":11,"index":30}},
36 "callee": {
37 "type": "Identifier",
38 "start":25,"end":28,"loc":{"start":{"line":2,"column":6,"index":25},"end":{"line":2,"column":9,"index":28},"identifierName":"foo"},
39 "name": "foo"
40 },
41 "arguments": []
42 },
43 "consequent": {
44 "type": "BlockStatement",
45 "start":32,"end":39,"loc":{"start":{"line":2,"column":13,"index":32},"end":{"line":2,"column":20,"index":39}},
46 "body": [
47 {
48 "type": "ExpressionStatement",
49 "start":34,"end":37,"loc":{"start":{"line":2,"column":15,"index":34},"end":{"line":2,"column":18,"index":37}},
50 "expression": {
51 "type": "CallExpression",
52 "start":34,"end":37,"loc":{"start":{"line":2,"column":15,"index":34},"end":{"line":2,"column":18,"index":37}},
53 "callee": {
54 "type": "Identifier",
55 "start":34,"end":35,"loc":{"start":{"line":2,"column":15,"index":34},"end":{"line":2,"column":16,"index":35},"identifierName":"f"},
56 "name": "f"
57 },
58 "arguments": []
59 }
60 }
61 ],
62 "directives": []
63 },
64 "alternate": {
65 "type": "IfStatement",
66 "start":47,"end":80,"loc":{"start":{"line":3,"column":7,"index":47},"end":{"line":4,"column":14,"index":80}},
67 "test": {
68 "type": "CallExpression",
69 "start":51,"end":56,"loc":{"start":{"line":3,"column":11,"index":51},"end":{"line":3,"column":16,"index":56}},
70 "callee": {
71 "type": "Identifier",
72 "start":51,"end":54,"loc":{"start":{"line":3,"column":11,"index":51},"end":{"line":3,"column":14,"index":54},"identifierName":"bar"},
73 "name": "bar"
74 },
75 "arguments": []
76 },
77 "consequent": {
78 "type": "BlockStatement",
79 "start":58,"end":65,"loc":{"start":{"line":3,"column":18,"index":58},"end":{"line":3,"column":25,"index":65}},
80 "body": [
81 {
82 "type": "ExpressionStatement",
83 "start":60,"end":63,"loc":{"start":{"line":3,"column":20,"index":60},"end":{"line":3,"column":23,"index":63}},
84 "expression": {
85 "type": "CallExpression",
86 "start":60,"end":63,"loc":{"start":{"line":3,"column":20,"index":60},"end":{"line":3,"column":23,"index":63}},
87 "callee": {
88 "type": "Identifier",
89 "start":60,"end":61,"loc":{"start":{"line":3,"column":20,"index":60},"end":{"line":3,"column":21,"index":61},"identifierName":"g"},
90 "name": "g"
91 },
92 "arguments": []
93 }
94 }
95 ],
96 "directives": []
97 },
98 "alternate": {
99 "type": "BlockStatement",
100 "start":73,"end":80,"loc":{"start":{"line":4,"column":7,"index":73},"end":{"line":4,"column":14,"index":80}},
101 "body": [
102 {
103 "type": "ExpressionStatement",
104 "start":75,"end":78,"loc":{"start":{"line":4,"column":9,"index":75},"end":{"line":4,"column":12,"index":78}},
105 "expression": {
106 "type": "CallExpression",
107 "start":75,"end":78,"loc":{"start":{"line":4,"column":9,"index":75},"end":{"line":4,"column":12,"index":78}},
108 "callee": {
109 "type": "Identifier",
110 "start":75,"end":76,"loc":{"start":{"line":4,"column":9,"index":75},"end":{"line":4,"column":10,"index":76},"identifierName":"h"},
111 "name": "h"
112 },
113 "arguments": []
114 }
115 }
116 ],
117 "directives": []
118 }
119 }
120 }
121 ],
122 "directives": []
123 }
124 }
125 }
126 ],
127 "kind": "let"
128 }
129 ],
130 "directives": []
131 }
132 }