blob: 5c8e65e0866d8667337e0eb6c66dff11cfeb801b (
plain)
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
|
@ ProgramNode (location: (0...246))
├── locals: [:foo, :pair]
└── statements:
@ StatementsNode (location: (0...246))
└── body: (length: 10)
├── @ IfNode (location: (0...18))
│ ├── if_keyword_loc: (0...2) = "if"
│ ├── predicate:
│ │ @ MatchLastLineNode (location: (3...8))
│ │ ├── opening_loc: (3...4) = "/"
│ │ ├── content_loc: (4...7) = "foo"
│ │ ├── closing_loc: (7...8) = "/"
│ │ ├── unescaped: "foo"
│ │ └── flags:
│ ├── statements:
│ │ @ StatementsNode (location: (11...14))
│ │ └── body: (length: 1)
│ │ └── @ CallNode (location: (11...14))
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── message_loc: (11...14) = "bar"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ ├── block: ∅
│ │ ├── flags: variable_call
│ │ └── name: "bar"
│ ├── consequent: ∅
│ └── end_keyword_loc: (15...18) = "end"
├── @ IfNode (location: (19...31))
│ ├── if_keyword_loc: (19...21) = "if"
│ ├── predicate:
│ │ @ IntegerNode (location: (22...23))
│ │ └── flags: decimal
│ ├── statements:
│ │ @ StatementsNode (location: (26...27))
│ │ └── body: (length: 1)
│ │ └── @ IntegerNode (location: (26...27))
│ │ └── flags: decimal
│ ├── consequent: ∅
│ └── end_keyword_loc: (28...31) = "end"
├── @ IfNode (location: (32...53))
│ ├── if_keyword_loc: (32...34) = "if"
│ ├── predicate:
│ │ @ IntegerNode (location: (35...36))
│ │ └── flags: decimal
│ ├── statements:
│ │ @ StatementsNode (location: (39...40))
│ │ └── body: (length: 1)
│ │ └── @ IntegerNode (location: (39...40))
│ │ └── flags: decimal
│ ├── consequent:
│ │ @ ElseNode (location: (41...53))
│ │ ├── else_keyword_loc: (41...45) = "else"
│ │ ├── statements:
│ │ │ @ StatementsNode (location: (48...49))
│ │ │ └── body: (length: 1)
│ │ │ └── @ IntegerNode (location: (48...49))
│ │ │ └── flags: decimal
│ │ └── end_keyword_loc: (50...53) = "end"
│ └── end_keyword_loc: (50...53) = "end"
├── @ UnlessNode (location: (54...72))
│ ├── keyword_loc: (54...60) = "unless"
│ ├── predicate:
│ │ @ IntegerNode (location: (61...62))
│ │ └── flags: decimal
│ ├── statements:
│ │ @ StatementsNode (location: (65...68))
│ │ └── body: (length: 1)
│ │ └── @ NilNode (location: (65...68))
│ ├── consequent: ∅
│ └── end_keyword_loc: (69...72) = "end"
├── @ UnlessNode (location: (73...89))
│ ├── keyword_loc: (73...79) = "unless"
│ ├── predicate:
│ │ @ IntegerNode (location: (80...81))
│ │ └── flags: decimal
│ ├── statements:
│ │ @ StatementsNode (location: (84...85))
│ │ └── body: (length: 1)
│ │ └── @ IntegerNode (location: (84...85))
│ │ └── flags: decimal
│ ├── consequent: ∅
│ └── end_keyword_loc: (86...89) = "end"
├── @ IfNode (location: (90...100))
│ ├── if_keyword_loc: (90...92) = "if"
│ ├── predicate:
│ │ @ CallNode (location: (93...96))
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── message_loc: (93...96) = "foo"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ ├── block: ∅
│ │ ├── flags: variable_call
│ │ └── name: "foo"
│ ├── statements: ∅
│ ├── consequent: ∅
│ └── end_keyword_loc: (97...100) = "end"
├── @ ModuleNode (location: (102...133))
│ ├── locals: [:foo]
│ ├── module_keyword_loc: (102...108) = "module"
│ ├── constant_path:
│ │ @ ConstantReadNode (location: (109...110))
│ │ └── name: :A
│ ├── body:
│ │ @ StatementsNode (location: (113...129))
│ │ └── body: (length: 1)
│ │ └── @ IfNode (location: (113...129))
│ │ ├── if_keyword_loc: (123...125) = "if"
│ │ ├── predicate:
│ │ │ @ LocalVariableReadNode (location: (126...129))
│ │ │ ├── name: :foo
│ │ │ └── depth: 0
│ │ ├── statements:
│ │ │ @ StatementsNode (location: (113...122))
│ │ │ └── body: (length: 1)
│ │ │ └── @ LocalVariableWriteNode (location: (113...122))
│ │ │ ├── name: :foo
│ │ │ ├── depth: 0
│ │ │ ├── name_loc: (113...116) = "foo"
│ │ │ ├── value:
│ │ │ │ @ CallNode (location: (119...122))
│ │ │ │ ├── receiver: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── message_loc: (119...122) = "bar"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ ├── block: ∅
│ │ │ │ ├── flags: variable_call
│ │ │ │ └── name: "bar"
│ │ │ └── operator_loc: (117...118) = "="
│ │ ├── consequent: ∅
│ │ └── end_keyword_loc: ∅
│ ├── end_keyword_loc: (130...133) = "end"
│ └── name: :A
├── @ ModuleNode (location: (135...170))
│ ├── locals: [:foo]
│ ├── module_keyword_loc: (135...141) = "module"
│ ├── constant_path:
│ │ @ ConstantReadNode (location: (142...143))
│ │ └── name: :B
│ ├── body:
│ │ @ StatementsNode (location: (146...166))
│ │ └── body: (length: 1)
│ │ └── @ UnlessNode (location: (146...166))
│ │ ├── keyword_loc: (156...162) = "unless"
│ │ ├── predicate:
│ │ │ @ LocalVariableReadNode (location: (163...166))
│ │ │ ├── name: :foo
│ │ │ └── depth: 0
│ │ ├── statements:
│ │ │ @ StatementsNode (location: (146...155))
│ │ │ └── body: (length: 1)
│ │ │ └── @ LocalVariableWriteNode (location: (146...155))
│ │ │ ├── name: :foo
│ │ │ ├── depth: 0
│ │ │ ├── name_loc: (146...149) = "foo"
│ │ │ ├── value:
│ │ │ │ @ CallNode (location: (152...155))
│ │ │ │ ├── receiver: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── message_loc: (152...155) = "bar"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ ├── block: ∅
│ │ │ │ ├── flags: variable_call
│ │ │ │ └── name: "bar"
│ │ │ └── operator_loc: (150...151) = "="
│ │ ├── consequent: ∅
│ │ └── end_keyword_loc: ∅
│ ├── end_keyword_loc: (167...170) = "end"
│ └── name: :B
├── @ UnlessNode (location: (171...197))
│ ├── keyword_loc: (171...177) = "unless"
│ ├── predicate:
│ │ @ CallNode (location: (178...181))
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── message_loc: (178...181) = "foo"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ ├── block: ∅
│ │ ├── flags: variable_call
│ │ └── name: "foo"
│ ├── statements:
│ │ @ StatementsNode (location: (184...193))
│ │ └── body: (length: 1)
│ │ └── @ LocalVariableWriteNode (location: (184...193))
│ │ ├── name: :foo
│ │ ├── depth: 0
│ │ ├── name_loc: (184...187) = "foo"
│ │ ├── value:
│ │ │ @ CallNode (location: (190...193))
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── message_loc: (190...193) = "bar"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ ├── block: ∅
│ │ │ ├── flags: variable_call
│ │ │ └── name: "bar"
│ │ └── operator_loc: (188...189) = "="
│ ├── consequent: ∅
│ └── end_keyword_loc: (194...197) = "end"
└── @ IfNode (location: (198...246))
├── if_keyword_loc: (198...200) = "if"
├── predicate:
│ @ CallNode (location: (201...222))
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── message_loc: (201...204) = "foo"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ ├── block:
│ │ @ BlockNode (location: (205...222))
│ │ ├── locals: [:pair]
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (207...213))
│ │ │ ├── parameters:
│ │ │ │ @ ParametersNode (location: (208...212))
│ │ │ │ ├── requireds: (length: 1)
│ │ │ │ │ └── @ RequiredParameterNode (location: (208...212))
│ │ │ │ │ └── name: :pair
│ │ │ │ ├── optionals: (length: 0)
│ │ │ │ ├── posts: (length: 0)
│ │ │ │ ├── rest: ∅
│ │ │ │ ├── keywords: (length: 0)
│ │ │ │ ├── keyword_rest: ∅
│ │ │ │ └── block: ∅
│ │ │ ├── locals: (length: 0)
│ │ │ ├── opening_loc: (207...208) = "|"
│ │ │ └── closing_loc: (212...213) = "|"
│ │ ├── body:
│ │ │ @ StatementsNode (location: (216...220))
│ │ │ └── body: (length: 1)
│ │ │ └── @ LocalVariableReadNode (location: (216...220))
│ │ │ ├── name: :pair
│ │ │ └── depth: 0
│ │ ├── opening_loc: (205...206) = "{"
│ │ └── closing_loc: (221...222) = "}"
│ ├── flags:
│ └── name: "foo"
├── statements:
│ @ StatementsNode (location: (225...242))
│ └── body: (length: 2)
│ ├── @ LocalVariableWriteNode (location: (225...236))
│ │ ├── name: :pair
│ │ ├── depth: 0
│ │ ├── name_loc: (225...229) = "pair"
│ │ ├── value:
│ │ │ @ SymbolNode (location: (232...236))
│ │ │ ├── opening_loc: (232...233) = ":"
│ │ │ ├── value_loc: (233...236) = "foo"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "foo"
│ │ └── operator_loc: (230...231) = "="
│ └── @ LocalVariableReadNode (location: (239...242))
│ ├── name: :foo
│ └── depth: 0
├── consequent: ∅
└── end_keyword_loc: (243...246) = "end"
|