Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":133,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":133}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":133,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":133}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "FunctionDeclaration",
12 "start":0,"end":133,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":133}},
13 "id": {
14 "type": "Identifier",
15 "start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"bar"},
16 "name": "bar"
17 },
18 "generator": false,
19 "async": false,
20 "params": [
21 {
22 "type": "Identifier",
23 "start":13,"end":14,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":14,"index":14},"identifierName":"a"},
24 "name": "a"
25 }
26 ],
27 "body": {
28 "type": "BlockStatement",
29 "start":16,"end":133,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":9,"column":1,"index":133}},
30 "body": [
31 {
32 "type": "SwitchStatement",
33 "start":22,"end":131,"loc":{"start":{"line":2,"column":4,"index":22},"end":{"line":8,"column":5,"index":131}},
34 "discriminant": {
35 "type": "Identifier",
36 "start":30,"end":31,"loc":{"start":{"line":2,"column":12,"index":30},"end":{"line":2,"column":13,"index":31},"identifierName":"a"},
37 "name": "a"
38 },
39 "cases": [
40 {
41 "type": "SwitchCase",
42 "start":43,"end":69,"loc":{"start":{"line":3,"column":8,"index":43},"end":{"line":4,"column":18,"index":69}},
43 "consequent": [
44 {
45 "type": "BreakStatement",
46 "start":63,"end":69,"loc":{"start":{"line":4,"column":12,"index":63},"end":{"line":4,"column":18,"index":69}},
47 "label": null
48 }
49 ],
50 "test": {
51 "type": "NumericLiteral",
52 "start":48,"end":49,"loc":{"start":{"line":3,"column":13,"index":48},"end":{"line":3,"column":14,"index":49}},
53 "extra": {
54 "rawValue": 2,
55 "raw": "2"
56 },
57 "value": 2
58 }
59 },
60 {
61 "type": "SwitchCase",
62 "start":78,"end":104,"loc":{"start":{"line":5,"column":8,"index":78},"end":{"line":6,"column":18,"index":104}},
63 "consequent": [
64 {
65 "type": "BreakStatement",
66 "start":98,"end":104,"loc":{"start":{"line":6,"column":12,"index":98},"end":{"line":6,"column":18,"index":104}},
67 "label": null
68 }
69 ],
70 "test": {
71 "type": "NumericLiteral",
72 "start":83,"end":84,"loc":{"start":{"line":5,"column":13,"index":83},"end":{"line":5,"column":14,"index":84}},
73 "extra": {
74 "rawValue": 1,
75 "raw": "1"
76 },
77 "value": 1
78 },
79 "trailingComments": [
80 {
81 "type": "CommentLine",
82 "value": "no default",
83 "start":113,"end":125,"loc":{"start":{"line":7,"column":8,"index":113},"end":{"line":7,"column":20,"index":125}}
84 }
85 ]
86 }
87 ]
88 }
89 ],
90 "directives": []
91 }
92 }
93 ],
94 "directives": []
95 },
96 "comments": [
97 {
98 "type": "CommentLine",
99 "value": "no default",
100 "start":113,"end":125,"loc":{"start":{"line":7,"column":8,"index":113},"end":{"line":7,"column":20,"index":125}}
101 }
102 ]
103 }