Debian Codegraph @

packages/babel-parser/test/fixtures/flow/comment/spread/output.json

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