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
|
@ ProgramNode (location: (1,0)-(40,24))
├── locals: [:foo, :ab, :abc, :a]
└── statements:
@ StatementsNode (location: (1,0)-(40,24))
└── body: (length: 21)
├── @ CallNode (location: (1,0)-(1,9))
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :foo
│ ├── message_loc: (1,0)-(1,3) = "foo"
│ ├── opening_loc: ∅
│ ├── arguments:
│ │ @ ArgumentsNode (location: (1,4)-(1,9))
│ │ ├── arguments: (length: 1)
│ │ │ └── @ RegularExpressionNode (location: (1,4)-(1,9))
│ │ │ ├── opening_loc: (1,4)-(1,5) = "/"
│ │ │ ├── content_loc: (1,5)-(1,8) = "bar"
│ │ │ ├── closing_loc: (1,8)-(1,9) = "/"
│ │ │ ├── unescaped: "bar"
│ │ │ └── flags: ∅
│ │ └── flags: ∅
│ ├── closing_loc: ∅
│ ├── block: ∅
│ └── flags: ∅
├── @ RegularExpressionNode (location: (3,0)-(3,8))
│ ├── opening_loc: (3,0)-(3,3) = "%r{"
│ ├── content_loc: (3,3)-(3,6) = "abc"
│ ├── closing_loc: (3,6)-(3,8) = "}i"
│ ├── unescaped: "abc"
│ └── flags: ignore_case
├── @ RegularExpressionNode (location: (5,0)-(5,5))
│ ├── opening_loc: (5,0)-(5,1) = "/"
│ ├── content_loc: (5,1)-(5,4) = "a\\b"
│ ├── closing_loc: (5,4)-(5,5) = "/"
│ ├── unescaped: "a\\b"
│ └── flags: ∅
├── @ InterpolatedRegularExpressionNode (location: (7,0)-(7,11))
│ ├── opening_loc: (7,0)-(7,1) = "/"
│ ├── parts: (length: 2)
│ │ ├── @ StringNode (location: (7,1)-(7,5))
│ │ │ ├── flags: ∅
│ │ │ ├── opening_loc: ∅
│ │ │ ├── content_loc: (7,1)-(7,5) = "aaa "
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "aaa "
│ │ └── @ EmbeddedVariableNode (location: (7,5)-(7,10))
│ │ ├── operator_loc: (7,5)-(7,6) = "#"
│ │ └── variable:
│ │ @ GlobalVariableReadNode (location: (7,6)-(7,10))
│ │ └── name: :$bbb
│ ├── closing_loc: (7,10)-(7,11) = "/"
│ └── flags: ∅
├── @ InterpolatedRegularExpressionNode (location: (9,0)-(9,16))
│ ├── opening_loc: (9,0)-(9,1) = "/"
│ ├── parts: (length: 3)
│ │ ├── @ StringNode (location: (9,1)-(9,5))
│ │ │ ├── flags: ∅
│ │ │ ├── opening_loc: ∅
│ │ │ ├── content_loc: (9,1)-(9,5) = "aaa "
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "aaa "
│ │ ├── @ EmbeddedStatementsNode (location: (9,5)-(9,11))
│ │ │ ├── opening_loc: (9,5)-(9,7) = "\#{"
│ │ │ ├── statements:
│ │ │ │ @ StatementsNode (location: (9,7)-(9,10))
│ │ │ │ └── body: (length: 1)
│ │ │ │ └── @ CallNode (location: (9,7)-(9,10))
│ │ │ │ ├── receiver: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── name: :bbb
│ │ │ │ ├── message_loc: (9,7)-(9,10) = "bbb"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ ├── block: ∅
│ │ │ │ └── flags: variable_call
│ │ │ └── closing_loc: (9,10)-(9,11) = "}"
│ │ └── @ StringNode (location: (9,11)-(9,15))
│ │ ├── flags: ∅
│ │ ├── opening_loc: ∅
│ │ ├── content_loc: (9,11)-(9,15) = " ccc"
│ │ ├── closing_loc: ∅
│ │ └── unescaped: " ccc"
│ ├── closing_loc: (9,15)-(9,16) = "/"
│ └── flags: ∅
├── @ ArrayNode (location: (11,0)-(11,27))
│ ├── elements: (length: 2)
│ │ ├── @ MatchWriteNode (location: (11,1)-(11,21))
│ │ │ ├── call:
│ │ │ │ @ CallNode (location: (11,1)-(11,21))
│ │ │ │ ├── receiver:
│ │ │ │ │ @ RegularExpressionNode (location: (11,1)-(11,14))
│ │ │ │ │ ├── opening_loc: (11,1)-(11,2) = "/"
│ │ │ │ │ ├── content_loc: (11,2)-(11,13) = "(?<foo>bar)"
│ │ │ │ │ ├── closing_loc: (11,13)-(11,14) = "/"
│ │ │ │ │ ├── unescaped: "(?<foo>bar)"
│ │ │ │ │ └── flags: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── name: :=~
│ │ │ │ ├── message_loc: (11,15)-(11,17) = "=~"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments:
│ │ │ │ │ @ ArgumentsNode (location: (11,18)-(11,21))
│ │ │ │ │ ├── arguments: (length: 1)
│ │ │ │ │ │ └── @ CallNode (location: (11,18)-(11,21))
│ │ │ │ │ │ ├── receiver: ∅
│ │ │ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ │ │ ├── name: :baz
│ │ │ │ │ │ ├── message_loc: (11,18)-(11,21) = "baz"
│ │ │ │ │ │ ├── opening_loc: ∅
│ │ │ │ │ │ ├── arguments: ∅
│ │ │ │ │ │ ├── closing_loc: ∅
│ │ │ │ │ │ ├── block: ∅
│ │ │ │ │ │ └── flags: variable_call
│ │ │ │ │ └── flags: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ ├── block: ∅
│ │ │ │ └── flags: ∅
│ │ │ └── targets: (length: 1)
│ │ │ └── @ LocalVariableTargetNode (location: (11,5)-(11,8))
│ │ │ ├── name: :foo
│ │ │ └── depth: 0
│ │ └── @ LocalVariableReadNode (location: (11,23)-(11,26))
│ │ ├── name: :foo
│ │ └── depth: 0
│ ├── opening_loc: (11,0)-(11,1) = "["
│ ├── closing_loc: (11,26)-(11,27) = "]"
│ └── flags: ∅
├── @ RegularExpressionNode (location: (13,0)-(13,6))
│ ├── opening_loc: (13,0)-(13,1) = "/"
│ ├── content_loc: (13,1)-(13,4) = "abc"
│ ├── closing_loc: (13,4)-(13,6) = "/i"
│ ├── unescaped: "abc"
│ └── flags: ignore_case
├── @ RegularExpressionNode (location: (15,0)-(15,26))
│ ├── opening_loc: (15,0)-(15,3) = "%r/"
│ ├── content_loc: (15,3)-(15,24) = "[a-z$._?][\\w$.?\#@~]*:"
│ ├── closing_loc: (15,24)-(15,26) = "/i"
│ ├── unescaped: "[a-z$._?][\\w$.?\#@~]*:"
│ └── flags: ignore_case
├── @ RegularExpressionNode (location: (17,0)-(17,37))
│ ├── opening_loc: (17,0)-(17,3) = "%r/"
│ ├── content_loc: (17,3)-(17,35) = "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)"
│ ├── closing_loc: (17,35)-(17,37) = "/i"
│ ├── unescaped: "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)"
│ └── flags: ignore_case
├── @ RegularExpressionNode (location: (19,0)-(19,25))
│ ├── opening_loc: (19,0)-(19,3) = "%r/"
│ ├── content_loc: (19,3)-(19,23) = "[a-z$._?][\\w$.?\#@~]*"
│ ├── closing_loc: (19,23)-(19,25) = "/i"
│ ├── unescaped: "[a-z$._?][\\w$.?\#@~]*"
│ └── flags: ignore_case
├── @ RegularExpressionNode (location: (21,0)-(24,1))
│ ├── opening_loc: (21,0)-(21,3) = "%r("
│ ├── content_loc: (21,3)-(24,0) = "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n"
│ ├── closing_loc: (24,0)-(24,1) = ")"
│ ├── unescaped: "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n"
│ └── flags: ∅
├── @ CallNode (location: (26,0)-(26,16))
│ ├── receiver:
│ │ @ RegularExpressionNode (location: (26,0)-(26,8))
│ │ ├── opening_loc: (26,0)-(26,1) = "/"
│ │ ├── content_loc: (26,1)-(26,7) = "(?#\\))"
│ │ ├── closing_loc: (26,7)-(26,8) = "/"
│ │ ├── unescaped: "(?#\\))"
│ │ └── flags: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :=~
│ ├── message_loc: (26,9)-(26,11) = "=~"
│ ├── opening_loc: ∅
│ ├── arguments:
│ │ @ ArgumentsNode (location: (26,12)-(26,16))
│ │ ├── arguments: (length: 1)
│ │ │ └── @ StringNode (location: (26,12)-(26,16))
│ │ │ ├── flags: ∅
│ │ │ ├── opening_loc: (26,12)-(26,13) = "\""
│ │ │ ├── content_loc: (26,13)-(26,15) = "hi"
│ │ │ ├── closing_loc: (26,15)-(26,16) = "\""
│ │ │ └── unescaped: "hi"
│ │ └── flags: ∅
│ ├── closing_loc: ∅
│ ├── block: ∅
│ └── flags: ∅
├── @ RegularExpressionNode (location: (28,0)-(28,9))
│ ├── opening_loc: (28,0)-(28,3) = "%r#"
│ ├── content_loc: (28,3)-(28,8) = "pound"
│ ├── closing_loc: (28,8)-(28,9) = "#"
│ ├── unescaped: "pound"
│ └── flags: ∅
├── @ InterpolatedRegularExpressionNode (location: (30,0)-(30,13))
│ ├── opening_loc: (30,0)-(30,1) = "/"
│ ├── parts: (length: 2)
│ │ ├── @ StringNode (location: (30,1)-(30,5))
│ │ │ ├── flags: ∅
│ │ │ ├── opening_loc: ∅
│ │ │ ├── content_loc: (30,1)-(30,5) = "aaa "
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "aaa "
│ │ └── @ EmbeddedStatementsNode (location: (30,5)-(30,11))
│ │ ├── opening_loc: (30,5)-(30,7) = "\#{"
│ │ ├── statements:
│ │ │ @ StatementsNode (location: (30,7)-(30,10))
│ │ │ └── body: (length: 1)
│ │ │ └── @ CallNode (location: (30,7)-(30,10))
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── name: :bbb
│ │ │ ├── message_loc: (30,7)-(30,10) = "bbb"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ └── closing_loc: (30,10)-(30,11) = "}"
│ ├── closing_loc: (30,11)-(30,13) = "/o"
│ └── flags: once
├── @ MatchWriteNode (location: (32,0)-(33,10))
│ ├── call:
│ │ @ CallNode (location: (32,0)-(33,10))
│ │ ├── receiver:
│ │ │ @ RegularExpressionNode (location: (32,0)-(33,4))
│ │ │ ├── opening_loc: (32,0)-(32,1) = "/"
│ │ │ ├── content_loc: (32,1)-(33,3) = "(?<a\\\nb>)"
│ │ │ ├── closing_loc: (33,3)-(33,4) = "/"
│ │ │ ├── unescaped: "(?<ab>)"
│ │ │ └── flags: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :=~
│ │ ├── message_loc: (33,5)-(33,7) = "=~"
│ │ ├── opening_loc: ∅
│ │ ├── arguments:
│ │ │ @ ArgumentsNode (location: (33,8)-(33,10))
│ │ │ ├── arguments: (length: 1)
│ │ │ │ └── @ StringNode (location: (33,8)-(33,10))
│ │ │ │ ├── flags: ∅
│ │ │ │ ├── opening_loc: (33,8)-(33,9) = "\""
│ │ │ │ ├── content_loc: (33,9)-(33,9) = ""
│ │ │ │ ├── closing_loc: (33,9)-(33,10) = "\""
│ │ │ │ └── unescaped: ""
│ │ │ └── flags: ∅
│ │ ├── closing_loc: ∅
│ │ ├── block: ∅
│ │ └── flags: ∅
│ └── targets: (length: 1)
│ └── @ LocalVariableTargetNode (location: (32,0)-(33,4))
│ ├── name: :ab
│ └── depth: 0
├── @ LocalVariableReadNode (location: (33,12)-(33,14))
│ ├── name: :ab
│ └── depth: 0
├── @ MatchWriteNode (location: (35,0)-(35,24))
│ ├── call:
│ │ @ CallNode (location: (35,0)-(35,24))
│ │ ├── receiver:
│ │ │ @ RegularExpressionNode (location: (35,0)-(35,18))
│ │ │ ├── opening_loc: (35,0)-(35,1) = "/"
│ │ │ ├── content_loc: (35,1)-(35,17) = "(?<abc>)(?<abc>)"
│ │ │ ├── closing_loc: (35,17)-(35,18) = "/"
│ │ │ ├── unescaped: "(?<abc>)(?<abc>)"
│ │ │ └── flags: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :=~
│ │ ├── message_loc: (35,19)-(35,21) = "=~"
│ │ ├── opening_loc: ∅
│ │ ├── arguments:
│ │ │ @ ArgumentsNode (location: (35,22)-(35,24))
│ │ │ ├── arguments: (length: 1)
│ │ │ │ └── @ StringNode (location: (35,22)-(35,24))
│ │ │ │ ├── flags: ∅
│ │ │ │ ├── opening_loc: (35,22)-(35,23) = "\""
│ │ │ │ ├── content_loc: (35,23)-(35,23) = ""
│ │ │ │ ├── closing_loc: (35,23)-(35,24) = "\""
│ │ │ │ └── unescaped: ""
│ │ │ └── flags: ∅
│ │ ├── closing_loc: ∅
│ │ ├── block: ∅
│ │ └── flags: ∅
│ └── targets: (length: 1)
│ └── @ LocalVariableTargetNode (location: (35,4)-(35,7))
│ ├── name: :abc
│ └── depth: 0
├── @ LocalVariableReadNode (location: (35,26)-(35,29))
│ ├── name: :abc
│ └── depth: 0
├── @ CallNode (location: (37,0)-(37,16))
│ ├── receiver:
│ │ @ RegularExpressionNode (location: (37,0)-(37,10))
│ │ ├── opening_loc: (37,0)-(37,1) = "/"
│ │ ├── content_loc: (37,1)-(37,9) = "(?<a b>)"
│ │ ├── closing_loc: (37,9)-(37,10) = "/"
│ │ ├── unescaped: "(?<a b>)"
│ │ └── flags: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :=~
│ ├── message_loc: (37,11)-(37,13) = "=~"
│ ├── opening_loc: ∅
│ ├── arguments:
│ │ @ ArgumentsNode (location: (37,14)-(37,16))
│ │ ├── arguments: (length: 1)
│ │ │ └── @ StringNode (location: (37,14)-(37,16))
│ │ │ ├── flags: ∅
│ │ │ ├── opening_loc: (37,14)-(37,15) = "\""
│ │ │ ├── content_loc: (37,15)-(37,15) = ""
│ │ │ ├── closing_loc: (37,15)-(37,16) = "\""
│ │ │ └── unescaped: ""
│ │ └── flags: ∅
│ ├── closing_loc: ∅
│ ├── block: ∅
│ └── flags: ∅
├── @ LocalVariableWriteNode (location: (39,0)-(39,5))
│ ├── name: :a
│ ├── depth: 0
│ ├── name_loc: (39,0)-(39,1) = "a"
│ ├── value:
│ │ @ IntegerNode (location: (39,4)-(39,5))
│ │ └── flags: decimal
│ └── operator_loc: (39,2)-(39,3) = "="
└── @ CallNode (location: (40,0)-(40,24))
├── receiver: ∅
├── call_operator_loc: ∅
├── name: :tap
├── message_loc: (40,0)-(40,3) = "tap"
├── opening_loc: ∅
├── arguments: ∅
├── closing_loc: ∅
├── block:
│ @ BlockNode (location: (40,4)-(40,24))
│ ├── locals: []
│ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (40,6)-(40,22))
│ │ └── body: (length: 1)
│ │ └── @ MatchWriteNode (location: (40,6)-(40,22))
│ │ ├── call:
│ │ │ @ CallNode (location: (40,6)-(40,22))
│ │ │ ├── receiver:
│ │ │ │ @ RegularExpressionNode (location: (40,6)-(40,14))
│ │ │ │ ├── opening_loc: (40,6)-(40,7) = "/"
│ │ │ │ ├── content_loc: (40,7)-(40,13) = "(?<a>)"
│ │ │ │ ├── closing_loc: (40,13)-(40,14) = "/"
│ │ │ │ ├── unescaped: "(?<a>)"
│ │ │ │ └── flags: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── name: :=~
│ │ │ ├── message_loc: (40,15)-(40,17) = "=~"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments:
│ │ │ │ @ ArgumentsNode (location: (40,18)-(40,22))
│ │ │ │ ├── arguments: (length: 1)
│ │ │ │ │ └── @ CallNode (location: (40,18)-(40,22))
│ │ │ │ │ ├── receiver: ∅
│ │ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ │ ├── name: :to_s
│ │ │ │ │ ├── message_loc: (40,18)-(40,22) = "to_s"
│ │ │ │ │ ├── opening_loc: ∅
│ │ │ │ │ ├── arguments: ∅
│ │ │ │ │ ├── closing_loc: ∅
│ │ │ │ │ ├── block: ∅
│ │ │ │ │ └── flags: variable_call
│ │ │ │ └── flags: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ ├── block: ∅
│ │ │ └── flags: ∅
│ │ └── targets: (length: 1)
│ │ └── @ LocalVariableTargetNode (location: (40,10)-(40,11))
│ │ ├── name: :a
│ │ └── depth: 1
│ ├── opening_loc: (40,4)-(40,5) = "{"
│ └── closing_loc: (40,23)-(40,24) = "}"
└── flags: ∅
|