Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/private-in/private-binary-expression-left/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":50,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":50}},
4 "errors": [
5 "SyntaxError: Private names are only allowed in property accesses (`obj.#x`) or in `in` expressions (`#x in obj`). (4:4)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":50,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":50}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":50,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":50}},
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":50,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":6,"column":1,"index":50}},
25 "body": [
26 {
27 "type": "ClassPrivateProperty",
28 "start":14,"end":21,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":9,"index":21}},
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": {
40 "type": "NumericLiteral",
41 "start":19,"end":20,"loc":{"start":{"line":2,"column":7,"index":19},"end":{"line":2,"column":8,"index":20}},
42 "extra": {
43 "rawValue": 1,
44 "raw": "1"
45 },
46 "value": 1
47 }
48 },
49 {
50 "type": "ClassMethod",
51 "start":24,"end":48,"loc":{"start":{"line":3,"column":2,"index":24},"end":{"line":5,"column":3,"index":48}},
52 "static": false,
53 "key": {
54 "type": "Identifier",
55 "start":24,"end":28,"loc":{"start":{"line":3,"column":2,"index":24},"end":{"line":3,"column":6,"index":28},"identifierName":"test"},
56 "name": "test"
57 },
58 "computed": false,
59 "kind": "method",
60 "id": null,
61 "generator": false,
62 "async": false,
63 "params": [],
64 "body": {
65 "type": "BlockStatement",
66 "start":31,"end":48,"loc":{"start":{"line":3,"column":9,"index":31},"end":{"line":5,"column":3,"index":48}},
67 "body": [
68 {
69 "type": "ExpressionStatement",
70 "start":37,"end":44,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":11,"index":44}},
71 "expression": {
72 "type": "BinaryExpression",
73 "start":37,"end":43,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":10,"index":43}},
74 "left": {
75 "type": "PrivateName",
76 "start":37,"end":39,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":6,"index":39}},
77 "id": {
78 "type": "Identifier",
79 "start":38,"end":39,"loc":{"start":{"line":4,"column":5,"index":38},"end":{"line":4,"column":6,"index":39},"identifierName":"x"},
80 "name": "x"
81 }
82 },
83 "operator": "+",
84 "right": {
85 "type": "NumericLiteral",
86 "start":42,"end":43,"loc":{"start":{"line":4,"column":9,"index":42},"end":{"line":4,"column":10,"index":43}},
87 "extra": {
88 "rawValue": 1,
89 "raw": "1"
90 },
91 "value": 1
92 }
93 }
94 }
95 ],
96 "directives": []
97 }
98 }
99 ]
100 }
101 }
102 ],
103 "directives": []
104 }
105 }