Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-instance-method/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":36,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":36}},
4 "errors": [
5 "SyntaxError: Duplicate private name #x. (3:2)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":36,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":36}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":36,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":36}},
16 "id": {
17 "type": "Identifier",
18 "start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7},"identifierName":"A"},
19 "name": "A"
20 },
21 "superClass": null,
22 "body": {
23 "type": "ClassBody",
24 "start":8,"end":36,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":4,"column":1,"index":36}},
25 "body": [
26 {
27 "type": "ClassPrivateMethod",
28 "start":12,"end":24,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":14,"index":24}},
29 "static": false,
30 "key": {
31 "type": "PrivateName",
32 "start":16,"end":18,"loc":{"start":{"line":2,"column":6,"index":16},"end":{"line":2,"column":8,"index":18}},
33 "id": {
34 "type": "Identifier",
35 "start":17,"end":18,"loc":{"start":{"line":2,"column":7,"index":17},"end":{"line":2,"column":8,"index":18},"identifierName":"x"},
36 "name": "x"
37 }
38 },
39 "computed": false,
40 "kind": "set",
41 "id": null,
42 "generator": false,
43 "async": false,
44 "params": [
45 {
46 "type": "Identifier",
47 "start":19,"end":20,"loc":{"start":{"line":2,"column":9,"index":19},"end":{"line":2,"column":10,"index":20},"identifierName":"_"},
48 "name": "_"
49 }
50 ],
51 "body": {
52 "type": "BlockStatement",
53 "start":22,"end":24,"loc":{"start":{"line":2,"column":12,"index":22},"end":{"line":2,"column":14,"index":24}},
54 "body": [],
55 "directives": []
56 }
57 },
58 {
59 "type": "ClassPrivateMethod",
60 "start":27,"end":34,"loc":{"start":{"line":3,"column":2,"index":27},"end":{"line":3,"column":9,"index":34}},
61 "static": false,
62 "key": {
63 "type": "PrivateName",
64 "start":27,"end":29,"loc":{"start":{"line":3,"column":2,"index":27},"end":{"line":3,"column":4,"index":29}},
65 "id": {
66 "type": "Identifier",
67 "start":28,"end":29,"loc":{"start":{"line":3,"column":3,"index":28},"end":{"line":3,"column":4,"index":29},"identifierName":"x"},
68 "name": "x"
69 }
70 },
71 "kind": "method",
72 "id": null,
73 "generator": false,
74 "async": false,
75 "params": [],
76 "body": {
77 "type": "BlockStatement",
78 "start":32,"end":34,"loc":{"start":{"line":3,"column":7,"index":32},"end":{"line":3,"column":9,"index":34}},
79 "body": [],
80 "directives": []
81 }
82 }
83 ]
84 }
85 }
86 ],
87 "directives": []
88 }
89 }