Debian Codegraph @

packages/babel-parser/test/fixtures/comments/basic/switch-function-call-no-semicolon/output.json

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