Debian Codegraph @

packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":44,"index":66}},
4 "errors": [
5 "SyntaxError: Identifier 'foo' has already been declared. (2:30)",
6 "SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:30)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":44,"index":66}},
11 "sourceType": "module",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ExportNamedDeclaration",
16 "start":0,"end":21,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":21,"index":21}},
17 "specifiers": [],
18 "source": null,
19 "declaration": {
20 "type": "VariableDeclaration",
21 "start":7,"end":21,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":21,"index":21}},
22 "declarations": [
23 {
24 "type": "VariableDeclarator",
25 "start":13,"end":20,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":20,"index":20}},
26 "id": {
27 "type": "Identifier",
28 "start":13,"end":16,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":16,"index":16},"identifierName":"foo"},
29 "name": "foo"
30 },
31 "init": {
32 "type": "NumericLiteral",
33 "start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20}},
34 "extra": {
35 "rawValue": 1,
36 "raw": "1"
37 },
38 "value": 1
39 }
40 }
41 ],
42 "kind": "const"
43 }
44 },
45 {
46 "type": "ExportNamedDeclaration",
47 "start":22,"end":66,"loc":{"start":{"line":2,"column":0,"index":22},"end":{"line":2,"column":44,"index":66}},
48 "specifiers": [],
49 "source": null,
50 "declaration": {
51 "type": "VariableDeclaration",
52 "start":29,"end":66,"loc":{"start":{"line":2,"column":7,"index":29},"end":{"line":2,"column":44,"index":66}},
53 "declarations": [
54 {
55 "type": "VariableDeclarator",
56 "start":35,"end":65,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":43,"index":65}},
57 "id": {
58 "type": "ObjectPattern",
59 "start":35,"end":59,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":37,"index":59}},
60 "properties": [
61 {
62 "type": "ObjectProperty",
63 "start":37,"end":57,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":35,"index":57}},
64 "key": {
65 "type": "Identifier",
66 "start":37,"end":40,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":18,"index":40},"identifierName":"bar"},
67 "name": "bar"
68 },
69 "computed": false,
70 "method": false,
71 "shorthand": false,
72 "value": {
73 "type": "ObjectPattern",
74 "start":42,"end":57,"loc":{"start":{"line":2,"column":20,"index":42},"end":{"line":2,"column":35,"index":57}},
75 "properties": [
76 {
77 "type": "ObjectProperty",
78 "start":44,"end":47,"loc":{"start":{"line":2,"column":22,"index":44},"end":{"line":2,"column":25,"index":47}},
79 "key": {
80 "type": "Identifier",
81 "start":44,"end":47,"loc":{"start":{"line":2,"column":22,"index":44},"end":{"line":2,"column":25,"index":47},"identifierName":"baz"},
82 "name": "baz"
83 },
84 "computed": false,
85 "method": false,
86 "shorthand": true,
87 "value": {
88 "type": "Identifier",
89 "start":44,"end":47,"loc":{"start":{"line":2,"column":22,"index":44},"end":{"line":2,"column":25,"index":47},"identifierName":"baz"},
90 "name": "baz"
91 },
92 "extra": {
93 "shorthand": true
94 }
95 },
96 {
97 "type": "RestElement",
98 "start":49,"end":55,"loc":{"start":{"line":2,"column":27,"index":49},"end":{"line":2,"column":33,"index":55}},
99 "argument": {
100 "type": "Identifier",
101 "start":52,"end":55,"loc":{"start":{"line":2,"column":30,"index":52},"end":{"line":2,"column":33,"index":55},"identifierName":"foo"},
102 "name": "foo"
103 }
104 }
105 ]
106 }
107 }
108 ]
109 },
110 "init": {
111 "type": "Identifier",
112 "start":62,"end":65,"loc":{"start":{"line":2,"column":40,"index":62},"end":{"line":2,"column":43,"index":65},"identifierName":"qux"},
113 "name": "qux"
114 }
115 }
116 ],
117 "kind": "const"
118 }
119 }
120 ],
121 "directives": []
122 }
123 }