Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-properties/super-inside-function/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":1,"index":54}},
4 "errors": [
5 "SyntaxError: 'super' is only allowed in object methods and classes. (3:4)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":1,"index":54}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":1,"index":54}},
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":54,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":5,"column":1,"index":54}},
25 "body": [
26 {
27 "type": "ClassProperty",
28 "start":12,"end":52,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":4,"column":3,"index":52}},
29 "static": false,
30 "key": {
31 "type": "Identifier",
32 "start":12,"end":15,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":5,"index":15},"identifierName":"foo"},
33 "name": "foo"
34 },
35 "computed": false,
36 "value": {
37 "type": "FunctionExpression",
38 "start":18,"end":52,"loc":{"start":{"line":2,"column":8,"index":18},"end":{"line":4,"column":3,"index":52}},
39 "id": {
40 "type": "Identifier",
41 "start":27,"end":29,"loc":{"start":{"line":2,"column":17,"index":27},"end":{"line":2,"column":19,"index":29},"identifierName":"fn"},
42 "name": "fn"
43 },
44 "generator": false,
45 "async": false,
46 "params": [],
47 "body": {
48 "type": "BlockStatement",
49 "start":32,"end":52,"loc":{"start":{"line":2,"column":22,"index":32},"end":{"line":4,"column":3,"index":52}},
50 "body": [
51 {
52 "type": "ExpressionStatement",
53 "start":38,"end":48,"loc":{"start":{"line":3,"column":4,"index":38},"end":{"line":3,"column":14,"index":48}},
54 "expression": {
55 "type": "CallExpression",
56 "start":38,"end":47,"loc":{"start":{"line":3,"column":4,"index":38},"end":{"line":3,"column":13,"index":47}},
57 "callee": {
58 "type": "MemberExpression",
59 "start":38,"end":45,"loc":{"start":{"line":3,"column":4,"index":38},"end":{"line":3,"column":11,"index":45}},
60 "object": {
61 "type": "Super",
62 "start":38,"end":43,"loc":{"start":{"line":3,"column":4,"index":38},"end":{"line":3,"column":9,"index":43}}
63 },
64 "computed": false,
65 "property": {
66 "type": "Identifier",
67 "start":44,"end":45,"loc":{"start":{"line":3,"column":10,"index":44},"end":{"line":3,"column":11,"index":45},"identifierName":"x"},
68 "name": "x"
69 }
70 },
71 "arguments": []
72 }
73 }
74 ],
75 "directives": []
76 }
77 }
78 }
79 ]
80 }
81 }
82 ],
83 "directives": []
84 }
85 }