Debian Codegraph @

packages/babel-parser/test/fixtures/comments/basic/export-default-anonymous-class/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":121,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":10,"column":1,"index":121}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":121,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":10,"column":1,"index":121}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExportDefaultDeclaration",
12 "start":36,"end":121,"loc":{"start":{"line":4,"column":0,"index":36},"end":{"line":10,"column":1,"index":121}},
13 "declaration": {
14 "type": "ClassDeclaration",
15 "start":51,"end":121,"loc":{"start":{"line":4,"column":15,"index":51},"end":{"line":10,"column":1,"index":121}},
16 "id": null,
17 "superClass": null,
18 "body": {
19 "type": "ClassBody",
20 "start":57,"end":121,"loc":{"start":{"line":4,"column":21,"index":57},"end":{"line":10,"column":1,"index":121}},
21 "body": [
22 {
23 "type": "ClassMethod",
24 "start":103,"end":119,"loc":{"start":{"line":8,"column":4,"index":103},"end":{"line":9,"column":5,"index":119}},
25 "static": false,
26 "key": {
27 "type": "Identifier",
28 "start":103,"end":110,"loc":{"start":{"line":8,"column":4,"index":103},"end":{"line":8,"column":11,"index":110},"identifierName":"method1"},
29 "name": "method1"
30 },
31 "computed": false,
32 "kind": "method",
33 "id": null,
34 "generator": false,
35 "async": false,
36 "params": [],
37 "body": {
38 "type": "BlockStatement",
39 "start":112,"end":119,"loc":{"start":{"line":8,"column":13,"index":112},"end":{"line":9,"column":5,"index":119}},
40 "body": [],
41 "directives": []
42 },
43 "leadingComments": [
44 {
45 "type": "CommentBlock",
46 "value": "*\n * this is method1.\n ",
47 "start":63,"end":98,"loc":{"start":{"line":5,"column":4,"index":63},"end":{"line":7,"column":7,"index":98}}
48 }
49 ]
50 }
51 ]
52 }
53 },
54 "leadingComments": [
55 {
56 "type": "CommentBlock",
57 "value": "*\n * this is anonymous class.\n ",
58 "start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":3,"index":35}}
59 }
60 ]
61 }
62 ],
63 "directives": []
64 },
65 "comments": [
66 {
67 "type": "CommentBlock",
68 "value": "*\n * this is anonymous class.\n ",
69 "start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":3,"index":35}}
70 },
71 {
72 "type": "CommentBlock",
73 "value": "*\n * this is method1.\n ",
74 "start":63,"end":98,"loc":{"start":{"line":5,"column":4,"index":63},"end":{"line":7,"column":7,"index":98}}
75 }
76 ]
77 }