Debian Codegraph @

packages/babel-parser/test/fixtures/comments/basic/object-method/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":98,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":98,"index":98}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":98,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":98,"index":98}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExpressionStatement",
12 "start":0,"end":98,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":98,"index":98}},
13 "expression": {
14 "type": "ObjectExpression",
15 "start":9,"end":87,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":87,"index":87}},
16 "properties": [
17 {
18 "type": "ObjectMethod",
19 "start":19,"end":77,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":77,"index":77}},
20 "method": true,
21 "key": {
22 "type": "Identifier",
23 "start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20},"identifierName":"f"},
24 "name": "f",
25 "trailingComments": [
26 {
27 "type": "CommentBlock",
28 "value": " 3 ",
29 "start":21,"end":28,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":28,"index":28}}
30 }
31 ]
32 },
33 "computed": false,
34 "kind": "method",
35 "id": null,
36 "generator": false,
37 "async": false,
38 "params": [
39 {
40 "type": "Identifier",
41 "start":38,"end":39,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":39,"index":39},"identifierName":"a"},
42 "name": "a",
43 "trailingComments": [
44 {
45 "type": "CommentBlock",
46 "value": " 5 ",
47 "start":40,"end":47,"loc":{"start":{"line":1,"column":40,"index":40},"end":{"line":1,"column":47,"index":47}}
48 },
49 {
50 "type": "CommentBlock",
51 "value": " 6 ",
52 "start":49,"end":56,"loc":{"start":{"line":1,"column":49,"index":49},"end":{"line":1,"column":56,"index":56}}
53 }
54 ],
55 "leadingComments": [
56 {
57 "type": "CommentBlock",
58 "value": " 4 ",
59 "start":30,"end":37,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":37,"index":37}}
60 }
61 ]
62 }
63 ],
64 "body": {
65 "type": "BlockStatement",
66 "start":66,"end":77,"loc":{"start":{"line":1,"column":66,"index":66},"end":{"line":1,"column":77,"index":77}},
67 "body": [],
68 "directives": [],
69 "innerComments": [
70 {
71 "type": "CommentBlock",
72 "value": " 8 ",
73 "start":68,"end":75,"loc":{"start":{"line":1,"column":68,"index":68},"end":{"line":1,"column":75,"index":75}}
74 }
75 ],
76 "leadingComments": [
77 {
78 "type": "CommentBlock",
79 "value": " 7 ",
80 "start":58,"end":65,"loc":{"start":{"line":1,"column":58,"index":58},"end":{"line":1,"column":65,"index":65}}
81 }
82 ]
83 },
84 "trailingComments": [
85 {
86 "type": "CommentBlock",
87 "value": " 9 ",
88 "start":78,"end":85,"loc":{"start":{"line":1,"column":78,"index":78},"end":{"line":1,"column":85,"index":85}}
89 }
90 ],
91 "leadingComments": [
92 {
93 "type": "CommentBlock",
94 "value": " 2 ",
95 "start":11,"end":18,"loc":{"start":{"line":1,"column":11,"index":11},"end":{"line":1,"column":18,"index":18}}
96 }
97 ]
98 }
99 ],
100 "extra": {
101 "parenthesized": true,
102 "parenStart": 0
103 },
104 "trailingComments": [
105 {
106 "type": "CommentBlock",
107 "value": " 10 ",
108 "start":88,"end":96,"loc":{"start":{"line":1,"column":88,"index":88},"end":{"line":1,"column":96,"index":96}}
109 }
110 ],
111 "leadingComments": [
112 {
113 "type": "CommentBlock",
114 "value": " 1 ",
115 "start":1,"end":8,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":8,"index":8}}
116 }
117 ]
118 }
119 }
120 ],
121 "directives": []
122 },
123 "comments": [
124 {
125 "type": "CommentBlock",
126 "value": " 1 ",
127 "start":1,"end":8,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":8,"index":8}}
128 },
129 {
130 "type": "CommentBlock",
131 "value": " 2 ",
132 "start":11,"end":18,"loc":{"start":{"line":1,"column":11,"index":11},"end":{"line":1,"column":18,"index":18}}
133 },
134 {
135 "type": "CommentBlock",
136 "value": " 3 ",
137 "start":21,"end":28,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":28,"index":28}}
138 },
139 {
140 "type": "CommentBlock",
141 "value": " 4 ",
142 "start":30,"end":37,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":37,"index":37}}
143 },
144 {
145 "type": "CommentBlock",
146 "value": " 5 ",
147 "start":40,"end":47,"loc":{"start":{"line":1,"column":40,"index":40},"end":{"line":1,"column":47,"index":47}}
148 },
149 {
150 "type": "CommentBlock",
151 "value": " 6 ",
152 "start":49,"end":56,"loc":{"start":{"line":1,"column":49,"index":49},"end":{"line":1,"column":56,"index":56}}
153 },
154 {
155 "type": "CommentBlock",
156 "value": " 7 ",
157 "start":58,"end":65,"loc":{"start":{"line":1,"column":58,"index":58},"end":{"line":1,"column":65,"index":65}}
158 },
159 {
160 "type": "CommentBlock",
161 "value": " 8 ",
162 "start":68,"end":75,"loc":{"start":{"line":1,"column":68,"index":68},"end":{"line":1,"column":75,"index":75}}
163 },
164 {
165 "type": "CommentBlock",
166 "value": " 9 ",
167 "start":78,"end":85,"loc":{"start":{"line":1,"column":78,"index":78},"end":{"line":1,"column":85,"index":85}}
168 },
169 {
170 "type": "CommentBlock",
171 "value": " 10 ",
172 "start":88,"end":96,"loc":{"start":{"line":1,"column":88,"index":88},"end":{"line":1,"column":96,"index":96}}
173 }
174 ]
175 }