Debian Codegraph @

packages/babel-parser/test/fixtures/comments/basic/surrounding-while-loop-comments/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":68,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":68,"index":68}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":68,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":68,"index":68}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "FunctionDeclaration",
12 "start":0,"end":68,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":68,"index":68}},
13 "id": {
14 "type": "Identifier",
15 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"f"},
16 "name": "f"
17 },
18 "generator": false,
19 "async": false,
20 "params": [],
21 "body": {
22 "type": "BlockStatement",
23 "start":13,"end":68,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":68,"index":68}},
24 "body": [
25 {
26 "type": "WhileStatement",
27 "start":30,"end":46,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":46,"index":46}},
28 "test": {
29 "type": "BooleanLiteral",
30 "start":37,"end":41,"loc":{"start":{"line":1,"column":37,"index":37},"end":{"line":1,"column":41,"index":41}},
31 "value": true
32 },
33 "body": {
34 "type": "BlockStatement",
35 "start":43,"end":46,"loc":{"start":{"line":1,"column":43,"index":43},"end":{"line":1,"column":46,"index":46}},
36 "body": [],
37 "directives": []
38 },
39 "trailingComments": [
40 {
41 "type": "CommentBlock",
42 "value": " bar ",
43 "start":47,"end":56,"loc":{"start":{"line":1,"column":47,"index":47},"end":{"line":1,"column":56,"index":56}}
44 }
45 ],
46 "leadingComments": [
47 {
48 "type": "CommentBlock",
49 "value": " infinite ",
50 "start":15,"end":29,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":29,"index":29}}
51 }
52 ]
53 },
54 {
55 "type": "VariableDeclaration",
56 "start":57,"end":66,"loc":{"start":{"line":1,"column":57,"index":57},"end":{"line":1,"column":66,"index":66}},
57 "declarations": [
58 {
59 "type": "VariableDeclarator",
60 "start":61,"end":65,"loc":{"start":{"line":1,"column":61,"index":61},"end":{"line":1,"column":65,"index":65}},
61 "id": {
62 "type": "Identifier",
63 "start":61,"end":65,"loc":{"start":{"line":1,"column":61,"index":61},"end":{"line":1,"column":65,"index":65},"identifierName":"each"},
64 "name": "each"
65 },
66 "init": null
67 }
68 ],
69 "kind": "var",
70 "leadingComments": [
71 {
72 "type": "CommentBlock",
73 "value": " bar ",
74 "start":47,"end":56,"loc":{"start":{"line":1,"column":47,"index":47},"end":{"line":1,"column":56,"index":56}}
75 }
76 ]
77 }
78 ],
79 "directives": []
80 }
81 }
82 ],
83 "directives": []
84 },
85 "comments": [
86 {
87 "type": "CommentBlock",
88 "value": " infinite ",
89 "start":15,"end":29,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":29,"index":29}}
90 },
91 {
92 "type": "CommentBlock",
93 "value": " bar ",
94 "start":47,"end":56,"loc":{"start":{"line":1,"column":47,"index":47},"end":{"line":1,"column":56,"index":56}}
95 }
96 ]
97 }