Debian Codegraph @

packages/babel-parser/test/fixtures/comments/basic/switch-no-default-comment/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":58,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":1,"index":58}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":58,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":1,"index":58}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "SwitchStatement",
12 "start":0,"end":58,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":1,"index":58}},
13 "discriminant": {
14 "type": "Identifier",
15 "start":8,"end":9,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":9,"index":9},"identifierName":"a"},
16 "name": "a"
17 },
18 "cases": [
19 {
20 "type": "SwitchCase",
21 "start":17,"end":39,"loc":{"start":{"line":2,"column":4,"index":17},"end":{"line":3,"column":14,"index":39}},
22 "consequent": [
23 {
24 "type": "BreakStatement",
25 "start":33,"end":39,"loc":{"start":{"line":3,"column":8,"index":33},"end":{"line":3,"column":14,"index":39}},
26 "label": null
27 }
28 ],
29 "test": {
30 "type": "NumericLiteral",
31 "start":22,"end":23,"loc":{"start":{"line":2,"column":9,"index":22},"end":{"line":2,"column":10,"index":23}},
32 "extra": {
33 "rawValue": 1,
34 "raw": "1"
35 },
36 "value": 1
37 },
38 "trailingComments": [
39 {
40 "type": "CommentLine",
41 "value": "no default",
42 "start":44,"end":56,"loc":{"start":{"line":4,"column":4,"index":44},"end":{"line":4,"column":16,"index":56}}
43 }
44 ]
45 }
46 ]
47 }
48 ],
49 "directives": []
50 },
51 "comments": [
52 {
53 "type": "CommentLine",
54 "value": "no default",
55 "start":44,"end":56,"loc":{"start":{"line":4,"column":4,"index":44},"end":{"line":4,"column":16,"index":56}}
56 }
57 ]
58 }