Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-private-methods/get-set/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":99,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":99}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":99,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":99}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":99,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":99}},
13 "id": {
14 "type": "Identifier",
15 "start":6,"end":11,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":11,"index":11},"identifierName":"Hotel"},
16 "name": "Hotel"
17 },
18 "superClass": null,
19 "body": {
20 "type": "ClassBody",
21 "start":12,"end":99,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":8,"column":1,"index":99}},
22 "body": [
23 {
24 "type": "ClassPrivateMethod",
25 "start":16,"end":52,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":4,"column":3,"index":52}},
26 "static": false,
27 "key": {
28 "type": "PrivateName",
29 "start":20,"end":25,"loc":{"start":{"line":2,"column":6,"index":20},"end":{"line":2,"column":11,"index":25}},
30 "id": {
31 "type": "Identifier",
32 "start":21,"end":25,"loc":{"start":{"line":2,"column":7,"index":21},"end":{"line":2,"column":11,"index":25},"identifierName":"evil"},
33 "name": "evil"
34 }
35 },
36 "computed": false,
37 "kind": "get",
38 "id": null,
39 "generator": false,
40 "async": false,
41 "params": [],
42 "body": {
43 "type": "BlockStatement",
44 "start":28,"end":52,"loc":{"start":{"line":2,"column":14,"index":28},"end":{"line":4,"column":3,"index":52}},
45 "body": [
46 {
47 "type": "ReturnStatement",
48 "start":34,"end":48,"loc":{"start":{"line":3,"column":4,"index":34},"end":{"line":3,"column":18,"index":48}},
49 "argument": {
50 "type": "CallExpression",
51 "start":41,"end":47,"loc":{"start":{"line":3,"column":11,"index":41},"end":{"line":3,"column":17,"index":47}},
52 "callee": {
53 "type": "Identifier",
54 "start":41,"end":45,"loc":{"start":{"line":3,"column":11,"index":41},"end":{"line":3,"column":15,"index":45},"identifierName":"ohNo"},
55 "name": "ohNo"
56 },
57 "arguments": []
58 }
59 }
60 ],
61 "directives": []
62 }
63 },
64 {
65 "type": "ClassPrivateMethod",
66 "start":55,"end":97,"loc":{"start":{"line":5,"column":2,"index":55},"end":{"line":7,"column":3,"index":97}},
67 "static": false,
68 "key": {
69 "type": "PrivateName",
70 "start":59,"end":64,"loc":{"start":{"line":5,"column":6,"index":59},"end":{"line":5,"column":11,"index":64}},
71 "id": {
72 "type": "Identifier",
73 "start":60,"end":64,"loc":{"start":{"line":5,"column":7,"index":60},"end":{"line":5,"column":11,"index":64},"identifierName":"evil"},
74 "name": "evil"
75 }
76 },
77 "computed": false,
78 "kind": "set",
79 "id": null,
80 "generator": false,
81 "async": false,
82 "params": [
83 {
84 "type": "Identifier",
85 "start":65,"end":66,"loc":{"start":{"line":5,"column":12,"index":65},"end":{"line":5,"column":13,"index":66},"identifierName":"x"},
86 "name": "x"
87 }
88 ],
89 "body": {
90 "type": "BlockStatement",
91 "start":68,"end":97,"loc":{"start":{"line":5,"column":15,"index":68},"end":{"line":7,"column":3,"index":97}},
92 "body": [
93 {
94 "type": "ReturnStatement",
95 "start":74,"end":93,"loc":{"start":{"line":6,"column":4,"index":74},"end":{"line":6,"column":23,"index":93}},
96 "argument": {
97 "type": "CallExpression",
98 "start":81,"end":92,"loc":{"start":{"line":6,"column":11,"index":81},"end":{"line":6,"column":22,"index":92}},
99 "callee": {
100 "type": "Identifier",
101 "start":81,"end":89,"loc":{"start":{"line":6,"column":11,"index":81},"end":{"line":6,"column":19,"index":89},"identifierName":"makeEvil"},
102 "name": "makeEvil"
103 },
104 "arguments": [
105 {
106 "type": "Identifier",
107 "start":90,"end":91,"loc":{"start":{"line":6,"column":20,"index":90},"end":{"line":6,"column":21,"index":91},"identifierName":"x"},
108 "name": "x"
109 }
110 ]
111 }
112 }
113 ],
114 "directives": []
115 }
116 }
117 ]
118 }
119 }
120 ],
121 "directives": []
122 }
123 }