Ruby: prism/node.c Source File

Ruby 3.3.6p108 (2024-11-05 revision 75015d4c1f6965b5e85e96fb309f1f2129f933c0)

node.c
1/******************************************************************************/
2/* This file is generated by the templates/template.rb script and should not */
3/* be modified manually. See */
4/* templates/src/node.c.erb */
5/* if you are looking to modify the */
6/* template */
7/******************************************************************************/
8#line 2 "node.c.erb"
9#include "prism/node.h"
10
11static void
12pm_node_memsize_node(pm_node_t *node, pm_memsize_t *memsize);
13
17static size_t
18pm_node_list_memsize(pm_node_list_t *node_list, pm_memsize_t *memsize) {
19 size_t size = sizeof(pm_node_list_t) + (node_list->capacity * sizeof(pm_node_t *));
20 for (size_t index = 0; index < node_list->size; index++) {
21 pm_node_memsize_node(node_list->nodes[index], memsize);
22 }
23 return size;
24}
25
29void
30pm_node_list_append(pm_node_list_t *list, pm_node_t *node) {
31 if (list->size == list->capacity) {
32 list->capacity = list->capacity == 0 ? 4 : list->capacity * 2;
33 list->nodes = (pm_node_t **) realloc(list->nodes, sizeof(pm_node_t *) * list->capacity);
34 }
35 list->nodes[list->size++] = node;
36}
37
38 PRISM_EXPORTED_FUNCTION void
39pm_node_destroy(pm_parser_t *parser, pm_node_t *node);
40
45static void
46pm_node_list_free(pm_parser_t *parser, pm_node_list_t *list) {
47 if (list->capacity > 0) {
48 for (size_t index = 0; index < list->size; index++) {
49 pm_node_destroy(parser, list->nodes[index]);
50 }
51 free(list->nodes);
52 }
53}
54
60 PRISM_EXPORTED_FUNCTION void
61pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
62 switch (PM_NODE_TYPE(node)) {
63#line 58 "node.c.erb"
64 case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
65 pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node;
66 pm_node_destroy(parser, (pm_node_t *)cast->new_name);
67 pm_node_destroy(parser, (pm_node_t *)cast->old_name);
68 break;
69 }
70#line 58 "node.c.erb"
71 case PM_ALIAS_METHOD_NODE: {
72 pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node;
73 pm_node_destroy(parser, (pm_node_t *)cast->new_name);
74 pm_node_destroy(parser, (pm_node_t *)cast->old_name);
75 break;
76 }
77#line 58 "node.c.erb"
78 case PM_ALTERNATION_PATTERN_NODE: {
79 pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node;
80 pm_node_destroy(parser, (pm_node_t *)cast->left);
81 pm_node_destroy(parser, (pm_node_t *)cast->right);
82 break;
83 }
84#line 58 "node.c.erb"
85 case PM_AND_NODE: {
86 pm_and_node_t *cast = (pm_and_node_t *) node;
87 pm_node_destroy(parser, (pm_node_t *)cast->left);
88 pm_node_destroy(parser, (pm_node_t *)cast->right);
89 break;
90 }
91#line 58 "node.c.erb"
92 case PM_ARGUMENTS_NODE: {
93 pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
94 pm_node_list_free(parser, &cast->arguments);
95 break;
96 }
97#line 58 "node.c.erb"
98 case PM_ARRAY_NODE: {
99 pm_array_node_t *cast = (pm_array_node_t *) node;
100 pm_node_list_free(parser, &cast->elements);
101 break;
102 }
103#line 58 "node.c.erb"
104 case PM_ARRAY_PATTERN_NODE: {
105 pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node;
106 if (cast->constant != NULL) {
107 pm_node_destroy(parser, (pm_node_t *)cast->constant);
108 }
109 pm_node_list_free(parser, &cast->requireds);
110 if (cast->rest != NULL) {
111 pm_node_destroy(parser, (pm_node_t *)cast->rest);
112 }
113 pm_node_list_free(parser, &cast->posts);
114 break;
115 }
116#line 58 "node.c.erb"
117 case PM_ASSOC_NODE: {
118 pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
119 pm_node_destroy(parser, (pm_node_t *)cast->key);
120 if (cast->value != NULL) {
121 pm_node_destroy(parser, (pm_node_t *)cast->value);
122 }
123 break;
124 }
125#line 58 "node.c.erb"
126 case PM_ASSOC_SPLAT_NODE: {
127 pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node;
128 if (cast->value != NULL) {
129 pm_node_destroy(parser, (pm_node_t *)cast->value);
130 }
131 break;
132 }
133#line 58 "node.c.erb"
134 case PM_BACK_REFERENCE_READ_NODE: {
135 break;
136 }
137#line 58 "node.c.erb"
138 case PM_BEGIN_NODE: {
139 pm_begin_node_t *cast = (pm_begin_node_t *) node;
140 if (cast->statements != NULL) {
141 pm_node_destroy(parser, (pm_node_t *)cast->statements);
142 }
143 if (cast->rescue_clause != NULL) {
144 pm_node_destroy(parser, (pm_node_t *)cast->rescue_clause);
145 }
146 if (cast->else_clause != NULL) {
147 pm_node_destroy(parser, (pm_node_t *)cast->else_clause);
148 }
149 if (cast->ensure_clause != NULL) {
150 pm_node_destroy(parser, (pm_node_t *)cast->ensure_clause);
151 }
152 break;
153 }
154#line 58 "node.c.erb"
155 case PM_BLOCK_ARGUMENT_NODE: {
156 pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node;
157 if (cast->expression != NULL) {
158 pm_node_destroy(parser, (pm_node_t *)cast->expression);
159 }
160 break;
161 }
162#line 58 "node.c.erb"
163 case PM_BLOCK_LOCAL_VARIABLE_NODE: {
164 break;
165 }
166#line 58 "node.c.erb"
167 case PM_BLOCK_NODE: {
168 pm_block_node_t *cast = (pm_block_node_t *) node;
169 pm_constant_id_list_free(&cast->locals);
170 if (cast->parameters != NULL) {
171 pm_node_destroy(parser, (pm_node_t *)cast->parameters);
172 }
173 if (cast->body != NULL) {
174 pm_node_destroy(parser, (pm_node_t *)cast->body);
175 }
176 break;
177 }
178#line 58 "node.c.erb"
179 case PM_BLOCK_PARAMETER_NODE: {
180 break;
181 }
182#line 58 "node.c.erb"
183 case PM_BLOCK_PARAMETERS_NODE: {
184 pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node;
185 if (cast->parameters != NULL) {
186 pm_node_destroy(parser, (pm_node_t *)cast->parameters);
187 }
188 pm_node_list_free(parser, &cast->locals);
189 break;
190 }
191#line 58 "node.c.erb"
192 case PM_BREAK_NODE: {
193 pm_break_node_t *cast = (pm_break_node_t *) node;
194 if (cast->arguments != NULL) {
195 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
196 }
197 break;
198 }
199#line 58 "node.c.erb"
200 case PM_CALL_AND_WRITE_NODE: {
201 pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
202 if (cast->receiver != NULL) {
203 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
204 }
205 pm_node_destroy(parser, (pm_node_t *)cast->value);
206 break;
207 }
208#line 58 "node.c.erb"
209 case PM_CALL_NODE: {
210 pm_call_node_t *cast = (pm_call_node_t *) node;
211 if (cast->receiver != NULL) {
212 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
213 }
214 if (cast->arguments != NULL) {
215 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
216 }
217 if (cast->block != NULL) {
218 pm_node_destroy(parser, (pm_node_t *)cast->block);
219 }
220 break;
221 }
222#line 58 "node.c.erb"
223 case PM_CALL_OPERATOR_WRITE_NODE: {
224 pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
225 if (cast->receiver != NULL) {
226 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
227 }
228 pm_node_destroy(parser, (pm_node_t *)cast->value);
229 break;
230 }
231#line 58 "node.c.erb"
232 case PM_CALL_OR_WRITE_NODE: {
233 pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
234 if (cast->receiver != NULL) {
235 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
236 }
237 pm_node_destroy(parser, (pm_node_t *)cast->value);
238 break;
239 }
240#line 58 "node.c.erb"
241 case PM_CALL_TARGET_NODE: {
242 pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
243 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
244 break;
245 }
246#line 58 "node.c.erb"
247 case PM_CAPTURE_PATTERN_NODE: {
248 pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
249 pm_node_destroy(parser, (pm_node_t *)cast->value);
250 pm_node_destroy(parser, (pm_node_t *)cast->target);
251 break;
252 }
253#line 58 "node.c.erb"
254 case PM_CASE_MATCH_NODE: {
255 pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
256 if (cast->predicate != NULL) {
257 pm_node_destroy(parser, (pm_node_t *)cast->predicate);
258 }
259 pm_node_list_free(parser, &cast->conditions);
260 if (cast->consequent != NULL) {
261 pm_node_destroy(parser, (pm_node_t *)cast->consequent);
262 }
263 break;
264 }
265#line 58 "node.c.erb"
266 case PM_CASE_NODE: {
267 pm_case_node_t *cast = (pm_case_node_t *) node;
268 if (cast->predicate != NULL) {
269 pm_node_destroy(parser, (pm_node_t *)cast->predicate);
270 }
271 pm_node_list_free(parser, &cast->conditions);
272 if (cast->consequent != NULL) {
273 pm_node_destroy(parser, (pm_node_t *)cast->consequent);
274 }
275 break;
276 }
277#line 58 "node.c.erb"
278 case PM_CLASS_NODE: {
279 pm_class_node_t *cast = (pm_class_node_t *) node;
280 pm_constant_id_list_free(&cast->locals);
281 pm_node_destroy(parser, (pm_node_t *)cast->constant_path);
282 if (cast->superclass != NULL) {
283 pm_node_destroy(parser, (pm_node_t *)cast->superclass);
284 }
285 if (cast->body != NULL) {
286 pm_node_destroy(parser, (pm_node_t *)cast->body);
287 }
288 break;
289 }
290#line 58 "node.c.erb"
291 case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
292 pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node;
293 pm_node_destroy(parser, (pm_node_t *)cast->value);
294 break;
295 }
296#line 58 "node.c.erb"
297 case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
298 pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node;
299 pm_node_destroy(parser, (pm_node_t *)cast->value);
300 break;
301 }
302#line 58 "node.c.erb"
303 case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
304 pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node;
305 pm_node_destroy(parser, (pm_node_t *)cast->value);
306 break;
307 }
308#line 58 "node.c.erb"
309 case PM_CLASS_VARIABLE_READ_NODE: {
310 break;
311 }
312#line 58 "node.c.erb"
313 case PM_CLASS_VARIABLE_TARGET_NODE: {
314 break;
315 }
316#line 58 "node.c.erb"
317 case PM_CLASS_VARIABLE_WRITE_NODE: {
318 pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node;
319 pm_node_destroy(parser, (pm_node_t *)cast->value);
320 break;
321 }
322#line 58 "node.c.erb"
323 case PM_CONSTANT_AND_WRITE_NODE: {
324 pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node;
325 pm_node_destroy(parser, (pm_node_t *)cast->value);
326 break;
327 }
328#line 58 "node.c.erb"
329 case PM_CONSTANT_OPERATOR_WRITE_NODE: {
330 pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node;
331 pm_node_destroy(parser, (pm_node_t *)cast->value);
332 break;
333 }
334#line 58 "node.c.erb"
335 case PM_CONSTANT_OR_WRITE_NODE: {
336 pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node;
337 pm_node_destroy(parser, (pm_node_t *)cast->value);
338 break;
339 }
340#line 58 "node.c.erb"
341 case PM_CONSTANT_PATH_AND_WRITE_NODE: {
342 pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node;
343 pm_node_destroy(parser, (pm_node_t *)cast->target);
344 pm_node_destroy(parser, (pm_node_t *)cast->value);
345 break;
346 }
347#line 58 "node.c.erb"
348 case PM_CONSTANT_PATH_NODE: {
349 pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node;
350 if (cast->parent != NULL) {
351 pm_node_destroy(parser, (pm_node_t *)cast->parent);
352 }
353 pm_node_destroy(parser, (pm_node_t *)cast->child);
354 break;
355 }
356#line 58 "node.c.erb"
357 case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
358 pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node;
359 pm_node_destroy(parser, (pm_node_t *)cast->target);
360 pm_node_destroy(parser, (pm_node_t *)cast->value);
361 break;
362 }
363#line 58 "node.c.erb"
364 case PM_CONSTANT_PATH_OR_WRITE_NODE: {
365 pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node;
366 pm_node_destroy(parser, (pm_node_t *)cast->target);
367 pm_node_destroy(parser, (pm_node_t *)cast->value);
368 break;
369 }
370#line 58 "node.c.erb"
371 case PM_CONSTANT_PATH_TARGET_NODE: {
372 pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node;
373 if (cast->parent != NULL) {
374 pm_node_destroy(parser, (pm_node_t *)cast->parent);
375 }
376 pm_node_destroy(parser, (pm_node_t *)cast->child);
377 break;
378 }
379#line 58 "node.c.erb"
380 case PM_CONSTANT_PATH_WRITE_NODE: {
381 pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node;
382 pm_node_destroy(parser, (pm_node_t *)cast->target);
383 pm_node_destroy(parser, (pm_node_t *)cast->value);
384 break;
385 }
386#line 58 "node.c.erb"
387 case PM_CONSTANT_READ_NODE: {
388 break;
389 }
390#line 58 "node.c.erb"
391 case PM_CONSTANT_TARGET_NODE: {
392 break;
393 }
394#line 58 "node.c.erb"
395 case PM_CONSTANT_WRITE_NODE: {
396 pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node;
397 pm_node_destroy(parser, (pm_node_t *)cast->value);
398 break;
399 }
400#line 58 "node.c.erb"
401 case PM_DEF_NODE: {
402 pm_def_node_t *cast = (pm_def_node_t *) node;
403 if (cast->receiver != NULL) {
404 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
405 }
406 if (cast->parameters != NULL) {
407 pm_node_destroy(parser, (pm_node_t *)cast->parameters);
408 }
409 if (cast->body != NULL) {
410 pm_node_destroy(parser, (pm_node_t *)cast->body);
411 }
412 pm_constant_id_list_free(&cast->locals);
413 break;
414 }
415#line 58 "node.c.erb"
416 case PM_DEFINED_NODE: {
417 pm_defined_node_t *cast = (pm_defined_node_t *) node;
418 pm_node_destroy(parser, (pm_node_t *)cast->value);
419 break;
420 }
421#line 58 "node.c.erb"
422 case PM_ELSE_NODE: {
423 pm_else_node_t *cast = (pm_else_node_t *) node;
424 if (cast->statements != NULL) {
425 pm_node_destroy(parser, (pm_node_t *)cast->statements);
426 }
427 break;
428 }
429#line 58 "node.c.erb"
430 case PM_EMBEDDED_STATEMENTS_NODE: {
431 pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node;
432 if (cast->statements != NULL) {
433 pm_node_destroy(parser, (pm_node_t *)cast->statements);
434 }
435 break;
436 }
437#line 58 "node.c.erb"
438 case PM_EMBEDDED_VARIABLE_NODE: {
439 pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node;
440 pm_node_destroy(parser, (pm_node_t *)cast->variable);
441 break;
442 }
443#line 58 "node.c.erb"
444 case PM_ENSURE_NODE: {
445 pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
446 if (cast->statements != NULL) {
447 pm_node_destroy(parser, (pm_node_t *)cast->statements);
448 }
449 break;
450 }
451#line 58 "node.c.erb"
452 case PM_FALSE_NODE: {
453 break;
454 }
455#line 58 "node.c.erb"
456 case PM_FIND_PATTERN_NODE: {
457 pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node;
458 if (cast->constant != NULL) {
459 pm_node_destroy(parser, (pm_node_t *)cast->constant);
460 }
461 pm_node_destroy(parser, (pm_node_t *)cast->left);
462 pm_node_list_free(parser, &cast->requireds);
463 pm_node_destroy(parser, (pm_node_t *)cast->right);
464 break;
465 }
466#line 58 "node.c.erb"
467 case PM_FLIP_FLOP_NODE: {
468 pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
469 if (cast->left != NULL) {
470 pm_node_destroy(parser, (pm_node_t *)cast->left);
471 }
472 if (cast->right != NULL) {
473 pm_node_destroy(parser, (pm_node_t *)cast->right);
474 }
475 break;
476 }
477#line 58 "node.c.erb"
478 case PM_FLOAT_NODE: {
479 break;
480 }
481#line 58 "node.c.erb"
482 case PM_FOR_NODE: {
483 pm_for_node_t *cast = (pm_for_node_t *) node;
484 pm_node_destroy(parser, (pm_node_t *)cast->index);
485 pm_node_destroy(parser, (pm_node_t *)cast->collection);
486 if (cast->statements != NULL) {
487 pm_node_destroy(parser, (pm_node_t *)cast->statements);
488 }
489 break;
490 }
491#line 58 "node.c.erb"
492 case PM_FORWARDING_ARGUMENTS_NODE: {
493 break;
494 }
495#line 58 "node.c.erb"
496 case PM_FORWARDING_PARAMETER_NODE: {
497 break;
498 }
499#line 58 "node.c.erb"
500 case PM_FORWARDING_SUPER_NODE: {
501 pm_forwarding_super_node_t *cast = (pm_forwarding_super_node_t *) node;
502 if (cast->block != NULL) {
503 pm_node_destroy(parser, (pm_node_t *)cast->block);
504 }
505 break;
506 }
507#line 58 "node.c.erb"
508 case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
509 pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node;
510 pm_node_destroy(parser, (pm_node_t *)cast->value);
511 break;
512 }
513#line 58 "node.c.erb"
514 case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
515 pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node;
516 pm_node_destroy(parser, (pm_node_t *)cast->value);
517 break;
518 }
519#line 58 "node.c.erb"
520 case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
521 pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node;
522 pm_node_destroy(parser, (pm_node_t *)cast->value);
523 break;
524 }
525#line 58 "node.c.erb"
526 case PM_GLOBAL_VARIABLE_READ_NODE: {
527 break;
528 }
529#line 58 "node.c.erb"
530 case PM_GLOBAL_VARIABLE_TARGET_NODE: {
531 break;
532 }
533#line 58 "node.c.erb"
534 case PM_GLOBAL_VARIABLE_WRITE_NODE: {
535 pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node;
536 pm_node_destroy(parser, (pm_node_t *)cast->value);
537 break;
538 }
539#line 58 "node.c.erb"
540 case PM_HASH_NODE: {
541 pm_hash_node_t *cast = (pm_hash_node_t *) node;
542 pm_node_list_free(parser, &cast->elements);
543 break;
544 }
545#line 58 "node.c.erb"
546 case PM_HASH_PATTERN_NODE: {
547 pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node;
548 if (cast->constant != NULL) {
549 pm_node_destroy(parser, (pm_node_t *)cast->constant);
550 }
551 pm_node_list_free(parser, &cast->elements);
552 if (cast->rest != NULL) {
553 pm_node_destroy(parser, (pm_node_t *)cast->rest);
554 }
555 break;
556 }
557#line 58 "node.c.erb"
558 case PM_IF_NODE: {
559 pm_if_node_t *cast = (pm_if_node_t *) node;
560 pm_node_destroy(parser, (pm_node_t *)cast->predicate);
561 if (cast->statements != NULL) {
562 pm_node_destroy(parser, (pm_node_t *)cast->statements);
563 }
564 if (cast->consequent != NULL) {
565 pm_node_destroy(parser, (pm_node_t *)cast->consequent);
566 }
567 break;
568 }
569#line 58 "node.c.erb"
570 case PM_IMAGINARY_NODE: {
571 pm_imaginary_node_t *cast = (pm_imaginary_node_t *) node;
572 pm_node_destroy(parser, (pm_node_t *)cast->numeric);
573 break;
574 }
575#line 58 "node.c.erb"
576 case PM_IMPLICIT_NODE: {
577 pm_implicit_node_t *cast = (pm_implicit_node_t *) node;
578 pm_node_destroy(parser, (pm_node_t *)cast->value);
579 break;
580 }
581#line 58 "node.c.erb"
582 case PM_IMPLICIT_REST_NODE: {
583 break;
584 }
585#line 58 "node.c.erb"
586 case PM_IN_NODE: {
587 pm_in_node_t *cast = (pm_in_node_t *) node;
588 pm_node_destroy(parser, (pm_node_t *)cast->pattern);
589 if (cast->statements != NULL) {
590 pm_node_destroy(parser, (pm_node_t *)cast->statements);
591 }
592 break;
593 }
594#line 58 "node.c.erb"
595 case PM_INDEX_AND_WRITE_NODE: {
596 pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
597 if (cast->receiver != NULL) {
598 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
599 }
600 if (cast->arguments != NULL) {
601 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
602 }
603 if (cast->block != NULL) {
604 pm_node_destroy(parser, (pm_node_t *)cast->block);
605 }
606 pm_node_destroy(parser, (pm_node_t *)cast->value);
607 break;
608 }
609#line 58 "node.c.erb"
610 case PM_INDEX_OPERATOR_WRITE_NODE: {
611 pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
612 if (cast->receiver != NULL) {
613 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
614 }
615 if (cast->arguments != NULL) {
616 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
617 }
618 if (cast->block != NULL) {
619 pm_node_destroy(parser, (pm_node_t *)cast->block);
620 }
621 pm_node_destroy(parser, (pm_node_t *)cast->value);
622 break;
623 }
624#line 58 "node.c.erb"
625 case PM_INDEX_OR_WRITE_NODE: {
626 pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
627 if (cast->receiver != NULL) {
628 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
629 }
630 if (cast->arguments != NULL) {
631 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
632 }
633 if (cast->block != NULL) {
634 pm_node_destroy(parser, (pm_node_t *)cast->block);
635 }
636 pm_node_destroy(parser, (pm_node_t *)cast->value);
637 break;
638 }
639#line 58 "node.c.erb"
640 case PM_INDEX_TARGET_NODE: {
641 pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
642 pm_node_destroy(parser, (pm_node_t *)cast->receiver);
643 if (cast->arguments != NULL) {
644 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
645 }
646 if (cast->block != NULL) {
647 pm_node_destroy(parser, (pm_node_t *)cast->block);
648 }
649 break;
650 }
651#line 58 "node.c.erb"
652 case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
653 pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
654 pm_node_destroy(parser, (pm_node_t *)cast->value);
655 break;
656 }
657#line 58 "node.c.erb"
658 case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
659 pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node;
660 pm_node_destroy(parser, (pm_node_t *)cast->value);
661 break;
662 }
663#line 58 "node.c.erb"
664 case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
665 pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node;
666 pm_node_destroy(parser, (pm_node_t *)cast->value);
667 break;
668 }
669#line 58 "node.c.erb"
670 case PM_INSTANCE_VARIABLE_READ_NODE: {
671 break;
672 }
673#line 58 "node.c.erb"
674 case PM_INSTANCE_VARIABLE_TARGET_NODE: {
675 break;
676 }
677#line 58 "node.c.erb"
678 case PM_INSTANCE_VARIABLE_WRITE_NODE: {
679 pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node;
680 pm_node_destroy(parser, (pm_node_t *)cast->value);
681 break;
682 }
683#line 58 "node.c.erb"
684 case PM_INTEGER_NODE: {
685 break;
686 }
687#line 58 "node.c.erb"
688 case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
689 pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
690 pm_node_list_free(parser, &cast->parts);
691 break;
692 }
693#line 58 "node.c.erb"
694 case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
695 pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
696 pm_node_list_free(parser, &cast->parts);
697 break;
698 }
699#line 58 "node.c.erb"
700 case PM_INTERPOLATED_STRING_NODE: {
701 pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node;
702 pm_node_list_free(parser, &cast->parts);
703 break;
704 }
705#line 58 "node.c.erb"
706 case PM_INTERPOLATED_SYMBOL_NODE: {
707 pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node;
708 pm_node_list_free(parser, &cast->parts);
709 break;
710 }
711#line 58 "node.c.erb"
712 case PM_INTERPOLATED_X_STRING_NODE: {
713 pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node;
714 pm_node_list_free(parser, &cast->parts);
715 break;
716 }
717#line 58 "node.c.erb"
718 case PM_KEYWORD_HASH_NODE: {
719 pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
720 pm_node_list_free(parser, &cast->elements);
721 break;
722 }
723#line 58 "node.c.erb"
724 case PM_KEYWORD_REST_PARAMETER_NODE: {
725 break;
726 }
727#line 58 "node.c.erb"
728 case PM_LAMBDA_NODE: {
729 pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
730 pm_constant_id_list_free(&cast->locals);
731 if (cast->parameters != NULL) {
732 pm_node_destroy(parser, (pm_node_t *)cast->parameters);
733 }
734 if (cast->body != NULL) {
735 pm_node_destroy(parser, (pm_node_t *)cast->body);
736 }
737 break;
738 }
739#line 58 "node.c.erb"
740 case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
741 pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node;
742 pm_node_destroy(parser, (pm_node_t *)cast->value);
743 break;
744 }
745#line 58 "node.c.erb"
746 case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
747 pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node;
748 pm_node_destroy(parser, (pm_node_t *)cast->value);
749 break;
750 }
751#line 58 "node.c.erb"
752 case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
753 pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node;
754 pm_node_destroy(parser, (pm_node_t *)cast->value);
755 break;
756 }
757#line 58 "node.c.erb"
758 case PM_LOCAL_VARIABLE_READ_NODE: {
759 break;
760 }
761#line 58 "node.c.erb"
762 case PM_LOCAL_VARIABLE_TARGET_NODE: {
763 break;
764 }
765#line 58 "node.c.erb"
766 case PM_LOCAL_VARIABLE_WRITE_NODE: {
767 pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node;
768 pm_node_destroy(parser, (pm_node_t *)cast->value);
769 break;
770 }
771#line 58 "node.c.erb"
772 case PM_MATCH_LAST_LINE_NODE: {
773 pm_match_last_line_node_t *cast = (pm_match_last_line_node_t *) node;
774 pm_string_free(&cast->unescaped);
775 break;
776 }
777#line 58 "node.c.erb"
778 case PM_MATCH_PREDICATE_NODE: {
779 pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node;
780 pm_node_destroy(parser, (pm_node_t *)cast->value);
781 pm_node_destroy(parser, (pm_node_t *)cast->pattern);
782 break;
783 }
784#line 58 "node.c.erb"
785 case PM_MATCH_REQUIRED_NODE: {
786 pm_match_required_node_t *cast = (pm_match_required_node_t *) node;
787 pm_node_destroy(parser, (pm_node_t *)cast->value);
788 pm_node_destroy(parser, (pm_node_t *)cast->pattern);
789 break;
790 }
791#line 58 "node.c.erb"
792 case PM_MATCH_WRITE_NODE: {
793 pm_match_write_node_t *cast = (pm_match_write_node_t *) node;
794 pm_node_destroy(parser, (pm_node_t *)cast->call);
795 pm_node_list_free(parser, &cast->targets);
796 break;
797 }
798#line 58 "node.c.erb"
799 case PM_MISSING_NODE: {
800 break;
801 }
802#line 58 "node.c.erb"
803 case PM_MODULE_NODE: {
804 pm_module_node_t *cast = (pm_module_node_t *) node;
805 pm_constant_id_list_free(&cast->locals);
806 pm_node_destroy(parser, (pm_node_t *)cast->constant_path);
807 if (cast->body != NULL) {
808 pm_node_destroy(parser, (pm_node_t *)cast->body);
809 }
810 break;
811 }
812#line 58 "node.c.erb"
813 case PM_MULTI_TARGET_NODE: {
814 pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node;
815 pm_node_list_free(parser, &cast->lefts);
816 if (cast->rest != NULL) {
817 pm_node_destroy(parser, (pm_node_t *)cast->rest);
818 }
819 pm_node_list_free(parser, &cast->rights);
820 break;
821 }
822#line 58 "node.c.erb"
823 case PM_MULTI_WRITE_NODE: {
824 pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node;
825 pm_node_list_free(parser, &cast->lefts);
826 if (cast->rest != NULL) {
827 pm_node_destroy(parser, (pm_node_t *)cast->rest);
828 }
829 pm_node_list_free(parser, &cast->rights);
830 pm_node_destroy(parser, (pm_node_t *)cast->value);
831 break;
832 }
833#line 58 "node.c.erb"
834 case PM_NEXT_NODE: {
835 pm_next_node_t *cast = (pm_next_node_t *) node;
836 if (cast->arguments != NULL) {
837 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
838 }
839 break;
840 }
841#line 58 "node.c.erb"
842 case PM_NIL_NODE: {
843 break;
844 }
845#line 58 "node.c.erb"
846 case PM_NO_KEYWORDS_PARAMETER_NODE: {
847 break;
848 }
849#line 58 "node.c.erb"
850 case PM_NUMBERED_PARAMETERS_NODE: {
851 break;
852 }
853#line 58 "node.c.erb"
854 case PM_NUMBERED_REFERENCE_READ_NODE: {
855 break;
856 }
857#line 58 "node.c.erb"
858 case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
859 pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node;
860 pm_node_destroy(parser, (pm_node_t *)cast->value);
861 break;
862 }
863#line 58 "node.c.erb"
864 case PM_OPTIONAL_PARAMETER_NODE: {
865 pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node;
866 pm_node_destroy(parser, (pm_node_t *)cast->value);
867 break;
868 }
869#line 58 "node.c.erb"
870 case PM_OR_NODE: {
871 pm_or_node_t *cast = (pm_or_node_t *) node;
872 pm_node_destroy(parser, (pm_node_t *)cast->left);
873 pm_node_destroy(parser, (pm_node_t *)cast->right);
874 break;
875 }
876#line 58 "node.c.erb"
877 case PM_PARAMETERS_NODE: {
878 pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
879 pm_node_list_free(parser, &cast->requireds);
880 pm_node_list_free(parser, &cast->optionals);
881 if (cast->rest != NULL) {
882 pm_node_destroy(parser, (pm_node_t *)cast->rest);
883 }
884 pm_node_list_free(parser, &cast->posts);
885 pm_node_list_free(parser, &cast->keywords);
886 if (cast->keyword_rest != NULL) {
887 pm_node_destroy(parser, (pm_node_t *)cast->keyword_rest);
888 }
889 if (cast->block != NULL) {
890 pm_node_destroy(parser, (pm_node_t *)cast->block);
891 }
892 break;
893 }
894#line 58 "node.c.erb"
895 case PM_PARENTHESES_NODE: {
896 pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node;
897 if (cast->body != NULL) {
898 pm_node_destroy(parser, (pm_node_t *)cast->body);
899 }
900 break;
901 }
902#line 58 "node.c.erb"
903 case PM_PINNED_EXPRESSION_NODE: {
904 pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node;
905 pm_node_destroy(parser, (pm_node_t *)cast->expression);
906 break;
907 }
908#line 58 "node.c.erb"
909 case PM_PINNED_VARIABLE_NODE: {
910 pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node;
911 pm_node_destroy(parser, (pm_node_t *)cast->variable);
912 break;
913 }
914#line 58 "node.c.erb"
915 case PM_POST_EXECUTION_NODE: {
916 pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
917 if (cast->statements != NULL) {
918 pm_node_destroy(parser, (pm_node_t *)cast->statements);
919 }
920 break;
921 }
922#line 58 "node.c.erb"
923 case PM_PRE_EXECUTION_NODE: {
924 pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node;
925 if (cast->statements != NULL) {
926 pm_node_destroy(parser, (pm_node_t *)cast->statements);
927 }
928 break;
929 }
930#line 58 "node.c.erb"
931 case PM_PROGRAM_NODE: {
932 pm_program_node_t *cast = (pm_program_node_t *) node;
933 pm_constant_id_list_free(&cast->locals);
934 pm_node_destroy(parser, (pm_node_t *)cast->statements);
935 break;
936 }
937#line 58 "node.c.erb"
938 case PM_RANGE_NODE: {
939 pm_range_node_t *cast = (pm_range_node_t *) node;
940 if (cast->left != NULL) {
941 pm_node_destroy(parser, (pm_node_t *)cast->left);
942 }
943 if (cast->right != NULL) {
944 pm_node_destroy(parser, (pm_node_t *)cast->right);
945 }
946 break;
947 }
948#line 58 "node.c.erb"
949 case PM_RATIONAL_NODE: {
950 pm_rational_node_t *cast = (pm_rational_node_t *) node;
951 pm_node_destroy(parser, (pm_node_t *)cast->numeric);
952 break;
953 }
954#line 58 "node.c.erb"
955 case PM_REDO_NODE: {
956 break;
957 }
958#line 58 "node.c.erb"
959 case PM_REGULAR_EXPRESSION_NODE: {
960 pm_regular_expression_node_t *cast = (pm_regular_expression_node_t *) node;
961 pm_string_free(&cast->unescaped);
962 break;
963 }
964#line 58 "node.c.erb"
965 case PM_REQUIRED_KEYWORD_PARAMETER_NODE: {
966 break;
967 }
968#line 58 "node.c.erb"
969 case PM_REQUIRED_PARAMETER_NODE: {
970 break;
971 }
972#line 58 "node.c.erb"
973 case PM_RESCUE_MODIFIER_NODE: {
974 pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node;
975 pm_node_destroy(parser, (pm_node_t *)cast->expression);
976 pm_node_destroy(parser, (pm_node_t *)cast->rescue_expression);
977 break;
978 }
979#line 58 "node.c.erb"
980 case PM_RESCUE_NODE: {
981 pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
982 pm_node_list_free(parser, &cast->exceptions);
983 if (cast->reference != NULL) {
984 pm_node_destroy(parser, (pm_node_t *)cast->reference);
985 }
986 if (cast->statements != NULL) {
987 pm_node_destroy(parser, (pm_node_t *)cast->statements);
988 }
989 if (cast->consequent != NULL) {
990 pm_node_destroy(parser, (pm_node_t *)cast->consequent);
991 }
992 break;
993 }
994#line 58 "node.c.erb"
995 case PM_REST_PARAMETER_NODE: {
996 break;
997 }
998#line 58 "node.c.erb"
999 case PM_RETRY_NODE: {
1000 break;
1001 }
1002#line 58 "node.c.erb"
1003 case PM_RETURN_NODE: {
1004 pm_return_node_t *cast = (pm_return_node_t *) node;
1005 if (cast->arguments != NULL) {
1006 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
1007 }
1008 break;
1009 }
1010#line 58 "node.c.erb"
1011 case PM_SELF_NODE: {
1012 break;
1013 }
1014#line 58 "node.c.erb"
1015 case PM_SINGLETON_CLASS_NODE: {
1016 pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node;
1017 pm_constant_id_list_free(&cast->locals);
1018 pm_node_destroy(parser, (pm_node_t *)cast->expression);
1019 if (cast->body != NULL) {
1020 pm_node_destroy(parser, (pm_node_t *)cast->body);
1021 }
1022 break;
1023 }
1024#line 58 "node.c.erb"
1025 case PM_SOURCE_ENCODING_NODE: {
1026 break;
1027 }
1028#line 58 "node.c.erb"
1029 case PM_SOURCE_FILE_NODE: {
1030 pm_source_file_node_t *cast = (pm_source_file_node_t *) node;
1031 pm_string_free(&cast->filepath);
1032 break;
1033 }
1034#line 58 "node.c.erb"
1035 case PM_SOURCE_LINE_NODE: {
1036 break;
1037 }
1038#line 58 "node.c.erb"
1039 case PM_SPLAT_NODE: {
1040 pm_splat_node_t *cast = (pm_splat_node_t *) node;
1041 if (cast->expression != NULL) {
1042 pm_node_destroy(parser, (pm_node_t *)cast->expression);
1043 }
1044 break;
1045 }
1046#line 58 "node.c.erb"
1047 case PM_STATEMENTS_NODE: {
1048 pm_statements_node_t *cast = (pm_statements_node_t *) node;
1049 pm_node_list_free(parser, &cast->body);
1050 break;
1051 }
1052#line 58 "node.c.erb"
1053 case PM_STRING_NODE: {
1054 pm_string_node_t *cast = (pm_string_node_t *) node;
1055 pm_string_free(&cast->unescaped);
1056 break;
1057 }
1058#line 58 "node.c.erb"
1059 case PM_SUPER_NODE: {
1060 pm_super_node_t *cast = (pm_super_node_t *) node;
1061 if (cast->arguments != NULL) {
1062 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
1063 }
1064 if (cast->block != NULL) {
1065 pm_node_destroy(parser, (pm_node_t *)cast->block);
1066 }
1067 break;
1068 }
1069#line 58 "node.c.erb"
1070 case PM_SYMBOL_NODE: {
1071 pm_symbol_node_t *cast = (pm_symbol_node_t *) node;
1072 pm_string_free(&cast->unescaped);
1073 break;
1074 }
1075#line 58 "node.c.erb"
1076 case PM_TRUE_NODE: {
1077 break;
1078 }
1079#line 58 "node.c.erb"
1080 case PM_UNDEF_NODE: {
1081 pm_undef_node_t *cast = (pm_undef_node_t *) node;
1082 pm_node_list_free(parser, &cast->names);
1083 break;
1084 }
1085#line 58 "node.c.erb"
1086 case PM_UNLESS_NODE: {
1087 pm_unless_node_t *cast = (pm_unless_node_t *) node;
1088 pm_node_destroy(parser, (pm_node_t *)cast->predicate);
1089 if (cast->statements != NULL) {
1090 pm_node_destroy(parser, (pm_node_t *)cast->statements);
1091 }
1092 if (cast->consequent != NULL) {
1093 pm_node_destroy(parser, (pm_node_t *)cast->consequent);
1094 }
1095 break;
1096 }
1097#line 58 "node.c.erb"
1098 case PM_UNTIL_NODE: {
1099 pm_until_node_t *cast = (pm_until_node_t *) node;
1100 pm_node_destroy(parser, (pm_node_t *)cast->predicate);
1101 if (cast->statements != NULL) {
1102 pm_node_destroy(parser, (pm_node_t *)cast->statements);
1103 }
1104 break;
1105 }
1106#line 58 "node.c.erb"
1107 case PM_WHEN_NODE: {
1108 pm_when_node_t *cast = (pm_when_node_t *) node;
1109 pm_node_list_free(parser, &cast->conditions);
1110 if (cast->statements != NULL) {
1111 pm_node_destroy(parser, (pm_node_t *)cast->statements);
1112 }
1113 break;
1114 }
1115#line 58 "node.c.erb"
1116 case PM_WHILE_NODE: {
1117 pm_while_node_t *cast = (pm_while_node_t *) node;
1118 pm_node_destroy(parser, (pm_node_t *)cast->predicate);
1119 if (cast->statements != NULL) {
1120 pm_node_destroy(parser, (pm_node_t *)cast->statements);
1121 }
1122 break;
1123 }
1124#line 58 "node.c.erb"
1125 case PM_X_STRING_NODE: {
1126 pm_x_string_node_t *cast = (pm_x_string_node_t *) node;
1127 pm_string_free(&cast->unescaped);
1128 break;
1129 }
1130#line 58 "node.c.erb"
1131 case PM_YIELD_NODE: {
1132 pm_yield_node_t *cast = (pm_yield_node_t *) node;
1133 if (cast->arguments != NULL) {
1134 pm_node_destroy(parser, (pm_node_t *)cast->arguments);
1135 }
1136 break;
1137 }
1138#line 85 "node.c.erb"
1139 default:
1140 assert(false && "unreachable");
1141 break;
1142 }
1143 free(node);
1144}
1145
1146static void
1147pm_node_memsize_node(pm_node_t *node, pm_memsize_t *memsize) {
1148 memsize->node_count++;
1149
1150 switch (PM_NODE_TYPE(node)) {
1151 // We do not calculate memsize of a ScopeNode
1152 // as it should never be generated
1153 case PM_SCOPE_NODE:
1154 return;
1155#line 103 "node.c.erb"
1156 case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
1157 pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node;
1158 memsize->memsize += sizeof(*cast);
1159 pm_node_memsize_node((pm_node_t *)cast->new_name, memsize);
1160 pm_node_memsize_node((pm_node_t *)cast->old_name, memsize);
1161 break;
1162 }
1163#line 103 "node.c.erb"
1164 case PM_ALIAS_METHOD_NODE: {
1165 pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node;
1166 memsize->memsize += sizeof(*cast);
1167 pm_node_memsize_node((pm_node_t *)cast->new_name, memsize);
1168 pm_node_memsize_node((pm_node_t *)cast->old_name, memsize);
1169 break;
1170 }
1171#line 103 "node.c.erb"
1172 case PM_ALTERNATION_PATTERN_NODE: {
1173 pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node;
1174 memsize->memsize += sizeof(*cast);
1175 pm_node_memsize_node((pm_node_t *)cast->left, memsize);
1176 pm_node_memsize_node((pm_node_t *)cast->right, memsize);
1177 break;
1178 }
1179#line 103 "node.c.erb"
1180 case PM_AND_NODE: {
1181 pm_and_node_t *cast = (pm_and_node_t *) node;
1182 memsize->memsize += sizeof(*cast);
1183 pm_node_memsize_node((pm_node_t *)cast->left, memsize);
1184 pm_node_memsize_node((pm_node_t *)cast->right, memsize);
1185 break;
1186 }
1187#line 103 "node.c.erb"
1188 case PM_ARGUMENTS_NODE: {
1189 pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
1190 memsize->memsize += sizeof(*cast);
1191 // Node lists will add in their own sizes below.
1192 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1193 memsize->memsize += pm_node_list_memsize(&cast->arguments, memsize);
1194 break;
1195 }
1196#line 103 "node.c.erb"
1197 case PM_ARRAY_NODE: {
1198 pm_array_node_t *cast = (pm_array_node_t *) node;
1199 memsize->memsize += sizeof(*cast);
1200 // Node lists will add in their own sizes below.
1201 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1202 memsize->memsize += pm_node_list_memsize(&cast->elements, memsize);
1203 break;
1204 }
1205#line 103 "node.c.erb"
1206 case PM_ARRAY_PATTERN_NODE: {
1207 pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node;
1208 memsize->memsize += sizeof(*cast);
1209 // Node lists will add in their own sizes below.
1210 memsize->memsize -= sizeof(pm_node_list_t) * 2;
1211 if (cast->constant != NULL) {
1212 pm_node_memsize_node((pm_node_t *)cast->constant, memsize);
1213 }
1214 memsize->memsize += pm_node_list_memsize(&cast->requireds, memsize);
1215 if (cast->rest != NULL) {
1216 pm_node_memsize_node((pm_node_t *)cast->rest, memsize);
1217 }
1218 memsize->memsize += pm_node_list_memsize(&cast->posts, memsize);
1219 break;
1220 }
1221#line 103 "node.c.erb"
1222 case PM_ASSOC_NODE: {
1223 pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
1224 memsize->memsize += sizeof(*cast);
1225 pm_node_memsize_node((pm_node_t *)cast->key, memsize);
1226 if (cast->value != NULL) {
1227 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1228 }
1229 break;
1230 }
1231#line 103 "node.c.erb"
1232 case PM_ASSOC_SPLAT_NODE: {
1233 pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node;
1234 memsize->memsize += sizeof(*cast);
1235 if (cast->value != NULL) {
1236 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1237 }
1238 break;
1239 }
1240#line 103 "node.c.erb"
1241 case PM_BACK_REFERENCE_READ_NODE: {
1242 pm_back_reference_read_node_t *cast = (pm_back_reference_read_node_t *) node;
1243 memsize->memsize += sizeof(*cast);
1244 break;
1245 }
1246#line 103 "node.c.erb"
1247 case PM_BEGIN_NODE: {
1248 pm_begin_node_t *cast = (pm_begin_node_t *) node;
1249 memsize->memsize += sizeof(*cast);
1250 if (cast->statements != NULL) {
1251 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
1252 }
1253 if (cast->rescue_clause != NULL) {
1254 pm_node_memsize_node((pm_node_t *)cast->rescue_clause, memsize);
1255 }
1256 if (cast->else_clause != NULL) {
1257 pm_node_memsize_node((pm_node_t *)cast->else_clause, memsize);
1258 }
1259 if (cast->ensure_clause != NULL) {
1260 pm_node_memsize_node((pm_node_t *)cast->ensure_clause, memsize);
1261 }
1262 break;
1263 }
1264#line 103 "node.c.erb"
1265 case PM_BLOCK_ARGUMENT_NODE: {
1266 pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node;
1267 memsize->memsize += sizeof(*cast);
1268 if (cast->expression != NULL) {
1269 pm_node_memsize_node((pm_node_t *)cast->expression, memsize);
1270 }
1271 break;
1272 }
1273#line 103 "node.c.erb"
1274 case PM_BLOCK_LOCAL_VARIABLE_NODE: {
1275 pm_block_local_variable_node_t *cast = (pm_block_local_variable_node_t *) node;
1276 memsize->memsize += sizeof(*cast);
1277 break;
1278 }
1279#line 103 "node.c.erb"
1280 case PM_BLOCK_NODE: {
1281 pm_block_node_t *cast = (pm_block_node_t *) node;
1282 memsize->memsize += sizeof(*cast);
1283 // Constant id lists will add in their own sizes below.
1284 memsize->memsize -= sizeof(pm_constant_id_list_t) * 1;
1285 memsize->memsize += pm_constant_id_list_memsize(&cast->locals);
1286 if (cast->parameters != NULL) {
1287 pm_node_memsize_node((pm_node_t *)cast->parameters, memsize);
1288 }
1289 if (cast->body != NULL) {
1290 pm_node_memsize_node((pm_node_t *)cast->body, memsize);
1291 }
1292 break;
1293 }
1294#line 103 "node.c.erb"
1295 case PM_BLOCK_PARAMETER_NODE: {
1296 pm_block_parameter_node_t *cast = (pm_block_parameter_node_t *) node;
1297 memsize->memsize += sizeof(*cast);
1298 break;
1299 }
1300#line 103 "node.c.erb"
1301 case PM_BLOCK_PARAMETERS_NODE: {
1302 pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node;
1303 memsize->memsize += sizeof(*cast);
1304 // Node lists will add in their own sizes below.
1305 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1306 if (cast->parameters != NULL) {
1307 pm_node_memsize_node((pm_node_t *)cast->parameters, memsize);
1308 }
1309 memsize->memsize += pm_node_list_memsize(&cast->locals, memsize);
1310 break;
1311 }
1312#line 103 "node.c.erb"
1313 case PM_BREAK_NODE: {
1314 pm_break_node_t *cast = (pm_break_node_t *) node;
1315 memsize->memsize += sizeof(*cast);
1316 if (cast->arguments != NULL) {
1317 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1318 }
1319 break;
1320 }
1321#line 103 "node.c.erb"
1322 case PM_CALL_AND_WRITE_NODE: {
1323 pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
1324 memsize->memsize += sizeof(*cast);
1325 if (cast->receiver != NULL) {
1326 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1327 }
1328 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1329 break;
1330 }
1331#line 103 "node.c.erb"
1332 case PM_CALL_NODE: {
1333 pm_call_node_t *cast = (pm_call_node_t *) node;
1334 memsize->memsize += sizeof(*cast);
1335 if (cast->receiver != NULL) {
1336 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1337 }
1338 if (cast->arguments != NULL) {
1339 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1340 }
1341 if (cast->block != NULL) {
1342 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1343 }
1344 break;
1345 }
1346#line 103 "node.c.erb"
1347 case PM_CALL_OPERATOR_WRITE_NODE: {
1348 pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
1349 memsize->memsize += sizeof(*cast);
1350 if (cast->receiver != NULL) {
1351 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1352 }
1353 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1354 break;
1355 }
1356#line 103 "node.c.erb"
1357 case PM_CALL_OR_WRITE_NODE: {
1358 pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
1359 memsize->memsize += sizeof(*cast);
1360 if (cast->receiver != NULL) {
1361 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1362 }
1363 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1364 break;
1365 }
1366#line 103 "node.c.erb"
1367 case PM_CALL_TARGET_NODE: {
1368 pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
1369 memsize->memsize += sizeof(*cast);
1370 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1371 break;
1372 }
1373#line 103 "node.c.erb"
1374 case PM_CAPTURE_PATTERN_NODE: {
1375 pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
1376 memsize->memsize += sizeof(*cast);
1377 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1378 pm_node_memsize_node((pm_node_t *)cast->target, memsize);
1379 break;
1380 }
1381#line 103 "node.c.erb"
1382 case PM_CASE_MATCH_NODE: {
1383 pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
1384 memsize->memsize += sizeof(*cast);
1385 // Node lists will add in their own sizes below.
1386 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1387 if (cast->predicate != NULL) {
1388 pm_node_memsize_node((pm_node_t *)cast->predicate, memsize);
1389 }
1390 memsize->memsize += pm_node_list_memsize(&cast->conditions, memsize);
1391 if (cast->consequent != NULL) {
1392 pm_node_memsize_node((pm_node_t *)cast->consequent, memsize);
1393 }
1394 break;
1395 }
1396#line 103 "node.c.erb"
1397 case PM_CASE_NODE: {
1398 pm_case_node_t *cast = (pm_case_node_t *) node;
1399 memsize->memsize += sizeof(*cast);
1400 // Node lists will add in their own sizes below.
1401 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1402 if (cast->predicate != NULL) {
1403 pm_node_memsize_node((pm_node_t *)cast->predicate, memsize);
1404 }
1405 memsize->memsize += pm_node_list_memsize(&cast->conditions, memsize);
1406 if (cast->consequent != NULL) {
1407 pm_node_memsize_node((pm_node_t *)cast->consequent, memsize);
1408 }
1409 break;
1410 }
1411#line 103 "node.c.erb"
1412 case PM_CLASS_NODE: {
1413 pm_class_node_t *cast = (pm_class_node_t *) node;
1414 memsize->memsize += sizeof(*cast);
1415 // Constant id lists will add in their own sizes below.
1416 memsize->memsize -= sizeof(pm_constant_id_list_t) * 1;
1417 memsize->memsize += pm_constant_id_list_memsize(&cast->locals);
1418 pm_node_memsize_node((pm_node_t *)cast->constant_path, memsize);
1419 if (cast->superclass != NULL) {
1420 pm_node_memsize_node((pm_node_t *)cast->superclass, memsize);
1421 }
1422 if (cast->body != NULL) {
1423 pm_node_memsize_node((pm_node_t *)cast->body, memsize);
1424 }
1425 break;
1426 }
1427#line 103 "node.c.erb"
1428 case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
1429 pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node;
1430 memsize->memsize += sizeof(*cast);
1431 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1432 break;
1433 }
1434#line 103 "node.c.erb"
1435 case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
1436 pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node;
1437 memsize->memsize += sizeof(*cast);
1438 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1439 break;
1440 }
1441#line 103 "node.c.erb"
1442 case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
1443 pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node;
1444 memsize->memsize += sizeof(*cast);
1445 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1446 break;
1447 }
1448#line 103 "node.c.erb"
1449 case PM_CLASS_VARIABLE_READ_NODE: {
1450 pm_class_variable_read_node_t *cast = (pm_class_variable_read_node_t *) node;
1451 memsize->memsize += sizeof(*cast);
1452 break;
1453 }
1454#line 103 "node.c.erb"
1455 case PM_CLASS_VARIABLE_TARGET_NODE: {
1456 pm_class_variable_target_node_t *cast = (pm_class_variable_target_node_t *) node;
1457 memsize->memsize += sizeof(*cast);
1458 break;
1459 }
1460#line 103 "node.c.erb"
1461 case PM_CLASS_VARIABLE_WRITE_NODE: {
1462 pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node;
1463 memsize->memsize += sizeof(*cast);
1464 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1465 break;
1466 }
1467#line 103 "node.c.erb"
1468 case PM_CONSTANT_AND_WRITE_NODE: {
1469 pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node;
1470 memsize->memsize += sizeof(*cast);
1471 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1472 break;
1473 }
1474#line 103 "node.c.erb"
1475 case PM_CONSTANT_OPERATOR_WRITE_NODE: {
1476 pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node;
1477 memsize->memsize += sizeof(*cast);
1478 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1479 break;
1480 }
1481#line 103 "node.c.erb"
1482 case PM_CONSTANT_OR_WRITE_NODE: {
1483 pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node;
1484 memsize->memsize += sizeof(*cast);
1485 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1486 break;
1487 }
1488#line 103 "node.c.erb"
1489 case PM_CONSTANT_PATH_AND_WRITE_NODE: {
1490 pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node;
1491 memsize->memsize += sizeof(*cast);
1492 pm_node_memsize_node((pm_node_t *)cast->target, memsize);
1493 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1494 break;
1495 }
1496#line 103 "node.c.erb"
1497 case PM_CONSTANT_PATH_NODE: {
1498 pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node;
1499 memsize->memsize += sizeof(*cast);
1500 if (cast->parent != NULL) {
1501 pm_node_memsize_node((pm_node_t *)cast->parent, memsize);
1502 }
1503 pm_node_memsize_node((pm_node_t *)cast->child, memsize);
1504 break;
1505 }
1506#line 103 "node.c.erb"
1507 case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
1508 pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node;
1509 memsize->memsize += sizeof(*cast);
1510 pm_node_memsize_node((pm_node_t *)cast->target, memsize);
1511 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1512 break;
1513 }
1514#line 103 "node.c.erb"
1515 case PM_CONSTANT_PATH_OR_WRITE_NODE: {
1516 pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node;
1517 memsize->memsize += sizeof(*cast);
1518 pm_node_memsize_node((pm_node_t *)cast->target, memsize);
1519 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1520 break;
1521 }
1522#line 103 "node.c.erb"
1523 case PM_CONSTANT_PATH_TARGET_NODE: {
1524 pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node;
1525 memsize->memsize += sizeof(*cast);
1526 if (cast->parent != NULL) {
1527 pm_node_memsize_node((pm_node_t *)cast->parent, memsize);
1528 }
1529 pm_node_memsize_node((pm_node_t *)cast->child, memsize);
1530 break;
1531 }
1532#line 103 "node.c.erb"
1533 case PM_CONSTANT_PATH_WRITE_NODE: {
1534 pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node;
1535 memsize->memsize += sizeof(*cast);
1536 pm_node_memsize_node((pm_node_t *)cast->target, memsize);
1537 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1538 break;
1539 }
1540#line 103 "node.c.erb"
1541 case PM_CONSTANT_READ_NODE: {
1542 pm_constant_read_node_t *cast = (pm_constant_read_node_t *) node;
1543 memsize->memsize += sizeof(*cast);
1544 break;
1545 }
1546#line 103 "node.c.erb"
1547 case PM_CONSTANT_TARGET_NODE: {
1548 pm_constant_target_node_t *cast = (pm_constant_target_node_t *) node;
1549 memsize->memsize += sizeof(*cast);
1550 break;
1551 }
1552#line 103 "node.c.erb"
1553 case PM_CONSTANT_WRITE_NODE: {
1554 pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node;
1555 memsize->memsize += sizeof(*cast);
1556 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1557 break;
1558 }
1559#line 103 "node.c.erb"
1560 case PM_DEF_NODE: {
1561 pm_def_node_t *cast = (pm_def_node_t *) node;
1562 memsize->memsize += sizeof(*cast);
1563 // Constant id lists will add in their own sizes below.
1564 memsize->memsize -= sizeof(pm_constant_id_list_t) * 1;
1565 if (cast->receiver != NULL) {
1566 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1567 }
1568 if (cast->parameters != NULL) {
1569 pm_node_memsize_node((pm_node_t *)cast->parameters, memsize);
1570 }
1571 if (cast->body != NULL) {
1572 pm_node_memsize_node((pm_node_t *)cast->body, memsize);
1573 }
1574 memsize->memsize += pm_constant_id_list_memsize(&cast->locals);
1575 break;
1576 }
1577#line 103 "node.c.erb"
1578 case PM_DEFINED_NODE: {
1579 pm_defined_node_t *cast = (pm_defined_node_t *) node;
1580 memsize->memsize += sizeof(*cast);
1581 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1582 break;
1583 }
1584#line 103 "node.c.erb"
1585 case PM_ELSE_NODE: {
1586 pm_else_node_t *cast = (pm_else_node_t *) node;
1587 memsize->memsize += sizeof(*cast);
1588 if (cast->statements != NULL) {
1589 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
1590 }
1591 break;
1592 }
1593#line 103 "node.c.erb"
1594 case PM_EMBEDDED_STATEMENTS_NODE: {
1595 pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node;
1596 memsize->memsize += sizeof(*cast);
1597 if (cast->statements != NULL) {
1598 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
1599 }
1600 break;
1601 }
1602#line 103 "node.c.erb"
1603 case PM_EMBEDDED_VARIABLE_NODE: {
1604 pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node;
1605 memsize->memsize += sizeof(*cast);
1606 pm_node_memsize_node((pm_node_t *)cast->variable, memsize);
1607 break;
1608 }
1609#line 103 "node.c.erb"
1610 case PM_ENSURE_NODE: {
1611 pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
1612 memsize->memsize += sizeof(*cast);
1613 if (cast->statements != NULL) {
1614 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
1615 }
1616 break;
1617 }
1618#line 103 "node.c.erb"
1619 case PM_FALSE_NODE: {
1620 pm_false_node_t *cast = (pm_false_node_t *) node;
1621 memsize->memsize += sizeof(*cast);
1622 break;
1623 }
1624#line 103 "node.c.erb"
1625 case PM_FIND_PATTERN_NODE: {
1626 pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node;
1627 memsize->memsize += sizeof(*cast);
1628 // Node lists will add in their own sizes below.
1629 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1630 if (cast->constant != NULL) {
1631 pm_node_memsize_node((pm_node_t *)cast->constant, memsize);
1632 }
1633 pm_node_memsize_node((pm_node_t *)cast->left, memsize);
1634 memsize->memsize += pm_node_list_memsize(&cast->requireds, memsize);
1635 pm_node_memsize_node((pm_node_t *)cast->right, memsize);
1636 break;
1637 }
1638#line 103 "node.c.erb"
1639 case PM_FLIP_FLOP_NODE: {
1640 pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
1641 memsize->memsize += sizeof(*cast);
1642 if (cast->left != NULL) {
1643 pm_node_memsize_node((pm_node_t *)cast->left, memsize);
1644 }
1645 if (cast->right != NULL) {
1646 pm_node_memsize_node((pm_node_t *)cast->right, memsize);
1647 }
1648 break;
1649 }
1650#line 103 "node.c.erb"
1651 case PM_FLOAT_NODE: {
1652 pm_float_node_t *cast = (pm_float_node_t *) node;
1653 memsize->memsize += sizeof(*cast);
1654 break;
1655 }
1656#line 103 "node.c.erb"
1657 case PM_FOR_NODE: {
1658 pm_for_node_t *cast = (pm_for_node_t *) node;
1659 memsize->memsize += sizeof(*cast);
1660 pm_node_memsize_node((pm_node_t *)cast->index, memsize);
1661 pm_node_memsize_node((pm_node_t *)cast->collection, memsize);
1662 if (cast->statements != NULL) {
1663 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
1664 }
1665 break;
1666 }
1667#line 103 "node.c.erb"
1668 case PM_FORWARDING_ARGUMENTS_NODE: {
1669 pm_forwarding_arguments_node_t *cast = (pm_forwarding_arguments_node_t *) node;
1670 memsize->memsize += sizeof(*cast);
1671 break;
1672 }
1673#line 103 "node.c.erb"
1674 case PM_FORWARDING_PARAMETER_NODE: {
1675 pm_forwarding_parameter_node_t *cast = (pm_forwarding_parameter_node_t *) node;
1676 memsize->memsize += sizeof(*cast);
1677 break;
1678 }
1679#line 103 "node.c.erb"
1680 case PM_FORWARDING_SUPER_NODE: {
1681 pm_forwarding_super_node_t *cast = (pm_forwarding_super_node_t *) node;
1682 memsize->memsize += sizeof(*cast);
1683 if (cast->block != NULL) {
1684 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1685 }
1686 break;
1687 }
1688#line 103 "node.c.erb"
1689 case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
1690 pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node;
1691 memsize->memsize += sizeof(*cast);
1692 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1693 break;
1694 }
1695#line 103 "node.c.erb"
1696 case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
1697 pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node;
1698 memsize->memsize += sizeof(*cast);
1699 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1700 break;
1701 }
1702#line 103 "node.c.erb"
1703 case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
1704 pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node;
1705 memsize->memsize += sizeof(*cast);
1706 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1707 break;
1708 }
1709#line 103 "node.c.erb"
1710 case PM_GLOBAL_VARIABLE_READ_NODE: {
1711 pm_global_variable_read_node_t *cast = (pm_global_variable_read_node_t *) node;
1712 memsize->memsize += sizeof(*cast);
1713 break;
1714 }
1715#line 103 "node.c.erb"
1716 case PM_GLOBAL_VARIABLE_TARGET_NODE: {
1717 pm_global_variable_target_node_t *cast = (pm_global_variable_target_node_t *) node;
1718 memsize->memsize += sizeof(*cast);
1719 break;
1720 }
1721#line 103 "node.c.erb"
1722 case PM_GLOBAL_VARIABLE_WRITE_NODE: {
1723 pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node;
1724 memsize->memsize += sizeof(*cast);
1725 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1726 break;
1727 }
1728#line 103 "node.c.erb"
1729 case PM_HASH_NODE: {
1730 pm_hash_node_t *cast = (pm_hash_node_t *) node;
1731 memsize->memsize += sizeof(*cast);
1732 // Node lists will add in their own sizes below.
1733 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1734 memsize->memsize += pm_node_list_memsize(&cast->elements, memsize);
1735 break;
1736 }
1737#line 103 "node.c.erb"
1738 case PM_HASH_PATTERN_NODE: {
1739 pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node;
1740 memsize->memsize += sizeof(*cast);
1741 // Node lists will add in their own sizes below.
1742 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1743 if (cast->constant != NULL) {
1744 pm_node_memsize_node((pm_node_t *)cast->constant, memsize);
1745 }
1746 memsize->memsize += pm_node_list_memsize(&cast->elements, memsize);
1747 if (cast->rest != NULL) {
1748 pm_node_memsize_node((pm_node_t *)cast->rest, memsize);
1749 }
1750 break;
1751 }
1752#line 103 "node.c.erb"
1753 case PM_IF_NODE: {
1754 pm_if_node_t *cast = (pm_if_node_t *) node;
1755 memsize->memsize += sizeof(*cast);
1756 pm_node_memsize_node((pm_node_t *)cast->predicate, memsize);
1757 if (cast->statements != NULL) {
1758 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
1759 }
1760 if (cast->consequent != NULL) {
1761 pm_node_memsize_node((pm_node_t *)cast->consequent, memsize);
1762 }
1763 break;
1764 }
1765#line 103 "node.c.erb"
1766 case PM_IMAGINARY_NODE: {
1767 pm_imaginary_node_t *cast = (pm_imaginary_node_t *) node;
1768 memsize->memsize += sizeof(*cast);
1769 pm_node_memsize_node((pm_node_t *)cast->numeric, memsize);
1770 break;
1771 }
1772#line 103 "node.c.erb"
1773 case PM_IMPLICIT_NODE: {
1774 pm_implicit_node_t *cast = (pm_implicit_node_t *) node;
1775 memsize->memsize += sizeof(*cast);
1776 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1777 break;
1778 }
1779#line 103 "node.c.erb"
1780 case PM_IMPLICIT_REST_NODE: {
1781 pm_implicit_rest_node_t *cast = (pm_implicit_rest_node_t *) node;
1782 memsize->memsize += sizeof(*cast);
1783 break;
1784 }
1785#line 103 "node.c.erb"
1786 case PM_IN_NODE: {
1787 pm_in_node_t *cast = (pm_in_node_t *) node;
1788 memsize->memsize += sizeof(*cast);
1789 pm_node_memsize_node((pm_node_t *)cast->pattern, memsize);
1790 if (cast->statements != NULL) {
1791 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
1792 }
1793 break;
1794 }
1795#line 103 "node.c.erb"
1796 case PM_INDEX_AND_WRITE_NODE: {
1797 pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
1798 memsize->memsize += sizeof(*cast);
1799 if (cast->receiver != NULL) {
1800 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1801 }
1802 if (cast->arguments != NULL) {
1803 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1804 }
1805 if (cast->block != NULL) {
1806 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1807 }
1808 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1809 break;
1810 }
1811#line 103 "node.c.erb"
1812 case PM_INDEX_OPERATOR_WRITE_NODE: {
1813 pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
1814 memsize->memsize += sizeof(*cast);
1815 if (cast->receiver != NULL) {
1816 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1817 }
1818 if (cast->arguments != NULL) {
1819 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1820 }
1821 if (cast->block != NULL) {
1822 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1823 }
1824 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1825 break;
1826 }
1827#line 103 "node.c.erb"
1828 case PM_INDEX_OR_WRITE_NODE: {
1829 pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
1830 memsize->memsize += sizeof(*cast);
1831 if (cast->receiver != NULL) {
1832 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1833 }
1834 if (cast->arguments != NULL) {
1835 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1836 }
1837 if (cast->block != NULL) {
1838 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1839 }
1840 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1841 break;
1842 }
1843#line 103 "node.c.erb"
1844 case PM_INDEX_TARGET_NODE: {
1845 pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
1846 memsize->memsize += sizeof(*cast);
1847 pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1848 if (cast->arguments != NULL) {
1849 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1850 }
1851 if (cast->block != NULL) {
1852 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1853 }
1854 break;
1855 }
1856#line 103 "node.c.erb"
1857 case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
1858 pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
1859 memsize->memsize += sizeof(*cast);
1860 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1861 break;
1862 }
1863#line 103 "node.c.erb"
1864 case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
1865 pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node;
1866 memsize->memsize += sizeof(*cast);
1867 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1868 break;
1869 }
1870#line 103 "node.c.erb"
1871 case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
1872 pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node;
1873 memsize->memsize += sizeof(*cast);
1874 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1875 break;
1876 }
1877#line 103 "node.c.erb"
1878 case PM_INSTANCE_VARIABLE_READ_NODE: {
1879 pm_instance_variable_read_node_t *cast = (pm_instance_variable_read_node_t *) node;
1880 memsize->memsize += sizeof(*cast);
1881 break;
1882 }
1883#line 103 "node.c.erb"
1884 case PM_INSTANCE_VARIABLE_TARGET_NODE: {
1885 pm_instance_variable_target_node_t *cast = (pm_instance_variable_target_node_t *) node;
1886 memsize->memsize += sizeof(*cast);
1887 break;
1888 }
1889#line 103 "node.c.erb"
1890 case PM_INSTANCE_VARIABLE_WRITE_NODE: {
1891 pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node;
1892 memsize->memsize += sizeof(*cast);
1893 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1894 break;
1895 }
1896#line 103 "node.c.erb"
1897 case PM_INTEGER_NODE: {
1898 pm_integer_node_t *cast = (pm_integer_node_t *) node;
1899 memsize->memsize += sizeof(*cast);
1900 break;
1901 }
1902#line 103 "node.c.erb"
1903 case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
1904 pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
1905 memsize->memsize += sizeof(*cast);
1906 // Node lists will add in their own sizes below.
1907 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1908 memsize->memsize += pm_node_list_memsize(&cast->parts, memsize);
1909 break;
1910 }
1911#line 103 "node.c.erb"
1912 case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
1913 pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
1914 memsize->memsize += sizeof(*cast);
1915 // Node lists will add in their own sizes below.
1916 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1917 memsize->memsize += pm_node_list_memsize(&cast->parts, memsize);
1918 break;
1919 }
1920#line 103 "node.c.erb"
1921 case PM_INTERPOLATED_STRING_NODE: {
1922 pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node;
1923 memsize->memsize += sizeof(*cast);
1924 // Node lists will add in their own sizes below.
1925 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1926 memsize->memsize += pm_node_list_memsize(&cast->parts, memsize);
1927 break;
1928 }
1929#line 103 "node.c.erb"
1930 case PM_INTERPOLATED_SYMBOL_NODE: {
1931 pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node;
1932 memsize->memsize += sizeof(*cast);
1933 // Node lists will add in their own sizes below.
1934 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1935 memsize->memsize += pm_node_list_memsize(&cast->parts, memsize);
1936 break;
1937 }
1938#line 103 "node.c.erb"
1939 case PM_INTERPOLATED_X_STRING_NODE: {
1940 pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node;
1941 memsize->memsize += sizeof(*cast);
1942 // Node lists will add in their own sizes below.
1943 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1944 memsize->memsize += pm_node_list_memsize(&cast->parts, memsize);
1945 break;
1946 }
1947#line 103 "node.c.erb"
1948 case PM_KEYWORD_HASH_NODE: {
1949 pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
1950 memsize->memsize += sizeof(*cast);
1951 // Node lists will add in their own sizes below.
1952 memsize->memsize -= sizeof(pm_node_list_t) * 1;
1953 memsize->memsize += pm_node_list_memsize(&cast->elements, memsize);
1954 break;
1955 }
1956#line 103 "node.c.erb"
1957 case PM_KEYWORD_REST_PARAMETER_NODE: {
1958 pm_keyword_rest_parameter_node_t *cast = (pm_keyword_rest_parameter_node_t *) node;
1959 memsize->memsize += sizeof(*cast);
1960 break;
1961 }
1962#line 103 "node.c.erb"
1963 case PM_LAMBDA_NODE: {
1964 pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
1965 memsize->memsize += sizeof(*cast);
1966 // Constant id lists will add in their own sizes below.
1967 memsize->memsize -= sizeof(pm_constant_id_list_t) * 1;
1968 memsize->memsize += pm_constant_id_list_memsize(&cast->locals);
1969 if (cast->parameters != NULL) {
1970 pm_node_memsize_node((pm_node_t *)cast->parameters, memsize);
1971 }
1972 if (cast->body != NULL) {
1973 pm_node_memsize_node((pm_node_t *)cast->body, memsize);
1974 }
1975 break;
1976 }
1977#line 103 "node.c.erb"
1978 case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
1979 pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node;
1980 memsize->memsize += sizeof(*cast);
1981 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1982 break;
1983 }
1984#line 103 "node.c.erb"
1985 case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
1986 pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node;
1987 memsize->memsize += sizeof(*cast);
1988 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1989 break;
1990 }
1991#line 103 "node.c.erb"
1992 case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
1993 pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node;
1994 memsize->memsize += sizeof(*cast);
1995 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1996 break;
1997 }
1998#line 103 "node.c.erb"
1999 case PM_LOCAL_VARIABLE_READ_NODE: {
2000 pm_local_variable_read_node_t *cast = (pm_local_variable_read_node_t *) node;
2001 memsize->memsize += sizeof(*cast);
2002 break;
2003 }
2004#line 103 "node.c.erb"
2005 case PM_LOCAL_VARIABLE_TARGET_NODE: {
2006 pm_local_variable_target_node_t *cast = (pm_local_variable_target_node_t *) node;
2007 memsize->memsize += sizeof(*cast);
2008 break;
2009 }
2010#line 103 "node.c.erb"
2011 case PM_LOCAL_VARIABLE_WRITE_NODE: {
2012 pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node;
2013 memsize->memsize += sizeof(*cast);
2014 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
2015 break;
2016 }
2017#line 103 "node.c.erb"
2018 case PM_MATCH_LAST_LINE_NODE: {
2019 pm_match_last_line_node_t *cast = (pm_match_last_line_node_t *) node;
2020 memsize->memsize += sizeof(*cast);
2021 memsize->memsize += pm_string_memsize(&cast->unescaped);
2022 break;
2023 }
2024#line 103 "node.c.erb"
2025 case PM_MATCH_PREDICATE_NODE: {
2026 pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node;
2027 memsize->memsize += sizeof(*cast);
2028 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
2029 pm_node_memsize_node((pm_node_t *)cast->pattern, memsize);
2030 break;
2031 }
2032#line 103 "node.c.erb"
2033 case PM_MATCH_REQUIRED_NODE: {
2034 pm_match_required_node_t *cast = (pm_match_required_node_t *) node;
2035 memsize->memsize += sizeof(*cast);
2036 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
2037 pm_node_memsize_node((pm_node_t *)cast->pattern, memsize);
2038 break;
2039 }
2040#line 103 "node.c.erb"
2041 case PM_MATCH_WRITE_NODE: {
2042 pm_match_write_node_t *cast = (pm_match_write_node_t *) node;
2043 memsize->memsize += sizeof(*cast);
2044 // Node lists will add in their own sizes below.
2045 memsize->memsize -= sizeof(pm_node_list_t) * 1;
2046 pm_node_memsize_node((pm_node_t *)cast->call, memsize);
2047 memsize->memsize += pm_node_list_memsize(&cast->targets, memsize);
2048 break;
2049 }
2050#line 103 "node.c.erb"
2051 case PM_MISSING_NODE: {
2052 pm_missing_node_t *cast = (pm_missing_node_t *) node;
2053 memsize->memsize += sizeof(*cast);
2054 break;
2055 }
2056#line 103 "node.c.erb"
2057 case PM_MODULE_NODE: {
2058 pm_module_node_t *cast = (pm_module_node_t *) node;
2059 memsize->memsize += sizeof(*cast);
2060 // Constant id lists will add in their own sizes below.
2061 memsize->memsize -= sizeof(pm_constant_id_list_t) * 1;
2062 memsize->memsize += pm_constant_id_list_memsize(&cast->locals);
2063 pm_node_memsize_node((pm_node_t *)cast->constant_path, memsize);
2064 if (cast->body != NULL) {
2065 pm_node_memsize_node((pm_node_t *)cast->body, memsize);
2066 }
2067 break;
2068 }
2069#line 103 "node.c.erb"
2070 case PM_MULTI_TARGET_NODE: {
2071 pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node;
2072 memsize->memsize += sizeof(*cast);
2073 // Node lists will add in their own sizes below.
2074 memsize->memsize -= sizeof(pm_node_list_t) * 2;
2075 memsize->memsize += pm_node_list_memsize(&cast->lefts, memsize);
2076 if (cast->rest != NULL) {
2077 pm_node_memsize_node((pm_node_t *)cast->rest, memsize);
2078 }
2079 memsize->memsize += pm_node_list_memsize(&cast->rights, memsize);
2080 break;
2081 }
2082#line 103 "node.c.erb"
2083 case PM_MULTI_WRITE_NODE: {
2084 pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node;
2085 memsize->memsize += sizeof(*cast);
2086 // Node lists will add in their own sizes below.
2087 memsize->memsize -= sizeof(pm_node_list_t) * 2;
2088 memsize->memsize += pm_node_list_memsize(&cast->lefts, memsize);
2089 if (cast->rest != NULL) {
2090 pm_node_memsize_node((pm_node_t *)cast->rest, memsize);
2091 }
2092 memsize->memsize += pm_node_list_memsize(&cast->rights, memsize);
2093 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
2094 break;
2095 }
2096#line 103 "node.c.erb"
2097 case PM_NEXT_NODE: {
2098 pm_next_node_t *cast = (pm_next_node_t *) node;
2099 memsize->memsize += sizeof(*cast);
2100 if (cast->arguments != NULL) {
2101 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
2102 }
2103 break;
2104 }
2105#line 103 "node.c.erb"
2106 case PM_NIL_NODE: {
2107 pm_nil_node_t *cast = (pm_nil_node_t *) node;
2108 memsize->memsize += sizeof(*cast);
2109 break;
2110 }
2111#line 103 "node.c.erb"
2112 case PM_NO_KEYWORDS_PARAMETER_NODE: {
2113 pm_no_keywords_parameter_node_t *cast = (pm_no_keywords_parameter_node_t *) node;
2114 memsize->memsize += sizeof(*cast);
2115 break;
2116 }
2117#line 103 "node.c.erb"
2118 case PM_NUMBERED_PARAMETERS_NODE: {
2119 pm_numbered_parameters_node_t *cast = (pm_numbered_parameters_node_t *) node;
2120 memsize->memsize += sizeof(*cast);
2121 break;
2122 }
2123#line 103 "node.c.erb"
2124 case PM_NUMBERED_REFERENCE_READ_NODE: {
2125 pm_numbered_reference_read_node_t *cast = (pm_numbered_reference_read_node_t *) node;
2126 memsize->memsize += sizeof(*cast);
2127 break;
2128 }
2129#line 103 "node.c.erb"
2130 case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
2131 pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node;
2132 memsize->memsize += sizeof(*cast);
2133 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
2134 break;
2135 }
2136#line 103 "node.c.erb"
2137 case PM_OPTIONAL_PARAMETER_NODE: {
2138 pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node;
2139 memsize->memsize += sizeof(*cast);
2140 pm_node_memsize_node((pm_node_t *)cast->value, memsize);
2141 break;
2142 }
2143#line 103 "node.c.erb"
2144 case PM_OR_NODE: {
2145 pm_or_node_t *cast = (pm_or_node_t *) node;
2146 memsize->memsize += sizeof(*cast);
2147 pm_node_memsize_node((pm_node_t *)cast->left, memsize);
2148 pm_node_memsize_node((pm_node_t *)cast->right, memsize);
2149 break;
2150 }
2151#line 103 "node.c.erb"
2152 case PM_PARAMETERS_NODE: {
2153 pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
2154 memsize->memsize += sizeof(*cast);
2155 // Node lists will add in their own sizes below.
2156 memsize->memsize -= sizeof(pm_node_list_t) * 4;
2157 memsize->memsize += pm_node_list_memsize(&cast->requireds, memsize);
2158 memsize->memsize += pm_node_list_memsize(&cast->optionals, memsize);
2159 if (cast->rest != NULL) {
2160 pm_node_memsize_node((pm_node_t *)cast->rest, memsize);
2161 }
2162 memsize->memsize += pm_node_list_memsize(&cast->posts, memsize);
2163 memsize->memsize += pm_node_list_memsize(&cast->keywords, memsize);
2164 if (cast->keyword_rest != NULL) {
2165 pm_node_memsize_node((pm_node_t *)cast->keyword_rest, memsize);
2166 }
2167 if (cast->block != NULL) {
2168 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
2169 }
2170 break;
2171 }
2172#line 103 "node.c.erb"
2173 case PM_PARENTHESES_NODE: {
2174 pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node;
2175 memsize->memsize += sizeof(*cast);
2176 if (cast->body != NULL) {
2177 pm_node_memsize_node((pm_node_t *)cast->body, memsize);
2178 }
2179 break;
2180 }
2181#line 103 "node.c.erb"
2182 case PM_PINNED_EXPRESSION_NODE: {
2183 pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node;
2184 memsize->memsize += sizeof(*cast);
2185 pm_node_memsize_node((pm_node_t *)cast->expression, memsize);
2186 break;
2187 }
2188#line 103 "node.c.erb"
2189 case PM_PINNED_VARIABLE_NODE: {
2190 pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node;
2191 memsize->memsize += sizeof(*cast);
2192 pm_node_memsize_node((pm_node_t *)cast->variable, memsize);
2193 break;
2194 }
2195#line 103 "node.c.erb"
2196 case PM_POST_EXECUTION_NODE: {
2197 pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
2198 memsize->memsize += sizeof(*cast);
2199 if (cast->statements != NULL) {
2200 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2201 }
2202 break;
2203 }
2204#line 103 "node.c.erb"
2205 case PM_PRE_EXECUTION_NODE: {
2206 pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node;
2207 memsize->memsize += sizeof(*cast);
2208 if (cast->statements != NULL) {
2209 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2210 }
2211 break;
2212 }
2213#line 103 "node.c.erb"
2214 case PM_PROGRAM_NODE: {
2215 pm_program_node_t *cast = (pm_program_node_t *) node;
2216 memsize->memsize += sizeof(*cast);
2217 // Constant id lists will add in their own sizes below.
2218 memsize->memsize -= sizeof(pm_constant_id_list_t) * 1;
2219 memsize->memsize += pm_constant_id_list_memsize(&cast->locals);
2220 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2221 break;
2222 }
2223#line 103 "node.c.erb"
2224 case PM_RANGE_NODE: {
2225 pm_range_node_t *cast = (pm_range_node_t *) node;
2226 memsize->memsize += sizeof(*cast);
2227 if (cast->left != NULL) {
2228 pm_node_memsize_node((pm_node_t *)cast->left, memsize);
2229 }
2230 if (cast->right != NULL) {
2231 pm_node_memsize_node((pm_node_t *)cast->right, memsize);
2232 }
2233 break;
2234 }
2235#line 103 "node.c.erb"
2236 case PM_RATIONAL_NODE: {
2237 pm_rational_node_t *cast = (pm_rational_node_t *) node;
2238 memsize->memsize += sizeof(*cast);
2239 pm_node_memsize_node((pm_node_t *)cast->numeric, memsize);
2240 break;
2241 }
2242#line 103 "node.c.erb"
2243 case PM_REDO_NODE: {
2244 pm_redo_node_t *cast = (pm_redo_node_t *) node;
2245 memsize->memsize += sizeof(*cast);
2246 break;
2247 }
2248#line 103 "node.c.erb"
2249 case PM_REGULAR_EXPRESSION_NODE: {
2250 pm_regular_expression_node_t *cast = (pm_regular_expression_node_t *) node;
2251 memsize->memsize += sizeof(*cast);
2252 memsize->memsize += pm_string_memsize(&cast->unescaped);
2253 break;
2254 }
2255#line 103 "node.c.erb"
2256 case PM_REQUIRED_KEYWORD_PARAMETER_NODE: {
2257 pm_required_keyword_parameter_node_t *cast = (pm_required_keyword_parameter_node_t *) node;
2258 memsize->memsize += sizeof(*cast);
2259 break;
2260 }
2261#line 103 "node.c.erb"
2262 case PM_REQUIRED_PARAMETER_NODE: {
2263 pm_required_parameter_node_t *cast = (pm_required_parameter_node_t *) node;
2264 memsize->memsize += sizeof(*cast);
2265 break;
2266 }
2267#line 103 "node.c.erb"
2268 case PM_RESCUE_MODIFIER_NODE: {
2269 pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node;
2270 memsize->memsize += sizeof(*cast);
2271 pm_node_memsize_node((pm_node_t *)cast->expression, memsize);
2272 pm_node_memsize_node((pm_node_t *)cast->rescue_expression, memsize);
2273 break;
2274 }
2275#line 103 "node.c.erb"
2276 case PM_RESCUE_NODE: {
2277 pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
2278 memsize->memsize += sizeof(*cast);
2279 // Node lists will add in their own sizes below.
2280 memsize->memsize -= sizeof(pm_node_list_t) * 1;
2281 memsize->memsize += pm_node_list_memsize(&cast->exceptions, memsize);
2282 if (cast->reference != NULL) {
2283 pm_node_memsize_node((pm_node_t *)cast->reference, memsize);
2284 }
2285 if (cast->statements != NULL) {
2286 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2287 }
2288 if (cast->consequent != NULL) {
2289 pm_node_memsize_node((pm_node_t *)cast->consequent, memsize);
2290 }
2291 break;
2292 }
2293#line 103 "node.c.erb"
2294 case PM_REST_PARAMETER_NODE: {
2295 pm_rest_parameter_node_t *cast = (pm_rest_parameter_node_t *) node;
2296 memsize->memsize += sizeof(*cast);
2297 break;
2298 }
2299#line 103 "node.c.erb"
2300 case PM_RETRY_NODE: {
2301 pm_retry_node_t *cast = (pm_retry_node_t *) node;
2302 memsize->memsize += sizeof(*cast);
2303 break;
2304 }
2305#line 103 "node.c.erb"
2306 case PM_RETURN_NODE: {
2307 pm_return_node_t *cast = (pm_return_node_t *) node;
2308 memsize->memsize += sizeof(*cast);
2309 if (cast->arguments != NULL) {
2310 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
2311 }
2312 break;
2313 }
2314#line 103 "node.c.erb"
2315 case PM_SELF_NODE: {
2316 pm_self_node_t *cast = (pm_self_node_t *) node;
2317 memsize->memsize += sizeof(*cast);
2318 break;
2319 }
2320#line 103 "node.c.erb"
2321 case PM_SINGLETON_CLASS_NODE: {
2322 pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node;
2323 memsize->memsize += sizeof(*cast);
2324 // Constant id lists will add in their own sizes below.
2325 memsize->memsize -= sizeof(pm_constant_id_list_t) * 1;
2326 memsize->memsize += pm_constant_id_list_memsize(&cast->locals);
2327 pm_node_memsize_node((pm_node_t *)cast->expression, memsize);
2328 if (cast->body != NULL) {
2329 pm_node_memsize_node((pm_node_t *)cast->body, memsize);
2330 }
2331 break;
2332 }
2333#line 103 "node.c.erb"
2334 case PM_SOURCE_ENCODING_NODE: {
2335 pm_source_encoding_node_t *cast = (pm_source_encoding_node_t *) node;
2336 memsize->memsize += sizeof(*cast);
2337 break;
2338 }
2339#line 103 "node.c.erb"
2340 case PM_SOURCE_FILE_NODE: {
2341 pm_source_file_node_t *cast = (pm_source_file_node_t *) node;
2342 memsize->memsize += sizeof(*cast);
2343 memsize->memsize += pm_string_memsize(&cast->filepath);
2344 break;
2345 }
2346#line 103 "node.c.erb"
2347 case PM_SOURCE_LINE_NODE: {
2348 pm_source_line_node_t *cast = (pm_source_line_node_t *) node;
2349 memsize->memsize += sizeof(*cast);
2350 break;
2351 }
2352#line 103 "node.c.erb"
2353 case PM_SPLAT_NODE: {
2354 pm_splat_node_t *cast = (pm_splat_node_t *) node;
2355 memsize->memsize += sizeof(*cast);
2356 if (cast->expression != NULL) {
2357 pm_node_memsize_node((pm_node_t *)cast->expression, memsize);
2358 }
2359 break;
2360 }
2361#line 103 "node.c.erb"
2362 case PM_STATEMENTS_NODE: {
2363 pm_statements_node_t *cast = (pm_statements_node_t *) node;
2364 memsize->memsize += sizeof(*cast);
2365 // Node lists will add in their own sizes below.
2366 memsize->memsize -= sizeof(pm_node_list_t) * 1;
2367 memsize->memsize += pm_node_list_memsize(&cast->body, memsize);
2368 break;
2369 }
2370#line 103 "node.c.erb"
2371 case PM_STRING_NODE: {
2372 pm_string_node_t *cast = (pm_string_node_t *) node;
2373 memsize->memsize += sizeof(*cast);
2374 memsize->memsize += pm_string_memsize(&cast->unescaped);
2375 break;
2376 }
2377#line 103 "node.c.erb"
2378 case PM_SUPER_NODE: {
2379 pm_super_node_t *cast = (pm_super_node_t *) node;
2380 memsize->memsize += sizeof(*cast);
2381 if (cast->arguments != NULL) {
2382 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
2383 }
2384 if (cast->block != NULL) {
2385 pm_node_memsize_node((pm_node_t *)cast->block, memsize);
2386 }
2387 break;
2388 }
2389#line 103 "node.c.erb"
2390 case PM_SYMBOL_NODE: {
2391 pm_symbol_node_t *cast = (pm_symbol_node_t *) node;
2392 memsize->memsize += sizeof(*cast);
2393 memsize->memsize += pm_string_memsize(&cast->unescaped);
2394 break;
2395 }
2396#line 103 "node.c.erb"
2397 case PM_TRUE_NODE: {
2398 pm_true_node_t *cast = (pm_true_node_t *) node;
2399 memsize->memsize += sizeof(*cast);
2400 break;
2401 }
2402#line 103 "node.c.erb"
2403 case PM_UNDEF_NODE: {
2404 pm_undef_node_t *cast = (pm_undef_node_t *) node;
2405 memsize->memsize += sizeof(*cast);
2406 // Node lists will add in their own sizes below.
2407 memsize->memsize -= sizeof(pm_node_list_t) * 1;
2408 memsize->memsize += pm_node_list_memsize(&cast->names, memsize);
2409 break;
2410 }
2411#line 103 "node.c.erb"
2412 case PM_UNLESS_NODE: {
2413 pm_unless_node_t *cast = (pm_unless_node_t *) node;
2414 memsize->memsize += sizeof(*cast);
2415 pm_node_memsize_node((pm_node_t *)cast->predicate, memsize);
2416 if (cast->statements != NULL) {
2417 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2418 }
2419 if (cast->consequent != NULL) {
2420 pm_node_memsize_node((pm_node_t *)cast->consequent, memsize);
2421 }
2422 break;
2423 }
2424#line 103 "node.c.erb"
2425 case PM_UNTIL_NODE: {
2426 pm_until_node_t *cast = (pm_until_node_t *) node;
2427 memsize->memsize += sizeof(*cast);
2428 pm_node_memsize_node((pm_node_t *)cast->predicate, memsize);
2429 if (cast->statements != NULL) {
2430 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2431 }
2432 break;
2433 }
2434#line 103 "node.c.erb"
2435 case PM_WHEN_NODE: {
2436 pm_when_node_t *cast = (pm_when_node_t *) node;
2437 memsize->memsize += sizeof(*cast);
2438 // Node lists will add in their own sizes below.
2439 memsize->memsize -= sizeof(pm_node_list_t) * 1;
2440 memsize->memsize += pm_node_list_memsize(&cast->conditions, memsize);
2441 if (cast->statements != NULL) {
2442 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2443 }
2444 break;
2445 }
2446#line 103 "node.c.erb"
2447 case PM_WHILE_NODE: {
2448 pm_while_node_t *cast = (pm_while_node_t *) node;
2449 memsize->memsize += sizeof(*cast);
2450 pm_node_memsize_node((pm_node_t *)cast->predicate, memsize);
2451 if (cast->statements != NULL) {
2452 pm_node_memsize_node((pm_node_t *)cast->statements, memsize);
2453 }
2454 break;
2455 }
2456#line 103 "node.c.erb"
2457 case PM_X_STRING_NODE: {
2458 pm_x_string_node_t *cast = (pm_x_string_node_t *) node;
2459 memsize->memsize += sizeof(*cast);
2460 memsize->memsize += pm_string_memsize(&cast->unescaped);
2461 break;
2462 }
2463#line 103 "node.c.erb"
2464 case PM_YIELD_NODE: {
2465 pm_yield_node_t *cast = (pm_yield_node_t *) node;
2466 memsize->memsize += sizeof(*cast);
2467 if (cast->arguments != NULL) {
2468 pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
2469 }
2470 break;
2471 }
2472#line 137 "node.c.erb"
2473 }
2474}
2475
2479 PRISM_EXPORTED_FUNCTION void
2480pm_node_memsize(pm_node_t *node, pm_memsize_t *memsize) {
2481 *memsize = (pm_memsize_t) { .memsize = 0, .node_count = 0 };
2482 pm_node_memsize_node(node, memsize);
2483}
2484
2488 PRISM_EXPORTED_FUNCTION const char *
2489pm_node_type_to_str(pm_node_type_t node_type)
2490{
2491 switch (node_type) {
2492 case PM_ALIAS_GLOBAL_VARIABLE_NODE:
2493 return "PM_ALIAS_GLOBAL_VARIABLE_NODE";
2494 case PM_ALIAS_METHOD_NODE:
2495 return "PM_ALIAS_METHOD_NODE";
2496 case PM_ALTERNATION_PATTERN_NODE:
2497 return "PM_ALTERNATION_PATTERN_NODE";
2498 case PM_AND_NODE:
2499 return "PM_AND_NODE";
2500 case PM_ARGUMENTS_NODE:
2501 return "PM_ARGUMENTS_NODE";
2502 case PM_ARRAY_NODE:
2503 return "PM_ARRAY_NODE";
2504 case PM_ARRAY_PATTERN_NODE:
2505 return "PM_ARRAY_PATTERN_NODE";
2506 case PM_ASSOC_NODE:
2507 return "PM_ASSOC_NODE";
2508 case PM_ASSOC_SPLAT_NODE:
2509 return "PM_ASSOC_SPLAT_NODE";
2510 case PM_BACK_REFERENCE_READ_NODE:
2511 return "PM_BACK_REFERENCE_READ_NODE";
2512 case PM_BEGIN_NODE:
2513 return "PM_BEGIN_NODE";
2514 case PM_BLOCK_ARGUMENT_NODE:
2515 return "PM_BLOCK_ARGUMENT_NODE";
2516 case PM_BLOCK_LOCAL_VARIABLE_NODE:
2517 return "PM_BLOCK_LOCAL_VARIABLE_NODE";
2518 case PM_BLOCK_NODE:
2519 return "PM_BLOCK_NODE";
2520 case PM_BLOCK_PARAMETER_NODE:
2521 return "PM_BLOCK_PARAMETER_NODE";
2522 case PM_BLOCK_PARAMETERS_NODE:
2523 return "PM_BLOCK_PARAMETERS_NODE";
2524 case PM_BREAK_NODE:
2525 return "PM_BREAK_NODE";
2526 case PM_CALL_AND_WRITE_NODE:
2527 return "PM_CALL_AND_WRITE_NODE";
2528 case PM_CALL_NODE:
2529 return "PM_CALL_NODE";
2530 case PM_CALL_OPERATOR_WRITE_NODE:
2531 return "PM_CALL_OPERATOR_WRITE_NODE";
2532 case PM_CALL_OR_WRITE_NODE:
2533 return "PM_CALL_OR_WRITE_NODE";
2534 case PM_CALL_TARGET_NODE:
2535 return "PM_CALL_TARGET_NODE";
2536 case PM_CAPTURE_PATTERN_NODE:
2537 return "PM_CAPTURE_PATTERN_NODE";
2538 case PM_CASE_MATCH_NODE:
2539 return "PM_CASE_MATCH_NODE";
2540 case PM_CASE_NODE:
2541 return "PM_CASE_NODE";
2542 case PM_CLASS_NODE:
2543 return "PM_CLASS_NODE";
2544 case PM_CLASS_VARIABLE_AND_WRITE_NODE:
2545 return "PM_CLASS_VARIABLE_AND_WRITE_NODE";
2546 case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE:
2547 return "PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE";
2548 case PM_CLASS_VARIABLE_OR_WRITE_NODE:
2549 return "PM_CLASS_VARIABLE_OR_WRITE_NODE";
2550 case PM_CLASS_VARIABLE_READ_NODE:
2551 return "PM_CLASS_VARIABLE_READ_NODE";
2552 case PM_CLASS_VARIABLE_TARGET_NODE:
2553 return "PM_CLASS_VARIABLE_TARGET_NODE";
2554 case PM_CLASS_VARIABLE_WRITE_NODE:
2555 return "PM_CLASS_VARIABLE_WRITE_NODE";
2556 case PM_CONSTANT_AND_WRITE_NODE:
2557 return "PM_CONSTANT_AND_WRITE_NODE";
2558 case PM_CONSTANT_OPERATOR_WRITE_NODE:
2559 return "PM_CONSTANT_OPERATOR_WRITE_NODE";
2560 case PM_CONSTANT_OR_WRITE_NODE:
2561 return "PM_CONSTANT_OR_WRITE_NODE";
2562 case PM_CONSTANT_PATH_AND_WRITE_NODE:
2563 return "PM_CONSTANT_PATH_AND_WRITE_NODE";
2564 case PM_CONSTANT_PATH_NODE:
2565 return "PM_CONSTANT_PATH_NODE";
2566 case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE:
2567 return "PM_CONSTANT_PATH_OPERATOR_WRITE_NODE";
2568 case PM_CONSTANT_PATH_OR_WRITE_NODE:
2569 return "PM_CONSTANT_PATH_OR_WRITE_NODE";
2570 case PM_CONSTANT_PATH_TARGET_NODE:
2571 return "PM_CONSTANT_PATH_TARGET_NODE";
2572 case PM_CONSTANT_PATH_WRITE_NODE:
2573 return "PM_CONSTANT_PATH_WRITE_NODE";
2574 case PM_CONSTANT_READ_NODE:
2575 return "PM_CONSTANT_READ_NODE";
2576 case PM_CONSTANT_TARGET_NODE:
2577 return "PM_CONSTANT_TARGET_NODE";
2578 case PM_CONSTANT_WRITE_NODE:
2579 return "PM_CONSTANT_WRITE_NODE";
2580 case PM_DEF_NODE:
2581 return "PM_DEF_NODE";
2582 case PM_DEFINED_NODE:
2583 return "PM_DEFINED_NODE";
2584 case PM_ELSE_NODE:
2585 return "PM_ELSE_NODE";
2586 case PM_EMBEDDED_STATEMENTS_NODE:
2587 return "PM_EMBEDDED_STATEMENTS_NODE";
2588 case PM_EMBEDDED_VARIABLE_NODE:
2589 return "PM_EMBEDDED_VARIABLE_NODE";
2590 case PM_ENSURE_NODE:
2591 return "PM_ENSURE_NODE";
2592 case PM_FALSE_NODE:
2593 return "PM_FALSE_NODE";
2594 case PM_FIND_PATTERN_NODE:
2595 return "PM_FIND_PATTERN_NODE";
2596 case PM_FLIP_FLOP_NODE:
2597 return "PM_FLIP_FLOP_NODE";
2598 case PM_FLOAT_NODE:
2599 return "PM_FLOAT_NODE";
2600 case PM_FOR_NODE:
2601 return "PM_FOR_NODE";
2602 case PM_FORWARDING_ARGUMENTS_NODE:
2603 return "PM_FORWARDING_ARGUMENTS_NODE";
2604 case PM_FORWARDING_PARAMETER_NODE:
2605 return "PM_FORWARDING_PARAMETER_NODE";
2606 case PM_FORWARDING_SUPER_NODE:
2607 return "PM_FORWARDING_SUPER_NODE";
2608 case PM_GLOBAL_VARIABLE_AND_WRITE_NODE:
2609 return "PM_GLOBAL_VARIABLE_AND_WRITE_NODE";
2610 case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE:
2611 return "PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE";
2612 case PM_GLOBAL_VARIABLE_OR_WRITE_NODE:
2613 return "PM_GLOBAL_VARIABLE_OR_WRITE_NODE";
2614 case PM_GLOBAL_VARIABLE_READ_NODE:
2615 return "PM_GLOBAL_VARIABLE_READ_NODE";
2616 case PM_GLOBAL_VARIABLE_TARGET_NODE:
2617 return "PM_GLOBAL_VARIABLE_TARGET_NODE";
2618 case PM_GLOBAL_VARIABLE_WRITE_NODE:
2619 return "PM_GLOBAL_VARIABLE_WRITE_NODE";
2620 case PM_HASH_NODE:
2621 return "PM_HASH_NODE";
2622 case PM_HASH_PATTERN_NODE:
2623 return "PM_HASH_PATTERN_NODE";
2624 case PM_IF_NODE:
2625 return "PM_IF_NODE";
2626 case PM_IMAGINARY_NODE:
2627 return "PM_IMAGINARY_NODE";
2628 case PM_IMPLICIT_NODE:
2629 return "PM_IMPLICIT_NODE";
2630 case PM_IMPLICIT_REST_NODE:
2631 return "PM_IMPLICIT_REST_NODE";
2632 case PM_IN_NODE:
2633 return "PM_IN_NODE";
2634 case PM_INDEX_AND_WRITE_NODE:
2635 return "PM_INDEX_AND_WRITE_NODE";
2636 case PM_INDEX_OPERATOR_WRITE_NODE:
2637 return "PM_INDEX_OPERATOR_WRITE_NODE";
2638 case PM_INDEX_OR_WRITE_NODE:
2639 return "PM_INDEX_OR_WRITE_NODE";
2640 case PM_INDEX_TARGET_NODE:
2641 return "PM_INDEX_TARGET_NODE";
2642 case PM_INSTANCE_VARIABLE_AND_WRITE_NODE:
2643 return "PM_INSTANCE_VARIABLE_AND_WRITE_NODE";
2644 case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE:
2645 return "PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE";
2646 case PM_INSTANCE_VARIABLE_OR_WRITE_NODE:
2647 return "PM_INSTANCE_VARIABLE_OR_WRITE_NODE";
2648 case PM_INSTANCE_VARIABLE_READ_NODE:
2649 return "PM_INSTANCE_VARIABLE_READ_NODE";
2650 case PM_INSTANCE_VARIABLE_TARGET_NODE:
2651 return "PM_INSTANCE_VARIABLE_TARGET_NODE";
2652 case PM_INSTANCE_VARIABLE_WRITE_NODE:
2653 return "PM_INSTANCE_VARIABLE_WRITE_NODE";
2654 case PM_INTEGER_NODE:
2655 return "PM_INTEGER_NODE";
2656 case PM_INTERPOLATED_MATCH_LAST_LINE_NODE:
2657 return "PM_INTERPOLATED_MATCH_LAST_LINE_NODE";
2658 case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE:
2659 return "PM_INTERPOLATED_REGULAR_EXPRESSION_NODE";
2660 case PM_INTERPOLATED_STRING_NODE:
2661 return "PM_INTERPOLATED_STRING_NODE";
2662 case PM_INTERPOLATED_SYMBOL_NODE:
2663 return "PM_INTERPOLATED_SYMBOL_NODE";
2664 case PM_INTERPOLATED_X_STRING_NODE:
2665 return "PM_INTERPOLATED_X_STRING_NODE";
2666 case PM_KEYWORD_HASH_NODE:
2667 return "PM_KEYWORD_HASH_NODE";
2668 case PM_KEYWORD_REST_PARAMETER_NODE:
2669 return "PM_KEYWORD_REST_PARAMETER_NODE";
2670 case PM_LAMBDA_NODE:
2671 return "PM_LAMBDA_NODE";
2672 case PM_LOCAL_VARIABLE_AND_WRITE_NODE:
2673 return "PM_LOCAL_VARIABLE_AND_WRITE_NODE";
2674 case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE:
2675 return "PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE";
2676 case PM_LOCAL_VARIABLE_OR_WRITE_NODE:
2677 return "PM_LOCAL_VARIABLE_OR_WRITE_NODE";
2678 case PM_LOCAL_VARIABLE_READ_NODE:
2679 return "PM_LOCAL_VARIABLE_READ_NODE";
2680 case PM_LOCAL_VARIABLE_TARGET_NODE:
2681 return "PM_LOCAL_VARIABLE_TARGET_NODE";
2682 case PM_LOCAL_VARIABLE_WRITE_NODE:
2683 return "PM_LOCAL_VARIABLE_WRITE_NODE";
2684 case PM_MATCH_LAST_LINE_NODE:
2685 return "PM_MATCH_LAST_LINE_NODE";
2686 case PM_MATCH_PREDICATE_NODE:
2687 return "PM_MATCH_PREDICATE_NODE";
2688 case PM_MATCH_REQUIRED_NODE:
2689 return "PM_MATCH_REQUIRED_NODE";
2690 case PM_MATCH_WRITE_NODE:
2691 return "PM_MATCH_WRITE_NODE";
2692 case PM_MISSING_NODE:
2693 return "PM_MISSING_NODE";
2694 case PM_MODULE_NODE:
2695 return "PM_MODULE_NODE";
2696 case PM_MULTI_TARGET_NODE:
2697 return "PM_MULTI_TARGET_NODE";
2698 case PM_MULTI_WRITE_NODE:
2699 return "PM_MULTI_WRITE_NODE";
2700 case PM_NEXT_NODE:
2701 return "PM_NEXT_NODE";
2702 case PM_NIL_NODE:
2703 return "PM_NIL_NODE";
2704 case PM_NO_KEYWORDS_PARAMETER_NODE:
2705 return "PM_NO_KEYWORDS_PARAMETER_NODE";
2706 case PM_NUMBERED_PARAMETERS_NODE:
2707 return "PM_NUMBERED_PARAMETERS_NODE";
2708 case PM_NUMBERED_REFERENCE_READ_NODE:
2709 return "PM_NUMBERED_REFERENCE_READ_NODE";
2710 case PM_OPTIONAL_KEYWORD_PARAMETER_NODE:
2711 return "PM_OPTIONAL_KEYWORD_PARAMETER_NODE";
2712 case PM_OPTIONAL_PARAMETER_NODE:
2713 return "PM_OPTIONAL_PARAMETER_NODE";
2714 case PM_OR_NODE:
2715 return "PM_OR_NODE";
2716 case PM_PARAMETERS_NODE:
2717 return "PM_PARAMETERS_NODE";
2718 case PM_PARENTHESES_NODE:
2719 return "PM_PARENTHESES_NODE";
2720 case PM_PINNED_EXPRESSION_NODE:
2721 return "PM_PINNED_EXPRESSION_NODE";
2722 case PM_PINNED_VARIABLE_NODE:
2723 return "PM_PINNED_VARIABLE_NODE";
2724 case PM_POST_EXECUTION_NODE:
2725 return "PM_POST_EXECUTION_NODE";
2726 case PM_PRE_EXECUTION_NODE:
2727 return "PM_PRE_EXECUTION_NODE";
2728 case PM_PROGRAM_NODE:
2729 return "PM_PROGRAM_NODE";
2730 case PM_RANGE_NODE:
2731 return "PM_RANGE_NODE";
2732 case PM_RATIONAL_NODE:
2733 return "PM_RATIONAL_NODE";
2734 case PM_REDO_NODE:
2735 return "PM_REDO_NODE";
2736 case PM_REGULAR_EXPRESSION_NODE:
2737 return "PM_REGULAR_EXPRESSION_NODE";
2738 case PM_REQUIRED_KEYWORD_PARAMETER_NODE:
2739 return "PM_REQUIRED_KEYWORD_PARAMETER_NODE";
2740 case PM_REQUIRED_PARAMETER_NODE:
2741 return "PM_REQUIRED_PARAMETER_NODE";
2742 case PM_RESCUE_MODIFIER_NODE:
2743 return "PM_RESCUE_MODIFIER_NODE";
2744 case PM_RESCUE_NODE:
2745 return "PM_RESCUE_NODE";
2746 case PM_REST_PARAMETER_NODE:
2747 return "PM_REST_PARAMETER_NODE";
2748 case PM_RETRY_NODE:
2749 return "PM_RETRY_NODE";
2750 case PM_RETURN_NODE:
2751 return "PM_RETURN_NODE";
2752 case PM_SELF_NODE:
2753 return "PM_SELF_NODE";
2754 case PM_SINGLETON_CLASS_NODE:
2755 return "PM_SINGLETON_CLASS_NODE";
2756 case PM_SOURCE_ENCODING_NODE:
2757 return "PM_SOURCE_ENCODING_NODE";
2758 case PM_SOURCE_FILE_NODE:
2759 return "PM_SOURCE_FILE_NODE";
2760 case PM_SOURCE_LINE_NODE:
2761 return "PM_SOURCE_LINE_NODE";
2762 case PM_SPLAT_NODE:
2763 return "PM_SPLAT_NODE";
2764 case PM_STATEMENTS_NODE:
2765 return "PM_STATEMENTS_NODE";
2766 case PM_STRING_NODE:
2767 return "PM_STRING_NODE";
2768 case PM_SUPER_NODE:
2769 return "PM_SUPER_NODE";
2770 case PM_SYMBOL_NODE:
2771 return "PM_SYMBOL_NODE";
2772 case PM_TRUE_NODE:
2773 return "PM_TRUE_NODE";
2774 case PM_UNDEF_NODE:
2775 return "PM_UNDEF_NODE";
2776 case PM_UNLESS_NODE:
2777 return "PM_UNLESS_NODE";
2778 case PM_UNTIL_NODE:
2779 return "PM_UNTIL_NODE";
2780 case PM_WHEN_NODE:
2781 return "PM_WHEN_NODE";
2782 case PM_WHILE_NODE:
2783 return "PM_WHILE_NODE";
2784 case PM_X_STRING_NODE:
2785 return "PM_X_STRING_NODE";
2786 case PM_YIELD_NODE:
2787 return "PM_YIELD_NODE";
2788 }
2789 return "";
2790}
PM_DEFINED_NODE
@ PM_DEFINED_NODE
DefinedNode.
Definition ast.h:707
PM_PRE_EXECUTION_NODE
@ PM_PRE_EXECUTION_NODE
PreExecutionNode.
Definition ast.h:923
PM_RETRY_NODE
@ PM_RETRY_NODE
RetryNode.
Definition ast.h:956
PM_REDO_NODE
@ PM_REDO_NODE
RedoNode.
Definition ast.h:935
PM_CONSTANT_PATH_WRITE_NODE
@ PM_CONSTANT_PATH_WRITE_NODE
ConstantPathWriteNode.
Definition ast.h:692
PM_INDEX_AND_WRITE_NODE
@ PM_INDEX_AND_WRITE_NODE
IndexAndWriteNode.
Definition ast.h:785
PM_SOURCE_LINE_NODE
@ PM_SOURCE_LINE_NODE
SourceLineNode.
Definition ast.h:974
PM_UNLESS_NODE
@ PM_UNLESS_NODE
UnlessNode.
Definition ast.h:998
PM_EMBEDDED_VARIABLE_NODE
@ PM_EMBEDDED_VARIABLE_NODE
EmbeddedVariableNode.
Definition ast.h:716
PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
@ PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
GlobalVariableOperatorWriteNode.
Definition ast.h:749
PM_CALL_NODE
@ PM_CALL_NODE
CallNode.
Definition ast.h:626
PM_NIL_NODE
@ PM_NIL_NODE
NilNode.
Definition ast.h:887
PM_GLOBAL_VARIABLE_READ_NODE
@ PM_GLOBAL_VARIABLE_READ_NODE
GlobalVariableReadNode.
Definition ast.h:755
PM_RATIONAL_NODE
@ PM_RATIONAL_NODE
RationalNode.
Definition ast.h:932
PM_YIELD_NODE
@ PM_YIELD_NODE
YieldNode.
Definition ast.h:1013
PM_LOCAL_VARIABLE_AND_WRITE_NODE
@ PM_LOCAL_VARIABLE_AND_WRITE_NODE
LocalVariableAndWriteNode.
Definition ast.h:842
PM_CONSTANT_AND_WRITE_NODE
@ PM_CONSTANT_AND_WRITE_NODE
ConstantAndWriteNode.
Definition ast.h:668
PM_CLASS_NODE
@ PM_CLASS_NODE
ClassNode.
Definition ast.h:647
PM_FIND_PATTERN_NODE
@ PM_FIND_PATTERN_NODE
FindPatternNode.
Definition ast.h:725
PM_CALL_OPERATOR_WRITE_NODE
@ PM_CALL_OPERATOR_WRITE_NODE
CallOperatorWriteNode.
Definition ast.h:629
PM_MATCH_WRITE_NODE
@ PM_MATCH_WRITE_NODE
MatchWriteNode.
Definition ast.h:869
PM_ARRAY_NODE
@ PM_ARRAY_NODE
ArrayNode.
Definition ast.h:587
PM_CONSTANT_PATH_TARGET_NODE
@ PM_CONSTANT_PATH_TARGET_NODE
ConstantPathTargetNode.
Definition ast.h:689
PM_PROGRAM_NODE
@ PM_PROGRAM_NODE
ProgramNode.
Definition ast.h:926
PM_OR_NODE
@ PM_OR_NODE
OrNode.
Definition ast.h:905
PM_MULTI_WRITE_NODE
@ PM_MULTI_WRITE_NODE
MultiWriteNode.
Definition ast.h:881
PM_IF_NODE
@ PM_IF_NODE
IfNode.
Definition ast.h:770
PM_IMPLICIT_NODE
@ PM_IMPLICIT_NODE
ImplicitNode.
Definition ast.h:776
PM_ARGUMENTS_NODE
@ PM_ARGUMENTS_NODE
ArgumentsNode.
Definition ast.h:584
PM_FORWARDING_SUPER_NODE
@ PM_FORWARDING_SUPER_NODE
ForwardingSuperNode.
Definition ast.h:743
PM_WHILE_NODE
@ PM_WHILE_NODE
WhileNode.
Definition ast.h:1007
PM_INTERPOLATED_STRING_NODE
@ PM_INTERPOLATED_STRING_NODE
InterpolatedStringNode.
Definition ast.h:824
PM_FALSE_NODE
@ PM_FALSE_NODE
FalseNode.
Definition ast.h:722
PM_FORWARDING_PARAMETER_NODE
@ PM_FORWARDING_PARAMETER_NODE
ForwardingParameterNode.
Definition ast.h:740
PM_BLOCK_LOCAL_VARIABLE_NODE
@ PM_BLOCK_LOCAL_VARIABLE_NODE
BlockLocalVariableNode.
Definition ast.h:608
PM_HASH_NODE
@ PM_HASH_NODE
HashNode.
Definition ast.h:764
PM_UNTIL_NODE
@ PM_UNTIL_NODE
UntilNode.
Definition ast.h:1001
PM_MATCH_PREDICATE_NODE
@ PM_MATCH_PREDICATE_NODE
MatchPredicateNode.
Definition ast.h:863
PM_X_STRING_NODE
@ PM_X_STRING_NODE
XStringNode.
Definition ast.h:1010
PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
@ PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
LocalVariableOperatorWriteNode.
Definition ast.h:845
PM_LOCAL_VARIABLE_OR_WRITE_NODE
@ PM_LOCAL_VARIABLE_OR_WRITE_NODE
LocalVariableOrWriteNode.
Definition ast.h:848
PM_INSTANCE_VARIABLE_AND_WRITE_NODE
@ PM_INSTANCE_VARIABLE_AND_WRITE_NODE
InstanceVariableAndWriteNode.
Definition ast.h:797
PM_GLOBAL_VARIABLE_TARGET_NODE
@ PM_GLOBAL_VARIABLE_TARGET_NODE
GlobalVariableTargetNode.
Definition ast.h:758
PM_AND_NODE
@ PM_AND_NODE
AndNode.
Definition ast.h:581
PM_CONSTANT_TARGET_NODE
@ PM_CONSTANT_TARGET_NODE
ConstantTargetNode.
Definition ast.h:698
PM_CONSTANT_PATH_AND_WRITE_NODE
@ PM_CONSTANT_PATH_AND_WRITE_NODE
ConstantPathAndWriteNode.
Definition ast.h:677
PM_IN_NODE
@ PM_IN_NODE
InNode.
Definition ast.h:782
PM_BLOCK_PARAMETER_NODE
@ PM_BLOCK_PARAMETER_NODE
BlockParameterNode.
Definition ast.h:614
PM_CAPTURE_PATTERN_NODE
@ PM_CAPTURE_PATTERN_NODE
CapturePatternNode.
Definition ast.h:638
PM_SOURCE_FILE_NODE
@ PM_SOURCE_FILE_NODE
SourceFileNode.
Definition ast.h:971
PM_NO_KEYWORDS_PARAMETER_NODE
@ PM_NO_KEYWORDS_PARAMETER_NODE
NoKeywordsParameterNode.
Definition ast.h:890
PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
@ PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
ConstantPathOperatorWriteNode.
Definition ast.h:683
PM_MULTI_TARGET_NODE
@ PM_MULTI_TARGET_NODE
MultiTargetNode.
Definition ast.h:878
PM_SPLAT_NODE
@ PM_SPLAT_NODE
SplatNode.
Definition ast.h:977
PM_LAMBDA_NODE
@ PM_LAMBDA_NODE
LambdaNode.
Definition ast.h:839
PM_CLASS_VARIABLE_READ_NODE
@ PM_CLASS_VARIABLE_READ_NODE
ClassVariableReadNode.
Definition ast.h:659
PM_REQUIRED_KEYWORD_PARAMETER_NODE
@ PM_REQUIRED_KEYWORD_PARAMETER_NODE
RequiredKeywordParameterNode.
Definition ast.h:941
PM_CALL_TARGET_NODE
@ PM_CALL_TARGET_NODE
CallTargetNode.
Definition ast.h:635
PM_ELSE_NODE
@ PM_ELSE_NODE
ElseNode.
Definition ast.h:710
PM_INTERPOLATED_MATCH_LAST_LINE_NODE
@ PM_INTERPOLATED_MATCH_LAST_LINE_NODE
InterpolatedMatchLastLineNode.
Definition ast.h:818
PM_WHEN_NODE
@ PM_WHEN_NODE
WhenNode.
Definition ast.h:1004
PM_NUMBERED_PARAMETERS_NODE
@ PM_NUMBERED_PARAMETERS_NODE
NumberedParametersNode.
Definition ast.h:893
PM_SYMBOL_NODE
@ PM_SYMBOL_NODE
SymbolNode.
Definition ast.h:989
PM_RESCUE_MODIFIER_NODE
@ PM_RESCUE_MODIFIER_NODE
RescueModifierNode.
Definition ast.h:947
PM_ALIAS_METHOD_NODE
@ PM_ALIAS_METHOD_NODE
AliasMethodNode.
Definition ast.h:575
PM_MATCH_REQUIRED_NODE
@ PM_MATCH_REQUIRED_NODE
MatchRequiredNode.
Definition ast.h:866
PM_FORWARDING_ARGUMENTS_NODE
@ PM_FORWARDING_ARGUMENTS_NODE
ForwardingArgumentsNode.
Definition ast.h:737
PM_BACK_REFERENCE_READ_NODE
@ PM_BACK_REFERENCE_READ_NODE
BackReferenceReadNode.
Definition ast.h:599
PM_SCOPE_NODE
@ PM_SCOPE_NODE
A special kind of node used for compilation.
Definition ast.h:1016
PM_BLOCK_ARGUMENT_NODE
@ PM_BLOCK_ARGUMENT_NODE
BlockArgumentNode.
Definition ast.h:605
PM_MISSING_NODE
@ PM_MISSING_NODE
MissingNode.
Definition ast.h:872
PM_SELF_NODE
@ PM_SELF_NODE
SelfNode.
Definition ast.h:962
PM_IMPLICIT_REST_NODE
@ PM_IMPLICIT_REST_NODE
ImplicitRestNode.
Definition ast.h:779
PM_TRUE_NODE
@ PM_TRUE_NODE
TrueNode.
Definition ast.h:992
PM_ASSOC_SPLAT_NODE
@ PM_ASSOC_SPLAT_NODE
AssocSplatNode.
Definition ast.h:596
PM_CLASS_VARIABLE_AND_WRITE_NODE
@ PM_CLASS_VARIABLE_AND_WRITE_NODE
ClassVariableAndWriteNode.
Definition ast.h:650
PM_RANGE_NODE
@ PM_RANGE_NODE
RangeNode.
Definition ast.h:929
PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
@ PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
InstanceVariableOperatorWriteNode.
Definition ast.h:800
PM_LOCAL_VARIABLE_READ_NODE
@ PM_LOCAL_VARIABLE_READ_NODE
LocalVariableReadNode.
Definition ast.h:851
PM_NEXT_NODE
@ PM_NEXT_NODE
NextNode.
Definition ast.h:884
PM_INSTANCE_VARIABLE_OR_WRITE_NODE
@ PM_INSTANCE_VARIABLE_OR_WRITE_NODE
InstanceVariableOrWriteNode.
Definition ast.h:803
PM_REGULAR_EXPRESSION_NODE
@ PM_REGULAR_EXPRESSION_NODE
RegularExpressionNode.
Definition ast.h:938
PM_CLASS_VARIABLE_OR_WRITE_NODE
@ PM_CLASS_VARIABLE_OR_WRITE_NODE
ClassVariableOrWriteNode.
Definition ast.h:656
PM_BLOCK_PARAMETERS_NODE
@ PM_BLOCK_PARAMETERS_NODE
BlockParametersNode.
Definition ast.h:617
PM_CONSTANT_WRITE_NODE
@ PM_CONSTANT_WRITE_NODE
ConstantWriteNode.
Definition ast.h:701
PM_HASH_PATTERN_NODE
@ PM_HASH_PATTERN_NODE
HashPatternNode.
Definition ast.h:767
PM_INDEX_OPERATOR_WRITE_NODE
@ PM_INDEX_OPERATOR_WRITE_NODE
IndexOperatorWriteNode.
Definition ast.h:788
PM_UNDEF_NODE
@ PM_UNDEF_NODE
UndefNode.
Definition ast.h:995
PM_ALTERNATION_PATTERN_NODE
@ PM_ALTERNATION_PATTERN_NODE
AlternationPatternNode.
Definition ast.h:578
PM_ENSURE_NODE
@ PM_ENSURE_NODE
EnsureNode.
Definition ast.h:719
PM_LOCAL_VARIABLE_WRITE_NODE
@ PM_LOCAL_VARIABLE_WRITE_NODE
LocalVariableWriteNode.
Definition ast.h:857
PM_SINGLETON_CLASS_NODE
@ PM_SINGLETON_CLASS_NODE
SingletonClassNode.
Definition ast.h:965
PM_KEYWORD_HASH_NODE
@ PM_KEYWORD_HASH_NODE
KeywordHashNode.
Definition ast.h:833
PM_PARENTHESES_NODE
@ PM_PARENTHESES_NODE
ParenthesesNode.
Definition ast.h:911
PM_FOR_NODE
@ PM_FOR_NODE
ForNode.
Definition ast.h:734
PM_CLASS_VARIABLE_WRITE_NODE
@ PM_CLASS_VARIABLE_WRITE_NODE
ClassVariableWriteNode.
Definition ast.h:665
PM_POST_EXECUTION_NODE
@ PM_POST_EXECUTION_NODE
PostExecutionNode.
Definition ast.h:920
PM_CONSTANT_OPERATOR_WRITE_NODE
@ PM_CONSTANT_OPERATOR_WRITE_NODE
ConstantOperatorWriteNode.
Definition ast.h:671
PM_RETURN_NODE
@ PM_RETURN_NODE
ReturnNode.
Definition ast.h:959
PM_MODULE_NODE
@ PM_MODULE_NODE
ModuleNode.
Definition ast.h:875
PM_ARRAY_PATTERN_NODE
@ PM_ARRAY_PATTERN_NODE
ArrayPatternNode.
Definition ast.h:590
PM_SUPER_NODE
@ PM_SUPER_NODE
SuperNode.
Definition ast.h:986
PM_MATCH_LAST_LINE_NODE
@ PM_MATCH_LAST_LINE_NODE
MatchLastLineNode.
Definition ast.h:860
PM_CONSTANT_PATH_NODE
@ PM_CONSTANT_PATH_NODE
ConstantPathNode.
Definition ast.h:680
PM_INTERPOLATED_SYMBOL_NODE
@ PM_INTERPOLATED_SYMBOL_NODE
InterpolatedSymbolNode.
Definition ast.h:827
PM_CALL_AND_WRITE_NODE
@ PM_CALL_AND_WRITE_NODE
CallAndWriteNode.
Definition ast.h:623
PM_OPTIONAL_KEYWORD_PARAMETER_NODE
@ PM_OPTIONAL_KEYWORD_PARAMETER_NODE
OptionalKeywordParameterNode.
Definition ast.h:899
PM_CLASS_VARIABLE_TARGET_NODE
@ PM_CLASS_VARIABLE_TARGET_NODE
ClassVariableTargetNode.
Definition ast.h:662
PM_CASE_MATCH_NODE
@ PM_CASE_MATCH_NODE
CaseMatchNode.
Definition ast.h:641
PM_BREAK_NODE
@ PM_BREAK_NODE
BreakNode.
Definition ast.h:620
PM_CALL_OR_WRITE_NODE
@ PM_CALL_OR_WRITE_NODE
CallOrWriteNode.
Definition ast.h:632
PM_IMAGINARY_NODE
@ PM_IMAGINARY_NODE
ImaginaryNode.
Definition ast.h:773
PM_DEF_NODE
@ PM_DEF_NODE
DefNode.
Definition ast.h:704
PM_CONSTANT_READ_NODE
@ PM_CONSTANT_READ_NODE
ConstantReadNode.
Definition ast.h:695
PM_GLOBAL_VARIABLE_WRITE_NODE
@ PM_GLOBAL_VARIABLE_WRITE_NODE
GlobalVariableWriteNode.
Definition ast.h:761
PM_SOURCE_ENCODING_NODE
@ PM_SOURCE_ENCODING_NODE
SourceEncodingNode.
Definition ast.h:968
PM_BEGIN_NODE
@ PM_BEGIN_NODE
BeginNode.
Definition ast.h:602
PM_INTERPOLATED_X_STRING_NODE
@ PM_INTERPOLATED_X_STRING_NODE
InterpolatedXStringNode.
Definition ast.h:830
PM_INSTANCE_VARIABLE_READ_NODE
@ PM_INSTANCE_VARIABLE_READ_NODE
InstanceVariableReadNode.
Definition ast.h:806
PM_FLIP_FLOP_NODE
@ PM_FLIP_FLOP_NODE
FlipFlopNode.
Definition ast.h:728
PM_PINNED_VARIABLE_NODE
@ PM_PINNED_VARIABLE_NODE
PinnedVariableNode.
Definition ast.h:917
PM_REQUIRED_PARAMETER_NODE
@ PM_REQUIRED_PARAMETER_NODE
RequiredParameterNode.
Definition ast.h:944
PM_INSTANCE_VARIABLE_WRITE_NODE
@ PM_INSTANCE_VARIABLE_WRITE_NODE
InstanceVariableWriteNode.
Definition ast.h:812
PM_INSTANCE_VARIABLE_TARGET_NODE
@ PM_INSTANCE_VARIABLE_TARGET_NODE
InstanceVariableTargetNode.
Definition ast.h:809
PM_GLOBAL_VARIABLE_AND_WRITE_NODE
@ PM_GLOBAL_VARIABLE_AND_WRITE_NODE
GlobalVariableAndWriteNode.
Definition ast.h:746
PM_CASE_NODE
@ PM_CASE_NODE
CaseNode.
Definition ast.h:644
PM_RESCUE_NODE
@ PM_RESCUE_NODE
RescueNode.
Definition ast.h:950
PM_FLOAT_NODE
@ PM_FLOAT_NODE
FloatNode.
Definition ast.h:731
PM_ASSOC_NODE
@ PM_ASSOC_NODE
AssocNode.
Definition ast.h:593
PM_INTEGER_NODE
@ PM_INTEGER_NODE
IntegerNode.
Definition ast.h:815
PM_LOCAL_VARIABLE_TARGET_NODE
@ PM_LOCAL_VARIABLE_TARGET_NODE
LocalVariableTargetNode.
Definition ast.h:854
PM_STRING_NODE
@ PM_STRING_NODE
StringNode.
Definition ast.h:983
PM_INDEX_OR_WRITE_NODE
@ PM_INDEX_OR_WRITE_NODE
IndexOrWriteNode.
Definition ast.h:791
PM_ALIAS_GLOBAL_VARIABLE_NODE
@ PM_ALIAS_GLOBAL_VARIABLE_NODE
AliasGlobalVariableNode.
Definition ast.h:572
PM_PARAMETERS_NODE
@ PM_PARAMETERS_NODE
ParametersNode.
Definition ast.h:908
PM_NUMBERED_REFERENCE_READ_NODE
@ PM_NUMBERED_REFERENCE_READ_NODE
NumberedReferenceReadNode.
Definition ast.h:896
PM_CONSTANT_PATH_OR_WRITE_NODE
@ PM_CONSTANT_PATH_OR_WRITE_NODE
ConstantPathOrWriteNode.
Definition ast.h:686
PM_GLOBAL_VARIABLE_OR_WRITE_NODE
@ PM_GLOBAL_VARIABLE_OR_WRITE_NODE
GlobalVariableOrWriteNode.
Definition ast.h:752
PM_CONSTANT_OR_WRITE_NODE
@ PM_CONSTANT_OR_WRITE_NODE
ConstantOrWriteNode.
Definition ast.h:674
PM_STATEMENTS_NODE
@ PM_STATEMENTS_NODE
StatementsNode.
Definition ast.h:980
PM_OPTIONAL_PARAMETER_NODE
@ PM_OPTIONAL_PARAMETER_NODE
OptionalParameterNode.
Definition ast.h:902
PM_PINNED_EXPRESSION_NODE
@ PM_PINNED_EXPRESSION_NODE
PinnedExpressionNode.
Definition ast.h:914
PM_BLOCK_NODE
@ PM_BLOCK_NODE
BlockNode.
Definition ast.h:611
PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
@ PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
ClassVariableOperatorWriteNode.
Definition ast.h:653
PM_REST_PARAMETER_NODE
@ PM_REST_PARAMETER_NODE
RestParameterNode.
Definition ast.h:953
PM_EMBEDDED_STATEMENTS_NODE
@ PM_EMBEDDED_STATEMENTS_NODE
EmbeddedStatementsNode.
Definition ast.h:713
PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
@ PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
InterpolatedRegularExpressionNode.
Definition ast.h:821
PM_INDEX_TARGET_NODE
@ PM_INDEX_TARGET_NODE
IndexTargetNode.
Definition ast.h:794
PM_KEYWORD_REST_PARAMETER_NODE
@ PM_KEYWORD_REST_PARAMETER_NODE
KeywordRestParameterNode.
Definition ast.h:836
PM_NODE_TYPE
#define PM_NODE_TYPE(node)
Cast the type to an enum to allow the compiler to provide exhaustiveness checking.
Definition ast.h:1045
pm_node_type_t
uint16_t pm_node_type_t
This is the type of node embedded in the node struct.
Definition ast.h:1023
pm_node_list_t
struct pm_node_list pm_node_list_t
A list of nodes in the source, most often used for lists of children.
PRISM_EXPORTED_FUNCTION
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition defines.h:32
node.h
Functions related to nodes in the AST.
pm_alias_global_variable_node
AliasGlobalVariableNode.
Definition ast.h:1088
pm_alias_global_variable_node::old_name
struct pm_node * old_name
AliasGlobalVariableNode#old_name.
Definition ast.h:1096
pm_alias_global_variable_node::new_name
struct pm_node * new_name
AliasGlobalVariableNode#new_name.
Definition ast.h:1093
pm_alias_method_node
AliasMethodNode.
Definition ast.h:1109
pm_alias_method_node::old_name
struct pm_node * old_name
AliasMethodNode#old_name.
Definition ast.h:1117
pm_alias_method_node::new_name
struct pm_node * new_name
AliasMethodNode#new_name.
Definition ast.h:1114
pm_alternation_pattern_node
AlternationPatternNode.
Definition ast.h:1130
pm_alternation_pattern_node::left
struct pm_node * left
AlternationPatternNode#left.
Definition ast.h:1135
pm_alternation_pattern_node::right
struct pm_node * right
AlternationPatternNode#right.
Definition ast.h:1138
pm_and_node
AndNode.
Definition ast.h:1151
pm_and_node::left
struct pm_node * left
AndNode#left.
Definition ast.h:1156
pm_and_node::right
struct pm_node * right
AndNode#right.
Definition ast.h:1159
pm_arguments_node
ArgumentsNode.
Definition ast.h:1174
pm_arguments_node::arguments
struct pm_node_list arguments
ArgumentsNode#arguments.
Definition ast.h:1179
pm_array_node
ArrayNode.
Definition ast.h:1191
pm_array_node::elements
struct pm_node_list elements
ArrayNode#elements.
Definition ast.h:1196
pm_array_pattern_node
ArrayPatternNode.
Definition ast.h:1212
pm_array_pattern_node::requireds
struct pm_node_list requireds
ArrayPatternNode#requireds.
Definition ast.h:1220
pm_array_pattern_node::rest
struct pm_node * rest
ArrayPatternNode#rest.
Definition ast.h:1223
pm_array_pattern_node::constant
struct pm_node * constant
ArrayPatternNode#constant.
Definition ast.h:1217
pm_array_pattern_node::posts
struct pm_node_list posts
ArrayPatternNode#posts.
Definition ast.h:1226
pm_assoc_node
AssocNode.
Definition ast.h:1242
pm_assoc_node::value
struct pm_node * value
AssocNode#value.
Definition ast.h:1250
pm_assoc_node::key
struct pm_node * key
AssocNode#key.
Definition ast.h:1247
pm_assoc_splat_node
AssocSplatNode.
Definition ast.h:1263
pm_assoc_splat_node::value
struct pm_node * value
AssocSplatNode#value.
Definition ast.h:1268
pm_back_reference_read_node
BackReferenceReadNode.
Definition ast.h:1281
pm_begin_node
BeginNode.
Definition ast.h:1296
pm_begin_node::ensure_clause
struct pm_ensure_node * ensure_clause
BeginNode#ensure_clause.
Definition ast.h:1313
pm_begin_node::rescue_clause
struct pm_rescue_node * rescue_clause
BeginNode#rescue_clause.
Definition ast.h:1307
pm_begin_node::statements
struct pm_statements_node * statements
BeginNode#statements.
Definition ast.h:1304
pm_begin_node::else_clause
struct pm_else_node * else_clause
BeginNode#else_clause.
Definition ast.h:1310
pm_block_argument_node
BlockArgumentNode.
Definition ast.h:1326
pm_block_argument_node::expression
struct pm_node * expression
BlockArgumentNode#expression.
Definition ast.h:1331
pm_block_local_variable_node
BlockLocalVariableNode.
Definition ast.h:1344
pm_block_node
BlockNode.
Definition ast.h:1359
pm_block_node::parameters
struct pm_node * parameters
BlockNode#parameters.
Definition ast.h:1370
pm_block_node::body
struct pm_node * body
BlockNode#body.
Definition ast.h:1373
pm_block_node::locals
pm_constant_id_list_t locals
BlockNode#locals.
Definition ast.h:1364
pm_block_parameter_node
BlockParameterNode.
Definition ast.h:1389
pm_block_parameters_node
BlockParametersNode.
Definition ast.h:1410
pm_block_parameters_node::parameters
struct pm_parameters_node * parameters
BlockParametersNode#parameters.
Definition ast.h:1415
pm_block_parameters_node::locals
struct pm_node_list locals
BlockParametersNode#locals.
Definition ast.h:1418
pm_break_node
BreakNode.
Definition ast.h:1434
pm_break_node::arguments
struct pm_arguments_node * arguments
BreakNode#arguments.
Definition ast.h:1439
pm_call_and_write_node
CallAndWriteNode.
Definition ast.h:1456
pm_call_and_write_node::value
struct pm_node * value
CallAndWriteNode#value.
Definition ast.h:1479
pm_call_and_write_node::receiver
struct pm_node * receiver
CallAndWriteNode#receiver.
Definition ast.h:1461
pm_call_node
CallNode.
Definition ast.h:1493
pm_call_node::receiver
struct pm_node * receiver
CallNode#receiver.
Definition ast.h:1498
pm_call_node::arguments
struct pm_arguments_node * arguments
CallNode#arguments.
Definition ast.h:1513
pm_call_node::block
struct pm_node * block
CallNode#block.
Definition ast.h:1519
pm_call_operator_write_node
CallOperatorWriteNode.
Definition ast.h:1533
pm_call_operator_write_node::receiver
struct pm_node * receiver
CallOperatorWriteNode#receiver.
Definition ast.h:1538
pm_call_operator_write_node::value
struct pm_node * value
CallOperatorWriteNode#value.
Definition ast.h:1559
pm_call_or_write_node
CallOrWriteNode.
Definition ast.h:1573
pm_call_or_write_node::receiver
struct pm_node * receiver
CallOrWriteNode#receiver.
Definition ast.h:1578
pm_call_or_write_node::value
struct pm_node * value
CallOrWriteNode#value.
Definition ast.h:1596
pm_call_target_node
CallTargetNode.
Definition ast.h:1610
pm_call_target_node::receiver
struct pm_node * receiver
CallTargetNode#receiver.
Definition ast.h:1615
pm_capture_pattern_node
CapturePatternNode.
Definition ast.h:1634
pm_capture_pattern_node::target
struct pm_node * target
CapturePatternNode#target.
Definition ast.h:1642
pm_capture_pattern_node::value
struct pm_node * value
CapturePatternNode#value.
Definition ast.h:1639
pm_case_match_node
CaseMatchNode.
Definition ast.h:1655
pm_case_match_node::conditions
struct pm_node_list conditions
CaseMatchNode#conditions.
Definition ast.h:1663
pm_case_match_node::consequent
struct pm_else_node * consequent
CaseMatchNode#consequent.
Definition ast.h:1666
pm_case_match_node::predicate
struct pm_node * predicate
CaseMatchNode#predicate.
Definition ast.h:1660
pm_case_node
CaseNode.
Definition ast.h:1682
pm_case_node::predicate
struct pm_node * predicate
CaseNode#predicate.
Definition ast.h:1687
pm_case_node::consequent
struct pm_else_node * consequent
CaseNode#consequent.
Definition ast.h:1693
pm_case_node::conditions
struct pm_node_list conditions
CaseNode#conditions.
Definition ast.h:1690
pm_class_node
ClassNode.
Definition ast.h:1709
pm_class_node::constant_path
struct pm_node * constant_path
ClassNode#constant_path.
Definition ast.h:1720
pm_class_node::locals
pm_constant_id_list_t locals
ClassNode#locals.
Definition ast.h:1714
pm_class_node::body
struct pm_node * body
ClassNode#body.
Definition ast.h:1729
pm_class_node::superclass
struct pm_node * superclass
ClassNode#superclass.
Definition ast.h:1726
pm_class_variable_and_write_node
ClassVariableAndWriteNode.
Definition ast.h:1745
pm_class_variable_and_write_node::value
struct pm_node * value
ClassVariableAndWriteNode#value.
Definition ast.h:1759
pm_class_variable_operator_write_node
ClassVariableOperatorWriteNode.
Definition ast.h:1769
pm_class_variable_operator_write_node::value
struct pm_node * value
ClassVariableOperatorWriteNode#value.
Definition ast.h:1783
pm_class_variable_or_write_node
ClassVariableOrWriteNode.
Definition ast.h:1796
pm_class_variable_or_write_node::value
struct pm_node * value
ClassVariableOrWriteNode#value.
Definition ast.h:1810
pm_class_variable_read_node
ClassVariableReadNode.
Definition ast.h:1820
pm_class_variable_target_node
ClassVariableTargetNode.
Definition ast.h:1835
pm_class_variable_write_node
ClassVariableWriteNode.
Definition ast.h:1850
pm_class_variable_write_node::value
struct pm_node * value
ClassVariableWriteNode#value.
Definition ast.h:1861
pm_constant_and_write_node
ConstantAndWriteNode.
Definition ast.h:1874
pm_constant_and_write_node::value
struct pm_node * value
ConstantAndWriteNode#value.
Definition ast.h:1888
pm_constant_id_list_t
A list of constant IDs.
Definition pm_constant_pool.h:29
pm_constant_operator_write_node
ConstantOperatorWriteNode.
Definition ast.h:1898
pm_constant_operator_write_node::value
struct pm_node * value
ConstantOperatorWriteNode#value.
Definition ast.h:1912
pm_constant_or_write_node
ConstantOrWriteNode.
Definition ast.h:1925
pm_constant_or_write_node::value
struct pm_node * value
ConstantOrWriteNode#value.
Definition ast.h:1939
pm_constant_path_and_write_node
ConstantPathAndWriteNode.
Definition ast.h:1949
pm_constant_path_and_write_node::target
struct pm_constant_path_node * target
ConstantPathAndWriteNode#target.
Definition ast.h:1954
pm_constant_path_and_write_node::value
struct pm_node * value
ConstantPathAndWriteNode#value.
Definition ast.h:1960
pm_constant_path_node
ConstantPathNode.
Definition ast.h:1970
pm_constant_path_node::child
struct pm_node * child
ConstantPathNode#child.
Definition ast.h:1978
pm_constant_path_node::parent
struct pm_node * parent
ConstantPathNode#parent.
Definition ast.h:1975
pm_constant_path_operator_write_node
ConstantPathOperatorWriteNode.
Definition ast.h:1991
pm_constant_path_operator_write_node::target
struct pm_constant_path_node * target
ConstantPathOperatorWriteNode#target.
Definition ast.h:1996
pm_constant_path_operator_write_node::value
struct pm_node * value
ConstantPathOperatorWriteNode#value.
Definition ast.h:2002
pm_constant_path_or_write_node
ConstantPathOrWriteNode.
Definition ast.h:2015
pm_constant_path_or_write_node::value
struct pm_node * value
ConstantPathOrWriteNode#value.
Definition ast.h:2026
pm_constant_path_or_write_node::target
struct pm_constant_path_node * target
ConstantPathOrWriteNode#target.
Definition ast.h:2020
pm_constant_path_target_node
ConstantPathTargetNode.
Definition ast.h:2036
pm_constant_path_target_node::parent
struct pm_node * parent
ConstantPathTargetNode#parent.
Definition ast.h:2041
pm_constant_path_target_node::child
struct pm_node * child
ConstantPathTargetNode#child.
Definition ast.h:2044
pm_constant_path_write_node
ConstantPathWriteNode.
Definition ast.h:2057
pm_constant_path_write_node::target
struct pm_constant_path_node * target
ConstantPathWriteNode#target.
Definition ast.h:2062
pm_constant_path_write_node::value
struct pm_node * value
ConstantPathWriteNode#value.
Definition ast.h:2068
pm_constant_read_node
ConstantReadNode.
Definition ast.h:2078
pm_constant_target_node
ConstantTargetNode.
Definition ast.h:2093
pm_constant_write_node
ConstantWriteNode.
Definition ast.h:2108
pm_constant_write_node::value
struct pm_node * value
ConstantWriteNode#value.
Definition ast.h:2119
pm_def_node
DefNode.
Definition ast.h:2132
pm_def_node::parameters
struct pm_parameters_node * parameters
DefNode#parameters.
Definition ast.h:2146
pm_def_node::body
struct pm_node * body
DefNode#body.
Definition ast.h:2149
pm_def_node::receiver
struct pm_node * receiver
DefNode#receiver.
Definition ast.h:2143
pm_def_node::locals
pm_constant_id_list_t locals
DefNode#locals.
Definition ast.h:2152
pm_defined_node
DefinedNode.
Definition ast.h:2183
pm_defined_node::value
struct pm_node * value
DefinedNode#value.
Definition ast.h:2191
pm_else_node
ElseNode.
Definition ast.h:2207
pm_else_node::statements
struct pm_statements_node * statements
ElseNode#statements.
Definition ast.h:2215
pm_embedded_statements_node
EmbeddedStatementsNode.
Definition ast.h:2228
pm_embedded_statements_node::statements
struct pm_statements_node * statements
EmbeddedStatementsNode#statements.
Definition ast.h:2236
pm_embedded_variable_node
EmbeddedVariableNode.
Definition ast.h:2249
pm_embedded_variable_node::variable
struct pm_node * variable
EmbeddedVariableNode#variable.
Definition ast.h:2257
pm_ensure_node
EnsureNode.
Definition ast.h:2267
pm_ensure_node::statements
struct pm_statements_node * statements
EnsureNode#statements.
Definition ast.h:2275
pm_false_node
FalseNode.
Definition ast.h:2288
pm_find_pattern_node
FindPatternNode.
Definition ast.h:2300
pm_find_pattern_node::left
struct pm_node * left
FindPatternNode#left.
Definition ast.h:2308
pm_find_pattern_node::constant
struct pm_node * constant
FindPatternNode#constant.
Definition ast.h:2305
pm_find_pattern_node::right
struct pm_node * right
FindPatternNode#right.
Definition ast.h:2314
pm_find_pattern_node::requireds
struct pm_node_list requireds
FindPatternNode#requireds.
Definition ast.h:2311
pm_flip_flop_node
FlipFlopNode.
Definition ast.h:2332
pm_flip_flop_node::left
struct pm_node * left
FlipFlopNode#left.
Definition ast.h:2337
pm_flip_flop_node::right
struct pm_node * right
FlipFlopNode#right.
Definition ast.h:2340
pm_float_node
FloatNode.
Definition ast.h:2353
pm_for_node
ForNode.
Definition ast.h:2365
pm_for_node::statements
struct pm_statements_node * statements
ForNode#statements.
Definition ast.h:2376
pm_for_node::index
struct pm_node * index
ForNode#index.
Definition ast.h:2370
pm_for_node::collection
struct pm_node * collection
ForNode#collection.
Definition ast.h:2373
pm_forwarding_arguments_node
ForwardingArgumentsNode.
Definition ast.h:2398
pm_forwarding_parameter_node
ForwardingParameterNode.
Definition ast.h:2410
pm_forwarding_super_node
ForwardingSuperNode.
Definition ast.h:2422
pm_forwarding_super_node::block
struct pm_block_node * block
ForwardingSuperNode#block.
Definition ast.h:2427
pm_global_variable_and_write_node
GlobalVariableAndWriteNode.
Definition ast.h:2437
pm_global_variable_and_write_node::value
struct pm_node * value
GlobalVariableAndWriteNode#value.
Definition ast.h:2451
pm_global_variable_operator_write_node
GlobalVariableOperatorWriteNode.
Definition ast.h:2461
pm_global_variable_operator_write_node::value
struct pm_node * value
GlobalVariableOperatorWriteNode#value.
Definition ast.h:2475
pm_global_variable_or_write_node
GlobalVariableOrWriteNode.
Definition ast.h:2488
pm_global_variable_or_write_node::value
struct pm_node * value
GlobalVariableOrWriteNode#value.
Definition ast.h:2502
pm_global_variable_read_node
GlobalVariableReadNode.
Definition ast.h:2512
pm_global_variable_target_node
GlobalVariableTargetNode.
Definition ast.h:2527
pm_global_variable_write_node
GlobalVariableWriteNode.
Definition ast.h:2542
pm_global_variable_write_node::value
struct pm_node * value
GlobalVariableWriteNode#value.
Definition ast.h:2553
pm_hash_node
HashNode.
Definition ast.h:2566
pm_hash_node::elements
struct pm_node_list elements
HashNode#elements.
Definition ast.h:2574
pm_hash_pattern_node
HashPatternNode.
Definition ast.h:2587
pm_hash_pattern_node::elements
struct pm_node_list elements
HashPatternNode#elements.
Definition ast.h:2595
pm_hash_pattern_node::rest
struct pm_node * rest
HashPatternNode#rest.
Definition ast.h:2598
pm_hash_pattern_node::constant
struct pm_node * constant
HashPatternNode#constant.
Definition ast.h:2592
pm_if_node
IfNode.
Definition ast.h:2614
pm_if_node::consequent
struct pm_node * consequent
IfNode#consequent.
Definition ast.h:2631
pm_if_node::predicate
struct pm_node * predicate
IfNode#predicate.
Definition ast.h:2622
pm_if_node::statements
struct pm_statements_node * statements
IfNode#statements.
Definition ast.h:2628
pm_imaginary_node
ImaginaryNode.
Definition ast.h:2644
pm_imaginary_node::numeric
struct pm_node * numeric
ImaginaryNode#numeric.
Definition ast.h:2649
pm_implicit_node
ImplicitNode.
Definition ast.h:2659
pm_implicit_node::value
struct pm_node * value
ImplicitNode#value.
Definition ast.h:2664
pm_implicit_rest_node
ImplicitRestNode.
Definition ast.h:2674
pm_in_node
InNode.
Definition ast.h:2686
pm_in_node::statements
struct pm_statements_node * statements
InNode#statements.
Definition ast.h:2694
pm_in_node::pattern
struct pm_node * pattern
InNode#pattern.
Definition ast.h:2691
pm_index_and_write_node
IndexAndWriteNode.
Definition ast.h:2714
pm_index_and_write_node::arguments
struct pm_arguments_node * arguments
IndexAndWriteNode#arguments.
Definition ast.h:2728
pm_index_and_write_node::receiver
struct pm_node * receiver
IndexAndWriteNode#receiver.
Definition ast.h:2719
pm_index_and_write_node::value
struct pm_node * value
IndexAndWriteNode#value.
Definition ast.h:2740
pm_index_and_write_node::block
struct pm_node * block
IndexAndWriteNode#block.
Definition ast.h:2734
pm_index_operator_write_node
IndexOperatorWriteNode.
Definition ast.h:2754
pm_index_operator_write_node::value
struct pm_node * value
IndexOperatorWriteNode#value.
Definition ast.h:2783
pm_index_operator_write_node::block
struct pm_node * block
IndexOperatorWriteNode#block.
Definition ast.h:2774
pm_index_operator_write_node::arguments
struct pm_arguments_node * arguments
IndexOperatorWriteNode#arguments.
Definition ast.h:2768
pm_index_operator_write_node::receiver
struct pm_node * receiver
IndexOperatorWriteNode#receiver.
Definition ast.h:2759
pm_index_or_write_node
IndexOrWriteNode.
Definition ast.h:2797
pm_index_or_write_node::receiver
struct pm_node * receiver
IndexOrWriteNode#receiver.
Definition ast.h:2802
pm_index_or_write_node::value
struct pm_node * value
IndexOrWriteNode#value.
Definition ast.h:2823
pm_index_or_write_node::arguments
struct pm_arguments_node * arguments
IndexOrWriteNode#arguments.
Definition ast.h:2811
pm_index_or_write_node::block
struct pm_node * block
IndexOrWriteNode#block.
Definition ast.h:2817
pm_index_target_node
IndexTargetNode.
Definition ast.h:2837
pm_index_target_node::block
struct pm_node * block
IndexTargetNode#block.
Definition ast.h:2854
pm_index_target_node::receiver
struct pm_node * receiver
IndexTargetNode#receiver.
Definition ast.h:2842
pm_index_target_node::arguments
struct pm_arguments_node * arguments
IndexTargetNode#arguments.
Definition ast.h:2848
pm_instance_variable_and_write_node
InstanceVariableAndWriteNode.
Definition ast.h:2864
pm_instance_variable_and_write_node::value
struct pm_node * value
InstanceVariableAndWriteNode#value.
Definition ast.h:2878
pm_instance_variable_operator_write_node
InstanceVariableOperatorWriteNode.
Definition ast.h:2888
pm_instance_variable_operator_write_node::value
struct pm_node * value
InstanceVariableOperatorWriteNode#value.
Definition ast.h:2902
pm_instance_variable_or_write_node
InstanceVariableOrWriteNode.
Definition ast.h:2915
pm_instance_variable_or_write_node::value
struct pm_node * value
InstanceVariableOrWriteNode#value.
Definition ast.h:2929
pm_instance_variable_read_node
InstanceVariableReadNode.
Definition ast.h:2939
pm_instance_variable_target_node
InstanceVariableTargetNode.
Definition ast.h:2954
pm_instance_variable_write_node
InstanceVariableWriteNode.
Definition ast.h:2969
pm_instance_variable_write_node::value
struct pm_node * value
InstanceVariableWriteNode#value.
Definition ast.h:2980
pm_integer_node
IntegerNode.
Definition ast.h:2998
pm_interpolated_match_last_line_node
InterpolatedMatchLastLineNode.
Definition ast.h:3022
pm_interpolated_match_last_line_node::parts
struct pm_node_list parts
InterpolatedMatchLastLineNode#parts.
Definition ast.h:3030
pm_interpolated_regular_expression_node
InterpolatedRegularExpressionNode.
Definition ast.h:3055
pm_interpolated_regular_expression_node::parts
struct pm_node_list parts
InterpolatedRegularExpressionNode#parts.
Definition ast.h:3063
pm_interpolated_string_node
InterpolatedStringNode.
Definition ast.h:3076
pm_interpolated_string_node::parts
struct pm_node_list parts
InterpolatedStringNode#parts.
Definition ast.h:3084
pm_interpolated_symbol_node
InterpolatedSymbolNode.
Definition ast.h:3097
pm_interpolated_symbol_node::parts
struct pm_node_list parts
InterpolatedSymbolNode#parts.
Definition ast.h:3105
pm_interpolated_x_string_node
InterpolatedXStringNode.
Definition ast.h:3118
pm_interpolated_x_string_node::parts
struct pm_node_list parts
InterpolatedXStringNode#parts.
Definition ast.h:3126
pm_keyword_hash_node
KeywordHashNode.
Definition ast.h:3141
pm_keyword_hash_node::elements
struct pm_node_list elements
KeywordHashNode#elements.
Definition ast.h:3146
pm_keyword_rest_parameter_node
KeywordRestParameterNode.
Definition ast.h:3156
pm_lambda_node
LambdaNode.
Definition ast.h:3177
pm_lambda_node::body
struct pm_node * body
LambdaNode#body.
Definition ast.h:3200
pm_lambda_node::parameters
struct pm_node * parameters
LambdaNode#parameters.
Definition ast.h:3197
pm_lambda_node::locals
pm_constant_id_list_t locals
LambdaNode#locals.
Definition ast.h:3182
pm_local_variable_and_write_node
LocalVariableAndWriteNode.
Definition ast.h:3210
pm_local_variable_and_write_node::value
struct pm_node * value
LocalVariableAndWriteNode#value.
Definition ast.h:3221
pm_local_variable_operator_write_node
LocalVariableOperatorWriteNode.
Definition ast.h:3237
pm_local_variable_operator_write_node::value
struct pm_node * value
LocalVariableOperatorWriteNode#value.
Definition ast.h:3248
pm_local_variable_or_write_node
LocalVariableOrWriteNode.
Definition ast.h:3267
pm_local_variable_or_write_node::value
struct pm_node * value
LocalVariableOrWriteNode#value.
Definition ast.h:3278
pm_local_variable_read_node
LocalVariableReadNode.
Definition ast.h:3294
pm_local_variable_target_node
LocalVariableTargetNode.
Definition ast.h:3312
pm_local_variable_write_node
LocalVariableWriteNode.
Definition ast.h:3330
pm_local_variable_write_node::value
struct pm_node * value
LocalVariableWriteNode#value.
Definition ast.h:3344
pm_match_last_line_node
MatchLastLineNode.
Definition ast.h:3369
pm_match_last_line_node::unescaped
pm_string_t unescaped
MatchLastLineNode#unescaped.
Definition ast.h:3383
pm_match_predicate_node
MatchPredicateNode.
Definition ast.h:3393
pm_match_predicate_node::pattern
struct pm_node * pattern
MatchPredicateNode#pattern.
Definition ast.h:3401
pm_match_predicate_node::value
struct pm_node * value
MatchPredicateNode#value.
Definition ast.h:3398
pm_match_required_node
MatchRequiredNode.
Definition ast.h:3414
pm_match_required_node::value
struct pm_node * value
MatchRequiredNode#value.
Definition ast.h:3419
pm_match_required_node::pattern
struct pm_node * pattern
MatchRequiredNode#pattern.
Definition ast.h:3422
pm_match_write_node
MatchWriteNode.
Definition ast.h:3435
pm_match_write_node::targets
struct pm_node_list targets
MatchWriteNode#targets.
Definition ast.h:3443
pm_match_write_node::call
struct pm_call_node * call
MatchWriteNode#call.
Definition ast.h:3440
pm_memsize_t
This struct stores the information gathered by the pm_node_memsize function.
Definition node.h:33
pm_memsize_t::memsize
size_t memsize
The total memory footprint of the node and all of its children.
Definition node.h:35
pm_memsize_t::node_count
size_t node_count
The number of children the node has.
Definition node.h:38
pm_missing_node
MissingNode.
Definition ast.h:3453
pm_module_node
ModuleNode.
Definition ast.h:3465
pm_module_node::constant_path
struct pm_node * constant_path
ModuleNode#constant_path.
Definition ast.h:3476
pm_module_node::body
struct pm_node * body
ModuleNode#body.
Definition ast.h:3479
pm_module_node::locals
pm_constant_id_list_t locals
ModuleNode#locals.
Definition ast.h:3470
pm_multi_target_node
MultiTargetNode.
Definition ast.h:3495
pm_multi_target_node::lefts
struct pm_node_list lefts
MultiTargetNode#lefts.
Definition ast.h:3500
pm_multi_target_node::rest
struct pm_node * rest
MultiTargetNode#rest.
Definition ast.h:3503
pm_multi_target_node::rights
struct pm_node_list rights
MultiTargetNode#rights.
Definition ast.h:3506
pm_multi_write_node
MultiWriteNode.
Definition ast.h:3522
pm_multi_write_node::value
struct pm_node * value
MultiWriteNode#value.
Definition ast.h:3545
pm_multi_write_node::rest
struct pm_node * rest
MultiWriteNode#rest.
Definition ast.h:3530
pm_multi_write_node::rights
struct pm_node_list rights
MultiWriteNode#rights.
Definition ast.h:3533
pm_multi_write_node::lefts
struct pm_node_list lefts
MultiWriteNode#lefts.
Definition ast.h:3527
pm_next_node
NextNode.
Definition ast.h:3555
pm_next_node::arguments
struct pm_arguments_node * arguments
NextNode#arguments.
Definition ast.h:3560
pm_nil_node
NilNode.
Definition ast.h:3573
pm_no_keywords_parameter_node
NoKeywordsParameterNode.
Definition ast.h:3585
pm_node_list
A list of nodes in the source, most often used for lists of children.
Definition ast.h:556
pm_node_list::size
size_t size
The number of nodes in the list.
Definition ast.h:558
pm_node_list::nodes
struct pm_node ** nodes
The nodes in the list.
Definition ast.h:564
pm_node_list::capacity
size_t capacity
The capacity of the list that has been allocated.
Definition ast.h:561
pm_node
This is the base structure that represents a node in the syntax tree.
Definition ast.h:1061
pm_numbered_parameters_node
NumberedParametersNode.
Definition ast.h:3603
pm_numbered_reference_read_node
NumberedReferenceReadNode.
Definition ast.h:3618
pm_optional_keyword_parameter_node
OptionalKeywordParameterNode.
Definition ast.h:3633
pm_optional_keyword_parameter_node::value
struct pm_node * value
OptionalKeywordParameterNode#value.
Definition ast.h:3644
pm_optional_parameter_node
OptionalParameterNode.
Definition ast.h:3654
pm_optional_parameter_node::value
struct pm_node * value
OptionalParameterNode#value.
Definition ast.h:3668
pm_or_node
OrNode.
Definition ast.h:3678
pm_or_node::left
struct pm_node * left
OrNode#left.
Definition ast.h:3683
pm_or_node::right
struct pm_node * right
OrNode#right.
Definition ast.h:3686
pm_parameters_node
ParametersNode.
Definition ast.h:3699
pm_parameters_node::rest
struct pm_node * rest
ParametersNode#rest.
Definition ast.h:3710
pm_parameters_node::requireds
struct pm_node_list requireds
ParametersNode#requireds.
Definition ast.h:3704
pm_parameters_node::block
struct pm_block_parameter_node * block
ParametersNode#block.
Definition ast.h:3722
pm_parameters_node::optionals
struct pm_node_list optionals
ParametersNode#optionals.
Definition ast.h:3707
pm_parameters_node::posts
struct pm_node_list posts
ParametersNode#posts.
Definition ast.h:3713
pm_parameters_node::keyword_rest
struct pm_node * keyword_rest
ParametersNode#keyword_rest.
Definition ast.h:3719
pm_parameters_node::keywords
struct pm_node_list keywords
ParametersNode#keywords.
Definition ast.h:3716
pm_parentheses_node
ParenthesesNode.
Definition ast.h:3732
pm_parentheses_node::body
struct pm_node * body
ParenthesesNode#body.
Definition ast.h:3737
pm_parser
This struct represents the overall parser.
Definition parser.h:489
pm_pinned_expression_node
PinnedExpressionNode.
Definition ast.h:3753
pm_pinned_expression_node::expression
struct pm_node * expression
PinnedExpressionNode#expression.
Definition ast.h:3758
pm_pinned_variable_node
PinnedVariableNode.
Definition ast.h:3777
pm_pinned_variable_node::variable
struct pm_node * variable
PinnedVariableNode#variable.
Definition ast.h:3782
pm_post_execution_node
PostExecutionNode.
Definition ast.h:3795
pm_post_execution_node::statements
struct pm_statements_node * statements
PostExecutionNode#statements.
Definition ast.h:3800
pm_pre_execution_node
PreExecutionNode.
Definition ast.h:3819
pm_pre_execution_node::statements
struct pm_statements_node * statements
PreExecutionNode#statements.
Definition ast.h:3824
pm_program_node
ProgramNode.
Definition ast.h:3843
pm_program_node::statements
struct pm_statements_node * statements
ProgramNode#statements.
Definition ast.h:3851
pm_program_node::locals
pm_constant_id_list_t locals
ProgramNode#locals.
Definition ast.h:3848
pm_range_node
RangeNode.
Definition ast.h:3863
pm_range_node::right
struct pm_node * right
RangeNode#right.
Definition ast.h:3871
pm_range_node::left
struct pm_node * left
RangeNode#left.
Definition ast.h:3868
pm_rational_node
RationalNode.
Definition ast.h:3884
pm_rational_node::numeric
struct pm_node * numeric
RationalNode#numeric.
Definition ast.h:3889
pm_redo_node
RedoNode.
Definition ast.h:3899
pm_regular_expression_node
RegularExpressionNode.
Definition ast.h:3923
pm_regular_expression_node::unescaped
pm_string_t unescaped
RegularExpressionNode#unescaped.
Definition ast.h:3937
pm_required_keyword_parameter_node
RequiredKeywordParameterNode.
Definition ast.h:3947
pm_required_parameter_node
RequiredParameterNode.
Definition ast.h:3965
pm_rescue_modifier_node
RescueModifierNode.
Definition ast.h:3980
pm_rescue_modifier_node::rescue_expression
struct pm_node * rescue_expression
RescueModifierNode#rescue_expression.
Definition ast.h:3991
pm_rescue_modifier_node::expression
struct pm_node * expression
RescueModifierNode#expression.
Definition ast.h:3985
pm_rescue_node
RescueNode.
Definition ast.h:4001
pm_rescue_node::consequent
struct pm_rescue_node * consequent
RescueNode#consequent.
Definition ast.h:4021
pm_rescue_node::reference
struct pm_node * reference
RescueNode#reference.
Definition ast.h:4015
pm_rescue_node::exceptions
struct pm_node_list exceptions
RescueNode#exceptions.
Definition ast.h:4009
pm_rescue_node::statements
struct pm_statements_node * statements
RescueNode#statements.
Definition ast.h:4018
pm_rest_parameter_node
RestParameterNode.
Definition ast.h:4031
pm_retry_node
RetryNode.
Definition ast.h:4052
pm_return_node
ReturnNode.
Definition ast.h:4064
pm_return_node::arguments
struct pm_arguments_node * arguments
ReturnNode#arguments.
Definition ast.h:4072
pm_self_node
SelfNode.
Definition ast.h:4082
pm_singleton_class_node
SingletonClassNode.
Definition ast.h:4094
pm_singleton_class_node::locals
pm_constant_id_list_t locals
SingletonClassNode#locals.
Definition ast.h:4099
pm_singleton_class_node::expression
struct pm_node * expression
SingletonClassNode#expression.
Definition ast.h:4108
pm_singleton_class_node::body
struct pm_node * body
SingletonClassNode#body.
Definition ast.h:4111
pm_source_encoding_node
SourceEncodingNode.
Definition ast.h:4124
pm_source_file_node
SourceFileNode.
Definition ast.h:4136
pm_source_file_node::filepath
pm_string_t filepath
SourceFileNode#filepath.
Definition ast.h:4141
pm_source_line_node
SourceLineNode.
Definition ast.h:4151
pm_splat_node
SplatNode.
Definition ast.h:4163
pm_splat_node::expression
struct pm_node * expression
SplatNode#expression.
Definition ast.h:4171
pm_statements_node
StatementsNode.
Definition ast.h:4181
pm_statements_node::body
struct pm_node_list body
StatementsNode#body.
Definition ast.h:4186
pm_string_node
StringNode.
Definition ast.h:4200
pm_string_node::unescaped
pm_string_t unescaped
StringNode#unescaped.
Definition ast.h:4214
pm_super_node
SuperNode.
Definition ast.h:4224
pm_super_node::arguments
struct pm_arguments_node * arguments
SuperNode#arguments.
Definition ast.h:4235
pm_super_node::block
struct pm_node * block
SuperNode#block.
Definition ast.h:4241
pm_symbol_node
SymbolNode.
Definition ast.h:4255
pm_symbol_node::unescaped
pm_string_t unescaped
SymbolNode#unescaped.
Definition ast.h:4269
pm_true_node
TrueNode.
Definition ast.h:4279
pm_undef_node
UndefNode.
Definition ast.h:4291
pm_undef_node::names
struct pm_node_list names
UndefNode#names.
Definition ast.h:4296
pm_unless_node
UnlessNode.
Definition ast.h:4309
pm_unless_node::consequent
struct pm_else_node * consequent
UnlessNode#consequent.
Definition ast.h:4326
pm_unless_node::statements
struct pm_statements_node * statements
UnlessNode#statements.
Definition ast.h:4323
pm_unless_node::predicate
struct pm_node * predicate
UnlessNode#predicate.
Definition ast.h:4317
pm_until_node
UntilNode.
Definition ast.h:4341
pm_until_node::statements
struct pm_statements_node * statements
UntilNode#statements.
Definition ast.h:4355
pm_until_node::predicate
struct pm_node * predicate
UntilNode#predicate.
Definition ast.h:4352
pm_when_node
WhenNode.
Definition ast.h:4365
pm_when_node::statements
struct pm_statements_node * statements
WhenNode#statements.
Definition ast.h:4376
pm_when_node::conditions
struct pm_node_list conditions
WhenNode#conditions.
Definition ast.h:4373
pm_while_node
WhileNode.
Definition ast.h:4388
pm_while_node::statements
struct pm_statements_node * statements
WhileNode#statements.
Definition ast.h:4402
pm_while_node::predicate
struct pm_node * predicate
WhileNode#predicate.
Definition ast.h:4399
pm_x_string_node
XStringNode.
Definition ast.h:4415
pm_x_string_node::unescaped
pm_string_t unescaped
XStringNode#unescaped.
Definition ast.h:4429
pm_yield_node
YieldNode.
Definition ast.h:4439
pm_yield_node::arguments
struct pm_arguments_node * arguments
YieldNode#arguments.
Definition ast.h:4450