Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":70,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":70,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":70,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"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":70,"loc":{"start":{"line":1,"column":8},"end":{"line":4,"column":1}},
22 "body": [
23 {
24 "type": "MethodDefinition",
25 "start":12,"end":35,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":25}},
26 "static": false,
27 "key": {
28 "type": "PrivateIdentifier",
29 "start":12,"end":16,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":6}},
30 "name": "foo"
31 },
32 "kind": "method",
33 "value": {
34 "type": "FunctionExpression",
35 "start":16,"end":35,"loc":{"start":{"line":2,"column":6},"end":{"line":2,"column":25}},
36 "id": null,
37 "generator": false,
38 "async": false,
39 "expression": false,
40 "params": [
41 {
42 "type": "Identifier",
43 "start":17,"end":20,"loc":{"start":{"line":2,"column":7},"end":{"line":2,"column":10},"identifierName":"arg"},
44 "name": "arg"
45 },
46 {
47 "type": "RestElement",
48 "start":22,"end":31,"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":21}},
49 "argument": {
50 "type": "Identifier",
51 "start":25,"end":31,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":21},"identifierName":"others"},
52 "name": "others"
53 }
54 }
55 ],
56 "body": {
57 "type": "BlockStatement",
58 "start":33,"end":35,"loc":{"start":{"line":2,"column":23},"end":{"line":2,"column":25}},
59 "body": []
60 }
61 },
62 "computed": false
63 },
64 {
65 "type": "MethodDefinition",
66 "start":38,"end":68,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":32}},
67 "static": true,
68 "key": {
69 "type": "PrivateIdentifier",
70 "start":45,"end":49,"loc":{"start":{"line":3,"column":9},"end":{"line":3,"column":13}},
71 "name": "bar"
72 },
73 "kind": "method",
74 "value": {
75 "type": "FunctionExpression",
76 "start":49,"end":68,"loc":{"start":{"line":3,"column":13},"end":{"line":3,"column":32}},
77 "id": null,
78 "generator": false,
79 "async": false,
80 "expression": false,
81 "params": [
82 {
83 "type": "Identifier",
84 "start":50,"end":53,"loc":{"start":{"line":3,"column":14},"end":{"line":3,"column":17},"identifierName":"arg"},
85 "name": "arg"
86 },
87 {
88 "type": "RestElement",
89 "start":55,"end":64,"loc":{"start":{"line":3,"column":19},"end":{"line":3,"column":28}},
90 "argument": {
91 "type": "Identifier",
92 "start":58,"end":64,"loc":{"start":{"line":3,"column":22},"end":{"line":3,"column":28},"identifierName":"others"},
93 "name": "others"
94 }
95 }
96 ],
97 "body": {
98 "type": "BlockStatement",
99 "start":66,"end":68,"loc":{"start":{"line":3,"column":30},"end":{"line":3,"column":32}},
100 "body": []
101 }
102 },
103 "computed": false
104 }
105 ]
106 }
107 }
108 ]
109 }
110 }