yarp 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -1
  3. data/Makefile +5 -1
  4. data/config.yml +156 -125
  5. data/docs/encoding.md +5 -5
  6. data/docs/serialization.md +2 -2
  7. data/ext/yarp/api_node.c +142 -98
  8. data/ext/yarp/extension.c +21 -7
  9. data/ext/yarp/extension.h +1 -1
  10. data/include/yarp/ast.h +327 -18
  11. data/include/yarp/defines.h +2 -1
  12. data/include/yarp/diagnostic.h +3 -3
  13. data/include/yarp/enc/yp_encoding.h +10 -10
  14. data/include/yarp/parser.h +19 -19
  15. data/include/yarp/regexp.h +1 -1
  16. data/include/yarp/unescape.h +4 -4
  17. data/include/yarp/util/yp_buffer.h +3 -0
  18. data/include/yarp/util/yp_char.h +16 -16
  19. data/include/yarp/util/yp_constant_pool.h +2 -2
  20. data/include/yarp/util/yp_newline_list.h +5 -5
  21. data/include/yarp/util/yp_string.h +4 -4
  22. data/include/yarp/util/yp_string_list.h +0 -3
  23. data/include/yarp/util/yp_strpbrk.h +1 -1
  24. data/include/yarp/version.h +2 -2
  25. data/include/yarp.h +5 -4
  26. data/lib/yarp/desugar_visitor.rb +59 -122
  27. data/lib/yarp/node.rb +230 -240
  28. data/lib/yarp/serialize.rb +16 -16
  29. data/lib/yarp.rb +5 -5
  30. data/src/diagnostic.c +1 -1
  31. data/src/enc/yp_big5.c +15 -42
  32. data/src/enc/yp_euc_jp.c +16 -43
  33. data/src/enc/yp_gbk.c +19 -46
  34. data/src/enc/yp_shift_jis.c +16 -43
  35. data/src/enc/yp_tables.c +36 -38
  36. data/src/enc/yp_unicode.c +20 -25
  37. data/src/enc/yp_windows_31j.c +16 -43
  38. data/src/node.c +1271 -899
  39. data/src/prettyprint.c +87 -48
  40. data/src/regexp.c +21 -21
  41. data/src/serialize.c +28 -15
  42. data/src/unescape.c +151 -121
  43. data/src/util/yp_buffer.c +7 -2
  44. data/src/util/yp_char.c +34 -34
  45. data/src/util/yp_constant_pool.c +4 -4
  46. data/src/util/yp_memchr.c +1 -1
  47. data/src/util/yp_newline_list.c +5 -4
  48. data/src/util/yp_string.c +22 -20
  49. data/src/util/yp_string_list.c +0 -6
  50. data/src/util/yp_strncasecmp.c +3 -6
  51. data/src/util/yp_strpbrk.c +8 -8
  52. data/src/yarp.c +355 -216
  53. data/yarp.gemspec +1 -1
  54. metadata +2 -2
data/src/node.c CHANGED
@@ -84,722 +84,960 @@ YP_EXPORTED_FUNCTION void
84
84
  yp_node_destroy(yp_parser_t *parser, yp_node_t *node) {
85
85
  switch (YP_NODE_TYPE(node)) {
86
86
  #line 81 "node.c.erb"
87
- case YP_NODE_ALIAS_NODE:
88
- yp_node_destroy(parser, (yp_node_t *)((yp_alias_node_t *)node)->new_name);
89
- yp_node_destroy(parser, (yp_node_t *)((yp_alias_node_t *)node)->old_name);
87
+ case YP_NODE_ALIAS_NODE: {
88
+ yp_alias_node_t *cast = (yp_alias_node_t *) node;
89
+ yp_node_destroy(parser, (yp_node_t *)cast->new_name);
90
+ yp_node_destroy(parser, (yp_node_t *)cast->old_name);
90
91
  break;
92
+ }
91
93
  #line 81 "node.c.erb"
92
- case YP_NODE_ALTERNATION_PATTERN_NODE:
93
- yp_node_destroy(parser, (yp_node_t *)((yp_alternation_pattern_node_t *)node)->left);
94
- yp_node_destroy(parser, (yp_node_t *)((yp_alternation_pattern_node_t *)node)->right);
94
+ case YP_NODE_ALTERNATION_PATTERN_NODE: {
95
+ yp_alternation_pattern_node_t *cast = (yp_alternation_pattern_node_t *) node;
96
+ yp_node_destroy(parser, (yp_node_t *)cast->left);
97
+ yp_node_destroy(parser, (yp_node_t *)cast->right);
95
98
  break;
99
+ }
96
100
  #line 81 "node.c.erb"
97
- case YP_NODE_AND_NODE:
98
- yp_node_destroy(parser, (yp_node_t *)((yp_and_node_t *)node)->left);
99
- yp_node_destroy(parser, (yp_node_t *)((yp_and_node_t *)node)->right);
101
+ case YP_NODE_AND_NODE: {
102
+ yp_and_node_t *cast = (yp_and_node_t *) node;
103
+ yp_node_destroy(parser, (yp_node_t *)cast->left);
104
+ yp_node_destroy(parser, (yp_node_t *)cast->right);
100
105
  break;
106
+ }
101
107
  #line 81 "node.c.erb"
102
- case YP_NODE_ARGUMENTS_NODE:
103
- yp_node_list_free(parser, &((yp_arguments_node_t *)node)->arguments);
108
+ case YP_NODE_ARGUMENTS_NODE: {
109
+ yp_arguments_node_t *cast = (yp_arguments_node_t *) node;
110
+ yp_node_list_free(parser, &cast->arguments);
104
111
  break;
112
+ }
105
113
  #line 81 "node.c.erb"
106
- case YP_NODE_ARRAY_NODE:
107
- yp_node_list_free(parser, &((yp_array_node_t *)node)->elements);
114
+ case YP_NODE_ARRAY_NODE: {
115
+ yp_array_node_t *cast = (yp_array_node_t *) node;
116
+ yp_node_list_free(parser, &cast->elements);
108
117
  break;
118
+ }
109
119
  #line 81 "node.c.erb"
110
- case YP_NODE_ARRAY_PATTERN_NODE:
111
- if (((yp_array_pattern_node_t *)node)->constant != NULL) {
112
- yp_node_destroy(parser, (yp_node_t *)((yp_array_pattern_node_t *)node)->constant);
120
+ case YP_NODE_ARRAY_PATTERN_NODE: {
121
+ yp_array_pattern_node_t *cast = (yp_array_pattern_node_t *) node;
122
+ if (cast->constant != NULL) {
123
+ yp_node_destroy(parser, (yp_node_t *)cast->constant);
113
124
  }
114
- yp_node_list_free(parser, &((yp_array_pattern_node_t *)node)->requireds);
115
- if (((yp_array_pattern_node_t *)node)->rest != NULL) {
116
- yp_node_destroy(parser, (yp_node_t *)((yp_array_pattern_node_t *)node)->rest);
125
+ yp_node_list_free(parser, &cast->requireds);
126
+ if (cast->rest != NULL) {
127
+ yp_node_destroy(parser, (yp_node_t *)cast->rest);
117
128
  }
118
- yp_node_list_free(parser, &((yp_array_pattern_node_t *)node)->posts);
129
+ yp_node_list_free(parser, &cast->posts);
119
130
  break;
131
+ }
120
132
  #line 81 "node.c.erb"
121
- case YP_NODE_ASSOC_NODE:
122
- yp_node_destroy(parser, (yp_node_t *)((yp_assoc_node_t *)node)->key);
123
- if (((yp_assoc_node_t *)node)->value != NULL) {
124
- yp_node_destroy(parser, (yp_node_t *)((yp_assoc_node_t *)node)->value);
133
+ case YP_NODE_ASSOC_NODE: {
134
+ yp_assoc_node_t *cast = (yp_assoc_node_t *) node;
135
+ yp_node_destroy(parser, (yp_node_t *)cast->key);
136
+ if (cast->value != NULL) {
137
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
125
138
  }
126
139
  break;
140
+ }
127
141
  #line 81 "node.c.erb"
128
- case YP_NODE_ASSOC_SPLAT_NODE:
129
- if (((yp_assoc_splat_node_t *)node)->value != NULL) {
130
- yp_node_destroy(parser, (yp_node_t *)((yp_assoc_splat_node_t *)node)->value);
142
+ case YP_NODE_ASSOC_SPLAT_NODE: {
143
+ yp_assoc_splat_node_t *cast = (yp_assoc_splat_node_t *) node;
144
+ if (cast->value != NULL) {
145
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
131
146
  }
132
147
  break;
148
+ }
133
149
  #line 81 "node.c.erb"
134
- case YP_NODE_BACK_REFERENCE_READ_NODE:
150
+ case YP_NODE_BACK_REFERENCE_READ_NODE: {
135
151
  break;
152
+ }
136
153
  #line 81 "node.c.erb"
137
- case YP_NODE_BEGIN_NODE:
138
- if (((yp_begin_node_t *)node)->statements != NULL) {
139
- yp_node_destroy(parser, (yp_node_t *)((yp_begin_node_t *)node)->statements);
154
+ case YP_NODE_BEGIN_NODE: {
155
+ yp_begin_node_t *cast = (yp_begin_node_t *) node;
156
+ if (cast->statements != NULL) {
157
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
140
158
  }
141
- if (((yp_begin_node_t *)node)->rescue_clause != NULL) {
142
- yp_node_destroy(parser, (yp_node_t *)((yp_begin_node_t *)node)->rescue_clause);
159
+ if (cast->rescue_clause != NULL) {
160
+ yp_node_destroy(parser, (yp_node_t *)cast->rescue_clause);
143
161
  }
144
- if (((yp_begin_node_t *)node)->else_clause != NULL) {
145
- yp_node_destroy(parser, (yp_node_t *)((yp_begin_node_t *)node)->else_clause);
162
+ if (cast->else_clause != NULL) {
163
+ yp_node_destroy(parser, (yp_node_t *)cast->else_clause);
146
164
  }
147
- if (((yp_begin_node_t *)node)->ensure_clause != NULL) {
148
- yp_node_destroy(parser, (yp_node_t *)((yp_begin_node_t *)node)->ensure_clause);
165
+ if (cast->ensure_clause != NULL) {
166
+ yp_node_destroy(parser, (yp_node_t *)cast->ensure_clause);
149
167
  }
150
168
  break;
169
+ }
151
170
  #line 81 "node.c.erb"
152
- case YP_NODE_BLOCK_ARGUMENT_NODE:
153
- if (((yp_block_argument_node_t *)node)->expression != NULL) {
154
- yp_node_destroy(parser, (yp_node_t *)((yp_block_argument_node_t *)node)->expression);
171
+ case YP_NODE_BLOCK_ARGUMENT_NODE: {
172
+ yp_block_argument_node_t *cast = (yp_block_argument_node_t *) node;
173
+ if (cast->expression != NULL) {
174
+ yp_node_destroy(parser, (yp_node_t *)cast->expression);
155
175
  }
156
176
  break;
177
+ }
157
178
  #line 81 "node.c.erb"
158
- case YP_NODE_BLOCK_NODE:
159
- yp_constant_id_list_free(&((yp_block_node_t *)node)->locals);
160
- if (((yp_block_node_t *)node)->parameters != NULL) {
161
- yp_node_destroy(parser, (yp_node_t *)((yp_block_node_t *)node)->parameters);
179
+ case YP_NODE_BLOCK_NODE: {
180
+ yp_block_node_t *cast = (yp_block_node_t *) node;
181
+ yp_constant_id_list_free(&cast->locals);
182
+ if (cast->parameters != NULL) {
183
+ yp_node_destroy(parser, (yp_node_t *)cast->parameters);
162
184
  }
163
- if (((yp_block_node_t *)node)->body != NULL) {
164
- yp_node_destroy(parser, (yp_node_t *)((yp_block_node_t *)node)->body);
185
+ if (cast->body != NULL) {
186
+ yp_node_destroy(parser, (yp_node_t *)cast->body);
165
187
  }
166
188
  break;
189
+ }
167
190
  #line 81 "node.c.erb"
168
- case YP_NODE_BLOCK_PARAMETER_NODE:
191
+ case YP_NODE_BLOCK_PARAMETER_NODE: {
169
192
  break;
193
+ }
170
194
  #line 81 "node.c.erb"
171
- case YP_NODE_BLOCK_PARAMETERS_NODE:
172
- if (((yp_block_parameters_node_t *)node)->parameters != NULL) {
173
- yp_node_destroy(parser, (yp_node_t *)((yp_block_parameters_node_t *)node)->parameters);
195
+ case YP_NODE_BLOCK_PARAMETERS_NODE: {
196
+ yp_block_parameters_node_t *cast = (yp_block_parameters_node_t *) node;
197
+ if (cast->parameters != NULL) {
198
+ yp_node_destroy(parser, (yp_node_t *)cast->parameters);
174
199
  }
175
- yp_location_list_free(&((yp_block_parameters_node_t *)node)->locals);
200
+ yp_location_list_free(&cast->locals);
176
201
  break;
202
+ }
177
203
  #line 81 "node.c.erb"
178
- case YP_NODE_BREAK_NODE:
179
- if (((yp_break_node_t *)node)->arguments != NULL) {
180
- yp_node_destroy(parser, (yp_node_t *)((yp_break_node_t *)node)->arguments);
204
+ case YP_NODE_BREAK_NODE: {
205
+ yp_break_node_t *cast = (yp_break_node_t *) node;
206
+ if (cast->arguments != NULL) {
207
+ yp_node_destroy(parser, (yp_node_t *)cast->arguments);
181
208
  }
182
209
  break;
210
+ }
183
211
  #line 81 "node.c.erb"
184
- case YP_NODE_CALL_NODE:
185
- if (((yp_call_node_t *)node)->receiver != NULL) {
186
- yp_node_destroy(parser, (yp_node_t *)((yp_call_node_t *)node)->receiver);
212
+ case YP_NODE_CALL_NODE: {
213
+ yp_call_node_t *cast = (yp_call_node_t *) node;
214
+ if (cast->receiver != NULL) {
215
+ yp_node_destroy(parser, (yp_node_t *)cast->receiver);
187
216
  }
188
- if (((yp_call_node_t *)node)->arguments != NULL) {
189
- yp_node_destroy(parser, (yp_node_t *)((yp_call_node_t *)node)->arguments);
217
+ if (cast->arguments != NULL) {
218
+ yp_node_destroy(parser, (yp_node_t *)cast->arguments);
190
219
  }
191
- if (((yp_call_node_t *)node)->block != NULL) {
192
- yp_node_destroy(parser, (yp_node_t *)((yp_call_node_t *)node)->block);
220
+ if (cast->block != NULL) {
221
+ yp_node_destroy(parser, (yp_node_t *)cast->block);
193
222
  }
194
- yp_string_free(&((yp_call_node_t *)node)->name);
223
+ yp_string_free(&cast->name);
195
224
  break;
225
+ }
196
226
  #line 81 "node.c.erb"
197
- case YP_NODE_CALL_OPERATOR_AND_WRITE_NODE:
198
- yp_node_destroy(parser, (yp_node_t *)((yp_call_operator_and_write_node_t *)node)->target);
199
- yp_node_destroy(parser, (yp_node_t *)((yp_call_operator_and_write_node_t *)node)->value);
227
+ case YP_NODE_CALL_OPERATOR_AND_WRITE_NODE: {
228
+ yp_call_operator_and_write_node_t *cast = (yp_call_operator_and_write_node_t *) node;
229
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
230
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
200
231
  break;
232
+ }
201
233
  #line 81 "node.c.erb"
202
- case YP_NODE_CALL_OPERATOR_OR_WRITE_NODE:
203
- yp_node_destroy(parser, (yp_node_t *)((yp_call_operator_or_write_node_t *)node)->target);
204
- yp_node_destroy(parser, (yp_node_t *)((yp_call_operator_or_write_node_t *)node)->value);
234
+ case YP_NODE_CALL_OPERATOR_OR_WRITE_NODE: {
235
+ yp_call_operator_or_write_node_t *cast = (yp_call_operator_or_write_node_t *) node;
236
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
237
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
205
238
  break;
239
+ }
206
240
  #line 81 "node.c.erb"
207
- case YP_NODE_CALL_OPERATOR_WRITE_NODE:
208
- yp_node_destroy(parser, (yp_node_t *)((yp_call_operator_write_node_t *)node)->target);
209
- yp_node_destroy(parser, (yp_node_t *)((yp_call_operator_write_node_t *)node)->value);
241
+ case YP_NODE_CALL_OPERATOR_WRITE_NODE: {
242
+ yp_call_operator_write_node_t *cast = (yp_call_operator_write_node_t *) node;
243
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
244
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
210
245
  break;
246
+ }
211
247
  #line 81 "node.c.erb"
212
- case YP_NODE_CAPTURE_PATTERN_NODE:
213
- yp_node_destroy(parser, (yp_node_t *)((yp_capture_pattern_node_t *)node)->value);
214
- yp_node_destroy(parser, (yp_node_t *)((yp_capture_pattern_node_t *)node)->target);
248
+ case YP_NODE_CAPTURE_PATTERN_NODE: {
249
+ yp_capture_pattern_node_t *cast = (yp_capture_pattern_node_t *) node;
250
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
251
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
215
252
  break;
253
+ }
216
254
  #line 81 "node.c.erb"
217
- case YP_NODE_CASE_NODE:
218
- if (((yp_case_node_t *)node)->predicate != NULL) {
219
- yp_node_destroy(parser, (yp_node_t *)((yp_case_node_t *)node)->predicate);
255
+ case YP_NODE_CASE_NODE: {
256
+ yp_case_node_t *cast = (yp_case_node_t *) node;
257
+ if (cast->predicate != NULL) {
258
+ yp_node_destroy(parser, (yp_node_t *)cast->predicate);
220
259
  }
221
- yp_node_list_free(parser, &((yp_case_node_t *)node)->conditions);
222
- if (((yp_case_node_t *)node)->consequent != NULL) {
223
- yp_node_destroy(parser, (yp_node_t *)((yp_case_node_t *)node)->consequent);
260
+ yp_node_list_free(parser, &cast->conditions);
261
+ if (cast->consequent != NULL) {
262
+ yp_node_destroy(parser, (yp_node_t *)cast->consequent);
224
263
  }
225
264
  break;
265
+ }
226
266
  #line 81 "node.c.erb"
227
- case YP_NODE_CLASS_NODE:
228
- yp_constant_id_list_free(&((yp_class_node_t *)node)->locals);
229
- yp_node_destroy(parser, (yp_node_t *)((yp_class_node_t *)node)->constant_path);
230
- if (((yp_class_node_t *)node)->superclass != NULL) {
231
- yp_node_destroy(parser, (yp_node_t *)((yp_class_node_t *)node)->superclass);
267
+ case YP_NODE_CLASS_NODE: {
268
+ yp_class_node_t *cast = (yp_class_node_t *) node;
269
+ yp_constant_id_list_free(&cast->locals);
270
+ yp_node_destroy(parser, (yp_node_t *)cast->constant_path);
271
+ if (cast->superclass != NULL) {
272
+ yp_node_destroy(parser, (yp_node_t *)cast->superclass);
232
273
  }
233
- if (((yp_class_node_t *)node)->body != NULL) {
234
- yp_node_destroy(parser, (yp_node_t *)((yp_class_node_t *)node)->body);
274
+ if (cast->body != NULL) {
275
+ yp_node_destroy(parser, (yp_node_t *)cast->body);
235
276
  }
236
- yp_string_free(&((yp_class_node_t *)node)->name);
277
+ yp_string_free(&cast->name);
237
278
  break;
279
+ }
238
280
  #line 81 "node.c.erb"
239
- case YP_NODE_CLASS_VARIABLE_AND_WRITE_NODE:
240
- yp_node_destroy(parser, (yp_node_t *)((yp_class_variable_and_write_node_t *)node)->value);
281
+ case YP_NODE_CLASS_VARIABLE_AND_WRITE_NODE: {
282
+ yp_class_variable_and_write_node_t *cast = (yp_class_variable_and_write_node_t *) node;
283
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
241
284
  break;
285
+ }
242
286
  #line 81 "node.c.erb"
243
- case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE:
244
- yp_node_destroy(parser, (yp_node_t *)((yp_class_variable_operator_write_node_t *)node)->value);
287
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
288
+ yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
289
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
245
290
  break;
291
+ }
246
292
  #line 81 "node.c.erb"
247
- case YP_NODE_CLASS_VARIABLE_OR_WRITE_NODE:
248
- yp_node_destroy(parser, (yp_node_t *)((yp_class_variable_or_write_node_t *)node)->value);
293
+ case YP_NODE_CLASS_VARIABLE_OR_WRITE_NODE: {
294
+ yp_class_variable_or_write_node_t *cast = (yp_class_variable_or_write_node_t *) node;
295
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
249
296
  break;
297
+ }
250
298
  #line 81 "node.c.erb"
251
- case YP_NODE_CLASS_VARIABLE_READ_NODE:
299
+ case YP_NODE_CLASS_VARIABLE_READ_NODE: {
252
300
  break;
301
+ }
253
302
  #line 81 "node.c.erb"
254
- case YP_NODE_CLASS_VARIABLE_TARGET_NODE:
303
+ case YP_NODE_CLASS_VARIABLE_TARGET_NODE: {
255
304
  break;
305
+ }
256
306
  #line 81 "node.c.erb"
257
- case YP_NODE_CLASS_VARIABLE_WRITE_NODE:
258
- if (((yp_class_variable_write_node_t *)node)->value != NULL) {
259
- yp_node_destroy(parser, (yp_node_t *)((yp_class_variable_write_node_t *)node)->value);
307
+ case YP_NODE_CLASS_VARIABLE_WRITE_NODE: {
308
+ yp_class_variable_write_node_t *cast = (yp_class_variable_write_node_t *) node;
309
+ if (cast->value != NULL) {
310
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
260
311
  }
261
312
  break;
313
+ }
262
314
  #line 81 "node.c.erb"
263
- case YP_NODE_CONSTANT_AND_WRITE_NODE:
264
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_and_write_node_t *)node)->value);
315
+ case YP_NODE_CONSTANT_AND_WRITE_NODE: {
316
+ yp_constant_and_write_node_t *cast = (yp_constant_and_write_node_t *) node;
317
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
265
318
  break;
319
+ }
266
320
  #line 81 "node.c.erb"
267
- case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE:
268
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_operator_write_node_t *)node)->value);
321
+ case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
322
+ yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
323
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
269
324
  break;
325
+ }
270
326
  #line 81 "node.c.erb"
271
- case YP_NODE_CONSTANT_OR_WRITE_NODE:
272
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_or_write_node_t *)node)->value);
327
+ case YP_NODE_CONSTANT_OR_WRITE_NODE: {
328
+ yp_constant_or_write_node_t *cast = (yp_constant_or_write_node_t *) node;
329
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
273
330
  break;
331
+ }
274
332
  #line 81 "node.c.erb"
275
- case YP_NODE_CONSTANT_PATH_AND_WRITE_NODE:
276
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_and_write_node_t *)node)->target);
277
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_and_write_node_t *)node)->value);
333
+ case YP_NODE_CONSTANT_PATH_AND_WRITE_NODE: {
334
+ yp_constant_path_and_write_node_t *cast = (yp_constant_path_and_write_node_t *) node;
335
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
336
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
278
337
  break;
338
+ }
279
339
  #line 81 "node.c.erb"
280
- case YP_NODE_CONSTANT_PATH_NODE:
281
- if (((yp_constant_path_node_t *)node)->parent != NULL) {
282
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_node_t *)node)->parent);
340
+ case YP_NODE_CONSTANT_PATH_NODE: {
341
+ yp_constant_path_node_t *cast = (yp_constant_path_node_t *) node;
342
+ if (cast->parent != NULL) {
343
+ yp_node_destroy(parser, (yp_node_t *)cast->parent);
283
344
  }
284
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_node_t *)node)->child);
345
+ yp_node_destroy(parser, (yp_node_t *)cast->child);
285
346
  break;
347
+ }
286
348
  #line 81 "node.c.erb"
287
- case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE:
288
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_operator_write_node_t *)node)->target);
289
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_operator_write_node_t *)node)->value);
349
+ case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
350
+ yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
351
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
352
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
290
353
  break;
354
+ }
291
355
  #line 81 "node.c.erb"
292
- case YP_NODE_CONSTANT_PATH_OR_WRITE_NODE:
293
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_or_write_node_t *)node)->target);
294
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_or_write_node_t *)node)->value);
356
+ case YP_NODE_CONSTANT_PATH_OR_WRITE_NODE: {
357
+ yp_constant_path_or_write_node_t *cast = (yp_constant_path_or_write_node_t *) node;
358
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
359
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
295
360
  break;
361
+ }
296
362
  #line 81 "node.c.erb"
297
- case YP_NODE_CONSTANT_PATH_TARGET_NODE:
298
- if (((yp_constant_path_target_node_t *)node)->parent != NULL) {
299
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_target_node_t *)node)->parent);
363
+ case YP_NODE_CONSTANT_PATH_TARGET_NODE: {
364
+ yp_constant_path_target_node_t *cast = (yp_constant_path_target_node_t *) node;
365
+ if (cast->parent != NULL) {
366
+ yp_node_destroy(parser, (yp_node_t *)cast->parent);
300
367
  }
301
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_target_node_t *)node)->child);
368
+ yp_node_destroy(parser, (yp_node_t *)cast->child);
302
369
  break;
370
+ }
303
371
  #line 81 "node.c.erb"
304
- case YP_NODE_CONSTANT_PATH_WRITE_NODE:
305
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_write_node_t *)node)->target);
306
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_path_write_node_t *)node)->value);
372
+ case YP_NODE_CONSTANT_PATH_WRITE_NODE: {
373
+ yp_constant_path_write_node_t *cast = (yp_constant_path_write_node_t *) node;
374
+ yp_node_destroy(parser, (yp_node_t *)cast->target);
375
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
307
376
  break;
377
+ }
308
378
  #line 81 "node.c.erb"
309
- case YP_NODE_CONSTANT_READ_NODE:
379
+ case YP_NODE_CONSTANT_READ_NODE: {
310
380
  break;
381
+ }
311
382
  #line 81 "node.c.erb"
312
- case YP_NODE_CONSTANT_TARGET_NODE:
383
+ case YP_NODE_CONSTANT_TARGET_NODE: {
313
384
  break;
385
+ }
314
386
  #line 81 "node.c.erb"
315
- case YP_NODE_CONSTANT_WRITE_NODE:
316
- yp_node_destroy(parser, (yp_node_t *)((yp_constant_write_node_t *)node)->value);
387
+ case YP_NODE_CONSTANT_WRITE_NODE: {
388
+ yp_constant_write_node_t *cast = (yp_constant_write_node_t *) node;
389
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
317
390
  break;
391
+ }
318
392
  #line 81 "node.c.erb"
319
- case YP_NODE_DEF_NODE:
320
- if (((yp_def_node_t *)node)->receiver != NULL) {
321
- yp_node_destroy(parser, (yp_node_t *)((yp_def_node_t *)node)->receiver);
393
+ case YP_NODE_DEF_NODE: {
394
+ yp_def_node_t *cast = (yp_def_node_t *) node;
395
+ if (cast->receiver != NULL) {
396
+ yp_node_destroy(parser, (yp_node_t *)cast->receiver);
322
397
  }
323
- if (((yp_def_node_t *)node)->parameters != NULL) {
324
- yp_node_destroy(parser, (yp_node_t *)((yp_def_node_t *)node)->parameters);
398
+ if (cast->parameters != NULL) {
399
+ yp_node_destroy(parser, (yp_node_t *)cast->parameters);
325
400
  }
326
- if (((yp_def_node_t *)node)->body != NULL) {
327
- yp_node_destroy(parser, (yp_node_t *)((yp_def_node_t *)node)->body);
401
+ if (cast->body != NULL) {
402
+ yp_node_destroy(parser, (yp_node_t *)cast->body);
328
403
  }
329
- yp_constant_id_list_free(&((yp_def_node_t *)node)->locals);
404
+ yp_constant_id_list_free(&cast->locals);
330
405
  break;
406
+ }
331
407
  #line 81 "node.c.erb"
332
- case YP_NODE_DEFINED_NODE:
333
- yp_node_destroy(parser, (yp_node_t *)((yp_defined_node_t *)node)->value);
408
+ case YP_NODE_DEFINED_NODE: {
409
+ yp_defined_node_t *cast = (yp_defined_node_t *) node;
410
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
334
411
  break;
412
+ }
335
413
  #line 81 "node.c.erb"
336
- case YP_NODE_ELSE_NODE:
337
- if (((yp_else_node_t *)node)->statements != NULL) {
338
- yp_node_destroy(parser, (yp_node_t *)((yp_else_node_t *)node)->statements);
414
+ case YP_NODE_ELSE_NODE: {
415
+ yp_else_node_t *cast = (yp_else_node_t *) node;
416
+ if (cast->statements != NULL) {
417
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
339
418
  }
340
419
  break;
420
+ }
341
421
  #line 81 "node.c.erb"
342
- case YP_NODE_EMBEDDED_STATEMENTS_NODE:
343
- if (((yp_embedded_statements_node_t *)node)->statements != NULL) {
344
- yp_node_destroy(parser, (yp_node_t *)((yp_embedded_statements_node_t *)node)->statements);
422
+ case YP_NODE_EMBEDDED_STATEMENTS_NODE: {
423
+ yp_embedded_statements_node_t *cast = (yp_embedded_statements_node_t *) node;
424
+ if (cast->statements != NULL) {
425
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
345
426
  }
346
427
  break;
428
+ }
347
429
  #line 81 "node.c.erb"
348
- case YP_NODE_EMBEDDED_VARIABLE_NODE:
349
- yp_node_destroy(parser, (yp_node_t *)((yp_embedded_variable_node_t *)node)->variable);
430
+ case YP_NODE_EMBEDDED_VARIABLE_NODE: {
431
+ yp_embedded_variable_node_t *cast = (yp_embedded_variable_node_t *) node;
432
+ yp_node_destroy(parser, (yp_node_t *)cast->variable);
350
433
  break;
434
+ }
351
435
  #line 81 "node.c.erb"
352
- case YP_NODE_ENSURE_NODE:
353
- if (((yp_ensure_node_t *)node)->statements != NULL) {
354
- yp_node_destroy(parser, (yp_node_t *)((yp_ensure_node_t *)node)->statements);
436
+ case YP_NODE_ENSURE_NODE: {
437
+ yp_ensure_node_t *cast = (yp_ensure_node_t *) node;
438
+ if (cast->statements != NULL) {
439
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
355
440
  }
356
441
  break;
442
+ }
357
443
  #line 81 "node.c.erb"
358
- case YP_NODE_FALSE_NODE:
444
+ case YP_NODE_FALSE_NODE: {
359
445
  break;
446
+ }
360
447
  #line 81 "node.c.erb"
361
- case YP_NODE_FIND_PATTERN_NODE:
362
- if (((yp_find_pattern_node_t *)node)->constant != NULL) {
363
- yp_node_destroy(parser, (yp_node_t *)((yp_find_pattern_node_t *)node)->constant);
448
+ case YP_NODE_FIND_PATTERN_NODE: {
449
+ yp_find_pattern_node_t *cast = (yp_find_pattern_node_t *) node;
450
+ if (cast->constant != NULL) {
451
+ yp_node_destroy(parser, (yp_node_t *)cast->constant);
364
452
  }
365
- yp_node_destroy(parser, (yp_node_t *)((yp_find_pattern_node_t *)node)->left);
366
- yp_node_list_free(parser, &((yp_find_pattern_node_t *)node)->requireds);
367
- yp_node_destroy(parser, (yp_node_t *)((yp_find_pattern_node_t *)node)->right);
453
+ yp_node_destroy(parser, (yp_node_t *)cast->left);
454
+ yp_node_list_free(parser, &cast->requireds);
455
+ yp_node_destroy(parser, (yp_node_t *)cast->right);
368
456
  break;
457
+ }
369
458
  #line 81 "node.c.erb"
370
- case YP_NODE_FLIP_FLOP_NODE:
371
- if (((yp_flip_flop_node_t *)node)->left != NULL) {
372
- yp_node_destroy(parser, (yp_node_t *)((yp_flip_flop_node_t *)node)->left);
459
+ case YP_NODE_FLIP_FLOP_NODE: {
460
+ yp_flip_flop_node_t *cast = (yp_flip_flop_node_t *) node;
461
+ if (cast->left != NULL) {
462
+ yp_node_destroy(parser, (yp_node_t *)cast->left);
373
463
  }
374
- if (((yp_flip_flop_node_t *)node)->right != NULL) {
375
- yp_node_destroy(parser, (yp_node_t *)((yp_flip_flop_node_t *)node)->right);
464
+ if (cast->right != NULL) {
465
+ yp_node_destroy(parser, (yp_node_t *)cast->right);
376
466
  }
377
467
  break;
468
+ }
378
469
  #line 81 "node.c.erb"
379
- case YP_NODE_FLOAT_NODE:
470
+ case YP_NODE_FLOAT_NODE: {
380
471
  break;
472
+ }
381
473
  #line 81 "node.c.erb"
382
- case YP_NODE_FOR_NODE:
383
- yp_node_destroy(parser, (yp_node_t *)((yp_for_node_t *)node)->index);
384
- yp_node_destroy(parser, (yp_node_t *)((yp_for_node_t *)node)->collection);
385
- if (((yp_for_node_t *)node)->statements != NULL) {
386
- yp_node_destroy(parser, (yp_node_t *)((yp_for_node_t *)node)->statements);
474
+ case YP_NODE_FOR_NODE: {
475
+ yp_for_node_t *cast = (yp_for_node_t *) node;
476
+ yp_node_destroy(parser, (yp_node_t *)cast->index);
477
+ yp_node_destroy(parser, (yp_node_t *)cast->collection);
478
+ if (cast->statements != NULL) {
479
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
387
480
  }
388
481
  break;
482
+ }
389
483
  #line 81 "node.c.erb"
390
- case YP_NODE_FORWARDING_ARGUMENTS_NODE:
484
+ case YP_NODE_FORWARDING_ARGUMENTS_NODE: {
391
485
  break;
486
+ }
392
487
  #line 81 "node.c.erb"
393
- case YP_NODE_FORWARDING_PARAMETER_NODE:
488
+ case YP_NODE_FORWARDING_PARAMETER_NODE: {
394
489
  break;
490
+ }
395
491
  #line 81 "node.c.erb"
396
- case YP_NODE_FORWARDING_SUPER_NODE:
397
- if (((yp_forwarding_super_node_t *)node)->block != NULL) {
398
- yp_node_destroy(parser, (yp_node_t *)((yp_forwarding_super_node_t *)node)->block);
492
+ case YP_NODE_FORWARDING_SUPER_NODE: {
493
+ yp_forwarding_super_node_t *cast = (yp_forwarding_super_node_t *) node;
494
+ if (cast->block != NULL) {
495
+ yp_node_destroy(parser, (yp_node_t *)cast->block);
399
496
  }
400
497
  break;
498
+ }
401
499
  #line 81 "node.c.erb"
402
- case YP_NODE_GLOBAL_VARIABLE_AND_WRITE_NODE:
403
- yp_node_destroy(parser, (yp_node_t *)((yp_global_variable_and_write_node_t *)node)->value);
500
+ case YP_NODE_GLOBAL_VARIABLE_AND_WRITE_NODE: {
501
+ yp_global_variable_and_write_node_t *cast = (yp_global_variable_and_write_node_t *) node;
502
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
404
503
  break;
504
+ }
405
505
  #line 81 "node.c.erb"
406
- case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE:
407
- yp_node_destroy(parser, (yp_node_t *)((yp_global_variable_operator_write_node_t *)node)->value);
506
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
507
+ yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
508
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
408
509
  break;
510
+ }
409
511
  #line 81 "node.c.erb"
410
- case YP_NODE_GLOBAL_VARIABLE_OR_WRITE_NODE:
411
- yp_node_destroy(parser, (yp_node_t *)((yp_global_variable_or_write_node_t *)node)->value);
512
+ case YP_NODE_GLOBAL_VARIABLE_OR_WRITE_NODE: {
513
+ yp_global_variable_or_write_node_t *cast = (yp_global_variable_or_write_node_t *) node;
514
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
412
515
  break;
516
+ }
413
517
  #line 81 "node.c.erb"
414
- case YP_NODE_GLOBAL_VARIABLE_READ_NODE:
518
+ case YP_NODE_GLOBAL_VARIABLE_READ_NODE: {
415
519
  break;
520
+ }
416
521
  #line 81 "node.c.erb"
417
- case YP_NODE_GLOBAL_VARIABLE_TARGET_NODE:
522
+ case YP_NODE_GLOBAL_VARIABLE_TARGET_NODE: {
418
523
  break;
524
+ }
419
525
  #line 81 "node.c.erb"
420
- case YP_NODE_GLOBAL_VARIABLE_WRITE_NODE:
421
- yp_node_destroy(parser, (yp_node_t *)((yp_global_variable_write_node_t *)node)->value);
526
+ case YP_NODE_GLOBAL_VARIABLE_WRITE_NODE: {
527
+ yp_global_variable_write_node_t *cast = (yp_global_variable_write_node_t *) node;
528
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
422
529
  break;
530
+ }
423
531
  #line 81 "node.c.erb"
424
- case YP_NODE_HASH_NODE:
425
- yp_node_list_free(parser, &((yp_hash_node_t *)node)->elements);
532
+ case YP_NODE_HASH_NODE: {
533
+ yp_hash_node_t *cast = (yp_hash_node_t *) node;
534
+ yp_node_list_free(parser, &cast->elements);
426
535
  break;
536
+ }
427
537
  #line 81 "node.c.erb"
428
- case YP_NODE_HASH_PATTERN_NODE:
429
- if (((yp_hash_pattern_node_t *)node)->constant != NULL) {
430
- yp_node_destroy(parser, (yp_node_t *)((yp_hash_pattern_node_t *)node)->constant);
538
+ case YP_NODE_HASH_PATTERN_NODE: {
539
+ yp_hash_pattern_node_t *cast = (yp_hash_pattern_node_t *) node;
540
+ if (cast->constant != NULL) {
541
+ yp_node_destroy(parser, (yp_node_t *)cast->constant);
431
542
  }
432
- yp_node_list_free(parser, &((yp_hash_pattern_node_t *)node)->assocs);
433
- if (((yp_hash_pattern_node_t *)node)->kwrest != NULL) {
434
- yp_node_destroy(parser, (yp_node_t *)((yp_hash_pattern_node_t *)node)->kwrest);
543
+ yp_node_list_free(parser, &cast->assocs);
544
+ if (cast->kwrest != NULL) {
545
+ yp_node_destroy(parser, (yp_node_t *)cast->kwrest);
435
546
  }
436
547
  break;
548
+ }
437
549
  #line 81 "node.c.erb"
438
- case YP_NODE_IF_NODE:
439
- yp_node_destroy(parser, (yp_node_t *)((yp_if_node_t *)node)->predicate);
440
- if (((yp_if_node_t *)node)->statements != NULL) {
441
- yp_node_destroy(parser, (yp_node_t *)((yp_if_node_t *)node)->statements);
550
+ case YP_NODE_IF_NODE: {
551
+ yp_if_node_t *cast = (yp_if_node_t *) node;
552
+ yp_node_destroy(parser, (yp_node_t *)cast->predicate);
553
+ if (cast->statements != NULL) {
554
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
442
555
  }
443
- if (((yp_if_node_t *)node)->consequent != NULL) {
444
- yp_node_destroy(parser, (yp_node_t *)((yp_if_node_t *)node)->consequent);
556
+ if (cast->consequent != NULL) {
557
+ yp_node_destroy(parser, (yp_node_t *)cast->consequent);
445
558
  }
446
559
  break;
560
+ }
447
561
  #line 81 "node.c.erb"
448
- case YP_NODE_IMAGINARY_NODE:
449
- yp_node_destroy(parser, (yp_node_t *)((yp_imaginary_node_t *)node)->numeric);
562
+ case YP_NODE_IMAGINARY_NODE: {
563
+ yp_imaginary_node_t *cast = (yp_imaginary_node_t *) node;
564
+ yp_node_destroy(parser, (yp_node_t *)cast->numeric);
450
565
  break;
566
+ }
451
567
  #line 81 "node.c.erb"
452
- case YP_NODE_IN_NODE:
453
- yp_node_destroy(parser, (yp_node_t *)((yp_in_node_t *)node)->pattern);
454
- if (((yp_in_node_t *)node)->statements != NULL) {
455
- yp_node_destroy(parser, (yp_node_t *)((yp_in_node_t *)node)->statements);
568
+ case YP_NODE_IN_NODE: {
569
+ yp_in_node_t *cast = (yp_in_node_t *) node;
570
+ yp_node_destroy(parser, (yp_node_t *)cast->pattern);
571
+ if (cast->statements != NULL) {
572
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
456
573
  }
457
574
  break;
575
+ }
458
576
  #line 81 "node.c.erb"
459
- case YP_NODE_INSTANCE_VARIABLE_AND_WRITE_NODE:
460
- yp_node_destroy(parser, (yp_node_t *)((yp_instance_variable_and_write_node_t *)node)->value);
577
+ case YP_NODE_INSTANCE_VARIABLE_AND_WRITE_NODE: {
578
+ yp_instance_variable_and_write_node_t *cast = (yp_instance_variable_and_write_node_t *) node;
579
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
461
580
  break;
581
+ }
462
582
  #line 81 "node.c.erb"
463
- case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE:
464
- yp_node_destroy(parser, (yp_node_t *)((yp_instance_variable_operator_write_node_t *)node)->value);
583
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
584
+ yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
585
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
465
586
  break;
587
+ }
466
588
  #line 81 "node.c.erb"
467
- case YP_NODE_INSTANCE_VARIABLE_OR_WRITE_NODE:
468
- yp_node_destroy(parser, (yp_node_t *)((yp_instance_variable_or_write_node_t *)node)->value);
589
+ case YP_NODE_INSTANCE_VARIABLE_OR_WRITE_NODE: {
590
+ yp_instance_variable_or_write_node_t *cast = (yp_instance_variable_or_write_node_t *) node;
591
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
469
592
  break;
593
+ }
470
594
  #line 81 "node.c.erb"
471
- case YP_NODE_INSTANCE_VARIABLE_READ_NODE:
595
+ case YP_NODE_INSTANCE_VARIABLE_READ_NODE: {
472
596
  break;
597
+ }
473
598
  #line 81 "node.c.erb"
474
- case YP_NODE_INSTANCE_VARIABLE_TARGET_NODE:
599
+ case YP_NODE_INSTANCE_VARIABLE_TARGET_NODE: {
475
600
  break;
601
+ }
476
602
  #line 81 "node.c.erb"
477
- case YP_NODE_INSTANCE_VARIABLE_WRITE_NODE:
478
- yp_node_destroy(parser, (yp_node_t *)((yp_instance_variable_write_node_t *)node)->value);
603
+ case YP_NODE_INSTANCE_VARIABLE_WRITE_NODE: {
604
+ yp_instance_variable_write_node_t *cast = (yp_instance_variable_write_node_t *) node;
605
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
479
606
  break;
607
+ }
480
608
  #line 81 "node.c.erb"
481
- case YP_NODE_INTEGER_NODE:
609
+ case YP_NODE_INTEGER_NODE: {
482
610
  break;
611
+ }
483
612
  #line 81 "node.c.erb"
484
- case YP_NODE_INTERPOLATED_REGULAR_EXPRESSION_NODE:
485
- yp_node_list_free(parser, &((yp_interpolated_regular_expression_node_t *)node)->parts);
613
+ case YP_NODE_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
614
+ yp_interpolated_regular_expression_node_t *cast = (yp_interpolated_regular_expression_node_t *) node;
615
+ yp_node_list_free(parser, &cast->parts);
486
616
  break;
617
+ }
487
618
  #line 81 "node.c.erb"
488
- case YP_NODE_INTERPOLATED_STRING_NODE:
489
- yp_node_list_free(parser, &((yp_interpolated_string_node_t *)node)->parts);
619
+ case YP_NODE_INTERPOLATED_STRING_NODE: {
620
+ yp_interpolated_string_node_t *cast = (yp_interpolated_string_node_t *) node;
621
+ yp_node_list_free(parser, &cast->parts);
490
622
  break;
623
+ }
491
624
  #line 81 "node.c.erb"
492
- case YP_NODE_INTERPOLATED_SYMBOL_NODE:
493
- yp_node_list_free(parser, &((yp_interpolated_symbol_node_t *)node)->parts);
625
+ case YP_NODE_INTERPOLATED_SYMBOL_NODE: {
626
+ yp_interpolated_symbol_node_t *cast = (yp_interpolated_symbol_node_t *) node;
627
+ yp_node_list_free(parser, &cast->parts);
494
628
  break;
629
+ }
495
630
  #line 81 "node.c.erb"
496
- case YP_NODE_INTERPOLATED_X_STRING_NODE:
497
- yp_node_list_free(parser, &((yp_interpolated_x_string_node_t *)node)->parts);
631
+ case YP_NODE_INTERPOLATED_X_STRING_NODE: {
632
+ yp_interpolated_x_string_node_t *cast = (yp_interpolated_x_string_node_t *) node;
633
+ yp_node_list_free(parser, &cast->parts);
498
634
  break;
635
+ }
499
636
  #line 81 "node.c.erb"
500
- case YP_NODE_KEYWORD_HASH_NODE:
501
- yp_node_list_free(parser, &((yp_keyword_hash_node_t *)node)->elements);
637
+ case YP_NODE_KEYWORD_HASH_NODE: {
638
+ yp_keyword_hash_node_t *cast = (yp_keyword_hash_node_t *) node;
639
+ yp_node_list_free(parser, &cast->elements);
502
640
  break;
641
+ }
503
642
  #line 81 "node.c.erb"
504
- case YP_NODE_KEYWORD_PARAMETER_NODE:
505
- if (((yp_keyword_parameter_node_t *)node)->value != NULL) {
506
- yp_node_destroy(parser, (yp_node_t *)((yp_keyword_parameter_node_t *)node)->value);
643
+ case YP_NODE_KEYWORD_PARAMETER_NODE: {
644
+ yp_keyword_parameter_node_t *cast = (yp_keyword_parameter_node_t *) node;
645
+ if (cast->value != NULL) {
646
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
507
647
  }
508
648
  break;
649
+ }
509
650
  #line 81 "node.c.erb"
510
- case YP_NODE_KEYWORD_REST_PARAMETER_NODE:
651
+ case YP_NODE_KEYWORD_REST_PARAMETER_NODE: {
511
652
  break;
653
+ }
512
654
  #line 81 "node.c.erb"
513
- case YP_NODE_LAMBDA_NODE:
514
- yp_constant_id_list_free(&((yp_lambda_node_t *)node)->locals);
515
- if (((yp_lambda_node_t *)node)->parameters != NULL) {
516
- yp_node_destroy(parser, (yp_node_t *)((yp_lambda_node_t *)node)->parameters);
655
+ case YP_NODE_LAMBDA_NODE: {
656
+ yp_lambda_node_t *cast = (yp_lambda_node_t *) node;
657
+ yp_constant_id_list_free(&cast->locals);
658
+ if (cast->parameters != NULL) {
659
+ yp_node_destroy(parser, (yp_node_t *)cast->parameters);
517
660
  }
518
- if (((yp_lambda_node_t *)node)->body != NULL) {
519
- yp_node_destroy(parser, (yp_node_t *)((yp_lambda_node_t *)node)->body);
661
+ if (cast->body != NULL) {
662
+ yp_node_destroy(parser, (yp_node_t *)cast->body);
520
663
  }
521
664
  break;
665
+ }
522
666
  #line 81 "node.c.erb"
523
- case YP_NODE_LOCAL_VARIABLE_AND_WRITE_NODE:
524
- yp_node_destroy(parser, (yp_node_t *)((yp_local_variable_and_write_node_t *)node)->value);
667
+ case YP_NODE_LOCAL_VARIABLE_AND_WRITE_NODE: {
668
+ yp_local_variable_and_write_node_t *cast = (yp_local_variable_and_write_node_t *) node;
669
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
525
670
  break;
671
+ }
526
672
  #line 81 "node.c.erb"
527
- case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE:
528
- yp_node_destroy(parser, (yp_node_t *)((yp_local_variable_operator_write_node_t *)node)->value);
673
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
674
+ yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
675
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
529
676
  break;
677
+ }
530
678
  #line 81 "node.c.erb"
531
- case YP_NODE_LOCAL_VARIABLE_OR_WRITE_NODE:
532
- yp_node_destroy(parser, (yp_node_t *)((yp_local_variable_or_write_node_t *)node)->value);
679
+ case YP_NODE_LOCAL_VARIABLE_OR_WRITE_NODE: {
680
+ yp_local_variable_or_write_node_t *cast = (yp_local_variable_or_write_node_t *) node;
681
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
533
682
  break;
683
+ }
534
684
  #line 81 "node.c.erb"
535
- case YP_NODE_LOCAL_VARIABLE_READ_NODE:
685
+ case YP_NODE_LOCAL_VARIABLE_READ_NODE: {
536
686
  break;
687
+ }
537
688
  #line 81 "node.c.erb"
538
- case YP_NODE_LOCAL_VARIABLE_TARGET_NODE:
689
+ case YP_NODE_LOCAL_VARIABLE_TARGET_NODE: {
539
690
  break;
691
+ }
540
692
  #line 81 "node.c.erb"
541
- case YP_NODE_LOCAL_VARIABLE_WRITE_NODE:
542
- yp_node_destroy(parser, (yp_node_t *)((yp_local_variable_write_node_t *)node)->value);
693
+ case YP_NODE_LOCAL_VARIABLE_WRITE_NODE: {
694
+ yp_local_variable_write_node_t *cast = (yp_local_variable_write_node_t *) node;
695
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
543
696
  break;
697
+ }
544
698
  #line 81 "node.c.erb"
545
- case YP_NODE_MATCH_PREDICATE_NODE:
546
- yp_node_destroy(parser, (yp_node_t *)((yp_match_predicate_node_t *)node)->value);
547
- yp_node_destroy(parser, (yp_node_t *)((yp_match_predicate_node_t *)node)->pattern);
699
+ case YP_NODE_MATCH_PREDICATE_NODE: {
700
+ yp_match_predicate_node_t *cast = (yp_match_predicate_node_t *) node;
701
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
702
+ yp_node_destroy(parser, (yp_node_t *)cast->pattern);
548
703
  break;
704
+ }
549
705
  #line 81 "node.c.erb"
550
- case YP_NODE_MATCH_REQUIRED_NODE:
551
- yp_node_destroy(parser, (yp_node_t *)((yp_match_required_node_t *)node)->value);
552
- yp_node_destroy(parser, (yp_node_t *)((yp_match_required_node_t *)node)->pattern);
706
+ case YP_NODE_MATCH_REQUIRED_NODE: {
707
+ yp_match_required_node_t *cast = (yp_match_required_node_t *) node;
708
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
709
+ yp_node_destroy(parser, (yp_node_t *)cast->pattern);
553
710
  break;
711
+ }
554
712
  #line 81 "node.c.erb"
555
- case YP_NODE_MISSING_NODE:
713
+ case YP_NODE_MISSING_NODE: {
556
714
  break;
715
+ }
557
716
  #line 81 "node.c.erb"
558
- case YP_NODE_MODULE_NODE:
559
- yp_constant_id_list_free(&((yp_module_node_t *)node)->locals);
560
- yp_node_destroy(parser, (yp_node_t *)((yp_module_node_t *)node)->constant_path);
561
- if (((yp_module_node_t *)node)->body != NULL) {
562
- yp_node_destroy(parser, (yp_node_t *)((yp_module_node_t *)node)->body);
717
+ case YP_NODE_MODULE_NODE: {
718
+ yp_module_node_t *cast = (yp_module_node_t *) node;
719
+ yp_constant_id_list_free(&cast->locals);
720
+ yp_node_destroy(parser, (yp_node_t *)cast->constant_path);
721
+ if (cast->body != NULL) {
722
+ yp_node_destroy(parser, (yp_node_t *)cast->body);
563
723
  }
564
- yp_string_free(&((yp_module_node_t *)node)->name);
724
+ yp_string_free(&cast->name);
565
725
  break;
726
+ }
566
727
  #line 81 "node.c.erb"
567
- case YP_NODE_MULTI_WRITE_NODE:
568
- yp_node_list_free(parser, &((yp_multi_write_node_t *)node)->targets);
569
- if (((yp_multi_write_node_t *)node)->value != NULL) {
570
- yp_node_destroy(parser, (yp_node_t *)((yp_multi_write_node_t *)node)->value);
728
+ case YP_NODE_MULTI_WRITE_NODE: {
729
+ yp_multi_write_node_t *cast = (yp_multi_write_node_t *) node;
730
+ yp_node_list_free(parser, &cast->targets);
731
+ if (cast->value != NULL) {
732
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
571
733
  }
572
734
  break;
735
+ }
573
736
  #line 81 "node.c.erb"
574
- case YP_NODE_NEXT_NODE:
575
- if (((yp_next_node_t *)node)->arguments != NULL) {
576
- yp_node_destroy(parser, (yp_node_t *)((yp_next_node_t *)node)->arguments);
737
+ case YP_NODE_NEXT_NODE: {
738
+ yp_next_node_t *cast = (yp_next_node_t *) node;
739
+ if (cast->arguments != NULL) {
740
+ yp_node_destroy(parser, (yp_node_t *)cast->arguments);
577
741
  }
578
742
  break;
743
+ }
579
744
  #line 81 "node.c.erb"
580
- case YP_NODE_NIL_NODE:
745
+ case YP_NODE_NIL_NODE: {
581
746
  break;
747
+ }
582
748
  #line 81 "node.c.erb"
583
- case YP_NODE_NO_KEYWORDS_PARAMETER_NODE:
749
+ case YP_NODE_NO_KEYWORDS_PARAMETER_NODE: {
584
750
  break;
751
+ }
585
752
  #line 81 "node.c.erb"
586
- case YP_NODE_NUMBERED_REFERENCE_READ_NODE:
753
+ case YP_NODE_NUMBERED_REFERENCE_READ_NODE: {
587
754
  break;
755
+ }
588
756
  #line 81 "node.c.erb"
589
- case YP_NODE_OPTIONAL_PARAMETER_NODE:
590
- yp_node_destroy(parser, (yp_node_t *)((yp_optional_parameter_node_t *)node)->value);
757
+ case YP_NODE_OPTIONAL_PARAMETER_NODE: {
758
+ yp_optional_parameter_node_t *cast = (yp_optional_parameter_node_t *) node;
759
+ yp_node_destroy(parser, (yp_node_t *)cast->value);
591
760
  break;
761
+ }
592
762
  #line 81 "node.c.erb"
593
- case YP_NODE_OR_NODE:
594
- yp_node_destroy(parser, (yp_node_t *)((yp_or_node_t *)node)->left);
595
- yp_node_destroy(parser, (yp_node_t *)((yp_or_node_t *)node)->right);
763
+ case YP_NODE_OR_NODE: {
764
+ yp_or_node_t *cast = (yp_or_node_t *) node;
765
+ yp_node_destroy(parser, (yp_node_t *)cast->left);
766
+ yp_node_destroy(parser, (yp_node_t *)cast->right);
596
767
  break;
768
+ }
597
769
  #line 81 "node.c.erb"
598
- case YP_NODE_PARAMETERS_NODE:
599
- yp_node_list_free(parser, &((yp_parameters_node_t *)node)->requireds);
600
- yp_node_list_free(parser, &((yp_parameters_node_t *)node)->optionals);
601
- yp_node_list_free(parser, &((yp_parameters_node_t *)node)->posts);
602
- if (((yp_parameters_node_t *)node)->rest != NULL) {
603
- yp_node_destroy(parser, (yp_node_t *)((yp_parameters_node_t *)node)->rest);
770
+ case YP_NODE_PARAMETERS_NODE: {
771
+ yp_parameters_node_t *cast = (yp_parameters_node_t *) node;
772
+ yp_node_list_free(parser, &cast->requireds);
773
+ yp_node_list_free(parser, &cast->optionals);
774
+ yp_node_list_free(parser, &cast->posts);
775
+ if (cast->rest != NULL) {
776
+ yp_node_destroy(parser, (yp_node_t *)cast->rest);
604
777
  }
605
- yp_node_list_free(parser, &((yp_parameters_node_t *)node)->keywords);
606
- if (((yp_parameters_node_t *)node)->keyword_rest != NULL) {
607
- yp_node_destroy(parser, (yp_node_t *)((yp_parameters_node_t *)node)->keyword_rest);
778
+ yp_node_list_free(parser, &cast->keywords);
779
+ if (cast->keyword_rest != NULL) {
780
+ yp_node_destroy(parser, (yp_node_t *)cast->keyword_rest);
608
781
  }
609
- if (((yp_parameters_node_t *)node)->block != NULL) {
610
- yp_node_destroy(parser, (yp_node_t *)((yp_parameters_node_t *)node)->block);
782
+ if (cast->block != NULL) {
783
+ yp_node_destroy(parser, (yp_node_t *)cast->block);
611
784
  }
612
785
  break;
786
+ }
613
787
  #line 81 "node.c.erb"
614
- case YP_NODE_PARENTHESES_NODE:
615
- if (((yp_parentheses_node_t *)node)->body != NULL) {
616
- yp_node_destroy(parser, (yp_node_t *)((yp_parentheses_node_t *)node)->body);
788
+ case YP_NODE_PARENTHESES_NODE: {
789
+ yp_parentheses_node_t *cast = (yp_parentheses_node_t *) node;
790
+ if (cast->body != NULL) {
791
+ yp_node_destroy(parser, (yp_node_t *)cast->body);
617
792
  }
618
793
  break;
794
+ }
619
795
  #line 81 "node.c.erb"
620
- case YP_NODE_PINNED_EXPRESSION_NODE:
621
- yp_node_destroy(parser, (yp_node_t *)((yp_pinned_expression_node_t *)node)->expression);
796
+ case YP_NODE_PINNED_EXPRESSION_NODE: {
797
+ yp_pinned_expression_node_t *cast = (yp_pinned_expression_node_t *) node;
798
+ yp_node_destroy(parser, (yp_node_t *)cast->expression);
622
799
  break;
800
+ }
623
801
  #line 81 "node.c.erb"
624
- case YP_NODE_PINNED_VARIABLE_NODE:
625
- yp_node_destroy(parser, (yp_node_t *)((yp_pinned_variable_node_t *)node)->variable);
802
+ case YP_NODE_PINNED_VARIABLE_NODE: {
803
+ yp_pinned_variable_node_t *cast = (yp_pinned_variable_node_t *) node;
804
+ yp_node_destroy(parser, (yp_node_t *)cast->variable);
626
805
  break;
806
+ }
627
807
  #line 81 "node.c.erb"
628
- case YP_NODE_POST_EXECUTION_NODE:
629
- if (((yp_post_execution_node_t *)node)->statements != NULL) {
630
- yp_node_destroy(parser, (yp_node_t *)((yp_post_execution_node_t *)node)->statements);
808
+ case YP_NODE_POST_EXECUTION_NODE: {
809
+ yp_post_execution_node_t *cast = (yp_post_execution_node_t *) node;
810
+ if (cast->statements != NULL) {
811
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
631
812
  }
632
813
  break;
814
+ }
633
815
  #line 81 "node.c.erb"
634
- case YP_NODE_PRE_EXECUTION_NODE:
635
- if (((yp_pre_execution_node_t *)node)->statements != NULL) {
636
- yp_node_destroy(parser, (yp_node_t *)((yp_pre_execution_node_t *)node)->statements);
816
+ case YP_NODE_PRE_EXECUTION_NODE: {
817
+ yp_pre_execution_node_t *cast = (yp_pre_execution_node_t *) node;
818
+ if (cast->statements != NULL) {
819
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
637
820
  }
638
821
  break;
822
+ }
639
823
  #line 81 "node.c.erb"
640
- case YP_NODE_PROGRAM_NODE:
641
- yp_constant_id_list_free(&((yp_program_node_t *)node)->locals);
642
- yp_node_destroy(parser, (yp_node_t *)((yp_program_node_t *)node)->statements);
824
+ case YP_NODE_PROGRAM_NODE: {
825
+ yp_program_node_t *cast = (yp_program_node_t *) node;
826
+ yp_constant_id_list_free(&cast->locals);
827
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
643
828
  break;
829
+ }
644
830
  #line 81 "node.c.erb"
645
- case YP_NODE_RANGE_NODE:
646
- if (((yp_range_node_t *)node)->left != NULL) {
647
- yp_node_destroy(parser, (yp_node_t *)((yp_range_node_t *)node)->left);
831
+ case YP_NODE_RANGE_NODE: {
832
+ yp_range_node_t *cast = (yp_range_node_t *) node;
833
+ if (cast->left != NULL) {
834
+ yp_node_destroy(parser, (yp_node_t *)cast->left);
648
835
  }
649
- if (((yp_range_node_t *)node)->right != NULL) {
650
- yp_node_destroy(parser, (yp_node_t *)((yp_range_node_t *)node)->right);
836
+ if (cast->right != NULL) {
837
+ yp_node_destroy(parser, (yp_node_t *)cast->right);
651
838
  }
652
839
  break;
840
+ }
653
841
  #line 81 "node.c.erb"
654
- case YP_NODE_RATIONAL_NODE:
655
- yp_node_destroy(parser, (yp_node_t *)((yp_rational_node_t *)node)->numeric);
842
+ case YP_NODE_RATIONAL_NODE: {
843
+ yp_rational_node_t *cast = (yp_rational_node_t *) node;
844
+ yp_node_destroy(parser, (yp_node_t *)cast->numeric);
656
845
  break;
846
+ }
657
847
  #line 81 "node.c.erb"
658
- case YP_NODE_REDO_NODE:
848
+ case YP_NODE_REDO_NODE: {
659
849
  break;
850
+ }
660
851
  #line 81 "node.c.erb"
661
- case YP_NODE_REGULAR_EXPRESSION_NODE:
662
- yp_string_free(&((yp_regular_expression_node_t *)node)->unescaped);
852
+ case YP_NODE_REGULAR_EXPRESSION_NODE: {
853
+ yp_regular_expression_node_t *cast = (yp_regular_expression_node_t *) node;
854
+ yp_string_free(&cast->unescaped);
663
855
  break;
856
+ }
664
857
  #line 81 "node.c.erb"
665
- case YP_NODE_REQUIRED_DESTRUCTURED_PARAMETER_NODE:
666
- yp_node_list_free(parser, &((yp_required_destructured_parameter_node_t *)node)->parameters);
858
+ case YP_NODE_REQUIRED_DESTRUCTURED_PARAMETER_NODE: {
859
+ yp_required_destructured_parameter_node_t *cast = (yp_required_destructured_parameter_node_t *) node;
860
+ yp_node_list_free(parser, &cast->parameters);
667
861
  break;
862
+ }
668
863
  #line 81 "node.c.erb"
669
- case YP_NODE_REQUIRED_PARAMETER_NODE:
864
+ case YP_NODE_REQUIRED_PARAMETER_NODE: {
670
865
  break;
866
+ }
671
867
  #line 81 "node.c.erb"
672
- case YP_NODE_RESCUE_MODIFIER_NODE:
673
- yp_node_destroy(parser, (yp_node_t *)((yp_rescue_modifier_node_t *)node)->expression);
674
- yp_node_destroy(parser, (yp_node_t *)((yp_rescue_modifier_node_t *)node)->rescue_expression);
868
+ case YP_NODE_RESCUE_MODIFIER_NODE: {
869
+ yp_rescue_modifier_node_t *cast = (yp_rescue_modifier_node_t *) node;
870
+ yp_node_destroy(parser, (yp_node_t *)cast->expression);
871
+ yp_node_destroy(parser, (yp_node_t *)cast->rescue_expression);
675
872
  break;
873
+ }
676
874
  #line 81 "node.c.erb"
677
- case YP_NODE_RESCUE_NODE:
678
- yp_node_list_free(parser, &((yp_rescue_node_t *)node)->exceptions);
679
- if (((yp_rescue_node_t *)node)->reference != NULL) {
680
- yp_node_destroy(parser, (yp_node_t *)((yp_rescue_node_t *)node)->reference);
875
+ case YP_NODE_RESCUE_NODE: {
876
+ yp_rescue_node_t *cast = (yp_rescue_node_t *) node;
877
+ yp_node_list_free(parser, &cast->exceptions);
878
+ if (cast->reference != NULL) {
879
+ yp_node_destroy(parser, (yp_node_t *)cast->reference);
681
880
  }
682
- if (((yp_rescue_node_t *)node)->statements != NULL) {
683
- yp_node_destroy(parser, (yp_node_t *)((yp_rescue_node_t *)node)->statements);
881
+ if (cast->statements != NULL) {
882
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
684
883
  }
685
- if (((yp_rescue_node_t *)node)->consequent != NULL) {
686
- yp_node_destroy(parser, (yp_node_t *)((yp_rescue_node_t *)node)->consequent);
884
+ if (cast->consequent != NULL) {
885
+ yp_node_destroy(parser, (yp_node_t *)cast->consequent);
687
886
  }
688
887
  break;
888
+ }
689
889
  #line 81 "node.c.erb"
690
- case YP_NODE_REST_PARAMETER_NODE:
890
+ case YP_NODE_REST_PARAMETER_NODE: {
691
891
  break;
892
+ }
692
893
  #line 81 "node.c.erb"
693
- case YP_NODE_RETRY_NODE:
894
+ case YP_NODE_RETRY_NODE: {
694
895
  break;
896
+ }
695
897
  #line 81 "node.c.erb"
696
- case YP_NODE_RETURN_NODE:
697
- if (((yp_return_node_t *)node)->arguments != NULL) {
698
- yp_node_destroy(parser, (yp_node_t *)((yp_return_node_t *)node)->arguments);
898
+ case YP_NODE_RETURN_NODE: {
899
+ yp_return_node_t *cast = (yp_return_node_t *) node;
900
+ if (cast->arguments != NULL) {
901
+ yp_node_destroy(parser, (yp_node_t *)cast->arguments);
699
902
  }
700
903
  break;
904
+ }
701
905
  #line 81 "node.c.erb"
702
- case YP_NODE_SELF_NODE:
906
+ case YP_NODE_SELF_NODE: {
703
907
  break;
908
+ }
704
909
  #line 81 "node.c.erb"
705
- case YP_NODE_SINGLETON_CLASS_NODE:
706
- yp_constant_id_list_free(&((yp_singleton_class_node_t *)node)->locals);
707
- yp_node_destroy(parser, (yp_node_t *)((yp_singleton_class_node_t *)node)->expression);
708
- if (((yp_singleton_class_node_t *)node)->body != NULL) {
709
- yp_node_destroy(parser, (yp_node_t *)((yp_singleton_class_node_t *)node)->body);
910
+ case YP_NODE_SINGLETON_CLASS_NODE: {
911
+ yp_singleton_class_node_t *cast = (yp_singleton_class_node_t *) node;
912
+ yp_constant_id_list_free(&cast->locals);
913
+ yp_node_destroy(parser, (yp_node_t *)cast->expression);
914
+ if (cast->body != NULL) {
915
+ yp_node_destroy(parser, (yp_node_t *)cast->body);
710
916
  }
711
917
  break;
918
+ }
712
919
  #line 81 "node.c.erb"
713
- case YP_NODE_SOURCE_ENCODING_NODE:
920
+ case YP_NODE_SOURCE_ENCODING_NODE: {
714
921
  break;
922
+ }
715
923
  #line 81 "node.c.erb"
716
- case YP_NODE_SOURCE_FILE_NODE:
717
- yp_string_free(&((yp_source_file_node_t *)node)->filepath);
924
+ case YP_NODE_SOURCE_FILE_NODE: {
925
+ yp_source_file_node_t *cast = (yp_source_file_node_t *) node;
926
+ yp_string_free(&cast->filepath);
718
927
  break;
928
+ }
719
929
  #line 81 "node.c.erb"
720
- case YP_NODE_SOURCE_LINE_NODE:
930
+ case YP_NODE_SOURCE_LINE_NODE: {
721
931
  break;
932
+ }
722
933
  #line 81 "node.c.erb"
723
- case YP_NODE_SPLAT_NODE:
724
- if (((yp_splat_node_t *)node)->expression != NULL) {
725
- yp_node_destroy(parser, (yp_node_t *)((yp_splat_node_t *)node)->expression);
934
+ case YP_NODE_SPLAT_NODE: {
935
+ yp_splat_node_t *cast = (yp_splat_node_t *) node;
936
+ if (cast->expression != NULL) {
937
+ yp_node_destroy(parser, (yp_node_t *)cast->expression);
726
938
  }
727
939
  break;
940
+ }
728
941
  #line 81 "node.c.erb"
729
- case YP_NODE_STATEMENTS_NODE:
730
- yp_node_list_free(parser, &((yp_statements_node_t *)node)->body);
942
+ case YP_NODE_STATEMENTS_NODE: {
943
+ yp_statements_node_t *cast = (yp_statements_node_t *) node;
944
+ yp_node_list_free(parser, &cast->body);
731
945
  break;
946
+ }
732
947
  #line 81 "node.c.erb"
733
- case YP_NODE_STRING_CONCAT_NODE:
734
- yp_node_destroy(parser, (yp_node_t *)((yp_string_concat_node_t *)node)->left);
735
- yp_node_destroy(parser, (yp_node_t *)((yp_string_concat_node_t *)node)->right);
948
+ case YP_NODE_STRING_CONCAT_NODE: {
949
+ yp_string_concat_node_t *cast = (yp_string_concat_node_t *) node;
950
+ yp_node_destroy(parser, (yp_node_t *)cast->left);
951
+ yp_node_destroy(parser, (yp_node_t *)cast->right);
736
952
  break;
953
+ }
737
954
  #line 81 "node.c.erb"
738
- case YP_NODE_STRING_NODE:
739
- yp_string_free(&((yp_string_node_t *)node)->unescaped);
955
+ case YP_NODE_STRING_NODE: {
956
+ yp_string_node_t *cast = (yp_string_node_t *) node;
957
+ yp_string_free(&cast->unescaped);
740
958
  break;
959
+ }
741
960
  #line 81 "node.c.erb"
742
- case YP_NODE_SUPER_NODE:
743
- if (((yp_super_node_t *)node)->arguments != NULL) {
744
- yp_node_destroy(parser, (yp_node_t *)((yp_super_node_t *)node)->arguments);
961
+ case YP_NODE_SUPER_NODE: {
962
+ yp_super_node_t *cast = (yp_super_node_t *) node;
963
+ if (cast->arguments != NULL) {
964
+ yp_node_destroy(parser, (yp_node_t *)cast->arguments);
745
965
  }
746
- if (((yp_super_node_t *)node)->block != NULL) {
747
- yp_node_destroy(parser, (yp_node_t *)((yp_super_node_t *)node)->block);
966
+ if (cast->block != NULL) {
967
+ yp_node_destroy(parser, (yp_node_t *)cast->block);
748
968
  }
749
969
  break;
970
+ }
750
971
  #line 81 "node.c.erb"
751
- case YP_NODE_SYMBOL_NODE:
752
- yp_string_free(&((yp_symbol_node_t *)node)->unescaped);
972
+ case YP_NODE_SYMBOL_NODE: {
973
+ yp_symbol_node_t *cast = (yp_symbol_node_t *) node;
974
+ yp_string_free(&cast->unescaped);
753
975
  break;
976
+ }
754
977
  #line 81 "node.c.erb"
755
- case YP_NODE_TRUE_NODE:
978
+ case YP_NODE_TRUE_NODE: {
756
979
  break;
980
+ }
757
981
  #line 81 "node.c.erb"
758
- case YP_NODE_UNDEF_NODE:
759
- yp_node_list_free(parser, &((yp_undef_node_t *)node)->names);
982
+ case YP_NODE_UNDEF_NODE: {
983
+ yp_undef_node_t *cast = (yp_undef_node_t *) node;
984
+ yp_node_list_free(parser, &cast->names);
760
985
  break;
986
+ }
761
987
  #line 81 "node.c.erb"
762
- case YP_NODE_UNLESS_NODE:
763
- yp_node_destroy(parser, (yp_node_t *)((yp_unless_node_t *)node)->predicate);
764
- if (((yp_unless_node_t *)node)->statements != NULL) {
765
- yp_node_destroy(parser, (yp_node_t *)((yp_unless_node_t *)node)->statements);
988
+ case YP_NODE_UNLESS_NODE: {
989
+ yp_unless_node_t *cast = (yp_unless_node_t *) node;
990
+ yp_node_destroy(parser, (yp_node_t *)cast->predicate);
991
+ if (cast->statements != NULL) {
992
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
766
993
  }
767
- if (((yp_unless_node_t *)node)->consequent != NULL) {
768
- yp_node_destroy(parser, (yp_node_t *)((yp_unless_node_t *)node)->consequent);
994
+ if (cast->consequent != NULL) {
995
+ yp_node_destroy(parser, (yp_node_t *)cast->consequent);
769
996
  }
770
997
  break;
998
+ }
771
999
  #line 81 "node.c.erb"
772
- case YP_NODE_UNTIL_NODE:
773
- yp_node_destroy(parser, (yp_node_t *)((yp_until_node_t *)node)->predicate);
774
- if (((yp_until_node_t *)node)->statements != NULL) {
775
- yp_node_destroy(parser, (yp_node_t *)((yp_until_node_t *)node)->statements);
1000
+ case YP_NODE_UNTIL_NODE: {
1001
+ yp_until_node_t *cast = (yp_until_node_t *) node;
1002
+ yp_node_destroy(parser, (yp_node_t *)cast->predicate);
1003
+ if (cast->statements != NULL) {
1004
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
776
1005
  }
777
1006
  break;
1007
+ }
778
1008
  #line 81 "node.c.erb"
779
- case YP_NODE_WHEN_NODE:
780
- yp_node_list_free(parser, &((yp_when_node_t *)node)->conditions);
781
- if (((yp_when_node_t *)node)->statements != NULL) {
782
- yp_node_destroy(parser, (yp_node_t *)((yp_when_node_t *)node)->statements);
1009
+ case YP_NODE_WHEN_NODE: {
1010
+ yp_when_node_t *cast = (yp_when_node_t *) node;
1011
+ yp_node_list_free(parser, &cast->conditions);
1012
+ if (cast->statements != NULL) {
1013
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
783
1014
  }
784
1015
  break;
1016
+ }
785
1017
  #line 81 "node.c.erb"
786
- case YP_NODE_WHILE_NODE:
787
- yp_node_destroy(parser, (yp_node_t *)((yp_while_node_t *)node)->predicate);
788
- if (((yp_while_node_t *)node)->statements != NULL) {
789
- yp_node_destroy(parser, (yp_node_t *)((yp_while_node_t *)node)->statements);
1018
+ case YP_NODE_WHILE_NODE: {
1019
+ yp_while_node_t *cast = (yp_while_node_t *) node;
1020
+ yp_node_destroy(parser, (yp_node_t *)cast->predicate);
1021
+ if (cast->statements != NULL) {
1022
+ yp_node_destroy(parser, (yp_node_t *)cast->statements);
790
1023
  }
791
1024
  break;
1025
+ }
792
1026
  #line 81 "node.c.erb"
793
- case YP_NODE_X_STRING_NODE:
794
- yp_string_free(&((yp_x_string_node_t *)node)->unescaped);
1027
+ case YP_NODE_X_STRING_NODE: {
1028
+ yp_x_string_node_t *cast = (yp_x_string_node_t *) node;
1029
+ yp_string_free(&cast->unescaped);
795
1030
  break;
1031
+ }
796
1032
  #line 81 "node.c.erb"
797
- case YP_NODE_YIELD_NODE:
798
- if (((yp_yield_node_t *)node)->arguments != NULL) {
799
- yp_node_destroy(parser, (yp_node_t *)((yp_yield_node_t *)node)->arguments);
1033
+ case YP_NODE_YIELD_NODE: {
1034
+ yp_yield_node_t *cast = (yp_yield_node_t *) node;
1035
+ if (cast->arguments != NULL) {
1036
+ yp_node_destroy(parser, (yp_node_t *)cast->arguments);
800
1037
  }
801
1038
  break;
802
- #line 106 "node.c.erb"
1039
+ }
1040
+ #line 110 "node.c.erb"
803
1041
  default:
804
1042
  assert(false && "unreachable");
805
1043
  break;
@@ -816,991 +1054,1125 @@ yp_node_memsize_node(yp_node_t *node, yp_memsize_t *memsize) {
816
1054
  // as it should never be generated
817
1055
  case YP_NODE_SCOPE_NODE:
818
1056
  return;
819
- #line 124 "node.c.erb"
1057
+ #line 128 "node.c.erb"
820
1058
  case YP_NODE_ALIAS_NODE: {
821
- memsize->memsize += sizeof(yp_alias_node_t);
822
- yp_node_memsize_node((yp_node_t *)((yp_alias_node_t *)node)->new_name, memsize);
823
- yp_node_memsize_node((yp_node_t *)((yp_alias_node_t *)node)->old_name, memsize);
1059
+ yp_alias_node_t *cast = (yp_alias_node_t *) node;
1060
+ memsize->memsize += sizeof(*cast);
1061
+ yp_node_memsize_node((yp_node_t *)cast->new_name, memsize);
1062
+ yp_node_memsize_node((yp_node_t *)cast->old_name, memsize);
824
1063
  break;
825
1064
  }
826
- #line 124 "node.c.erb"
1065
+ #line 128 "node.c.erb"
827
1066
  case YP_NODE_ALTERNATION_PATTERN_NODE: {
828
- memsize->memsize += sizeof(yp_alternation_pattern_node_t);
829
- yp_node_memsize_node((yp_node_t *)((yp_alternation_pattern_node_t *)node)->left, memsize);
830
- yp_node_memsize_node((yp_node_t *)((yp_alternation_pattern_node_t *)node)->right, memsize);
1067
+ yp_alternation_pattern_node_t *cast = (yp_alternation_pattern_node_t *) node;
1068
+ memsize->memsize += sizeof(*cast);
1069
+ yp_node_memsize_node((yp_node_t *)cast->left, memsize);
1070
+ yp_node_memsize_node((yp_node_t *)cast->right, memsize);
831
1071
  break;
832
1072
  }
833
- #line 124 "node.c.erb"
1073
+ #line 128 "node.c.erb"
834
1074
  case YP_NODE_AND_NODE: {
835
- memsize->memsize += sizeof(yp_and_node_t);
836
- yp_node_memsize_node((yp_node_t *)((yp_and_node_t *)node)->left, memsize);
837
- yp_node_memsize_node((yp_node_t *)((yp_and_node_t *)node)->right, memsize);
1075
+ yp_and_node_t *cast = (yp_and_node_t *) node;
1076
+ memsize->memsize += sizeof(*cast);
1077
+ yp_node_memsize_node((yp_node_t *)cast->left, memsize);
1078
+ yp_node_memsize_node((yp_node_t *)cast->right, memsize);
838
1079
  break;
839
1080
  }
840
- #line 124 "node.c.erb"
1081
+ #line 128 "node.c.erb"
841
1082
  case YP_NODE_ARGUMENTS_NODE: {
842
- memsize->memsize += sizeof(yp_arguments_node_t);
843
- yp_node_list_memsize(&((yp_arguments_node_t *)node)->arguments, memsize);
1083
+ yp_arguments_node_t *cast = (yp_arguments_node_t *) node;
1084
+ memsize->memsize += sizeof(*cast);
1085
+ yp_node_list_memsize(&cast->arguments, memsize);
844
1086
  break;
845
1087
  }
846
- #line 124 "node.c.erb"
1088
+ #line 128 "node.c.erb"
847
1089
  case YP_NODE_ARRAY_NODE: {
848
- memsize->memsize += sizeof(yp_array_node_t);
849
- yp_node_list_memsize(&((yp_array_node_t *)node)->elements, memsize);
1090
+ yp_array_node_t *cast = (yp_array_node_t *) node;
1091
+ memsize->memsize += sizeof(*cast);
1092
+ yp_node_list_memsize(&cast->elements, memsize);
850
1093
  break;
851
1094
  }
852
- #line 124 "node.c.erb"
1095
+ #line 128 "node.c.erb"
853
1096
  case YP_NODE_ARRAY_PATTERN_NODE: {
854
- memsize->memsize += sizeof(yp_array_pattern_node_t);
855
- if (((yp_array_pattern_node_t *)node)->constant != NULL) {
856
- yp_node_memsize_node((yp_node_t *)((yp_array_pattern_node_t *)node)->constant, memsize);
1097
+ yp_array_pattern_node_t *cast = (yp_array_pattern_node_t *) node;
1098
+ memsize->memsize += sizeof(*cast);
1099
+ if (cast->constant != NULL) {
1100
+ yp_node_memsize_node((yp_node_t *)cast->constant, memsize);
857
1101
  }
858
- yp_node_list_memsize(&((yp_array_pattern_node_t *)node)->requireds, memsize);
859
- if (((yp_array_pattern_node_t *)node)->rest != NULL) {
860
- yp_node_memsize_node((yp_node_t *)((yp_array_pattern_node_t *)node)->rest, memsize);
1102
+ yp_node_list_memsize(&cast->requireds, memsize);
1103
+ if (cast->rest != NULL) {
1104
+ yp_node_memsize_node((yp_node_t *)cast->rest, memsize);
861
1105
  }
862
- yp_node_list_memsize(&((yp_array_pattern_node_t *)node)->posts, memsize);
1106
+ yp_node_list_memsize(&cast->posts, memsize);
863
1107
  break;
864
1108
  }
865
- #line 124 "node.c.erb"
1109
+ #line 128 "node.c.erb"
866
1110
  case YP_NODE_ASSOC_NODE: {
867
- memsize->memsize += sizeof(yp_assoc_node_t);
868
- yp_node_memsize_node((yp_node_t *)((yp_assoc_node_t *)node)->key, memsize);
869
- if (((yp_assoc_node_t *)node)->value != NULL) {
870
- yp_node_memsize_node((yp_node_t *)((yp_assoc_node_t *)node)->value, memsize);
1111
+ yp_assoc_node_t *cast = (yp_assoc_node_t *) node;
1112
+ memsize->memsize += sizeof(*cast);
1113
+ yp_node_memsize_node((yp_node_t *)cast->key, memsize);
1114
+ if (cast->value != NULL) {
1115
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
871
1116
  }
872
1117
  break;
873
1118
  }
874
- #line 124 "node.c.erb"
1119
+ #line 128 "node.c.erb"
875
1120
  case YP_NODE_ASSOC_SPLAT_NODE: {
876
- memsize->memsize += sizeof(yp_assoc_splat_node_t);
877
- if (((yp_assoc_splat_node_t *)node)->value != NULL) {
878
- yp_node_memsize_node((yp_node_t *)((yp_assoc_splat_node_t *)node)->value, memsize);
1121
+ yp_assoc_splat_node_t *cast = (yp_assoc_splat_node_t *) node;
1122
+ memsize->memsize += sizeof(*cast);
1123
+ if (cast->value != NULL) {
1124
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
879
1125
  }
880
1126
  break;
881
1127
  }
882
- #line 124 "node.c.erb"
1128
+ #line 128 "node.c.erb"
883
1129
  case YP_NODE_BACK_REFERENCE_READ_NODE: {
884
- memsize->memsize += sizeof(yp_back_reference_read_node_t);
1130
+ yp_back_reference_read_node_t *cast = (yp_back_reference_read_node_t *) node;
1131
+ memsize->memsize += sizeof(*cast);
885
1132
  break;
886
1133
  }
887
- #line 124 "node.c.erb"
1134
+ #line 128 "node.c.erb"
888
1135
  case YP_NODE_BEGIN_NODE: {
889
- memsize->memsize += sizeof(yp_begin_node_t);
890
- if (((yp_begin_node_t *)node)->statements != NULL) {
891
- yp_node_memsize_node((yp_node_t *)((yp_begin_node_t *)node)->statements, memsize);
1136
+ yp_begin_node_t *cast = (yp_begin_node_t *) node;
1137
+ memsize->memsize += sizeof(*cast);
1138
+ if (cast->statements != NULL) {
1139
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
892
1140
  }
893
- if (((yp_begin_node_t *)node)->rescue_clause != NULL) {
894
- yp_node_memsize_node((yp_node_t *)((yp_begin_node_t *)node)->rescue_clause, memsize);
1141
+ if (cast->rescue_clause != NULL) {
1142
+ yp_node_memsize_node((yp_node_t *)cast->rescue_clause, memsize);
895
1143
  }
896
- if (((yp_begin_node_t *)node)->else_clause != NULL) {
897
- yp_node_memsize_node((yp_node_t *)((yp_begin_node_t *)node)->else_clause, memsize);
1144
+ if (cast->else_clause != NULL) {
1145
+ yp_node_memsize_node((yp_node_t *)cast->else_clause, memsize);
898
1146
  }
899
- if (((yp_begin_node_t *)node)->ensure_clause != NULL) {
900
- yp_node_memsize_node((yp_node_t *)((yp_begin_node_t *)node)->ensure_clause, memsize);
1147
+ if (cast->ensure_clause != NULL) {
1148
+ yp_node_memsize_node((yp_node_t *)cast->ensure_clause, memsize);
901
1149
  }
902
1150
  break;
903
1151
  }
904
- #line 124 "node.c.erb"
1152
+ #line 128 "node.c.erb"
905
1153
  case YP_NODE_BLOCK_ARGUMENT_NODE: {
906
- memsize->memsize += sizeof(yp_block_argument_node_t);
907
- if (((yp_block_argument_node_t *)node)->expression != NULL) {
908
- yp_node_memsize_node((yp_node_t *)((yp_block_argument_node_t *)node)->expression, memsize);
1154
+ yp_block_argument_node_t *cast = (yp_block_argument_node_t *) node;
1155
+ memsize->memsize += sizeof(*cast);
1156
+ if (cast->expression != NULL) {
1157
+ yp_node_memsize_node((yp_node_t *)cast->expression, memsize);
909
1158
  }
910
1159
  break;
911
1160
  }
912
- #line 124 "node.c.erb"
1161
+ #line 128 "node.c.erb"
913
1162
  case YP_NODE_BLOCK_NODE: {
914
- memsize->memsize += sizeof(yp_block_node_t);
915
- memsize->memsize += yp_constant_id_list_memsize(&((yp_block_node_t *)node)->locals);
916
- if (((yp_block_node_t *)node)->parameters != NULL) {
917
- yp_node_memsize_node((yp_node_t *)((yp_block_node_t *)node)->parameters, memsize);
1163
+ yp_block_node_t *cast = (yp_block_node_t *) node;
1164
+ memsize->memsize += sizeof(*cast);
1165
+ memsize->memsize += yp_constant_id_list_memsize(&cast->locals);
1166
+ if (cast->parameters != NULL) {
1167
+ yp_node_memsize_node((yp_node_t *)cast->parameters, memsize);
918
1168
  }
919
- if (((yp_block_node_t *)node)->body != NULL) {
920
- yp_node_memsize_node((yp_node_t *)((yp_block_node_t *)node)->body, memsize);
1169
+ if (cast->body != NULL) {
1170
+ yp_node_memsize_node((yp_node_t *)cast->body, memsize);
921
1171
  }
922
1172
  break;
923
1173
  }
924
- #line 124 "node.c.erb"
1174
+ #line 128 "node.c.erb"
925
1175
  case YP_NODE_BLOCK_PARAMETER_NODE: {
926
- memsize->memsize += sizeof(yp_block_parameter_node_t);
1176
+ yp_block_parameter_node_t *cast = (yp_block_parameter_node_t *) node;
1177
+ memsize->memsize += sizeof(*cast);
927
1178
  break;
928
1179
  }
929
- #line 124 "node.c.erb"
1180
+ #line 128 "node.c.erb"
930
1181
  case YP_NODE_BLOCK_PARAMETERS_NODE: {
931
- memsize->memsize += sizeof(yp_block_parameters_node_t);
932
- if (((yp_block_parameters_node_t *)node)->parameters != NULL) {
933
- yp_node_memsize_node((yp_node_t *)((yp_block_parameters_node_t *)node)->parameters, memsize);
1182
+ yp_block_parameters_node_t *cast = (yp_block_parameters_node_t *) node;
1183
+ memsize->memsize += sizeof(*cast);
1184
+ if (cast->parameters != NULL) {
1185
+ yp_node_memsize_node((yp_node_t *)cast->parameters, memsize);
934
1186
  }
935
- memsize->memsize += yp_location_list_memsize(&((yp_block_parameters_node_t *)node)->locals);
1187
+ memsize->memsize += yp_location_list_memsize(&cast->locals);
936
1188
  break;
937
1189
  }
938
- #line 124 "node.c.erb"
1190
+ #line 128 "node.c.erb"
939
1191
  case YP_NODE_BREAK_NODE: {
940
- memsize->memsize += sizeof(yp_break_node_t);
941
- if (((yp_break_node_t *)node)->arguments != NULL) {
942
- yp_node_memsize_node((yp_node_t *)((yp_break_node_t *)node)->arguments, memsize);
1192
+ yp_break_node_t *cast = (yp_break_node_t *) node;
1193
+ memsize->memsize += sizeof(*cast);
1194
+ if (cast->arguments != NULL) {
1195
+ yp_node_memsize_node((yp_node_t *)cast->arguments, memsize);
943
1196
  }
944
1197
  break;
945
1198
  }
946
- #line 124 "node.c.erb"
1199
+ #line 128 "node.c.erb"
947
1200
  case YP_NODE_CALL_NODE: {
948
- memsize->memsize += sizeof(yp_call_node_t);
949
- if (((yp_call_node_t *)node)->receiver != NULL) {
950
- yp_node_memsize_node((yp_node_t *)((yp_call_node_t *)node)->receiver, memsize);
1201
+ yp_call_node_t *cast = (yp_call_node_t *) node;
1202
+ memsize->memsize += sizeof(*cast);
1203
+ if (cast->receiver != NULL) {
1204
+ yp_node_memsize_node((yp_node_t *)cast->receiver, memsize);
951
1205
  }
952
- if (((yp_call_node_t *)node)->arguments != NULL) {
953
- yp_node_memsize_node((yp_node_t *)((yp_call_node_t *)node)->arguments, memsize);
1206
+ if (cast->arguments != NULL) {
1207
+ yp_node_memsize_node((yp_node_t *)cast->arguments, memsize);
954
1208
  }
955
- if (((yp_call_node_t *)node)->block != NULL) {
956
- yp_node_memsize_node((yp_node_t *)((yp_call_node_t *)node)->block, memsize);
1209
+ if (cast->block != NULL) {
1210
+ yp_node_memsize_node((yp_node_t *)cast->block, memsize);
957
1211
  }
958
- memsize->memsize += yp_string_memsize(&((yp_call_node_t *)node)->name);
1212
+ memsize->memsize += yp_string_memsize(&cast->name);
959
1213
  break;
960
1214
  }
961
- #line 124 "node.c.erb"
1215
+ #line 128 "node.c.erb"
962
1216
  case YP_NODE_CALL_OPERATOR_AND_WRITE_NODE: {
963
- memsize->memsize += sizeof(yp_call_operator_and_write_node_t);
964
- yp_node_memsize_node((yp_node_t *)((yp_call_operator_and_write_node_t *)node)->target, memsize);
965
- yp_node_memsize_node((yp_node_t *)((yp_call_operator_and_write_node_t *)node)->value, memsize);
1217
+ yp_call_operator_and_write_node_t *cast = (yp_call_operator_and_write_node_t *) node;
1218
+ memsize->memsize += sizeof(*cast);
1219
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
1220
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
966
1221
  break;
967
1222
  }
968
- #line 124 "node.c.erb"
1223
+ #line 128 "node.c.erb"
969
1224
  case YP_NODE_CALL_OPERATOR_OR_WRITE_NODE: {
970
- memsize->memsize += sizeof(yp_call_operator_or_write_node_t);
971
- yp_node_memsize_node((yp_node_t *)((yp_call_operator_or_write_node_t *)node)->target, memsize);
972
- yp_node_memsize_node((yp_node_t *)((yp_call_operator_or_write_node_t *)node)->value, memsize);
1225
+ yp_call_operator_or_write_node_t *cast = (yp_call_operator_or_write_node_t *) node;
1226
+ memsize->memsize += sizeof(*cast);
1227
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
1228
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
973
1229
  break;
974
1230
  }
975
- #line 124 "node.c.erb"
1231
+ #line 128 "node.c.erb"
976
1232
  case YP_NODE_CALL_OPERATOR_WRITE_NODE: {
977
- memsize->memsize += sizeof(yp_call_operator_write_node_t);
978
- yp_node_memsize_node((yp_node_t *)((yp_call_operator_write_node_t *)node)->target, memsize);
979
- yp_node_memsize_node((yp_node_t *)((yp_call_operator_write_node_t *)node)->value, memsize);
1233
+ yp_call_operator_write_node_t *cast = (yp_call_operator_write_node_t *) node;
1234
+ memsize->memsize += sizeof(*cast);
1235
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
1236
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
980
1237
  break;
981
1238
  }
982
- #line 124 "node.c.erb"
1239
+ #line 128 "node.c.erb"
983
1240
  case YP_NODE_CAPTURE_PATTERN_NODE: {
984
- memsize->memsize += sizeof(yp_capture_pattern_node_t);
985
- yp_node_memsize_node((yp_node_t *)((yp_capture_pattern_node_t *)node)->value, memsize);
986
- yp_node_memsize_node((yp_node_t *)((yp_capture_pattern_node_t *)node)->target, memsize);
1241
+ yp_capture_pattern_node_t *cast = (yp_capture_pattern_node_t *) node;
1242
+ memsize->memsize += sizeof(*cast);
1243
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1244
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
987
1245
  break;
988
1246
  }
989
- #line 124 "node.c.erb"
1247
+ #line 128 "node.c.erb"
990
1248
  case YP_NODE_CASE_NODE: {
991
- memsize->memsize += sizeof(yp_case_node_t);
992
- if (((yp_case_node_t *)node)->predicate != NULL) {
993
- yp_node_memsize_node((yp_node_t *)((yp_case_node_t *)node)->predicate, memsize);
1249
+ yp_case_node_t *cast = (yp_case_node_t *) node;
1250
+ memsize->memsize += sizeof(*cast);
1251
+ if (cast->predicate != NULL) {
1252
+ yp_node_memsize_node((yp_node_t *)cast->predicate, memsize);
994
1253
  }
995
- yp_node_list_memsize(&((yp_case_node_t *)node)->conditions, memsize);
996
- if (((yp_case_node_t *)node)->consequent != NULL) {
997
- yp_node_memsize_node((yp_node_t *)((yp_case_node_t *)node)->consequent, memsize);
1254
+ yp_node_list_memsize(&cast->conditions, memsize);
1255
+ if (cast->consequent != NULL) {
1256
+ yp_node_memsize_node((yp_node_t *)cast->consequent, memsize);
998
1257
  }
999
1258
  break;
1000
1259
  }
1001
- #line 124 "node.c.erb"
1260
+ #line 128 "node.c.erb"
1002
1261
  case YP_NODE_CLASS_NODE: {
1003
- memsize->memsize += sizeof(yp_class_node_t);
1004
- memsize->memsize += yp_constant_id_list_memsize(&((yp_class_node_t *)node)->locals);
1005
- yp_node_memsize_node((yp_node_t *)((yp_class_node_t *)node)->constant_path, memsize);
1006
- if (((yp_class_node_t *)node)->superclass != NULL) {
1007
- yp_node_memsize_node((yp_node_t *)((yp_class_node_t *)node)->superclass, memsize);
1262
+ yp_class_node_t *cast = (yp_class_node_t *) node;
1263
+ memsize->memsize += sizeof(*cast);
1264
+ memsize->memsize += yp_constant_id_list_memsize(&cast->locals);
1265
+ yp_node_memsize_node((yp_node_t *)cast->constant_path, memsize);
1266
+ if (cast->superclass != NULL) {
1267
+ yp_node_memsize_node((yp_node_t *)cast->superclass, memsize);
1008
1268
  }
1009
- if (((yp_class_node_t *)node)->body != NULL) {
1010
- yp_node_memsize_node((yp_node_t *)((yp_class_node_t *)node)->body, memsize);
1269
+ if (cast->body != NULL) {
1270
+ yp_node_memsize_node((yp_node_t *)cast->body, memsize);
1011
1271
  }
1012
- memsize->memsize += yp_string_memsize(&((yp_class_node_t *)node)->name);
1272
+ memsize->memsize += yp_string_memsize(&cast->name);
1013
1273
  break;
1014
1274
  }
1015
- #line 124 "node.c.erb"
1275
+ #line 128 "node.c.erb"
1016
1276
  case YP_NODE_CLASS_VARIABLE_AND_WRITE_NODE: {
1017
- memsize->memsize += sizeof(yp_class_variable_and_write_node_t);
1018
- yp_node_memsize_node((yp_node_t *)((yp_class_variable_and_write_node_t *)node)->value, memsize);
1277
+ yp_class_variable_and_write_node_t *cast = (yp_class_variable_and_write_node_t *) node;
1278
+ memsize->memsize += sizeof(*cast);
1279
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1019
1280
  break;
1020
1281
  }
1021
- #line 124 "node.c.erb"
1282
+ #line 128 "node.c.erb"
1022
1283
  case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
1023
- memsize->memsize += sizeof(yp_class_variable_operator_write_node_t);
1024
- yp_node_memsize_node((yp_node_t *)((yp_class_variable_operator_write_node_t *)node)->value, memsize);
1284
+ yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
1285
+ memsize->memsize += sizeof(*cast);
1286
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1025
1287
  break;
1026
1288
  }
1027
- #line 124 "node.c.erb"
1289
+ #line 128 "node.c.erb"
1028
1290
  case YP_NODE_CLASS_VARIABLE_OR_WRITE_NODE: {
1029
- memsize->memsize += sizeof(yp_class_variable_or_write_node_t);
1030
- yp_node_memsize_node((yp_node_t *)((yp_class_variable_or_write_node_t *)node)->value, memsize);
1291
+ yp_class_variable_or_write_node_t *cast = (yp_class_variable_or_write_node_t *) node;
1292
+ memsize->memsize += sizeof(*cast);
1293
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1031
1294
  break;
1032
1295
  }
1033
- #line 124 "node.c.erb"
1296
+ #line 128 "node.c.erb"
1034
1297
  case YP_NODE_CLASS_VARIABLE_READ_NODE: {
1035
- memsize->memsize += sizeof(yp_class_variable_read_node_t);
1298
+ yp_class_variable_read_node_t *cast = (yp_class_variable_read_node_t *) node;
1299
+ memsize->memsize += sizeof(*cast);
1036
1300
  break;
1037
1301
  }
1038
- #line 124 "node.c.erb"
1302
+ #line 128 "node.c.erb"
1039
1303
  case YP_NODE_CLASS_VARIABLE_TARGET_NODE: {
1040
- memsize->memsize += sizeof(yp_class_variable_target_node_t);
1304
+ yp_class_variable_target_node_t *cast = (yp_class_variable_target_node_t *) node;
1305
+ memsize->memsize += sizeof(*cast);
1041
1306
  break;
1042
1307
  }
1043
- #line 124 "node.c.erb"
1308
+ #line 128 "node.c.erb"
1044
1309
  case YP_NODE_CLASS_VARIABLE_WRITE_NODE: {
1045
- memsize->memsize += sizeof(yp_class_variable_write_node_t);
1046
- if (((yp_class_variable_write_node_t *)node)->value != NULL) {
1047
- yp_node_memsize_node((yp_node_t *)((yp_class_variable_write_node_t *)node)->value, memsize);
1310
+ yp_class_variable_write_node_t *cast = (yp_class_variable_write_node_t *) node;
1311
+ memsize->memsize += sizeof(*cast);
1312
+ if (cast->value != NULL) {
1313
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1048
1314
  }
1049
1315
  break;
1050
1316
  }
1051
- #line 124 "node.c.erb"
1317
+ #line 128 "node.c.erb"
1052
1318
  case YP_NODE_CONSTANT_AND_WRITE_NODE: {
1053
- memsize->memsize += sizeof(yp_constant_and_write_node_t);
1054
- yp_node_memsize_node((yp_node_t *)((yp_constant_and_write_node_t *)node)->value, memsize);
1319
+ yp_constant_and_write_node_t *cast = (yp_constant_and_write_node_t *) node;
1320
+ memsize->memsize += sizeof(*cast);
1321
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1055
1322
  break;
1056
1323
  }
1057
- #line 124 "node.c.erb"
1324
+ #line 128 "node.c.erb"
1058
1325
  case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
1059
- memsize->memsize += sizeof(yp_constant_operator_write_node_t);
1060
- yp_node_memsize_node((yp_node_t *)((yp_constant_operator_write_node_t *)node)->value, memsize);
1326
+ yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
1327
+ memsize->memsize += sizeof(*cast);
1328
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1061
1329
  break;
1062
1330
  }
1063
- #line 124 "node.c.erb"
1331
+ #line 128 "node.c.erb"
1064
1332
  case YP_NODE_CONSTANT_OR_WRITE_NODE: {
1065
- memsize->memsize += sizeof(yp_constant_or_write_node_t);
1066
- yp_node_memsize_node((yp_node_t *)((yp_constant_or_write_node_t *)node)->value, memsize);
1333
+ yp_constant_or_write_node_t *cast = (yp_constant_or_write_node_t *) node;
1334
+ memsize->memsize += sizeof(*cast);
1335
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1067
1336
  break;
1068
1337
  }
1069
- #line 124 "node.c.erb"
1338
+ #line 128 "node.c.erb"
1070
1339
  case YP_NODE_CONSTANT_PATH_AND_WRITE_NODE: {
1071
- memsize->memsize += sizeof(yp_constant_path_and_write_node_t);
1072
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_and_write_node_t *)node)->target, memsize);
1073
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_and_write_node_t *)node)->value, memsize);
1340
+ yp_constant_path_and_write_node_t *cast = (yp_constant_path_and_write_node_t *) node;
1341
+ memsize->memsize += sizeof(*cast);
1342
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
1343
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1074
1344
  break;
1075
1345
  }
1076
- #line 124 "node.c.erb"
1346
+ #line 128 "node.c.erb"
1077
1347
  case YP_NODE_CONSTANT_PATH_NODE: {
1078
- memsize->memsize += sizeof(yp_constant_path_node_t);
1079
- if (((yp_constant_path_node_t *)node)->parent != NULL) {
1080
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_node_t *)node)->parent, memsize);
1348
+ yp_constant_path_node_t *cast = (yp_constant_path_node_t *) node;
1349
+ memsize->memsize += sizeof(*cast);
1350
+ if (cast->parent != NULL) {
1351
+ yp_node_memsize_node((yp_node_t *)cast->parent, memsize);
1081
1352
  }
1082
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_node_t *)node)->child, memsize);
1353
+ yp_node_memsize_node((yp_node_t *)cast->child, memsize);
1083
1354
  break;
1084
1355
  }
1085
- #line 124 "node.c.erb"
1356
+ #line 128 "node.c.erb"
1086
1357
  case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
1087
- memsize->memsize += sizeof(yp_constant_path_operator_write_node_t);
1088
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_operator_write_node_t *)node)->target, memsize);
1089
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_operator_write_node_t *)node)->value, memsize);
1358
+ yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
1359
+ memsize->memsize += sizeof(*cast);
1360
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
1361
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1090
1362
  break;
1091
1363
  }
1092
- #line 124 "node.c.erb"
1364
+ #line 128 "node.c.erb"
1093
1365
  case YP_NODE_CONSTANT_PATH_OR_WRITE_NODE: {
1094
- memsize->memsize += sizeof(yp_constant_path_or_write_node_t);
1095
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_or_write_node_t *)node)->target, memsize);
1096
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_or_write_node_t *)node)->value, memsize);
1366
+ yp_constant_path_or_write_node_t *cast = (yp_constant_path_or_write_node_t *) node;
1367
+ memsize->memsize += sizeof(*cast);
1368
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
1369
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1097
1370
  break;
1098
1371
  }
1099
- #line 124 "node.c.erb"
1372
+ #line 128 "node.c.erb"
1100
1373
  case YP_NODE_CONSTANT_PATH_TARGET_NODE: {
1101
- memsize->memsize += sizeof(yp_constant_path_target_node_t);
1102
- if (((yp_constant_path_target_node_t *)node)->parent != NULL) {
1103
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_target_node_t *)node)->parent, memsize);
1374
+ yp_constant_path_target_node_t *cast = (yp_constant_path_target_node_t *) node;
1375
+ memsize->memsize += sizeof(*cast);
1376
+ if (cast->parent != NULL) {
1377
+ yp_node_memsize_node((yp_node_t *)cast->parent, memsize);
1104
1378
  }
1105
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_target_node_t *)node)->child, memsize);
1379
+ yp_node_memsize_node((yp_node_t *)cast->child, memsize);
1106
1380
  break;
1107
1381
  }
1108
- #line 124 "node.c.erb"
1382
+ #line 128 "node.c.erb"
1109
1383
  case YP_NODE_CONSTANT_PATH_WRITE_NODE: {
1110
- memsize->memsize += sizeof(yp_constant_path_write_node_t);
1111
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_write_node_t *)node)->target, memsize);
1112
- yp_node_memsize_node((yp_node_t *)((yp_constant_path_write_node_t *)node)->value, memsize);
1384
+ yp_constant_path_write_node_t *cast = (yp_constant_path_write_node_t *) node;
1385
+ memsize->memsize += sizeof(*cast);
1386
+ yp_node_memsize_node((yp_node_t *)cast->target, memsize);
1387
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1113
1388
  break;
1114
1389
  }
1115
- #line 124 "node.c.erb"
1390
+ #line 128 "node.c.erb"
1116
1391
  case YP_NODE_CONSTANT_READ_NODE: {
1117
- memsize->memsize += sizeof(yp_constant_read_node_t);
1392
+ yp_constant_read_node_t *cast = (yp_constant_read_node_t *) node;
1393
+ memsize->memsize += sizeof(*cast);
1118
1394
  break;
1119
1395
  }
1120
- #line 124 "node.c.erb"
1396
+ #line 128 "node.c.erb"
1121
1397
  case YP_NODE_CONSTANT_TARGET_NODE: {
1122
- memsize->memsize += sizeof(yp_constant_target_node_t);
1398
+ yp_constant_target_node_t *cast = (yp_constant_target_node_t *) node;
1399
+ memsize->memsize += sizeof(*cast);
1123
1400
  break;
1124
1401
  }
1125
- #line 124 "node.c.erb"
1402
+ #line 128 "node.c.erb"
1126
1403
  case YP_NODE_CONSTANT_WRITE_NODE: {
1127
- memsize->memsize += sizeof(yp_constant_write_node_t);
1128
- yp_node_memsize_node((yp_node_t *)((yp_constant_write_node_t *)node)->value, memsize);
1404
+ yp_constant_write_node_t *cast = (yp_constant_write_node_t *) node;
1405
+ memsize->memsize += sizeof(*cast);
1406
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1129
1407
  break;
1130
1408
  }
1131
- #line 124 "node.c.erb"
1409
+ #line 128 "node.c.erb"
1132
1410
  case YP_NODE_DEF_NODE: {
1133
- memsize->memsize += sizeof(yp_def_node_t);
1134
- if (((yp_def_node_t *)node)->receiver != NULL) {
1135
- yp_node_memsize_node((yp_node_t *)((yp_def_node_t *)node)->receiver, memsize);
1411
+ yp_def_node_t *cast = (yp_def_node_t *) node;
1412
+ memsize->memsize += sizeof(*cast);
1413
+ if (cast->receiver != NULL) {
1414
+ yp_node_memsize_node((yp_node_t *)cast->receiver, memsize);
1136
1415
  }
1137
- if (((yp_def_node_t *)node)->parameters != NULL) {
1138
- yp_node_memsize_node((yp_node_t *)((yp_def_node_t *)node)->parameters, memsize);
1416
+ if (cast->parameters != NULL) {
1417
+ yp_node_memsize_node((yp_node_t *)cast->parameters, memsize);
1139
1418
  }
1140
- if (((yp_def_node_t *)node)->body != NULL) {
1141
- yp_node_memsize_node((yp_node_t *)((yp_def_node_t *)node)->body, memsize);
1419
+ if (cast->body != NULL) {
1420
+ yp_node_memsize_node((yp_node_t *)cast->body, memsize);
1142
1421
  }
1143
- memsize->memsize += yp_constant_id_list_memsize(&((yp_def_node_t *)node)->locals);
1422
+ memsize->memsize += yp_constant_id_list_memsize(&cast->locals);
1144
1423
  break;
1145
1424
  }
1146
- #line 124 "node.c.erb"
1425
+ #line 128 "node.c.erb"
1147
1426
  case YP_NODE_DEFINED_NODE: {
1148
- memsize->memsize += sizeof(yp_defined_node_t);
1149
- yp_node_memsize_node((yp_node_t *)((yp_defined_node_t *)node)->value, memsize);
1427
+ yp_defined_node_t *cast = (yp_defined_node_t *) node;
1428
+ memsize->memsize += sizeof(*cast);
1429
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1150
1430
  break;
1151
1431
  }
1152
- #line 124 "node.c.erb"
1432
+ #line 128 "node.c.erb"
1153
1433
  case YP_NODE_ELSE_NODE: {
1154
- memsize->memsize += sizeof(yp_else_node_t);
1155
- if (((yp_else_node_t *)node)->statements != NULL) {
1156
- yp_node_memsize_node((yp_node_t *)((yp_else_node_t *)node)->statements, memsize);
1434
+ yp_else_node_t *cast = (yp_else_node_t *) node;
1435
+ memsize->memsize += sizeof(*cast);
1436
+ if (cast->statements != NULL) {
1437
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1157
1438
  }
1158
1439
  break;
1159
1440
  }
1160
- #line 124 "node.c.erb"
1441
+ #line 128 "node.c.erb"
1161
1442
  case YP_NODE_EMBEDDED_STATEMENTS_NODE: {
1162
- memsize->memsize += sizeof(yp_embedded_statements_node_t);
1163
- if (((yp_embedded_statements_node_t *)node)->statements != NULL) {
1164
- yp_node_memsize_node((yp_node_t *)((yp_embedded_statements_node_t *)node)->statements, memsize);
1443
+ yp_embedded_statements_node_t *cast = (yp_embedded_statements_node_t *) node;
1444
+ memsize->memsize += sizeof(*cast);
1445
+ if (cast->statements != NULL) {
1446
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1165
1447
  }
1166
1448
  break;
1167
1449
  }
1168
- #line 124 "node.c.erb"
1450
+ #line 128 "node.c.erb"
1169
1451
  case YP_NODE_EMBEDDED_VARIABLE_NODE: {
1170
- memsize->memsize += sizeof(yp_embedded_variable_node_t);
1171
- yp_node_memsize_node((yp_node_t *)((yp_embedded_variable_node_t *)node)->variable, memsize);
1452
+ yp_embedded_variable_node_t *cast = (yp_embedded_variable_node_t *) node;
1453
+ memsize->memsize += sizeof(*cast);
1454
+ yp_node_memsize_node((yp_node_t *)cast->variable, memsize);
1172
1455
  break;
1173
1456
  }
1174
- #line 124 "node.c.erb"
1457
+ #line 128 "node.c.erb"
1175
1458
  case YP_NODE_ENSURE_NODE: {
1176
- memsize->memsize += sizeof(yp_ensure_node_t);
1177
- if (((yp_ensure_node_t *)node)->statements != NULL) {
1178
- yp_node_memsize_node((yp_node_t *)((yp_ensure_node_t *)node)->statements, memsize);
1459
+ yp_ensure_node_t *cast = (yp_ensure_node_t *) node;
1460
+ memsize->memsize += sizeof(*cast);
1461
+ if (cast->statements != NULL) {
1462
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1179
1463
  }
1180
1464
  break;
1181
1465
  }
1182
- #line 124 "node.c.erb"
1466
+ #line 128 "node.c.erb"
1183
1467
  case YP_NODE_FALSE_NODE: {
1184
- memsize->memsize += sizeof(yp_false_node_t);
1468
+ yp_false_node_t *cast = (yp_false_node_t *) node;
1469
+ memsize->memsize += sizeof(*cast);
1185
1470
  break;
1186
1471
  }
1187
- #line 124 "node.c.erb"
1472
+ #line 128 "node.c.erb"
1188
1473
  case YP_NODE_FIND_PATTERN_NODE: {
1189
- memsize->memsize += sizeof(yp_find_pattern_node_t);
1190
- if (((yp_find_pattern_node_t *)node)->constant != NULL) {
1191
- yp_node_memsize_node((yp_node_t *)((yp_find_pattern_node_t *)node)->constant, memsize);
1474
+ yp_find_pattern_node_t *cast = (yp_find_pattern_node_t *) node;
1475
+ memsize->memsize += sizeof(*cast);
1476
+ if (cast->constant != NULL) {
1477
+ yp_node_memsize_node((yp_node_t *)cast->constant, memsize);
1192
1478
  }
1193
- yp_node_memsize_node((yp_node_t *)((yp_find_pattern_node_t *)node)->left, memsize);
1194
- yp_node_list_memsize(&((yp_find_pattern_node_t *)node)->requireds, memsize);
1195
- yp_node_memsize_node((yp_node_t *)((yp_find_pattern_node_t *)node)->right, memsize);
1479
+ yp_node_memsize_node((yp_node_t *)cast->left, memsize);
1480
+ yp_node_list_memsize(&cast->requireds, memsize);
1481
+ yp_node_memsize_node((yp_node_t *)cast->right, memsize);
1196
1482
  break;
1197
1483
  }
1198
- #line 124 "node.c.erb"
1484
+ #line 128 "node.c.erb"
1199
1485
  case YP_NODE_FLIP_FLOP_NODE: {
1200
- memsize->memsize += sizeof(yp_flip_flop_node_t);
1201
- if (((yp_flip_flop_node_t *)node)->left != NULL) {
1202
- yp_node_memsize_node((yp_node_t *)((yp_flip_flop_node_t *)node)->left, memsize);
1486
+ yp_flip_flop_node_t *cast = (yp_flip_flop_node_t *) node;
1487
+ memsize->memsize += sizeof(*cast);
1488
+ if (cast->left != NULL) {
1489
+ yp_node_memsize_node((yp_node_t *)cast->left, memsize);
1203
1490
  }
1204
- if (((yp_flip_flop_node_t *)node)->right != NULL) {
1205
- yp_node_memsize_node((yp_node_t *)((yp_flip_flop_node_t *)node)->right, memsize);
1491
+ if (cast->right != NULL) {
1492
+ yp_node_memsize_node((yp_node_t *)cast->right, memsize);
1206
1493
  }
1207
1494
  break;
1208
1495
  }
1209
- #line 124 "node.c.erb"
1496
+ #line 128 "node.c.erb"
1210
1497
  case YP_NODE_FLOAT_NODE: {
1211
- memsize->memsize += sizeof(yp_float_node_t);
1498
+ yp_float_node_t *cast = (yp_float_node_t *) node;
1499
+ memsize->memsize += sizeof(*cast);
1212
1500
  break;
1213
1501
  }
1214
- #line 124 "node.c.erb"
1502
+ #line 128 "node.c.erb"
1215
1503
  case YP_NODE_FOR_NODE: {
1216
- memsize->memsize += sizeof(yp_for_node_t);
1217
- yp_node_memsize_node((yp_node_t *)((yp_for_node_t *)node)->index, memsize);
1218
- yp_node_memsize_node((yp_node_t *)((yp_for_node_t *)node)->collection, memsize);
1219
- if (((yp_for_node_t *)node)->statements != NULL) {
1220
- yp_node_memsize_node((yp_node_t *)((yp_for_node_t *)node)->statements, memsize);
1504
+ yp_for_node_t *cast = (yp_for_node_t *) node;
1505
+ memsize->memsize += sizeof(*cast);
1506
+ yp_node_memsize_node((yp_node_t *)cast->index, memsize);
1507
+ yp_node_memsize_node((yp_node_t *)cast->collection, memsize);
1508
+ if (cast->statements != NULL) {
1509
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1221
1510
  }
1222
1511
  break;
1223
1512
  }
1224
- #line 124 "node.c.erb"
1513
+ #line 128 "node.c.erb"
1225
1514
  case YP_NODE_FORWARDING_ARGUMENTS_NODE: {
1226
- memsize->memsize += sizeof(yp_forwarding_arguments_node_t);
1515
+ yp_forwarding_arguments_node_t *cast = (yp_forwarding_arguments_node_t *) node;
1516
+ memsize->memsize += sizeof(*cast);
1227
1517
  break;
1228
1518
  }
1229
- #line 124 "node.c.erb"
1519
+ #line 128 "node.c.erb"
1230
1520
  case YP_NODE_FORWARDING_PARAMETER_NODE: {
1231
- memsize->memsize += sizeof(yp_forwarding_parameter_node_t);
1521
+ yp_forwarding_parameter_node_t *cast = (yp_forwarding_parameter_node_t *) node;
1522
+ memsize->memsize += sizeof(*cast);
1232
1523
  break;
1233
1524
  }
1234
- #line 124 "node.c.erb"
1525
+ #line 128 "node.c.erb"
1235
1526
  case YP_NODE_FORWARDING_SUPER_NODE: {
1236
- memsize->memsize += sizeof(yp_forwarding_super_node_t);
1237
- if (((yp_forwarding_super_node_t *)node)->block != NULL) {
1238
- yp_node_memsize_node((yp_node_t *)((yp_forwarding_super_node_t *)node)->block, memsize);
1527
+ yp_forwarding_super_node_t *cast = (yp_forwarding_super_node_t *) node;
1528
+ memsize->memsize += sizeof(*cast);
1529
+ if (cast->block != NULL) {
1530
+ yp_node_memsize_node((yp_node_t *)cast->block, memsize);
1239
1531
  }
1240
1532
  break;
1241
1533
  }
1242
- #line 124 "node.c.erb"
1534
+ #line 128 "node.c.erb"
1243
1535
  case YP_NODE_GLOBAL_VARIABLE_AND_WRITE_NODE: {
1244
- memsize->memsize += sizeof(yp_global_variable_and_write_node_t);
1245
- yp_node_memsize_node((yp_node_t *)((yp_global_variable_and_write_node_t *)node)->value, memsize);
1536
+ yp_global_variable_and_write_node_t *cast = (yp_global_variable_and_write_node_t *) node;
1537
+ memsize->memsize += sizeof(*cast);
1538
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1246
1539
  break;
1247
1540
  }
1248
- #line 124 "node.c.erb"
1541
+ #line 128 "node.c.erb"
1249
1542
  case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
1250
- memsize->memsize += sizeof(yp_global_variable_operator_write_node_t);
1251
- yp_node_memsize_node((yp_node_t *)((yp_global_variable_operator_write_node_t *)node)->value, memsize);
1543
+ yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
1544
+ memsize->memsize += sizeof(*cast);
1545
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1252
1546
  break;
1253
1547
  }
1254
- #line 124 "node.c.erb"
1548
+ #line 128 "node.c.erb"
1255
1549
  case YP_NODE_GLOBAL_VARIABLE_OR_WRITE_NODE: {
1256
- memsize->memsize += sizeof(yp_global_variable_or_write_node_t);
1257
- yp_node_memsize_node((yp_node_t *)((yp_global_variable_or_write_node_t *)node)->value, memsize);
1550
+ yp_global_variable_or_write_node_t *cast = (yp_global_variable_or_write_node_t *) node;
1551
+ memsize->memsize += sizeof(*cast);
1552
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1258
1553
  break;
1259
1554
  }
1260
- #line 124 "node.c.erb"
1555
+ #line 128 "node.c.erb"
1261
1556
  case YP_NODE_GLOBAL_VARIABLE_READ_NODE: {
1262
- memsize->memsize += sizeof(yp_global_variable_read_node_t);
1557
+ yp_global_variable_read_node_t *cast = (yp_global_variable_read_node_t *) node;
1558
+ memsize->memsize += sizeof(*cast);
1263
1559
  break;
1264
1560
  }
1265
- #line 124 "node.c.erb"
1561
+ #line 128 "node.c.erb"
1266
1562
  case YP_NODE_GLOBAL_VARIABLE_TARGET_NODE: {
1267
- memsize->memsize += sizeof(yp_global_variable_target_node_t);
1563
+ yp_global_variable_target_node_t *cast = (yp_global_variable_target_node_t *) node;
1564
+ memsize->memsize += sizeof(*cast);
1268
1565
  break;
1269
1566
  }
1270
- #line 124 "node.c.erb"
1567
+ #line 128 "node.c.erb"
1271
1568
  case YP_NODE_GLOBAL_VARIABLE_WRITE_NODE: {
1272
- memsize->memsize += sizeof(yp_global_variable_write_node_t);
1273
- yp_node_memsize_node((yp_node_t *)((yp_global_variable_write_node_t *)node)->value, memsize);
1569
+ yp_global_variable_write_node_t *cast = (yp_global_variable_write_node_t *) node;
1570
+ memsize->memsize += sizeof(*cast);
1571
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1274
1572
  break;
1275
1573
  }
1276
- #line 124 "node.c.erb"
1574
+ #line 128 "node.c.erb"
1277
1575
  case YP_NODE_HASH_NODE: {
1278
- memsize->memsize += sizeof(yp_hash_node_t);
1279
- yp_node_list_memsize(&((yp_hash_node_t *)node)->elements, memsize);
1576
+ yp_hash_node_t *cast = (yp_hash_node_t *) node;
1577
+ memsize->memsize += sizeof(*cast);
1578
+ yp_node_list_memsize(&cast->elements, memsize);
1280
1579
  break;
1281
1580
  }
1282
- #line 124 "node.c.erb"
1581
+ #line 128 "node.c.erb"
1283
1582
  case YP_NODE_HASH_PATTERN_NODE: {
1284
- memsize->memsize += sizeof(yp_hash_pattern_node_t);
1285
- if (((yp_hash_pattern_node_t *)node)->constant != NULL) {
1286
- yp_node_memsize_node((yp_node_t *)((yp_hash_pattern_node_t *)node)->constant, memsize);
1583
+ yp_hash_pattern_node_t *cast = (yp_hash_pattern_node_t *) node;
1584
+ memsize->memsize += sizeof(*cast);
1585
+ if (cast->constant != NULL) {
1586
+ yp_node_memsize_node((yp_node_t *)cast->constant, memsize);
1287
1587
  }
1288
- yp_node_list_memsize(&((yp_hash_pattern_node_t *)node)->assocs, memsize);
1289
- if (((yp_hash_pattern_node_t *)node)->kwrest != NULL) {
1290
- yp_node_memsize_node((yp_node_t *)((yp_hash_pattern_node_t *)node)->kwrest, memsize);
1588
+ yp_node_list_memsize(&cast->assocs, memsize);
1589
+ if (cast->kwrest != NULL) {
1590
+ yp_node_memsize_node((yp_node_t *)cast->kwrest, memsize);
1291
1591
  }
1292
1592
  break;
1293
1593
  }
1294
- #line 124 "node.c.erb"
1594
+ #line 128 "node.c.erb"
1295
1595
  case YP_NODE_IF_NODE: {
1296
- memsize->memsize += sizeof(yp_if_node_t);
1297
- yp_node_memsize_node((yp_node_t *)((yp_if_node_t *)node)->predicate, memsize);
1298
- if (((yp_if_node_t *)node)->statements != NULL) {
1299
- yp_node_memsize_node((yp_node_t *)((yp_if_node_t *)node)->statements, memsize);
1596
+ yp_if_node_t *cast = (yp_if_node_t *) node;
1597
+ memsize->memsize += sizeof(*cast);
1598
+ yp_node_memsize_node((yp_node_t *)cast->predicate, memsize);
1599
+ if (cast->statements != NULL) {
1600
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1300
1601
  }
1301
- if (((yp_if_node_t *)node)->consequent != NULL) {
1302
- yp_node_memsize_node((yp_node_t *)((yp_if_node_t *)node)->consequent, memsize);
1602
+ if (cast->consequent != NULL) {
1603
+ yp_node_memsize_node((yp_node_t *)cast->consequent, memsize);
1303
1604
  }
1304
1605
  break;
1305
1606
  }
1306
- #line 124 "node.c.erb"
1607
+ #line 128 "node.c.erb"
1307
1608
  case YP_NODE_IMAGINARY_NODE: {
1308
- memsize->memsize += sizeof(yp_imaginary_node_t);
1309
- yp_node_memsize_node((yp_node_t *)((yp_imaginary_node_t *)node)->numeric, memsize);
1609
+ yp_imaginary_node_t *cast = (yp_imaginary_node_t *) node;
1610
+ memsize->memsize += sizeof(*cast);
1611
+ yp_node_memsize_node((yp_node_t *)cast->numeric, memsize);
1310
1612
  break;
1311
1613
  }
1312
- #line 124 "node.c.erb"
1614
+ #line 128 "node.c.erb"
1313
1615
  case YP_NODE_IN_NODE: {
1314
- memsize->memsize += sizeof(yp_in_node_t);
1315
- yp_node_memsize_node((yp_node_t *)((yp_in_node_t *)node)->pattern, memsize);
1316
- if (((yp_in_node_t *)node)->statements != NULL) {
1317
- yp_node_memsize_node((yp_node_t *)((yp_in_node_t *)node)->statements, memsize);
1616
+ yp_in_node_t *cast = (yp_in_node_t *) node;
1617
+ memsize->memsize += sizeof(*cast);
1618
+ yp_node_memsize_node((yp_node_t *)cast->pattern, memsize);
1619
+ if (cast->statements != NULL) {
1620
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1318
1621
  }
1319
1622
  break;
1320
1623
  }
1321
- #line 124 "node.c.erb"
1624
+ #line 128 "node.c.erb"
1322
1625
  case YP_NODE_INSTANCE_VARIABLE_AND_WRITE_NODE: {
1323
- memsize->memsize += sizeof(yp_instance_variable_and_write_node_t);
1324
- yp_node_memsize_node((yp_node_t *)((yp_instance_variable_and_write_node_t *)node)->value, memsize);
1626
+ yp_instance_variable_and_write_node_t *cast = (yp_instance_variable_and_write_node_t *) node;
1627
+ memsize->memsize += sizeof(*cast);
1628
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1325
1629
  break;
1326
1630
  }
1327
- #line 124 "node.c.erb"
1631
+ #line 128 "node.c.erb"
1328
1632
  case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
1329
- memsize->memsize += sizeof(yp_instance_variable_operator_write_node_t);
1330
- yp_node_memsize_node((yp_node_t *)((yp_instance_variable_operator_write_node_t *)node)->value, memsize);
1633
+ yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
1634
+ memsize->memsize += sizeof(*cast);
1635
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1331
1636
  break;
1332
1637
  }
1333
- #line 124 "node.c.erb"
1638
+ #line 128 "node.c.erb"
1334
1639
  case YP_NODE_INSTANCE_VARIABLE_OR_WRITE_NODE: {
1335
- memsize->memsize += sizeof(yp_instance_variable_or_write_node_t);
1336
- yp_node_memsize_node((yp_node_t *)((yp_instance_variable_or_write_node_t *)node)->value, memsize);
1640
+ yp_instance_variable_or_write_node_t *cast = (yp_instance_variable_or_write_node_t *) node;
1641
+ memsize->memsize += sizeof(*cast);
1642
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1337
1643
  break;
1338
1644
  }
1339
- #line 124 "node.c.erb"
1645
+ #line 128 "node.c.erb"
1340
1646
  case YP_NODE_INSTANCE_VARIABLE_READ_NODE: {
1341
- memsize->memsize += sizeof(yp_instance_variable_read_node_t);
1647
+ yp_instance_variable_read_node_t *cast = (yp_instance_variable_read_node_t *) node;
1648
+ memsize->memsize += sizeof(*cast);
1342
1649
  break;
1343
1650
  }
1344
- #line 124 "node.c.erb"
1651
+ #line 128 "node.c.erb"
1345
1652
  case YP_NODE_INSTANCE_VARIABLE_TARGET_NODE: {
1346
- memsize->memsize += sizeof(yp_instance_variable_target_node_t);
1653
+ yp_instance_variable_target_node_t *cast = (yp_instance_variable_target_node_t *) node;
1654
+ memsize->memsize += sizeof(*cast);
1347
1655
  break;
1348
1656
  }
1349
- #line 124 "node.c.erb"
1657
+ #line 128 "node.c.erb"
1350
1658
  case YP_NODE_INSTANCE_VARIABLE_WRITE_NODE: {
1351
- memsize->memsize += sizeof(yp_instance_variable_write_node_t);
1352
- yp_node_memsize_node((yp_node_t *)((yp_instance_variable_write_node_t *)node)->value, memsize);
1659
+ yp_instance_variable_write_node_t *cast = (yp_instance_variable_write_node_t *) node;
1660
+ memsize->memsize += sizeof(*cast);
1661
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1353
1662
  break;
1354
1663
  }
1355
- #line 124 "node.c.erb"
1664
+ #line 128 "node.c.erb"
1356
1665
  case YP_NODE_INTEGER_NODE: {
1357
- memsize->memsize += sizeof(yp_integer_node_t);
1666
+ yp_integer_node_t *cast = (yp_integer_node_t *) node;
1667
+ memsize->memsize += sizeof(*cast);
1358
1668
  break;
1359
1669
  }
1360
- #line 124 "node.c.erb"
1670
+ #line 128 "node.c.erb"
1361
1671
  case YP_NODE_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
1362
- memsize->memsize += sizeof(yp_interpolated_regular_expression_node_t);
1363
- yp_node_list_memsize(&((yp_interpolated_regular_expression_node_t *)node)->parts, memsize);
1672
+ yp_interpolated_regular_expression_node_t *cast = (yp_interpolated_regular_expression_node_t *) node;
1673
+ memsize->memsize += sizeof(*cast);
1674
+ yp_node_list_memsize(&cast->parts, memsize);
1364
1675
  break;
1365
1676
  }
1366
- #line 124 "node.c.erb"
1677
+ #line 128 "node.c.erb"
1367
1678
  case YP_NODE_INTERPOLATED_STRING_NODE: {
1368
- memsize->memsize += sizeof(yp_interpolated_string_node_t);
1369
- yp_node_list_memsize(&((yp_interpolated_string_node_t *)node)->parts, memsize);
1679
+ yp_interpolated_string_node_t *cast = (yp_interpolated_string_node_t *) node;
1680
+ memsize->memsize += sizeof(*cast);
1681
+ yp_node_list_memsize(&cast->parts, memsize);
1370
1682
  break;
1371
1683
  }
1372
- #line 124 "node.c.erb"
1684
+ #line 128 "node.c.erb"
1373
1685
  case YP_NODE_INTERPOLATED_SYMBOL_NODE: {
1374
- memsize->memsize += sizeof(yp_interpolated_symbol_node_t);
1375
- yp_node_list_memsize(&((yp_interpolated_symbol_node_t *)node)->parts, memsize);
1686
+ yp_interpolated_symbol_node_t *cast = (yp_interpolated_symbol_node_t *) node;
1687
+ memsize->memsize += sizeof(*cast);
1688
+ yp_node_list_memsize(&cast->parts, memsize);
1376
1689
  break;
1377
1690
  }
1378
- #line 124 "node.c.erb"
1691
+ #line 128 "node.c.erb"
1379
1692
  case YP_NODE_INTERPOLATED_X_STRING_NODE: {
1380
- memsize->memsize += sizeof(yp_interpolated_x_string_node_t);
1381
- yp_node_list_memsize(&((yp_interpolated_x_string_node_t *)node)->parts, memsize);
1693
+ yp_interpolated_x_string_node_t *cast = (yp_interpolated_x_string_node_t *) node;
1694
+ memsize->memsize += sizeof(*cast);
1695
+ yp_node_list_memsize(&cast->parts, memsize);
1382
1696
  break;
1383
1697
  }
1384
- #line 124 "node.c.erb"
1698
+ #line 128 "node.c.erb"
1385
1699
  case YP_NODE_KEYWORD_HASH_NODE: {
1386
- memsize->memsize += sizeof(yp_keyword_hash_node_t);
1387
- yp_node_list_memsize(&((yp_keyword_hash_node_t *)node)->elements, memsize);
1700
+ yp_keyword_hash_node_t *cast = (yp_keyword_hash_node_t *) node;
1701
+ memsize->memsize += sizeof(*cast);
1702
+ yp_node_list_memsize(&cast->elements, memsize);
1388
1703
  break;
1389
1704
  }
1390
- #line 124 "node.c.erb"
1705
+ #line 128 "node.c.erb"
1391
1706
  case YP_NODE_KEYWORD_PARAMETER_NODE: {
1392
- memsize->memsize += sizeof(yp_keyword_parameter_node_t);
1393
- if (((yp_keyword_parameter_node_t *)node)->value != NULL) {
1394
- yp_node_memsize_node((yp_node_t *)((yp_keyword_parameter_node_t *)node)->value, memsize);
1707
+ yp_keyword_parameter_node_t *cast = (yp_keyword_parameter_node_t *) node;
1708
+ memsize->memsize += sizeof(*cast);
1709
+ if (cast->value != NULL) {
1710
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1395
1711
  }
1396
1712
  break;
1397
1713
  }
1398
- #line 124 "node.c.erb"
1714
+ #line 128 "node.c.erb"
1399
1715
  case YP_NODE_KEYWORD_REST_PARAMETER_NODE: {
1400
- memsize->memsize += sizeof(yp_keyword_rest_parameter_node_t);
1716
+ yp_keyword_rest_parameter_node_t *cast = (yp_keyword_rest_parameter_node_t *) node;
1717
+ memsize->memsize += sizeof(*cast);
1401
1718
  break;
1402
1719
  }
1403
- #line 124 "node.c.erb"
1720
+ #line 128 "node.c.erb"
1404
1721
  case YP_NODE_LAMBDA_NODE: {
1405
- memsize->memsize += sizeof(yp_lambda_node_t);
1406
- memsize->memsize += yp_constant_id_list_memsize(&((yp_lambda_node_t *)node)->locals);
1407
- if (((yp_lambda_node_t *)node)->parameters != NULL) {
1408
- yp_node_memsize_node((yp_node_t *)((yp_lambda_node_t *)node)->parameters, memsize);
1722
+ yp_lambda_node_t *cast = (yp_lambda_node_t *) node;
1723
+ memsize->memsize += sizeof(*cast);
1724
+ memsize->memsize += yp_constant_id_list_memsize(&cast->locals);
1725
+ if (cast->parameters != NULL) {
1726
+ yp_node_memsize_node((yp_node_t *)cast->parameters, memsize);
1409
1727
  }
1410
- if (((yp_lambda_node_t *)node)->body != NULL) {
1411
- yp_node_memsize_node((yp_node_t *)((yp_lambda_node_t *)node)->body, memsize);
1728
+ if (cast->body != NULL) {
1729
+ yp_node_memsize_node((yp_node_t *)cast->body, memsize);
1412
1730
  }
1413
1731
  break;
1414
1732
  }
1415
- #line 124 "node.c.erb"
1733
+ #line 128 "node.c.erb"
1416
1734
  case YP_NODE_LOCAL_VARIABLE_AND_WRITE_NODE: {
1417
- memsize->memsize += sizeof(yp_local_variable_and_write_node_t);
1418
- yp_node_memsize_node((yp_node_t *)((yp_local_variable_and_write_node_t *)node)->value, memsize);
1735
+ yp_local_variable_and_write_node_t *cast = (yp_local_variable_and_write_node_t *) node;
1736
+ memsize->memsize += sizeof(*cast);
1737
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1419
1738
  break;
1420
1739
  }
1421
- #line 124 "node.c.erb"
1740
+ #line 128 "node.c.erb"
1422
1741
  case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
1423
- memsize->memsize += sizeof(yp_local_variable_operator_write_node_t);
1424
- yp_node_memsize_node((yp_node_t *)((yp_local_variable_operator_write_node_t *)node)->value, memsize);
1742
+ yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
1743
+ memsize->memsize += sizeof(*cast);
1744
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1425
1745
  break;
1426
1746
  }
1427
- #line 124 "node.c.erb"
1747
+ #line 128 "node.c.erb"
1428
1748
  case YP_NODE_LOCAL_VARIABLE_OR_WRITE_NODE: {
1429
- memsize->memsize += sizeof(yp_local_variable_or_write_node_t);
1430
- yp_node_memsize_node((yp_node_t *)((yp_local_variable_or_write_node_t *)node)->value, memsize);
1749
+ yp_local_variable_or_write_node_t *cast = (yp_local_variable_or_write_node_t *) node;
1750
+ memsize->memsize += sizeof(*cast);
1751
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1431
1752
  break;
1432
1753
  }
1433
- #line 124 "node.c.erb"
1754
+ #line 128 "node.c.erb"
1434
1755
  case YP_NODE_LOCAL_VARIABLE_READ_NODE: {
1435
- memsize->memsize += sizeof(yp_local_variable_read_node_t);
1756
+ yp_local_variable_read_node_t *cast = (yp_local_variable_read_node_t *) node;
1757
+ memsize->memsize += sizeof(*cast);
1436
1758
  break;
1437
1759
  }
1438
- #line 124 "node.c.erb"
1760
+ #line 128 "node.c.erb"
1439
1761
  case YP_NODE_LOCAL_VARIABLE_TARGET_NODE: {
1440
- memsize->memsize += sizeof(yp_local_variable_target_node_t);
1762
+ yp_local_variable_target_node_t *cast = (yp_local_variable_target_node_t *) node;
1763
+ memsize->memsize += sizeof(*cast);
1441
1764
  break;
1442
1765
  }
1443
- #line 124 "node.c.erb"
1766
+ #line 128 "node.c.erb"
1444
1767
  case YP_NODE_LOCAL_VARIABLE_WRITE_NODE: {
1445
- memsize->memsize += sizeof(yp_local_variable_write_node_t);
1446
- yp_node_memsize_node((yp_node_t *)((yp_local_variable_write_node_t *)node)->value, memsize);
1768
+ yp_local_variable_write_node_t *cast = (yp_local_variable_write_node_t *) node;
1769
+ memsize->memsize += sizeof(*cast);
1770
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1447
1771
  break;
1448
1772
  }
1449
- #line 124 "node.c.erb"
1773
+ #line 128 "node.c.erb"
1450
1774
  case YP_NODE_MATCH_PREDICATE_NODE: {
1451
- memsize->memsize += sizeof(yp_match_predicate_node_t);
1452
- yp_node_memsize_node((yp_node_t *)((yp_match_predicate_node_t *)node)->value, memsize);
1453
- yp_node_memsize_node((yp_node_t *)((yp_match_predicate_node_t *)node)->pattern, memsize);
1775
+ yp_match_predicate_node_t *cast = (yp_match_predicate_node_t *) node;
1776
+ memsize->memsize += sizeof(*cast);
1777
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1778
+ yp_node_memsize_node((yp_node_t *)cast->pattern, memsize);
1454
1779
  break;
1455
1780
  }
1456
- #line 124 "node.c.erb"
1781
+ #line 128 "node.c.erb"
1457
1782
  case YP_NODE_MATCH_REQUIRED_NODE: {
1458
- memsize->memsize += sizeof(yp_match_required_node_t);
1459
- yp_node_memsize_node((yp_node_t *)((yp_match_required_node_t *)node)->value, memsize);
1460
- yp_node_memsize_node((yp_node_t *)((yp_match_required_node_t *)node)->pattern, memsize);
1783
+ yp_match_required_node_t *cast = (yp_match_required_node_t *) node;
1784
+ memsize->memsize += sizeof(*cast);
1785
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1786
+ yp_node_memsize_node((yp_node_t *)cast->pattern, memsize);
1461
1787
  break;
1462
1788
  }
1463
- #line 124 "node.c.erb"
1789
+ #line 128 "node.c.erb"
1464
1790
  case YP_NODE_MISSING_NODE: {
1465
- memsize->memsize += sizeof(yp_missing_node_t);
1791
+ yp_missing_node_t *cast = (yp_missing_node_t *) node;
1792
+ memsize->memsize += sizeof(*cast);
1466
1793
  break;
1467
1794
  }
1468
- #line 124 "node.c.erb"
1795
+ #line 128 "node.c.erb"
1469
1796
  case YP_NODE_MODULE_NODE: {
1470
- memsize->memsize += sizeof(yp_module_node_t);
1471
- memsize->memsize += yp_constant_id_list_memsize(&((yp_module_node_t *)node)->locals);
1472
- yp_node_memsize_node((yp_node_t *)((yp_module_node_t *)node)->constant_path, memsize);
1473
- if (((yp_module_node_t *)node)->body != NULL) {
1474
- yp_node_memsize_node((yp_node_t *)((yp_module_node_t *)node)->body, memsize);
1797
+ yp_module_node_t *cast = (yp_module_node_t *) node;
1798
+ memsize->memsize += sizeof(*cast);
1799
+ memsize->memsize += yp_constant_id_list_memsize(&cast->locals);
1800
+ yp_node_memsize_node((yp_node_t *)cast->constant_path, memsize);
1801
+ if (cast->body != NULL) {
1802
+ yp_node_memsize_node((yp_node_t *)cast->body, memsize);
1475
1803
  }
1476
- memsize->memsize += yp_string_memsize(&((yp_module_node_t *)node)->name);
1804
+ memsize->memsize += yp_string_memsize(&cast->name);
1477
1805
  break;
1478
1806
  }
1479
- #line 124 "node.c.erb"
1807
+ #line 128 "node.c.erb"
1480
1808
  case YP_NODE_MULTI_WRITE_NODE: {
1481
- memsize->memsize += sizeof(yp_multi_write_node_t);
1482
- yp_node_list_memsize(&((yp_multi_write_node_t *)node)->targets, memsize);
1483
- if (((yp_multi_write_node_t *)node)->value != NULL) {
1484
- yp_node_memsize_node((yp_node_t *)((yp_multi_write_node_t *)node)->value, memsize);
1809
+ yp_multi_write_node_t *cast = (yp_multi_write_node_t *) node;
1810
+ memsize->memsize += sizeof(*cast);
1811
+ yp_node_list_memsize(&cast->targets, memsize);
1812
+ if (cast->value != NULL) {
1813
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1485
1814
  }
1486
1815
  break;
1487
1816
  }
1488
- #line 124 "node.c.erb"
1817
+ #line 128 "node.c.erb"
1489
1818
  case YP_NODE_NEXT_NODE: {
1490
- memsize->memsize += sizeof(yp_next_node_t);
1491
- if (((yp_next_node_t *)node)->arguments != NULL) {
1492
- yp_node_memsize_node((yp_node_t *)((yp_next_node_t *)node)->arguments, memsize);
1819
+ yp_next_node_t *cast = (yp_next_node_t *) node;
1820
+ memsize->memsize += sizeof(*cast);
1821
+ if (cast->arguments != NULL) {
1822
+ yp_node_memsize_node((yp_node_t *)cast->arguments, memsize);
1493
1823
  }
1494
1824
  break;
1495
1825
  }
1496
- #line 124 "node.c.erb"
1826
+ #line 128 "node.c.erb"
1497
1827
  case YP_NODE_NIL_NODE: {
1498
- memsize->memsize += sizeof(yp_nil_node_t);
1828
+ yp_nil_node_t *cast = (yp_nil_node_t *) node;
1829
+ memsize->memsize += sizeof(*cast);
1499
1830
  break;
1500
1831
  }
1501
- #line 124 "node.c.erb"
1832
+ #line 128 "node.c.erb"
1502
1833
  case YP_NODE_NO_KEYWORDS_PARAMETER_NODE: {
1503
- memsize->memsize += sizeof(yp_no_keywords_parameter_node_t);
1834
+ yp_no_keywords_parameter_node_t *cast = (yp_no_keywords_parameter_node_t *) node;
1835
+ memsize->memsize += sizeof(*cast);
1504
1836
  break;
1505
1837
  }
1506
- #line 124 "node.c.erb"
1838
+ #line 128 "node.c.erb"
1507
1839
  case YP_NODE_NUMBERED_REFERENCE_READ_NODE: {
1508
- memsize->memsize += sizeof(yp_numbered_reference_read_node_t);
1840
+ yp_numbered_reference_read_node_t *cast = (yp_numbered_reference_read_node_t *) node;
1841
+ memsize->memsize += sizeof(*cast);
1509
1842
  break;
1510
1843
  }
1511
- #line 124 "node.c.erb"
1844
+ #line 128 "node.c.erb"
1512
1845
  case YP_NODE_OPTIONAL_PARAMETER_NODE: {
1513
- memsize->memsize += sizeof(yp_optional_parameter_node_t);
1514
- yp_node_memsize_node((yp_node_t *)((yp_optional_parameter_node_t *)node)->value, memsize);
1846
+ yp_optional_parameter_node_t *cast = (yp_optional_parameter_node_t *) node;
1847
+ memsize->memsize += sizeof(*cast);
1848
+ yp_node_memsize_node((yp_node_t *)cast->value, memsize);
1515
1849
  break;
1516
1850
  }
1517
- #line 124 "node.c.erb"
1851
+ #line 128 "node.c.erb"
1518
1852
  case YP_NODE_OR_NODE: {
1519
- memsize->memsize += sizeof(yp_or_node_t);
1520
- yp_node_memsize_node((yp_node_t *)((yp_or_node_t *)node)->left, memsize);
1521
- yp_node_memsize_node((yp_node_t *)((yp_or_node_t *)node)->right, memsize);
1853
+ yp_or_node_t *cast = (yp_or_node_t *) node;
1854
+ memsize->memsize += sizeof(*cast);
1855
+ yp_node_memsize_node((yp_node_t *)cast->left, memsize);
1856
+ yp_node_memsize_node((yp_node_t *)cast->right, memsize);
1522
1857
  break;
1523
1858
  }
1524
- #line 124 "node.c.erb"
1859
+ #line 128 "node.c.erb"
1525
1860
  case YP_NODE_PARAMETERS_NODE: {
1526
- memsize->memsize += sizeof(yp_parameters_node_t);
1527
- yp_node_list_memsize(&((yp_parameters_node_t *)node)->requireds, memsize);
1528
- yp_node_list_memsize(&((yp_parameters_node_t *)node)->optionals, memsize);
1529
- yp_node_list_memsize(&((yp_parameters_node_t *)node)->posts, memsize);
1530
- if (((yp_parameters_node_t *)node)->rest != NULL) {
1531
- yp_node_memsize_node((yp_node_t *)((yp_parameters_node_t *)node)->rest, memsize);
1861
+ yp_parameters_node_t *cast = (yp_parameters_node_t *) node;
1862
+ memsize->memsize += sizeof(*cast);
1863
+ yp_node_list_memsize(&cast->requireds, memsize);
1864
+ yp_node_list_memsize(&cast->optionals, memsize);
1865
+ yp_node_list_memsize(&cast->posts, memsize);
1866
+ if (cast->rest != NULL) {
1867
+ yp_node_memsize_node((yp_node_t *)cast->rest, memsize);
1532
1868
  }
1533
- yp_node_list_memsize(&((yp_parameters_node_t *)node)->keywords, memsize);
1534
- if (((yp_parameters_node_t *)node)->keyword_rest != NULL) {
1535
- yp_node_memsize_node((yp_node_t *)((yp_parameters_node_t *)node)->keyword_rest, memsize);
1869
+ yp_node_list_memsize(&cast->keywords, memsize);
1870
+ if (cast->keyword_rest != NULL) {
1871
+ yp_node_memsize_node((yp_node_t *)cast->keyword_rest, memsize);
1536
1872
  }
1537
- if (((yp_parameters_node_t *)node)->block != NULL) {
1538
- yp_node_memsize_node((yp_node_t *)((yp_parameters_node_t *)node)->block, memsize);
1873
+ if (cast->block != NULL) {
1874
+ yp_node_memsize_node((yp_node_t *)cast->block, memsize);
1539
1875
  }
1540
1876
  break;
1541
1877
  }
1542
- #line 124 "node.c.erb"
1878
+ #line 128 "node.c.erb"
1543
1879
  case YP_NODE_PARENTHESES_NODE: {
1544
- memsize->memsize += sizeof(yp_parentheses_node_t);
1545
- if (((yp_parentheses_node_t *)node)->body != NULL) {
1546
- yp_node_memsize_node((yp_node_t *)((yp_parentheses_node_t *)node)->body, memsize);
1880
+ yp_parentheses_node_t *cast = (yp_parentheses_node_t *) node;
1881
+ memsize->memsize += sizeof(*cast);
1882
+ if (cast->body != NULL) {
1883
+ yp_node_memsize_node((yp_node_t *)cast->body, memsize);
1547
1884
  }
1548
1885
  break;
1549
1886
  }
1550
- #line 124 "node.c.erb"
1887
+ #line 128 "node.c.erb"
1551
1888
  case YP_NODE_PINNED_EXPRESSION_NODE: {
1552
- memsize->memsize += sizeof(yp_pinned_expression_node_t);
1553
- yp_node_memsize_node((yp_node_t *)((yp_pinned_expression_node_t *)node)->expression, memsize);
1889
+ yp_pinned_expression_node_t *cast = (yp_pinned_expression_node_t *) node;
1890
+ memsize->memsize += sizeof(*cast);
1891
+ yp_node_memsize_node((yp_node_t *)cast->expression, memsize);
1554
1892
  break;
1555
1893
  }
1556
- #line 124 "node.c.erb"
1894
+ #line 128 "node.c.erb"
1557
1895
  case YP_NODE_PINNED_VARIABLE_NODE: {
1558
- memsize->memsize += sizeof(yp_pinned_variable_node_t);
1559
- yp_node_memsize_node((yp_node_t *)((yp_pinned_variable_node_t *)node)->variable, memsize);
1896
+ yp_pinned_variable_node_t *cast = (yp_pinned_variable_node_t *) node;
1897
+ memsize->memsize += sizeof(*cast);
1898
+ yp_node_memsize_node((yp_node_t *)cast->variable, memsize);
1560
1899
  break;
1561
1900
  }
1562
- #line 124 "node.c.erb"
1901
+ #line 128 "node.c.erb"
1563
1902
  case YP_NODE_POST_EXECUTION_NODE: {
1564
- memsize->memsize += sizeof(yp_post_execution_node_t);
1565
- if (((yp_post_execution_node_t *)node)->statements != NULL) {
1566
- yp_node_memsize_node((yp_node_t *)((yp_post_execution_node_t *)node)->statements, memsize);
1903
+ yp_post_execution_node_t *cast = (yp_post_execution_node_t *) node;
1904
+ memsize->memsize += sizeof(*cast);
1905
+ if (cast->statements != NULL) {
1906
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1567
1907
  }
1568
1908
  break;
1569
1909
  }
1570
- #line 124 "node.c.erb"
1910
+ #line 128 "node.c.erb"
1571
1911
  case YP_NODE_PRE_EXECUTION_NODE: {
1572
- memsize->memsize += sizeof(yp_pre_execution_node_t);
1573
- if (((yp_pre_execution_node_t *)node)->statements != NULL) {
1574
- yp_node_memsize_node((yp_node_t *)((yp_pre_execution_node_t *)node)->statements, memsize);
1912
+ yp_pre_execution_node_t *cast = (yp_pre_execution_node_t *) node;
1913
+ memsize->memsize += sizeof(*cast);
1914
+ if (cast->statements != NULL) {
1915
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1575
1916
  }
1576
1917
  break;
1577
1918
  }
1578
- #line 124 "node.c.erb"
1919
+ #line 128 "node.c.erb"
1579
1920
  case YP_NODE_PROGRAM_NODE: {
1580
- memsize->memsize += sizeof(yp_program_node_t);
1581
- memsize->memsize += yp_constant_id_list_memsize(&((yp_program_node_t *)node)->locals);
1582
- yp_node_memsize_node((yp_node_t *)((yp_program_node_t *)node)->statements, memsize);
1921
+ yp_program_node_t *cast = (yp_program_node_t *) node;
1922
+ memsize->memsize += sizeof(*cast);
1923
+ memsize->memsize += yp_constant_id_list_memsize(&cast->locals);
1924
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1583
1925
  break;
1584
1926
  }
1585
- #line 124 "node.c.erb"
1927
+ #line 128 "node.c.erb"
1586
1928
  case YP_NODE_RANGE_NODE: {
1587
- memsize->memsize += sizeof(yp_range_node_t);
1588
- if (((yp_range_node_t *)node)->left != NULL) {
1589
- yp_node_memsize_node((yp_node_t *)((yp_range_node_t *)node)->left, memsize);
1929
+ yp_range_node_t *cast = (yp_range_node_t *) node;
1930
+ memsize->memsize += sizeof(*cast);
1931
+ if (cast->left != NULL) {
1932
+ yp_node_memsize_node((yp_node_t *)cast->left, memsize);
1590
1933
  }
1591
- if (((yp_range_node_t *)node)->right != NULL) {
1592
- yp_node_memsize_node((yp_node_t *)((yp_range_node_t *)node)->right, memsize);
1934
+ if (cast->right != NULL) {
1935
+ yp_node_memsize_node((yp_node_t *)cast->right, memsize);
1593
1936
  }
1594
1937
  break;
1595
1938
  }
1596
- #line 124 "node.c.erb"
1939
+ #line 128 "node.c.erb"
1597
1940
  case YP_NODE_RATIONAL_NODE: {
1598
- memsize->memsize += sizeof(yp_rational_node_t);
1599
- yp_node_memsize_node((yp_node_t *)((yp_rational_node_t *)node)->numeric, memsize);
1941
+ yp_rational_node_t *cast = (yp_rational_node_t *) node;
1942
+ memsize->memsize += sizeof(*cast);
1943
+ yp_node_memsize_node((yp_node_t *)cast->numeric, memsize);
1600
1944
  break;
1601
1945
  }
1602
- #line 124 "node.c.erb"
1946
+ #line 128 "node.c.erb"
1603
1947
  case YP_NODE_REDO_NODE: {
1604
- memsize->memsize += sizeof(yp_redo_node_t);
1948
+ yp_redo_node_t *cast = (yp_redo_node_t *) node;
1949
+ memsize->memsize += sizeof(*cast);
1605
1950
  break;
1606
1951
  }
1607
- #line 124 "node.c.erb"
1952
+ #line 128 "node.c.erb"
1608
1953
  case YP_NODE_REGULAR_EXPRESSION_NODE: {
1609
- memsize->memsize += sizeof(yp_regular_expression_node_t);
1610
- memsize->memsize += yp_string_memsize(&((yp_regular_expression_node_t *)node)->unescaped);
1954
+ yp_regular_expression_node_t *cast = (yp_regular_expression_node_t *) node;
1955
+ memsize->memsize += sizeof(*cast);
1956
+ memsize->memsize += yp_string_memsize(&cast->unescaped);
1611
1957
  break;
1612
1958
  }
1613
- #line 124 "node.c.erb"
1959
+ #line 128 "node.c.erb"
1614
1960
  case YP_NODE_REQUIRED_DESTRUCTURED_PARAMETER_NODE: {
1615
- memsize->memsize += sizeof(yp_required_destructured_parameter_node_t);
1616
- yp_node_list_memsize(&((yp_required_destructured_parameter_node_t *)node)->parameters, memsize);
1961
+ yp_required_destructured_parameter_node_t *cast = (yp_required_destructured_parameter_node_t *) node;
1962
+ memsize->memsize += sizeof(*cast);
1963
+ yp_node_list_memsize(&cast->parameters, memsize);
1617
1964
  break;
1618
1965
  }
1619
- #line 124 "node.c.erb"
1966
+ #line 128 "node.c.erb"
1620
1967
  case YP_NODE_REQUIRED_PARAMETER_NODE: {
1621
- memsize->memsize += sizeof(yp_required_parameter_node_t);
1968
+ yp_required_parameter_node_t *cast = (yp_required_parameter_node_t *) node;
1969
+ memsize->memsize += sizeof(*cast);
1622
1970
  break;
1623
1971
  }
1624
- #line 124 "node.c.erb"
1972
+ #line 128 "node.c.erb"
1625
1973
  case YP_NODE_RESCUE_MODIFIER_NODE: {
1626
- memsize->memsize += sizeof(yp_rescue_modifier_node_t);
1627
- yp_node_memsize_node((yp_node_t *)((yp_rescue_modifier_node_t *)node)->expression, memsize);
1628
- yp_node_memsize_node((yp_node_t *)((yp_rescue_modifier_node_t *)node)->rescue_expression, memsize);
1974
+ yp_rescue_modifier_node_t *cast = (yp_rescue_modifier_node_t *) node;
1975
+ memsize->memsize += sizeof(*cast);
1976
+ yp_node_memsize_node((yp_node_t *)cast->expression, memsize);
1977
+ yp_node_memsize_node((yp_node_t *)cast->rescue_expression, memsize);
1629
1978
  break;
1630
1979
  }
1631
- #line 124 "node.c.erb"
1980
+ #line 128 "node.c.erb"
1632
1981
  case YP_NODE_RESCUE_NODE: {
1633
- memsize->memsize += sizeof(yp_rescue_node_t);
1634
- yp_node_list_memsize(&((yp_rescue_node_t *)node)->exceptions, memsize);
1635
- if (((yp_rescue_node_t *)node)->reference != NULL) {
1636
- yp_node_memsize_node((yp_node_t *)((yp_rescue_node_t *)node)->reference, memsize);
1982
+ yp_rescue_node_t *cast = (yp_rescue_node_t *) node;
1983
+ memsize->memsize += sizeof(*cast);
1984
+ yp_node_list_memsize(&cast->exceptions, memsize);
1985
+ if (cast->reference != NULL) {
1986
+ yp_node_memsize_node((yp_node_t *)cast->reference, memsize);
1637
1987
  }
1638
- if (((yp_rescue_node_t *)node)->statements != NULL) {
1639
- yp_node_memsize_node((yp_node_t *)((yp_rescue_node_t *)node)->statements, memsize);
1988
+ if (cast->statements != NULL) {
1989
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1640
1990
  }
1641
- if (((yp_rescue_node_t *)node)->consequent != NULL) {
1642
- yp_node_memsize_node((yp_node_t *)((yp_rescue_node_t *)node)->consequent, memsize);
1991
+ if (cast->consequent != NULL) {
1992
+ yp_node_memsize_node((yp_node_t *)cast->consequent, memsize);
1643
1993
  }
1644
1994
  break;
1645
1995
  }
1646
- #line 124 "node.c.erb"
1996
+ #line 128 "node.c.erb"
1647
1997
  case YP_NODE_REST_PARAMETER_NODE: {
1648
- memsize->memsize += sizeof(yp_rest_parameter_node_t);
1998
+ yp_rest_parameter_node_t *cast = (yp_rest_parameter_node_t *) node;
1999
+ memsize->memsize += sizeof(*cast);
1649
2000
  break;
1650
2001
  }
1651
- #line 124 "node.c.erb"
2002
+ #line 128 "node.c.erb"
1652
2003
  case YP_NODE_RETRY_NODE: {
1653
- memsize->memsize += sizeof(yp_retry_node_t);
2004
+ yp_retry_node_t *cast = (yp_retry_node_t *) node;
2005
+ memsize->memsize += sizeof(*cast);
1654
2006
  break;
1655
2007
  }
1656
- #line 124 "node.c.erb"
2008
+ #line 128 "node.c.erb"
1657
2009
  case YP_NODE_RETURN_NODE: {
1658
- memsize->memsize += sizeof(yp_return_node_t);
1659
- if (((yp_return_node_t *)node)->arguments != NULL) {
1660
- yp_node_memsize_node((yp_node_t *)((yp_return_node_t *)node)->arguments, memsize);
2010
+ yp_return_node_t *cast = (yp_return_node_t *) node;
2011
+ memsize->memsize += sizeof(*cast);
2012
+ if (cast->arguments != NULL) {
2013
+ yp_node_memsize_node((yp_node_t *)cast->arguments, memsize);
1661
2014
  }
1662
2015
  break;
1663
2016
  }
1664
- #line 124 "node.c.erb"
2017
+ #line 128 "node.c.erb"
1665
2018
  case YP_NODE_SELF_NODE: {
1666
- memsize->memsize += sizeof(yp_self_node_t);
2019
+ yp_self_node_t *cast = (yp_self_node_t *) node;
2020
+ memsize->memsize += sizeof(*cast);
1667
2021
  break;
1668
2022
  }
1669
- #line 124 "node.c.erb"
2023
+ #line 128 "node.c.erb"
1670
2024
  case YP_NODE_SINGLETON_CLASS_NODE: {
1671
- memsize->memsize += sizeof(yp_singleton_class_node_t);
1672
- memsize->memsize += yp_constant_id_list_memsize(&((yp_singleton_class_node_t *)node)->locals);
1673
- yp_node_memsize_node((yp_node_t *)((yp_singleton_class_node_t *)node)->expression, memsize);
1674
- if (((yp_singleton_class_node_t *)node)->body != NULL) {
1675
- yp_node_memsize_node((yp_node_t *)((yp_singleton_class_node_t *)node)->body, memsize);
2025
+ yp_singleton_class_node_t *cast = (yp_singleton_class_node_t *) node;
2026
+ memsize->memsize += sizeof(*cast);
2027
+ memsize->memsize += yp_constant_id_list_memsize(&cast->locals);
2028
+ yp_node_memsize_node((yp_node_t *)cast->expression, memsize);
2029
+ if (cast->body != NULL) {
2030
+ yp_node_memsize_node((yp_node_t *)cast->body, memsize);
1676
2031
  }
1677
2032
  break;
1678
2033
  }
1679
- #line 124 "node.c.erb"
2034
+ #line 128 "node.c.erb"
1680
2035
  case YP_NODE_SOURCE_ENCODING_NODE: {
1681
- memsize->memsize += sizeof(yp_source_encoding_node_t);
2036
+ yp_source_encoding_node_t *cast = (yp_source_encoding_node_t *) node;
2037
+ memsize->memsize += sizeof(*cast);
1682
2038
  break;
1683
2039
  }
1684
- #line 124 "node.c.erb"
2040
+ #line 128 "node.c.erb"
1685
2041
  case YP_NODE_SOURCE_FILE_NODE: {
1686
- memsize->memsize += sizeof(yp_source_file_node_t);
1687
- memsize->memsize += yp_string_memsize(&((yp_source_file_node_t *)node)->filepath);
2042
+ yp_source_file_node_t *cast = (yp_source_file_node_t *) node;
2043
+ memsize->memsize += sizeof(*cast);
2044
+ memsize->memsize += yp_string_memsize(&cast->filepath);
1688
2045
  break;
1689
2046
  }
1690
- #line 124 "node.c.erb"
2047
+ #line 128 "node.c.erb"
1691
2048
  case YP_NODE_SOURCE_LINE_NODE: {
1692
- memsize->memsize += sizeof(yp_source_line_node_t);
2049
+ yp_source_line_node_t *cast = (yp_source_line_node_t *) node;
2050
+ memsize->memsize += sizeof(*cast);
1693
2051
  break;
1694
2052
  }
1695
- #line 124 "node.c.erb"
2053
+ #line 128 "node.c.erb"
1696
2054
  case YP_NODE_SPLAT_NODE: {
1697
- memsize->memsize += sizeof(yp_splat_node_t);
1698
- if (((yp_splat_node_t *)node)->expression != NULL) {
1699
- yp_node_memsize_node((yp_node_t *)((yp_splat_node_t *)node)->expression, memsize);
2055
+ yp_splat_node_t *cast = (yp_splat_node_t *) node;
2056
+ memsize->memsize += sizeof(*cast);
2057
+ if (cast->expression != NULL) {
2058
+ yp_node_memsize_node((yp_node_t *)cast->expression, memsize);
1700
2059
  }
1701
2060
  break;
1702
2061
  }
1703
- #line 124 "node.c.erb"
2062
+ #line 128 "node.c.erb"
1704
2063
  case YP_NODE_STATEMENTS_NODE: {
1705
- memsize->memsize += sizeof(yp_statements_node_t);
1706
- yp_node_list_memsize(&((yp_statements_node_t *)node)->body, memsize);
2064
+ yp_statements_node_t *cast = (yp_statements_node_t *) node;
2065
+ memsize->memsize += sizeof(*cast);
2066
+ yp_node_list_memsize(&cast->body, memsize);
1707
2067
  break;
1708
2068
  }
1709
- #line 124 "node.c.erb"
2069
+ #line 128 "node.c.erb"
1710
2070
  case YP_NODE_STRING_CONCAT_NODE: {
1711
- memsize->memsize += sizeof(yp_string_concat_node_t);
1712
- yp_node_memsize_node((yp_node_t *)((yp_string_concat_node_t *)node)->left, memsize);
1713
- yp_node_memsize_node((yp_node_t *)((yp_string_concat_node_t *)node)->right, memsize);
2071
+ yp_string_concat_node_t *cast = (yp_string_concat_node_t *) node;
2072
+ memsize->memsize += sizeof(*cast);
2073
+ yp_node_memsize_node((yp_node_t *)cast->left, memsize);
2074
+ yp_node_memsize_node((yp_node_t *)cast->right, memsize);
1714
2075
  break;
1715
2076
  }
1716
- #line 124 "node.c.erb"
2077
+ #line 128 "node.c.erb"
1717
2078
  case YP_NODE_STRING_NODE: {
1718
- memsize->memsize += sizeof(yp_string_node_t);
1719
- memsize->memsize += yp_string_memsize(&((yp_string_node_t *)node)->unescaped);
2079
+ yp_string_node_t *cast = (yp_string_node_t *) node;
2080
+ memsize->memsize += sizeof(*cast);
2081
+ memsize->memsize += yp_string_memsize(&cast->unescaped);
1720
2082
  break;
1721
2083
  }
1722
- #line 124 "node.c.erb"
2084
+ #line 128 "node.c.erb"
1723
2085
  case YP_NODE_SUPER_NODE: {
1724
- memsize->memsize += sizeof(yp_super_node_t);
1725
- if (((yp_super_node_t *)node)->arguments != NULL) {
1726
- yp_node_memsize_node((yp_node_t *)((yp_super_node_t *)node)->arguments, memsize);
2086
+ yp_super_node_t *cast = (yp_super_node_t *) node;
2087
+ memsize->memsize += sizeof(*cast);
2088
+ if (cast->arguments != NULL) {
2089
+ yp_node_memsize_node((yp_node_t *)cast->arguments, memsize);
1727
2090
  }
1728
- if (((yp_super_node_t *)node)->block != NULL) {
1729
- yp_node_memsize_node((yp_node_t *)((yp_super_node_t *)node)->block, memsize);
2091
+ if (cast->block != NULL) {
2092
+ yp_node_memsize_node((yp_node_t *)cast->block, memsize);
1730
2093
  }
1731
2094
  break;
1732
2095
  }
1733
- #line 124 "node.c.erb"
2096
+ #line 128 "node.c.erb"
1734
2097
  case YP_NODE_SYMBOL_NODE: {
1735
- memsize->memsize += sizeof(yp_symbol_node_t);
1736
- memsize->memsize += yp_string_memsize(&((yp_symbol_node_t *)node)->unescaped);
2098
+ yp_symbol_node_t *cast = (yp_symbol_node_t *) node;
2099
+ memsize->memsize += sizeof(*cast);
2100
+ memsize->memsize += yp_string_memsize(&cast->unescaped);
1737
2101
  break;
1738
2102
  }
1739
- #line 124 "node.c.erb"
2103
+ #line 128 "node.c.erb"
1740
2104
  case YP_NODE_TRUE_NODE: {
1741
- memsize->memsize += sizeof(yp_true_node_t);
2105
+ yp_true_node_t *cast = (yp_true_node_t *) node;
2106
+ memsize->memsize += sizeof(*cast);
1742
2107
  break;
1743
2108
  }
1744
- #line 124 "node.c.erb"
2109
+ #line 128 "node.c.erb"
1745
2110
  case YP_NODE_UNDEF_NODE: {
1746
- memsize->memsize += sizeof(yp_undef_node_t);
1747
- yp_node_list_memsize(&((yp_undef_node_t *)node)->names, memsize);
2111
+ yp_undef_node_t *cast = (yp_undef_node_t *) node;
2112
+ memsize->memsize += sizeof(*cast);
2113
+ yp_node_list_memsize(&cast->names, memsize);
1748
2114
  break;
1749
2115
  }
1750
- #line 124 "node.c.erb"
2116
+ #line 128 "node.c.erb"
1751
2117
  case YP_NODE_UNLESS_NODE: {
1752
- memsize->memsize += sizeof(yp_unless_node_t);
1753
- yp_node_memsize_node((yp_node_t *)((yp_unless_node_t *)node)->predicate, memsize);
1754
- if (((yp_unless_node_t *)node)->statements != NULL) {
1755
- yp_node_memsize_node((yp_node_t *)((yp_unless_node_t *)node)->statements, memsize);
2118
+ yp_unless_node_t *cast = (yp_unless_node_t *) node;
2119
+ memsize->memsize += sizeof(*cast);
2120
+ yp_node_memsize_node((yp_node_t *)cast->predicate, memsize);
2121
+ if (cast->statements != NULL) {
2122
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1756
2123
  }
1757
- if (((yp_unless_node_t *)node)->consequent != NULL) {
1758
- yp_node_memsize_node((yp_node_t *)((yp_unless_node_t *)node)->consequent, memsize);
2124
+ if (cast->consequent != NULL) {
2125
+ yp_node_memsize_node((yp_node_t *)cast->consequent, memsize);
1759
2126
  }
1760
2127
  break;
1761
2128
  }
1762
- #line 124 "node.c.erb"
2129
+ #line 128 "node.c.erb"
1763
2130
  case YP_NODE_UNTIL_NODE: {
1764
- memsize->memsize += sizeof(yp_until_node_t);
1765
- yp_node_memsize_node((yp_node_t *)((yp_until_node_t *)node)->predicate, memsize);
1766
- if (((yp_until_node_t *)node)->statements != NULL) {
1767
- yp_node_memsize_node((yp_node_t *)((yp_until_node_t *)node)->statements, memsize);
2131
+ yp_until_node_t *cast = (yp_until_node_t *) node;
2132
+ memsize->memsize += sizeof(*cast);
2133
+ yp_node_memsize_node((yp_node_t *)cast->predicate, memsize);
2134
+ if (cast->statements != NULL) {
2135
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1768
2136
  }
1769
2137
  break;
1770
2138
  }
1771
- #line 124 "node.c.erb"
2139
+ #line 128 "node.c.erb"
1772
2140
  case YP_NODE_WHEN_NODE: {
1773
- memsize->memsize += sizeof(yp_when_node_t);
1774
- yp_node_list_memsize(&((yp_when_node_t *)node)->conditions, memsize);
1775
- if (((yp_when_node_t *)node)->statements != NULL) {
1776
- yp_node_memsize_node((yp_node_t *)((yp_when_node_t *)node)->statements, memsize);
2141
+ yp_when_node_t *cast = (yp_when_node_t *) node;
2142
+ memsize->memsize += sizeof(*cast);
2143
+ yp_node_list_memsize(&cast->conditions, memsize);
2144
+ if (cast->statements != NULL) {
2145
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1777
2146
  }
1778
2147
  break;
1779
2148
  }
1780
- #line 124 "node.c.erb"
2149
+ #line 128 "node.c.erb"
1781
2150
  case YP_NODE_WHILE_NODE: {
1782
- memsize->memsize += sizeof(yp_while_node_t);
1783
- yp_node_memsize_node((yp_node_t *)((yp_while_node_t *)node)->predicate, memsize);
1784
- if (((yp_while_node_t *)node)->statements != NULL) {
1785
- yp_node_memsize_node((yp_node_t *)((yp_while_node_t *)node)->statements, memsize);
2151
+ yp_while_node_t *cast = (yp_while_node_t *) node;
2152
+ memsize->memsize += sizeof(*cast);
2153
+ yp_node_memsize_node((yp_node_t *)cast->predicate, memsize);
2154
+ if (cast->statements != NULL) {
2155
+ yp_node_memsize_node((yp_node_t *)cast->statements, memsize);
1786
2156
  }
1787
2157
  break;
1788
2158
  }
1789
- #line 124 "node.c.erb"
2159
+ #line 128 "node.c.erb"
1790
2160
  case YP_NODE_X_STRING_NODE: {
1791
- memsize->memsize += sizeof(yp_x_string_node_t);
1792
- memsize->memsize += yp_string_memsize(&((yp_x_string_node_t *)node)->unescaped);
2161
+ yp_x_string_node_t *cast = (yp_x_string_node_t *) node;
2162
+ memsize->memsize += sizeof(*cast);
2163
+ memsize->memsize += yp_string_memsize(&cast->unescaped);
1793
2164
  break;
1794
2165
  }
1795
- #line 124 "node.c.erb"
2166
+ #line 128 "node.c.erb"
1796
2167
  case YP_NODE_YIELD_NODE: {
1797
- memsize->memsize += sizeof(yp_yield_node_t);
1798
- if (((yp_yield_node_t *)node)->arguments != NULL) {
1799
- yp_node_memsize_node((yp_node_t *)((yp_yield_node_t *)node)->arguments, memsize);
2168
+ yp_yield_node_t *cast = (yp_yield_node_t *) node;
2169
+ memsize->memsize += sizeof(*cast);
2170
+ if (cast->arguments != NULL) {
2171
+ yp_node_memsize_node((yp_node_t *)cast->arguments, memsize);
1800
2172
  }
1801
2173
  break;
1802
2174
  }
1803
- #line 151 "node.c.erb"
2175
+ #line 156 "node.c.erb"
1804
2176
  }
1805
2177
  }
1806
2178
 
@@ -2085,5 +2457,5 @@ yp_node_type_to_str(yp_node_type_t node_type)
2085
2457
  case YP_NODE_YIELD_NODE:
2086
2458
  return "YP_NODE_YIELD_NODE";
2087
2459
  }
2088
- return "\0";
2460
+ return "";
2089
2461
  }