Debian Codegraph @

packages/babel-parser/test/fixtures/estree/class-method/basic/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
13 "id": {
14 "type": "Identifier",
15 "start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7},"identifierName":"A"},
16 "name": "A"
17 },
18 "superClass": null,
19 "body": {
20 "type": "ClassBody",
21 "start":8,"end":22,"loc":{"start":{"line":1,"column":8},"end":{"line":3,"column":1}},
22 "body": [
23 {
24 "type": "MethodDefinition",
25 "start":12,"end":20,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":10}},
26 "static": false,
27 "key": {
28 "type": "Identifier",
29 "start":12,"end":15,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":5},"identifierName":"foo"},
30 "name": "foo"
31 },
32 "computed": false,
33 "kind": "method",
34 "value": {
35 "type": "FunctionExpression",
36 "start":15,"end":20,"loc":{"start":{"line":2,"column":5},"end":{"line":2,"column":10}},
37 "id": null,
38 "generator": false,
39 "async": false,
40 "expression": false,
41 "params": [],
42 "body": {
43 "type": "BlockStatement",
44 "start":18,"end":20,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":10}},
45 "body": []
46 }
47 }
48 }
49 ]
50 }
51 }
52 ]
53 }
54 }