Debian Codegraph @

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

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