Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-static-block/basic/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":69,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":69}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":69,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":69}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":69,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":69}},
13 "id": {
14 "type": "Identifier",
15 "start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7},"identifierName":"C"},
16 "name": "C"
17 },
18 "superClass": null,
19 "body": {
20 "type": "ClassBody",
21 "start":8,"end":69,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":6,"column":1,"index":69}},
22 "body": [
23 {
24 "type": "ClassMethod",
25 "start":12,"end":27,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":17,"index":27}},
26 "static": true,
27 "key": {
28 "type": "Identifier",
29 "start":19,"end":22,"loc":{"start":{"line":2,"column":9,"index":19},"end":{"line":2,"column":12,"index":22},"identifierName":"foo"},
30 "name": "foo"
31 },
32 "computed": false,
33 "kind": "method",
34 "id": null,
35 "generator": false,
36 "async": false,
37 "params": [],
38 "body": {
39 "type": "BlockStatement",
40 "start":25,"end":27,"loc":{"start":{"line":2,"column":15,"index":25},"end":{"line":2,"column":17,"index":27}},
41 "body": [],
42 "directives": []
43 }
44 },
45 {
46 "type": "StaticBlock",
47 "start":30,"end":67,"loc":{"start":{"line":3,"column":2,"index":30},"end":{"line":5,"column":3,"index":67}},
48 "body": [
49 {
50 "type": "ExpressionStatement",
51 "start":43,"end":63,"loc":{"start":{"line":4,"column":4,"index":43},"end":{"line":4,"column":24,"index":63}},
52 "expression": {
53 "type": "AssignmentExpression",
54 "start":43,"end":62,"loc":{"start":{"line":4,"column":4,"index":43},"end":{"line":4,"column":23,"index":62}},
55 "operator": "=",
56 "left": {
57 "type": "MemberExpression",
58 "start":43,"end":51,"loc":{"start":{"line":4,"column":4,"index":43},"end":{"line":4,"column":12,"index":51}},
59 "object": {
60 "type": "ThisExpression",
61 "start":43,"end":47,"loc":{"start":{"line":4,"column":4,"index":43},"end":{"line":4,"column":8,"index":47}}
62 },
63 "computed": false,
64 "property": {
65 "type": "Identifier",
66 "start":48,"end":51,"loc":{"start":{"line":4,"column":9,"index":48},"end":{"line":4,"column":12,"index":51},"identifierName":"bar"},
67 "name": "bar"
68 }
69 },
70 "right": {
71 "type": "MemberExpression",
72 "start":54,"end":62,"loc":{"start":{"line":4,"column":15,"index":54},"end":{"line":4,"column":23,"index":62}},
73 "object": {
74 "type": "ThisExpression",
75 "start":54,"end":58,"loc":{"start":{"line":4,"column":15,"index":54},"end":{"line":4,"column":19,"index":58}}
76 },
77 "computed": false,
78 "property": {
79 "type": "Identifier",
80 "start":59,"end":62,"loc":{"start":{"line":4,"column":20,"index":59},"end":{"line":4,"column":23,"index":62},"identifierName":"foo"},
81 "name": "foo"
82 }
83 }
84 }
85 }
86 ]
87 }
88 ]
89 }
90 }
91 ],
92 "directives": []
93 }
94 }