Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-super-call/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":78,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":78}},
4 "errors": [
5 "SyntaxError: `super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (5:4)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":78,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":78}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":10,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":10,"index":10}},
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":"B"},
19 "name": "B"
20 },
21 "superClass": null,
22 "body": {
23 "type": "ClassBody",
24 "start":8,"end":10,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":10,"index":10}},
25 "body": []
26 }
27 },
28 {
29 "type": "ClassDeclaration",
30 "start":11,"end":78,"loc":{"start":{"line":2,"column":0,"index":11},"end":{"line":7,"column":1,"index":78}},
31 "id": {
32 "type": "Identifier",
33 "start":17,"end":18,"loc":{"start":{"line":2,"column":6,"index":17},"end":{"line":2,"column":7,"index":18},"identifierName":"C"},
34 "name": "C"
35 },
36 "superClass": {
37 "type": "Identifier",
38 "start":27,"end":28,"loc":{"start":{"line":2,"column":16,"index":27},"end":{"line":2,"column":17,"index":28},"identifierName":"B"},
39 "name": "B"
40 },
41 "body": {
42 "type": "ClassBody",
43 "start":29,"end":78,"loc":{"start":{"line":2,"column":18,"index":29},"end":{"line":7,"column":1,"index":78}},
44 "body": [
45 {
46 "type": "ClassMethod",
47 "start":33,"end":48,"loc":{"start":{"line":3,"column":2,"index":33},"end":{"line":3,"column":17,"index":48}},
48 "static": true,
49 "key": {
50 "type": "Identifier",
51 "start":40,"end":43,"loc":{"start":{"line":3,"column":9,"index":40},"end":{"line":3,"column":12,"index":43},"identifierName":"foo"},
52 "name": "foo"
53 },
54 "computed": false,
55 "kind": "method",
56 "id": null,
57 "generator": false,
58 "async": false,
59 "params": [],
60 "body": {
61 "type": "BlockStatement",
62 "start":46,"end":48,"loc":{"start":{"line":3,"column":15,"index":46},"end":{"line":3,"column":17,"index":48}},
63 "body": [],
64 "directives": []
65 }
66 },
67 {
68 "type": "StaticBlock",
69 "start":51,"end":76,"loc":{"start":{"line":4,"column":2,"index":51},"end":{"line":6,"column":3,"index":76}},
70 "body": [
71 {
72 "type": "ExpressionStatement",
73 "start":64,"end":72,"loc":{"start":{"line":5,"column":4,"index":64},"end":{"line":5,"column":12,"index":72}},
74 "expression": {
75 "type": "CallExpression",
76 "start":64,"end":71,"loc":{"start":{"line":5,"column":4,"index":64},"end":{"line":5,"column":11,"index":71}},
77 "callee": {
78 "type": "Super",
79 "start":64,"end":69,"loc":{"start":{"line":5,"column":4,"index":64},"end":{"line":5,"column":9,"index":69}}
80 },
81 "arguments": []
82 }
83 }
84 ]
85 }
86 ]
87 }
88 }
89 ],
90 "directives": []
91 }
92 }