1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
|
@ ProgramNode (location: (0...266))
├── locals: []
└── statements:
@ StatementsNode (location: (0...266))
└── body: (length: 10)
├── @ LambdaNode (location: (0...21))
│ ├── locals: [:a, :b, :c, :d]
│ ├── operator_loc: (0...2) = "->"
│ ├── opening_loc: (16...17) = "{"
│ ├── closing_loc: (20...21) = "}"
│ ├── parameters:
│ │ @ BlockParametersNode (location: (3...15))
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (4...5))
│ │ │ ├── requireds: (length: 1)
│ │ │ │ └── @ RequiredParameterNode (location: (4...5))
│ │ │ │ └── name: :a
│ │ │ ├── optionals: (length: 0)
│ │ │ ├── rest: ∅
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 0)
│ │ │ ├── keyword_rest: ∅
│ │ │ └── block: ∅
│ │ ├── locals: (length: 3)
│ │ │ ├── @ BlockLocalVariableNode (location: (7...8))
│ │ │ │ └── name: :b
│ │ │ ├── @ BlockLocalVariableNode (location: (10...11))
│ │ │ │ └── name: :c
│ │ │ └── @ BlockLocalVariableNode (location: (13...14))
│ │ │ └── name: :d
│ │ ├── opening_loc: (3...4) = "("
│ │ └── closing_loc: (14...15) = ")"
│ └── body:
│ @ StatementsNode (location: (18...19))
│ └── body: (length: 1)
│ └── @ LocalVariableReadNode (location: (18...19))
│ ├── name: :b
│ └── depth: 0
├── @ LambdaNode (location: (23...39))
│ ├── locals: []
│ ├── operator_loc: (23...25) = "->"
│ ├── opening_loc: (26...28) = "do"
│ ├── closing_loc: (36...39) = "end"
│ ├── parameters: ∅
│ └── body:
│ @ BeginNode (location: (29...39))
│ ├── begin_keyword_loc: ∅
│ ├── statements: ∅
│ ├── rescue_clause: ∅
│ ├── else_clause: ∅
│ ├── ensure_clause:
│ │ @ EnsureNode (location: (29...39))
│ │ ├── ensure_keyword_loc: (29...35) = "ensure"
│ │ ├── statements: ∅
│ │ └── end_keyword_loc: (36...39) = "end"
│ └── end_keyword_loc: (36...39) = "end"
├── @ LambdaNode (location: (41...69))
│ ├── locals: []
│ ├── operator_loc: (41...43) = "->"
│ ├── opening_loc: (44...46) = "do"
│ ├── closing_loc: (66...69) = "end"
│ ├── parameters: ∅
│ └── body:
│ @ BeginNode (location: (47...69))
│ ├── begin_keyword_loc: ∅
│ ├── statements: ∅
│ ├── rescue_clause:
│ │ @ RescueNode (location: (47...53))
│ │ ├── keyword_loc: (47...53) = "rescue"
│ │ ├── exceptions: (length: 0)
│ │ ├── operator_loc: ∅
│ │ ├── reference: ∅
│ │ ├── statements: ∅
│ │ └── consequent: ∅
│ ├── else_clause:
│ │ @ ElseNode (location: (54...65))
│ │ ├── else_keyword_loc: (54...58) = "else"
│ │ ├── statements: ∅
│ │ └── end_keyword_loc: (59...65) = "ensure"
│ ├── ensure_clause:
│ │ @ EnsureNode (location: (59...69))
│ │ ├── ensure_keyword_loc: (59...65) = "ensure"
│ │ ├── statements: ∅
│ │ └── end_keyword_loc: (66...69) = "end"
│ └── end_keyword_loc: (66...69) = "end"
├── @ LambdaNode (location: (71...81))
│ ├── locals: []
│ ├── operator_loc: (71...73) = "->"
│ ├── opening_loc: (74...75) = "{"
│ ├── closing_loc: (80...81) = "}"
│ ├── parameters: ∅
│ └── body:
│ @ StatementsNode (location: (76...79))
│ └── body: (length: 1)
│ └── @ CallNode (location: (76...79))
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── message_loc: (76...79) = "foo"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ ├── block: ∅
│ ├── flags: variable_call
│ └── name: "foo"
├── @ LambdaNode (location: (83...98))
│ ├── locals: []
│ ├── operator_loc: (83...85) = "->"
│ ├── opening_loc: (86...88) = "do"
│ ├── closing_loc: (95...98) = "end"
│ ├── parameters: ∅
│ └── body:
│ @ StatementsNode (location: (90...93))
│ └── body: (length: 1)
│ └── @ CallNode (location: (90...93))
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── message_loc: (90...93) = "foo"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ ├── block: ∅
│ ├── flags: variable_call
│ └── name: "foo"
├── @ LambdaNode (location: (100...129))
│ ├── locals: [:a, :b, :c, :d, :e]
│ ├── operator_loc: (100...102) = "->"
│ ├── opening_loc: (124...125) = "{"
│ ├── closing_loc: (128...129) = "}"
│ ├── parameters:
│ │ @ BlockParametersNode (location: (103...123))
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (103...123))
│ │ │ ├── requireds: (length: 1)
│ │ │ │ └── @ RequiredParameterNode (location: (103...104))
│ │ │ │ └── name: :a
│ │ │ ├── optionals: (length: 1)
│ │ │ │ └── @ OptionalParameterNode (location: (106...111))
│ │ │ │ ├── name: :b
│ │ │ │ ├── name_loc: (106...107) = "b"
│ │ │ │ ├── operator_loc: (108...109) = "="
│ │ │ │ └── value:
│ │ │ │ @ IntegerNode (location: (110...111))
│ │ │ │ └── flags: decimal
│ │ │ ├── rest: ∅
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 2)
│ │ │ │ ├── @ KeywordParameterNode (location: (113...115))
│ │ │ │ │ ├── name: :c
│ │ │ │ │ ├── name_loc: (113...115) = "c:"
│ │ │ │ │ └── value: ∅
│ │ │ │ └── @ KeywordParameterNode (location: (117...119))
│ │ │ │ ├── name: :d
│ │ │ │ ├── name_loc: (117...119) = "d:"
│ │ │ │ └── value: ∅
│ │ │ ├── keyword_rest: ∅
│ │ │ └── block:
│ │ │ @ BlockParameterNode (location: (121...123))
│ │ │ ├── name: :e
│ │ │ ├── name_loc: (122...123) = "e"
│ │ │ └── operator_loc: (121...122) = "&"
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: ∅
│ │ └── closing_loc: ∅
│ └── body:
│ @ StatementsNode (location: (126...127))
│ └── body: (length: 1)
│ └── @ LocalVariableReadNode (location: (126...127))
│ ├── name: :a
│ └── depth: 0
├── @ LambdaNode (location: (131...171))
│ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
│ ├── operator_loc: (131...133) = "->"
│ ├── opening_loc: (166...167) = "{"
│ ├── closing_loc: (170...171) = "}"
│ ├── parameters:
│ │ @ BlockParametersNode (location: (134...165))
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (135...164))
│ │ │ ├── requireds: (length: 1)
│ │ │ │ └── @ RequiredParameterNode (location: (135...136))
│ │ │ │ └── name: :a
│ │ │ ├── optionals: (length: 1)
│ │ │ │ └── @ OptionalParameterNode (location: (138...143))
│ │ │ │ ├── name: :b
│ │ │ │ ├── name_loc: (138...139) = "b"
│ │ │ │ ├── operator_loc: (140...141) = "="
│ │ │ │ └── value:
│ │ │ │ @ IntegerNode (location: (142...143))
│ │ │ │ └── flags: decimal
│ │ │ ├── rest:
│ │ │ │ @ RestParameterNode (location: (145...147))
│ │ │ │ ├── name: :c
│ │ │ │ ├── name_loc: (146...147) = "c"
│ │ │ │ └── operator_loc: (145...146) = "*"
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 2)
│ │ │ │ ├── @ KeywordParameterNode (location: (149...151))
│ │ │ │ │ ├── name: :d
│ │ │ │ │ ├── name_loc: (149...151) = "d:"
│ │ │ │ │ └── value: ∅
│ │ │ │ └── @ KeywordParameterNode (location: (153...155))
│ │ │ │ ├── name: :e
│ │ │ │ ├── name_loc: (153...155) = "e:"
│ │ │ │ └── value: ∅
│ │ │ ├── keyword_rest:
│ │ │ │ @ KeywordRestParameterNode (location: (157...160))
│ │ │ │ ├── name: :f
│ │ │ │ ├── name_loc: (159...160) = "f"
│ │ │ │ └── operator_loc: (157...159) = "**"
│ │ │ └── block:
│ │ │ @ BlockParameterNode (location: (162...164))
│ │ │ ├── name: :g
│ │ │ ├── name_loc: (163...164) = "g"
│ │ │ └── operator_loc: (162...163) = "&"
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: (134...135) = "("
│ │ └── closing_loc: (164...165) = ")"
│ └── body:
│ @ StatementsNode (location: (168...169))
│ └── body: (length: 1)
│ └── @ LocalVariableReadNode (location: (168...169))
│ ├── name: :a
│ └── depth: 0
├── @ LambdaNode (location: (173...218))
│ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
│ ├── operator_loc: (173...175) = "->"
│ ├── opening_loc: (208...210) = "do"
│ ├── closing_loc: (215...218) = "end"
│ ├── parameters:
│ │ @ BlockParametersNode (location: (176...207))
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (177...206))
│ │ │ ├── requireds: (length: 1)
│ │ │ │ └── @ RequiredParameterNode (location: (177...178))
│ │ │ │ └── name: :a
│ │ │ ├── optionals: (length: 1)
│ │ │ │ └── @ OptionalParameterNode (location: (180...185))
│ │ │ │ ├── name: :b
│ │ │ │ ├── name_loc: (180...181) = "b"
│ │ │ │ ├── operator_loc: (182...183) = "="
│ │ │ │ └── value:
│ │ │ │ @ IntegerNode (location: (184...185))
│ │ │ │ └── flags: decimal
│ │ │ ├── rest:
│ │ │ │ @ RestParameterNode (location: (187...189))
│ │ │ │ ├── name: :c
│ │ │ │ ├── name_loc: (188...189) = "c"
│ │ │ │ └── operator_loc: (187...188) = "*"
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 2)
│ │ │ │ ├── @ KeywordParameterNode (location: (191...193))
│ │ │ │ │ ├── name: :d
│ │ │ │ │ ├── name_loc: (191...193) = "d:"
│ │ │ │ │ └── value: ∅
│ │ │ │ └── @ KeywordParameterNode (location: (195...197))
│ │ │ │ ├── name: :e
│ │ │ │ ├── name_loc: (195...197) = "e:"
│ │ │ │ └── value: ∅
│ │ │ ├── keyword_rest:
│ │ │ │ @ KeywordRestParameterNode (location: (199...202))
│ │ │ │ ├── name: :f
│ │ │ │ ├── name_loc: (201...202) = "f"
│ │ │ │ └── operator_loc: (199...201) = "**"
│ │ │ └── block:
│ │ │ @ BlockParameterNode (location: (204...206))
│ │ │ ├── name: :g
│ │ │ ├── name_loc: (205...206) = "g"
│ │ │ └── operator_loc: (204...205) = "&"
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: (176...177) = "("
│ │ └── closing_loc: (206...207) = ")"
│ └── body:
│ @ StatementsNode (location: (213...214))
│ └── body: (length: 1)
│ └── @ LocalVariableReadNode (location: (213...214))
│ ├── name: :a
│ └── depth: 0
├── @ LambdaNode (location: (220...245))
│ ├── locals: [:a]
│ ├── operator_loc: (220...222) = "->"
│ ├── opening_loc: (227...228) = "{"
│ ├── closing_loc: (244...245) = "}"
│ ├── parameters:
│ │ @ BlockParametersNode (location: (223...226))
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (224...225))
│ │ │ ├── requireds: (length: 1)
│ │ │ │ └── @ RequiredParameterNode (location: (224...225))
│ │ │ │ └── name: :a
│ │ │ ├── optionals: (length: 0)
│ │ │ ├── rest: ∅
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 0)
│ │ │ ├── keyword_rest: ∅
│ │ │ └── block: ∅
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: (223...224) = "("
│ │ └── closing_loc: (225...226) = ")"
│ └── body:
│ @ StatementsNode (location: (229...243))
│ └── body: (length: 1)
│ └── @ LambdaNode (location: (229...243))
│ ├── locals: [:b]
│ ├── operator_loc: (229...231) = "->"
│ ├── opening_loc: (234...235) = "{"
│ ├── closing_loc: (242...243) = "}"
│ ├── parameters:
│ │ @ BlockParametersNode (location: (232...233))
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (232...233))
│ │ │ ├── requireds: (length: 1)
│ │ │ │ └── @ RequiredParameterNode (location: (232...233))
│ │ │ │ └── name: :b
│ │ │ ├── optionals: (length: 0)
│ │ │ ├── rest: ∅
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 0)
│ │ │ ├── keyword_rest: ∅
│ │ │ └── block: ∅
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: ∅
│ │ └── closing_loc: ∅
│ └── body:
│ @ StatementsNode (location: (236...241))
│ └── body: (length: 1)
│ └── @ CallNode (location: (236...241))
│ ├── receiver:
│ │ @ LocalVariableReadNode (location: (236...237))
│ │ ├── name: :a
│ │ └── depth: 1
│ ├── call_operator_loc: ∅
│ ├── message_loc: (238...239) = "*"
│ ├── opening_loc: ∅
│ ├── arguments:
│ │ @ ArgumentsNode (location: (240...241))
│ │ └── arguments: (length: 1)
│ │ └── @ LocalVariableReadNode (location: (240...241))
│ │ ├── name: :b
│ │ └── depth: 0
│ ├── closing_loc: ∅
│ ├── block: ∅
│ ├── flags:
│ └── name: "*"
└── @ LambdaNode (location: (247...266))
├── locals: [:a, :b, :c]
├── operator_loc: (247...249) = "->"
├── opening_loc: (263...264) = "{"
├── closing_loc: (265...266) = "}"
├── parameters:
│ @ BlockParametersNode (location: (250...262))
│ ├── parameters:
│ │ @ ParametersNode (location: (251...261))
│ │ ├── requireds: (length: 1)
│ │ │ └── @ RequiredDestructuredParameterNode (location: (251...257))
│ │ │ ├── parameters: (length: 2)
│ │ │ │ ├── @ RequiredParameterNode (location: (252...253))
│ │ │ │ │ └── name: :a
│ │ │ │ └── @ RequiredParameterNode (location: (255...256))
│ │ │ │ └── name: :b
│ │ │ ├── opening_loc: (251...252) = "("
│ │ │ └── closing_loc: (256...257) = ")"
│ │ ├── optionals: (length: 0)
│ │ ├── rest:
│ │ │ @ RestParameterNode (location: (259...261))
│ │ │ ├── name: :c
│ │ │ ├── name_loc: (260...261) = "c"
│ │ │ └── operator_loc: (259...260) = "*"
│ │ ├── posts: (length: 0)
│ │ ├── keywords: (length: 0)
│ │ ├── keyword_rest: ∅
│ │ └── block: ∅
│ ├── locals: (length: 0)
│ ├── opening_loc: (250...251) = "("
│ └── closing_loc: (261...262) = ")"
└── body: ∅
|