Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-shorthand/output.json

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