Debian Codegraph @

packages/babel-parser/test/fixtures/flow/scope/dupl-decl-func-declare-func/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":43,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":27,"index":43}},
4 "errors": [
5 "SyntaxError: Identifier 'A' has already been declared. (2:17)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":43,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":27,"index":43}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":15,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":15,"index":15}},
16 "id": {
17 "type": "Identifier",
18 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"A"},
19 "name": "A"
20 },
21 "generator": false,
22 "async": false,
23 "params": [],
24 "body": {
25 "type": "BlockStatement",
26 "start":13,"end":15,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":15,"index":15}},
27 "body": [],
28 "directives": []
29 }
30 },
31 {
32 "type": "DeclareFunction",
33 "start":16,"end":43,"loc":{"start":{"line":2,"column":0,"index":16},"end":{"line":2,"column":27,"index":43}},
34 "id": {
35 "type": "Identifier",
36 "start":33,"end":42,"loc":{"start":{"line":2,"column":17,"index":33},"end":{"line":2,"column":26,"index":42},"identifierName":"A"},
37 "name": "A",
38 "typeAnnotation": {
39 "type": "TypeAnnotation",
40 "start":34,"end":42,"loc":{"start":{"line":2,"column":18,"index":34},"end":{"line":2,"column":26,"index":42}},
41 "typeAnnotation": {
42 "type": "FunctionTypeAnnotation",
43 "start":34,"end":42,"loc":{"start":{"line":2,"column":18,"index":34},"end":{"line":2,"column":26,"index":42}},
44 "typeParameters": null,
45 "params": [],
46 "rest": null,
47 "this": null,
48 "returnType": {
49 "type": "VoidTypeAnnotation",
50 "start":38,"end":42,"loc":{"start":{"line":2,"column":22,"index":38},"end":{"line":2,"column":26,"index":42}}
51 }
52 }
53 }
54 },
55 "predicate": null
56 }
57 ],
58 "directives": []
59 }
60 }