Debian Codegraph @

packages/babel-parser/test/fixtures/flow/regression/issue-2493/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":102,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":8,"index":102}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":102,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":8,"index":102}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":92,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":2,"index":92}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":4,"end":91,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":3,"column":1,"index":91}},
17 "id": {
18 "type": "Identifier",
19 "start":4,"end":9,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":9,"index":9},"identifierName":"hello"},
20 "name": "hello"
21 },
22 "init": {
23 "type": "ArrowFunctionExpression",
24 "start":12,"end":91,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":3,"column":1,"index":91}},
25 "predicate": null,
26 "returnType": {
27 "type": "TypeAnnotation",
28 "start":41,"end":49,"loc":{"start":{"line":1,"column":41,"index":41},"end":{"line":1,"column":49,"index":49}},
29 "typeAnnotation": {
30 "type": "StringTypeAnnotation",
31 "start":43,"end":49,"loc":{"start":{"line":1,"column":43,"index":43},"end":{"line":1,"column":49,"index":49}}
32 }
33 },
34 "id": null,
35 "generator": false,
36 "async": false,
37 "params": [
38 {
39 "type": "AssignmentPattern",
40 "start":13,"end":39,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":39,"index":39}},
41 "left": {
42 "type": "Identifier",
43 "start":13,"end":28,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":28,"index":28},"identifierName":"greeting"},
44 "name": "greeting",
45 "typeAnnotation": {
46 "type": "TypeAnnotation",
47 "start":21,"end":28,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":28,"index":28}},
48 "typeAnnotation": {
49 "type": "StringTypeAnnotation",
50 "start":22,"end":28,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":28,"index":28}}
51 }
52 }
53 },
54 "right": {
55 "type": "StringLiteral",
56 "start":31,"end":39,"loc":{"start":{"line":1,"column":31,"index":31},"end":{"line":1,"column":39,"index":39}},
57 "extra": {
58 "rawValue": " world",
59 "raw": "' world'"
60 },
61 "value": " world"
62 }
63 }
64 ],
65 "body": {
66 "type": "BlockStatement",
67 "start":53,"end":91,"loc":{"start":{"line":1,"column":53,"index":53},"end":{"line":3,"column":1,"index":91}},
68 "body": [
69 {
70 "type": "ExpressionStatement",
71 "start":57,"end":89,"loc":{"start":{"line":2,"column":2,"index":57},"end":{"line":2,"column":34,"index":89}},
72 "expression": {
73 "type": "CallExpression",
74 "start":57,"end":88,"loc":{"start":{"line":2,"column":2,"index":57},"end":{"line":2,"column":33,"index":88}},
75 "callee": {
76 "type": "MemberExpression",
77 "start":57,"end":68,"loc":{"start":{"line":2,"column":2,"index":57},"end":{"line":2,"column":13,"index":68}},
78 "object": {
79 "type": "Identifier",
80 "start":57,"end":64,"loc":{"start":{"line":2,"column":2,"index":57},"end":{"line":2,"column":9,"index":64},"identifierName":"console"},
81 "name": "console"
82 },
83 "computed": false,
84 "property": {
85 "type": "Identifier",
86 "start":65,"end":68,"loc":{"start":{"line":2,"column":10,"index":65},"end":{"line":2,"column":13,"index":68},"identifierName":"log"},
87 "name": "log"
88 }
89 },
90 "arguments": [
91 {
92 "type": "BinaryExpression",
93 "start":69,"end":87,"loc":{"start":{"line":2,"column":14,"index":69},"end":{"line":2,"column":32,"index":87}},
94 "left": {
95 "type": "StringLiteral",
96 "start":69,"end":76,"loc":{"start":{"line":2,"column":14,"index":69},"end":{"line":2,"column":21,"index":76}},
97 "extra": {
98 "rawValue": "hello",
99 "raw": "'hello'"
100 },
101 "value": "hello"
102 },
103 "operator": "+",
104 "right": {
105 "type": "Identifier",
106 "start":79,"end":87,"loc":{"start":{"line":2,"column":24,"index":79},"end":{"line":2,"column":32,"index":87},"identifierName":"greeting"},
107 "name": "greeting"
108 }
109 }
110 ]
111 }
112 }
113 ],
114 "directives": []
115 }
116 }
117 }
118 ],
119 "kind": "let"
120 },
121 {
122 "type": "ExpressionStatement",
123 "start":94,"end":102,"loc":{"start":{"line":5,"column":0,"index":94},"end":{"line":5,"column":8,"index":102}},
124 "expression": {
125 "type": "CallExpression",
126 "start":94,"end":101,"loc":{"start":{"line":5,"column":0,"index":94},"end":{"line":5,"column":7,"index":101}},
127 "callee": {
128 "type": "Identifier",
129 "start":94,"end":99,"loc":{"start":{"line":5,"column":0,"index":94},"end":{"line":5,"column":5,"index":99},"identifierName":"hello"},
130 "name": "hello"
131 },
132 "arguments": []
133 }
134 }
135 ],
136 "directives": []
137 }
138 }