Debian Codegraph @

packages/babel-parser/test/fixtures/placeholders/variable/let-context-3/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":32,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":32,"index":32}},
4 "errors": [
5 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (1:10)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":32,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":32,"index":32}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "IfStatement",
15 "start":0,"end":32,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":32,"index":32}},
16 "test": {
17 "type": "Identifier",
18 "start":4,"end":8,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":8,"index":8},"identifierName":"cond"},
19 "name": "cond"
20 },
21 "consequent": {
22 "type": "VariableDeclaration",
23 "start":10,"end":32,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":32,"index":32}},
24 "declarations": [
25 {
26 "type": "VariableDeclarator",
27 "start":14,"end":31,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":31,"index":31}},
28 "id": {
29 "type": "Placeholder",
30 "start":14,"end":21,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":21,"index":21}},
31 "name": {
32 "type": "Identifier",
33 "start":16,"end":19,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":19,"index":19},"identifierName":"LHS"},
34 "name": "LHS"
35 },
36 "expectedNode": "Pattern"
37 },
38 "init": {
39 "type": "Placeholder",
40 "start":24,"end":31,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":31,"index":31}},
41 "name": {
42 "type": "Identifier",
43 "start":26,"end":29,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":1,"column":29,"index":29},"identifierName":"RHS"},
44 "name": "RHS"
45 },
46 "expectedNode": "Expression"
47 }
48 }
49 ],
50 "kind": "let"
51 },
52 "alternate": null
53 }
54 ],
55 "directives": []
56 }
57 }