Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":28}},
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? (2:8)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":28}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":28}},
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":28,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":3,"column":1,"index":28}},
25 "body": [
26 {
27 "type": "ClassMethod",
28 "start":12,"end":26,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":16,"index":26}},
29 "static": false,
30 "key": {
31 "type": "Identifier",
32 "start":12,"end":13,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":3,"index":13},"identifierName":"x"},
33 "name": "x"
34 },
35 "computed": false,
36 "kind": "method",
37 "id": null,
38 "generator": false,
39 "async": false,
40 "params": [],
41 "body": {
42 "type": "BlockStatement",
43 "start":17,"end":26,"loc":{"start":{"line":2,"column":7,"index":17},"end":{"line":2,"column":16,"index":26}},
44 "body": [
45 {
46 "type": "ExpressionStatement",
47 "start":18,"end":25,"loc":{"start":{"line":2,"column":8,"index":18},"end":{"line":2,"column":15,"index":25}},
48 "expression": {
49 "type": "CallExpression",
50 "start":18,"end":25,"loc":{"start":{"line":2,"column":8,"index":18},"end":{"line":2,"column":15,"index":25}},
51 "callee": {
52 "type": "Super",
53 "start":18,"end":23,"loc":{"start":{"line":2,"column":8,"index":18},"end":{"line":2,"column":13,"index":23}}
54 },
55 "arguments": []
56 }
57 }
58 ],
59 "directives": []
60 }
61 }
62 ]
63 }
64 }
65 ],
66 "directives": []
67 }
68 }