Debian Codegraph @

packages/babel-parser/test/fixtures/comments/attachComment-false/array-expression-trailing-comma/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":229,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":18,"column":10,"index":229}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":229,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":18,"column":10,"index":229}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":76,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":76}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":6,"end":76,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":6,"column":1,"index":76}},
17 "id": {
18 "type": "Identifier",
19 "start":6,"end":17,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":17,"index":17},"identifierName":"nonTrailing"},
20 "name": "nonTrailing"
21 },
22 "init": {
23 "type": "ArrayExpression",
24 "start":20,"end":76,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":6,"column":1,"index":76}},
25 "elements": [
26 {
27 "type": "StringLiteral",
28 "start":24,"end":29,"loc":{"start":{"line":2,"column":2,"index":24},"end":{"line":2,"column":7,"index":29}},
29 "extra": {
30 "rawValue": "One",
31 "raw": "\"One\""
32 },
33 "value": "One"
34 },
35 {
36 "type": "StringLiteral",
37 "start":50,"end":55,"loc":{"start":{"line":4,"column":2,"index":50},"end":{"line":4,"column":7,"index":55}},
38 "extra": {
39 "rawValue": "Two",
40 "raw": "\"Two\""
41 },
42 "value": "Two"
43 }
44 ]
45 }
46 }
47 ],
48 "kind": "const"
49 },
50 {
51 "type": "VariableDeclaration",
52 "start":78,"end":162,"loc":{"start":{"line":8,"column":0,"index":78},"end":{"line":13,"column":1,"index":162}},
53 "declarations": [
54 {
55 "type": "VariableDeclarator",
56 "start":84,"end":162,"loc":{"start":{"line":8,"column":6,"index":84},"end":{"line":13,"column":1,"index":162}},
57 "id": {
58 "type": "Identifier",
59 "start":84,"end":102,"loc":{"start":{"line":8,"column":6,"index":84},"end":{"line":8,"column":24,"index":102},"identifierName":"trailingAfterComma"},
60 "name": "trailingAfterComma"
61 },
62 "init": {
63 "type": "ArrayExpression",
64 "start":105,"end":162,"loc":{"start":{"line":8,"column":27,"index":105},"end":{"line":13,"column":1,"index":162}},
65 "extra": {
66 "trailingComma": 140
67 },
68 "elements": [
69 {
70 "type": "StringLiteral",
71 "start":109,"end":114,"loc":{"start":{"line":9,"column":2,"index":109},"end":{"line":9,"column":7,"index":114}},
72 "extra": {
73 "rawValue": "One",
74 "raw": "\"One\""
75 },
76 "value": "One"
77 },
78 {
79 "type": "StringLiteral",
80 "start":135,"end":140,"loc":{"start":{"line":11,"column":2,"index":135},"end":{"line":11,"column":7,"index":140}},
81 "extra": {
82 "rawValue": "Two",
83 "raw": "\"Two\""
84 },
85 "value": "Two"
86 }
87 ]
88 }
89 }
90 ],
91 "kind": "const"
92 },
93 {
94 "type": "VariableDeclaration",
95 "start":164,"end":220,"loc":{"start":{"line":15,"column":0,"index":164},"end":{"line":18,"column":1,"index":220}},
96 "declarations": [
97 {
98 "type": "VariableDeclarator",
99 "start":170,"end":220,"loc":{"start":{"line":15,"column":6,"index":170},"end":{"line":18,"column":1,"index":220}},
100 "id": {
101 "type": "Identifier",
102 "start":170,"end":188,"loc":{"start":{"line":15,"column":6,"index":170},"end":{"line":15,"column":24,"index":188},"identifierName":"trailingAfterArray"},
103 "name": "trailingAfterArray"
104 },
105 "init": {
106 "type": "ArrayExpression",
107 "start":191,"end":220,"loc":{"start":{"line":15,"column":27,"index":191},"end":{"line":18,"column":1,"index":220}},
108 "extra": {
109 "trailingComma": 200
110 },
111 "elements": [
112 {
113 "type": "StringLiteral",
114 "start":195,"end":200,"loc":{"start":{"line":16,"column":2,"index":195},"end":{"line":16,"column":7,"index":200}},
115 "extra": {
116 "rawValue": "One",
117 "raw": "\"One\""
118 },
119 "value": "One"
120 }
121 ]
122 }
123 }
124 ],
125 "kind": "const"
126 }
127 ],
128 "directives": []
129 },
130 "comments": [
131 {
132 "type": "CommentLine",
133 "value": " One",
134 "start":31,"end":37,"loc":{"start":{"line":2,"column":9,"index":31},"end":{"line":2,"column":15,"index":37}}
135 },
136 {
137 "type": "CommentLine",
138 "value": " Two",
139 "start":41,"end":47,"loc":{"start":{"line":3,"column":3,"index":41},"end":{"line":3,"column":9,"index":47}}
140 },
141 {
142 "type": "CommentLine",
143 "value": " Three",
144 "start":56,"end":64,"loc":{"start":{"line":4,"column":8,"index":56},"end":{"line":4,"column":16,"index":64}}
145 },
146 {
147 "type": "CommentLine",
148 "value": " Four",
149 "start":67,"end":74,"loc":{"start":{"line":5,"column":2,"index":67},"end":{"line":5,"column":9,"index":74}}
150 },
151 {
152 "type": "CommentLine",
153 "value": " One",
154 "start":116,"end":122,"loc":{"start":{"line":9,"column":9,"index":116},"end":{"line":9,"column":15,"index":122}}
155 },
156 {
157 "type": "CommentLine",
158 "value": " Two",
159 "start":126,"end":132,"loc":{"start":{"line":10,"column":3,"index":126},"end":{"line":10,"column":9,"index":132}}
160 },
161 {
162 "type": "CommentLine",
163 "value": " Three",
164 "start":142,"end":150,"loc":{"start":{"line":11,"column":9,"index":142},"end":{"line":11,"column":17,"index":150}}
165 },
166 {
167 "type": "CommentLine",
168 "value": " Four",
169 "start":153,"end":160,"loc":{"start":{"line":12,"column":2,"index":153},"end":{"line":12,"column":9,"index":160}}
170 },
171 {
172 "type": "CommentLine",
173 "value": " One",
174 "start":202,"end":208,"loc":{"start":{"line":16,"column":9,"index":202},"end":{"line":16,"column":15,"index":208}}
175 },
176 {
177 "type": "CommentLine",
178 "value": " Two",
179 "start":212,"end":218,"loc":{"start":{"line":17,"column":3,"index":212},"end":{"line":17,"column":9,"index":218}}
180 },
181 {
182 "type": "CommentLine",
183 "value": " Three",
184 "start":221,"end":229,"loc":{"start":{"line":18,"column":2,"index":221},"end":{"line":18,"column":10,"index":229}}
185 }
186 ]
187 }