Debian Codegraph @

packages/babel-parser/test/fixtures/core/scope/undecl-export-if/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":51,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":31,"index":51}},
4 "errors": [
5 "SyntaxError: In strict mode code, functions can only be declared at top level or inside a block. (2:10)",
6 "SyntaxError: Export 'encrypt' is not defined. (1:9)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":51,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":31,"index":51}},
11 "sourceType": "module",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ExportNamedDeclaration",
16 "start":0,"end":19,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":19,"index":19}},
17 "specifiers": [
18 {
19 "type": "ExportSpecifier",
20 "start":9,"end":16,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":16,"index":16}},
21 "local": {
22 "type": "Identifier",
23 "start":9,"end":16,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":16,"index":16},"identifierName":"encrypt"},
24 "name": "encrypt"
25 },
26 "exported": {
27 "type": "Identifier",
28 "start":9,"end":16,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":16,"index":16},"identifierName":"encrypt"},
29 "name": "encrypt"
30 }
31 }
32 ],
33 "source": null,
34 "declaration": null
35 },
36 {
37 "type": "IfStatement",
38 "start":20,"end":51,"loc":{"start":{"line":2,"column":0,"index":20},"end":{"line":2,"column":31,"index":51}},
39 "test": {
40 "type": "BooleanLiteral",
41 "start":24,"end":28,"loc":{"start":{"line":2,"column":4,"index":24},"end":{"line":2,"column":8,"index":28}},
42 "value": true
43 },
44 "consequent": {
45 "type": "FunctionDeclaration",
46 "start":30,"end":51,"loc":{"start":{"line":2,"column":10,"index":30},"end":{"line":2,"column":31,"index":51}},
47 "id": {
48 "type": "Identifier",
49 "start":39,"end":46,"loc":{"start":{"line":2,"column":19,"index":39},"end":{"line":2,"column":26,"index":46},"identifierName":"encrypt"},
50 "name": "encrypt"
51 },
52 "generator": false,
53 "async": false,
54 "params": [],
55 "body": {
56 "type": "BlockStatement",
57 "start":49,"end":51,"loc":{"start":{"line":2,"column":29,"index":49},"end":{"line":2,"column":31,"index":51}},
58 "body": [],
59 "directives": []
60 }
61 },
62 "alternate": null
63 }
64 ],
65 "directives": []
66 }
67 }