Ruby  3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
prettyprint.c
1 /*----------------------------------------------------------------------------*/
2 /* This file is generated by the templates/template.rb script and should not */
3 /* be modified manually. See */
4 /* templates/src/prettyprint.c.erb */
5 /* if you are looking to modify the */
6 /* template */
7 /*----------------------------------------------------------------------------*/
8 
9 #include "prism/prettyprint.h"
10 
11 // We optionally support pretty printing nodes. For systems that don't want or
12 // need this functionality, it can be turned off with the
13 // PRISM_EXCLUDE_PRETTYPRINT define.
14 #ifdef PRISM_EXCLUDE_PRETTYPRINT
15 
16 void pm_prettyprint(void) {}
17 
18 #else
19 
20 static inline void
21 prettyprint_location(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_location_t *location) {
22  pm_line_column_t start = pm_newline_list_line_column(&parser->newline_list, location->start, parser->start_line);
23  pm_line_column_t end = pm_newline_list_line_column(&parser->newline_list, location->end, parser->start_line);
24  pm_buffer_append_format(output_buffer, "(%" PRIi32 ",%" PRIu32 ")-(%" PRIi32 ",%" PRIu32 ")", start.line, start.column, end.line, end.column);
25 }
26 
27 static inline void
28 prettyprint_constant(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_constant_id_t constant_id) {
29  pm_constant_t *constant = pm_constant_pool_id_to_constant(&parser->constant_pool, constant_id);
30  pm_buffer_append_format(output_buffer, ":%.*s", (int) constant->length, constant->start);
31 }
32 
33 static void
34 prettyprint_node(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node, pm_buffer_t *prefix_buffer) {
35  switch (PM_NODE_TYPE(node)) {
36  case PM_SCOPE_NODE:
37  // We do not need to print a ScopeNode as it's not part of the AST.
38  return;
41  pm_buffer_append_string(output_buffer, "@ AliasGlobalVariableNode (location: ", 37);
42  prettyprint_location(output_buffer, parser, &node->location);
43  pm_buffer_append_string(output_buffer, ")\n", 2);
44 
45  // new_name
46  {
47  pm_buffer_concat(output_buffer, prefix_buffer);
48  pm_buffer_append_string(output_buffer, "+-- new_name:", 13);
49  pm_buffer_append_byte(output_buffer, '\n');
50 
51  size_t prefix_length = prefix_buffer->length;
52  pm_buffer_append_string(prefix_buffer, "| ", 4);
53  pm_buffer_concat(output_buffer, prefix_buffer);
54  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->new_name, prefix_buffer);
55  prefix_buffer->length = prefix_length;
56  }
57 
58  // old_name
59  {
60  pm_buffer_concat(output_buffer, prefix_buffer);
61  pm_buffer_append_string(output_buffer, "+-- old_name:", 13);
62  pm_buffer_append_byte(output_buffer, '\n');
63 
64  size_t prefix_length = prefix_buffer->length;
65  pm_buffer_append_string(prefix_buffer, "| ", 4);
66  pm_buffer_concat(output_buffer, prefix_buffer);
67  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->old_name, prefix_buffer);
68  prefix_buffer->length = prefix_length;
69  }
70 
71  // keyword_loc
72  {
73  pm_buffer_concat(output_buffer, prefix_buffer);
74  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
75  pm_location_t *location = &cast->keyword_loc;
76  pm_buffer_append_byte(output_buffer, ' ');
77  prettyprint_location(output_buffer, parser, location);
78  pm_buffer_append_string(output_buffer, " = \"", 4);
79  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
80  pm_buffer_append_string(output_buffer, "\"\n", 2);
81  }
82 
83  break;
84  }
85  case PM_ALIAS_METHOD_NODE: {
87  pm_buffer_append_string(output_buffer, "@ AliasMethodNode (location: ", 29);
88  prettyprint_location(output_buffer, parser, &node->location);
89  pm_buffer_append_string(output_buffer, ")\n", 2);
90 
91  // new_name
92  {
93  pm_buffer_concat(output_buffer, prefix_buffer);
94  pm_buffer_append_string(output_buffer, "+-- new_name:", 13);
95  pm_buffer_append_byte(output_buffer, '\n');
96 
97  size_t prefix_length = prefix_buffer->length;
98  pm_buffer_append_string(prefix_buffer, "| ", 4);
99  pm_buffer_concat(output_buffer, prefix_buffer);
100  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->new_name, prefix_buffer);
101  prefix_buffer->length = prefix_length;
102  }
103 
104  // old_name
105  {
106  pm_buffer_concat(output_buffer, prefix_buffer);
107  pm_buffer_append_string(output_buffer, "+-- old_name:", 13);
108  pm_buffer_append_byte(output_buffer, '\n');
109 
110  size_t prefix_length = prefix_buffer->length;
111  pm_buffer_append_string(prefix_buffer, "| ", 4);
112  pm_buffer_concat(output_buffer, prefix_buffer);
113  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->old_name, prefix_buffer);
114  prefix_buffer->length = prefix_length;
115  }
116 
117  // keyword_loc
118  {
119  pm_buffer_concat(output_buffer, prefix_buffer);
120  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
121  pm_location_t *location = &cast->keyword_loc;
122  pm_buffer_append_byte(output_buffer, ' ');
123  prettyprint_location(output_buffer, parser, location);
124  pm_buffer_append_string(output_buffer, " = \"", 4);
125  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
126  pm_buffer_append_string(output_buffer, "\"\n", 2);
127  }
128 
129  break;
130  }
133  pm_buffer_append_string(output_buffer, "@ AlternationPatternNode (location: ", 36);
134  prettyprint_location(output_buffer, parser, &node->location);
135  pm_buffer_append_string(output_buffer, ")\n", 2);
136 
137  // left
138  {
139  pm_buffer_concat(output_buffer, prefix_buffer);
140  pm_buffer_append_string(output_buffer, "+-- left:", 9);
141  pm_buffer_append_byte(output_buffer, '\n');
142 
143  size_t prefix_length = prefix_buffer->length;
144  pm_buffer_append_string(prefix_buffer, "| ", 4);
145  pm_buffer_concat(output_buffer, prefix_buffer);
146  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->left, prefix_buffer);
147  prefix_buffer->length = prefix_length;
148  }
149 
150  // right
151  {
152  pm_buffer_concat(output_buffer, prefix_buffer);
153  pm_buffer_append_string(output_buffer, "+-- right:", 10);
154  pm_buffer_append_byte(output_buffer, '\n');
155 
156  size_t prefix_length = prefix_buffer->length;
157  pm_buffer_append_string(prefix_buffer, "| ", 4);
158  pm_buffer_concat(output_buffer, prefix_buffer);
159  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->right, prefix_buffer);
160  prefix_buffer->length = prefix_length;
161  }
162 
163  // operator_loc
164  {
165  pm_buffer_concat(output_buffer, prefix_buffer);
166  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
167  pm_location_t *location = &cast->operator_loc;
168  pm_buffer_append_byte(output_buffer, ' ');
169  prettyprint_location(output_buffer, parser, location);
170  pm_buffer_append_string(output_buffer, " = \"", 4);
171  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
172  pm_buffer_append_string(output_buffer, "\"\n", 2);
173  }
174 
175  break;
176  }
177  case PM_AND_NODE: {
178  pm_and_node_t *cast = (pm_and_node_t *) node;
179  pm_buffer_append_string(output_buffer, "@ AndNode (location: ", 21);
180  prettyprint_location(output_buffer, parser, &node->location);
181  pm_buffer_append_string(output_buffer, ")\n", 2);
182 
183  // left
184  {
185  pm_buffer_concat(output_buffer, prefix_buffer);
186  pm_buffer_append_string(output_buffer, "+-- left:", 9);
187  pm_buffer_append_byte(output_buffer, '\n');
188 
189  size_t prefix_length = prefix_buffer->length;
190  pm_buffer_append_string(prefix_buffer, "| ", 4);
191  pm_buffer_concat(output_buffer, prefix_buffer);
192  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->left, prefix_buffer);
193  prefix_buffer->length = prefix_length;
194  }
195 
196  // right
197  {
198  pm_buffer_concat(output_buffer, prefix_buffer);
199  pm_buffer_append_string(output_buffer, "+-- right:", 10);
200  pm_buffer_append_byte(output_buffer, '\n');
201 
202  size_t prefix_length = prefix_buffer->length;
203  pm_buffer_append_string(prefix_buffer, "| ", 4);
204  pm_buffer_concat(output_buffer, prefix_buffer);
205  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->right, prefix_buffer);
206  prefix_buffer->length = prefix_length;
207  }
208 
209  // operator_loc
210  {
211  pm_buffer_concat(output_buffer, prefix_buffer);
212  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
213  pm_location_t *location = &cast->operator_loc;
214  pm_buffer_append_byte(output_buffer, ' ');
215  prettyprint_location(output_buffer, parser, location);
216  pm_buffer_append_string(output_buffer, " = \"", 4);
217  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
218  pm_buffer_append_string(output_buffer, "\"\n", 2);
219  }
220 
221  break;
222  }
223  case PM_ARGUMENTS_NODE: {
224  pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
225  pm_buffer_append_string(output_buffer, "@ ArgumentsNode (location: ", 27);
226  prettyprint_location(output_buffer, parser, &node->location);
227  pm_buffer_append_string(output_buffer, ")\n", 2);
228 
229  // ArgumentsNodeFlags
230  {
231  pm_buffer_concat(output_buffer, prefix_buffer);
232  pm_buffer_append_string(output_buffer, "+-- ArgumentsNodeFlags:", 23);
233  bool found = false;
235  if (found) pm_buffer_append_byte(output_buffer, ',');
236  pm_buffer_append_string(output_buffer, " contains_forwarding", 20);
237  found = true;
238  }
240  if (found) pm_buffer_append_byte(output_buffer, ',');
241  pm_buffer_append_string(output_buffer, " contains_keywords", 18);
242  found = true;
243  }
245  if (found) pm_buffer_append_byte(output_buffer, ',');
246  pm_buffer_append_string(output_buffer, " contains_keyword_splat", 23);
247  found = true;
248  }
250  if (found) pm_buffer_append_byte(output_buffer, ',');
251  pm_buffer_append_string(output_buffer, " contains_splat", 15);
252  found = true;
253  }
255  if (found) pm_buffer_append_byte(output_buffer, ',');
256  pm_buffer_append_string(output_buffer, " contains_multiple_splats", 25);
257  found = true;
258  }
259  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
260  pm_buffer_append_byte(output_buffer, '\n');
261  }
262 
263  // arguments
264  {
265  pm_buffer_concat(output_buffer, prefix_buffer);
266  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
267  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->arguments.size));
268 
269  size_t last_index = cast->arguments.size;
270  for (uint32_t index = 0; index < last_index; index++) {
271  size_t prefix_length = prefix_buffer->length;
272  pm_buffer_append_string(prefix_buffer, " ", 4);
273  pm_buffer_concat(output_buffer, prefix_buffer);
274  pm_buffer_append_string(output_buffer, "+-- ", 4);
275  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
276  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments.nodes[index], prefix_buffer);
277  prefix_buffer->length = prefix_length;
278  }
279  }
280 
281  break;
282  }
283  case PM_ARRAY_NODE: {
284  pm_array_node_t *cast = (pm_array_node_t *) node;
285  pm_buffer_append_string(output_buffer, "@ ArrayNode (location: ", 23);
286  prettyprint_location(output_buffer, parser, &node->location);
287  pm_buffer_append_string(output_buffer, ")\n", 2);
288 
289  // ArrayNodeFlags
290  {
291  pm_buffer_concat(output_buffer, prefix_buffer);
292  pm_buffer_append_string(output_buffer, "+-- ArrayNodeFlags:", 19);
293  bool found = false;
295  if (found) pm_buffer_append_byte(output_buffer, ',');
296  pm_buffer_append_string(output_buffer, " contains_splat", 15);
297  found = true;
298  }
299  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
300  pm_buffer_append_byte(output_buffer, '\n');
301  }
302 
303  // elements
304  {
305  pm_buffer_concat(output_buffer, prefix_buffer);
306  pm_buffer_append_string(output_buffer, "+-- elements:", 13);
307  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->elements.size));
308 
309  size_t last_index = cast->elements.size;
310  for (uint32_t index = 0; index < last_index; index++) {
311  size_t prefix_length = prefix_buffer->length;
312  pm_buffer_append_string(prefix_buffer, "| ", 4);
313  pm_buffer_concat(output_buffer, prefix_buffer);
314  pm_buffer_append_string(output_buffer, "+-- ", 4);
315  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
316  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->elements.nodes[index], prefix_buffer);
317  prefix_buffer->length = prefix_length;
318  }
319  }
320 
321  // opening_loc
322  {
323  pm_buffer_concat(output_buffer, prefix_buffer);
324  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
325  pm_location_t *location = &cast->opening_loc;
326  if (location->start == NULL) {
327  pm_buffer_append_string(output_buffer, " nil\n", 5);
328  } else {
329  pm_buffer_append_byte(output_buffer, ' ');
330  prettyprint_location(output_buffer, parser, location);
331  pm_buffer_append_string(output_buffer, " = \"", 4);
332  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
333  pm_buffer_append_string(output_buffer, "\"\n", 2);
334  }
335  }
336 
337  // closing_loc
338  {
339  pm_buffer_concat(output_buffer, prefix_buffer);
340  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
341  pm_location_t *location = &cast->closing_loc;
342  if (location->start == NULL) {
343  pm_buffer_append_string(output_buffer, " nil\n", 5);
344  } else {
345  pm_buffer_append_byte(output_buffer, ' ');
346  prettyprint_location(output_buffer, parser, location);
347  pm_buffer_append_string(output_buffer, " = \"", 4);
348  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
349  pm_buffer_append_string(output_buffer, "\"\n", 2);
350  }
351  }
352 
353  break;
354  }
355  case PM_ARRAY_PATTERN_NODE: {
357  pm_buffer_append_string(output_buffer, "@ ArrayPatternNode (location: ", 30);
358  prettyprint_location(output_buffer, parser, &node->location);
359  pm_buffer_append_string(output_buffer, ")\n", 2);
360 
361  // constant
362  {
363  pm_buffer_concat(output_buffer, prefix_buffer);
364  pm_buffer_append_string(output_buffer, "+-- constant:", 13);
365  if (cast->constant == NULL) {
366  pm_buffer_append_string(output_buffer, " nil\n", 5);
367  } else {
368  pm_buffer_append_byte(output_buffer, '\n');
369 
370  size_t prefix_length = prefix_buffer->length;
371  pm_buffer_append_string(prefix_buffer, "| ", 4);
372  pm_buffer_concat(output_buffer, prefix_buffer);
373  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->constant, prefix_buffer);
374  prefix_buffer->length = prefix_length;
375  }
376  }
377 
378  // requireds
379  {
380  pm_buffer_concat(output_buffer, prefix_buffer);
381  pm_buffer_append_string(output_buffer, "+-- requireds:", 14);
382  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->requireds.size));
383 
384  size_t last_index = cast->requireds.size;
385  for (uint32_t index = 0; index < last_index; index++) {
386  size_t prefix_length = prefix_buffer->length;
387  pm_buffer_append_string(prefix_buffer, "| ", 4);
388  pm_buffer_concat(output_buffer, prefix_buffer);
389  pm_buffer_append_string(output_buffer, "+-- ", 4);
390  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
391  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->requireds.nodes[index], prefix_buffer);
392  prefix_buffer->length = prefix_length;
393  }
394  }
395 
396  // rest
397  {
398  pm_buffer_concat(output_buffer, prefix_buffer);
399  pm_buffer_append_string(output_buffer, "+-- rest:", 9);
400  if (cast->rest == NULL) {
401  pm_buffer_append_string(output_buffer, " nil\n", 5);
402  } else {
403  pm_buffer_append_byte(output_buffer, '\n');
404 
405  size_t prefix_length = prefix_buffer->length;
406  pm_buffer_append_string(prefix_buffer, "| ", 4);
407  pm_buffer_concat(output_buffer, prefix_buffer);
408  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rest, prefix_buffer);
409  prefix_buffer->length = prefix_length;
410  }
411  }
412 
413  // posts
414  {
415  pm_buffer_concat(output_buffer, prefix_buffer);
416  pm_buffer_append_string(output_buffer, "+-- posts:", 10);
417  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->posts.size));
418 
419  size_t last_index = cast->posts.size;
420  for (uint32_t index = 0; index < last_index; index++) {
421  size_t prefix_length = prefix_buffer->length;
422  pm_buffer_append_string(prefix_buffer, "| ", 4);
423  pm_buffer_concat(output_buffer, prefix_buffer);
424  pm_buffer_append_string(output_buffer, "+-- ", 4);
425  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
426  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->posts.nodes[index], prefix_buffer);
427  prefix_buffer->length = prefix_length;
428  }
429  }
430 
431  // opening_loc
432  {
433  pm_buffer_concat(output_buffer, prefix_buffer);
434  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
435  pm_location_t *location = &cast->opening_loc;
436  if (location->start == NULL) {
437  pm_buffer_append_string(output_buffer, " nil\n", 5);
438  } else {
439  pm_buffer_append_byte(output_buffer, ' ');
440  prettyprint_location(output_buffer, parser, location);
441  pm_buffer_append_string(output_buffer, " = \"", 4);
442  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
443  pm_buffer_append_string(output_buffer, "\"\n", 2);
444  }
445  }
446 
447  // closing_loc
448  {
449  pm_buffer_concat(output_buffer, prefix_buffer);
450  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
451  pm_location_t *location = &cast->closing_loc;
452  if (location->start == NULL) {
453  pm_buffer_append_string(output_buffer, " nil\n", 5);
454  } else {
455  pm_buffer_append_byte(output_buffer, ' ');
456  prettyprint_location(output_buffer, parser, location);
457  pm_buffer_append_string(output_buffer, " = \"", 4);
458  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
459  pm_buffer_append_string(output_buffer, "\"\n", 2);
460  }
461  }
462 
463  break;
464  }
465  case PM_ASSOC_NODE: {
466  pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
467  pm_buffer_append_string(output_buffer, "@ AssocNode (location: ", 23);
468  prettyprint_location(output_buffer, parser, &node->location);
469  pm_buffer_append_string(output_buffer, ")\n", 2);
470 
471  // key
472  {
473  pm_buffer_concat(output_buffer, prefix_buffer);
474  pm_buffer_append_string(output_buffer, "+-- key:", 8);
475  pm_buffer_append_byte(output_buffer, '\n');
476 
477  size_t prefix_length = prefix_buffer->length;
478  pm_buffer_append_string(prefix_buffer, "| ", 4);
479  pm_buffer_concat(output_buffer, prefix_buffer);
480  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->key, prefix_buffer);
481  prefix_buffer->length = prefix_length;
482  }
483 
484  // value
485  {
486  pm_buffer_concat(output_buffer, prefix_buffer);
487  pm_buffer_append_string(output_buffer, "+-- value:", 10);
488  pm_buffer_append_byte(output_buffer, '\n');
489 
490  size_t prefix_length = prefix_buffer->length;
491  pm_buffer_append_string(prefix_buffer, "| ", 4);
492  pm_buffer_concat(output_buffer, prefix_buffer);
493  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
494  prefix_buffer->length = prefix_length;
495  }
496 
497  // operator_loc
498  {
499  pm_buffer_concat(output_buffer, prefix_buffer);
500  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
501  pm_location_t *location = &cast->operator_loc;
502  if (location->start == NULL) {
503  pm_buffer_append_string(output_buffer, " nil\n", 5);
504  } else {
505  pm_buffer_append_byte(output_buffer, ' ');
506  prettyprint_location(output_buffer, parser, location);
507  pm_buffer_append_string(output_buffer, " = \"", 4);
508  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
509  pm_buffer_append_string(output_buffer, "\"\n", 2);
510  }
511  }
512 
513  break;
514  }
515  case PM_ASSOC_SPLAT_NODE: {
517  pm_buffer_append_string(output_buffer, "@ AssocSplatNode (location: ", 28);
518  prettyprint_location(output_buffer, parser, &node->location);
519  pm_buffer_append_string(output_buffer, ")\n", 2);
520 
521  // value
522  {
523  pm_buffer_concat(output_buffer, prefix_buffer);
524  pm_buffer_append_string(output_buffer, "+-- value:", 10);
525  if (cast->value == NULL) {
526  pm_buffer_append_string(output_buffer, " nil\n", 5);
527  } else {
528  pm_buffer_append_byte(output_buffer, '\n');
529 
530  size_t prefix_length = prefix_buffer->length;
531  pm_buffer_append_string(prefix_buffer, "| ", 4);
532  pm_buffer_concat(output_buffer, prefix_buffer);
533  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
534  prefix_buffer->length = prefix_length;
535  }
536  }
537 
538  // operator_loc
539  {
540  pm_buffer_concat(output_buffer, prefix_buffer);
541  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
542  pm_location_t *location = &cast->operator_loc;
543  pm_buffer_append_byte(output_buffer, ' ');
544  prettyprint_location(output_buffer, parser, location);
545  pm_buffer_append_string(output_buffer, " = \"", 4);
546  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
547  pm_buffer_append_string(output_buffer, "\"\n", 2);
548  }
549 
550  break;
551  }
554  pm_buffer_append_string(output_buffer, "@ BackReferenceReadNode (location: ", 35);
555  prettyprint_location(output_buffer, parser, &node->location);
556  pm_buffer_append_string(output_buffer, ")\n", 2);
557 
558  // name
559  {
560  pm_buffer_concat(output_buffer, prefix_buffer);
561  pm_buffer_append_string(output_buffer, "+-- name:", 9);
562  pm_buffer_append_byte(output_buffer, ' ');
563  prettyprint_constant(output_buffer, parser, cast->name);
564  pm_buffer_append_byte(output_buffer, '\n');
565  }
566 
567  break;
568  }
569  case PM_BEGIN_NODE: {
570  pm_begin_node_t *cast = (pm_begin_node_t *) node;
571  pm_buffer_append_string(output_buffer, "@ BeginNode (location: ", 23);
572  prettyprint_location(output_buffer, parser, &node->location);
573  pm_buffer_append_string(output_buffer, ")\n", 2);
574 
575  // begin_keyword_loc
576  {
577  pm_buffer_concat(output_buffer, prefix_buffer);
578  pm_buffer_append_string(output_buffer, "+-- begin_keyword_loc:", 22);
579  pm_location_t *location = &cast->begin_keyword_loc;
580  if (location->start == NULL) {
581  pm_buffer_append_string(output_buffer, " nil\n", 5);
582  } else {
583  pm_buffer_append_byte(output_buffer, ' ');
584  prettyprint_location(output_buffer, parser, location);
585  pm_buffer_append_string(output_buffer, " = \"", 4);
586  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
587  pm_buffer_append_string(output_buffer, "\"\n", 2);
588  }
589  }
590 
591  // statements
592  {
593  pm_buffer_concat(output_buffer, prefix_buffer);
594  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
595  if (cast->statements == NULL) {
596  pm_buffer_append_string(output_buffer, " nil\n", 5);
597  } else {
598  pm_buffer_append_byte(output_buffer, '\n');
599 
600  size_t prefix_length = prefix_buffer->length;
601  pm_buffer_append_string(prefix_buffer, "| ", 4);
602  pm_buffer_concat(output_buffer, prefix_buffer);
603  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
604  prefix_buffer->length = prefix_length;
605  }
606  }
607 
608  // rescue_clause
609  {
610  pm_buffer_concat(output_buffer, prefix_buffer);
611  pm_buffer_append_string(output_buffer, "+-- rescue_clause:", 18);
612  if (cast->rescue_clause == NULL) {
613  pm_buffer_append_string(output_buffer, " nil\n", 5);
614  } else {
615  pm_buffer_append_byte(output_buffer, '\n');
616 
617  size_t prefix_length = prefix_buffer->length;
618  pm_buffer_append_string(prefix_buffer, "| ", 4);
619  pm_buffer_concat(output_buffer, prefix_buffer);
620  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rescue_clause, prefix_buffer);
621  prefix_buffer->length = prefix_length;
622  }
623  }
624 
625  // else_clause
626  {
627  pm_buffer_concat(output_buffer, prefix_buffer);
628  pm_buffer_append_string(output_buffer, "+-- else_clause:", 16);
629  if (cast->else_clause == NULL) {
630  pm_buffer_append_string(output_buffer, " nil\n", 5);
631  } else {
632  pm_buffer_append_byte(output_buffer, '\n');
633 
634  size_t prefix_length = prefix_buffer->length;
635  pm_buffer_append_string(prefix_buffer, "| ", 4);
636  pm_buffer_concat(output_buffer, prefix_buffer);
637  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->else_clause, prefix_buffer);
638  prefix_buffer->length = prefix_length;
639  }
640  }
641 
642  // ensure_clause
643  {
644  pm_buffer_concat(output_buffer, prefix_buffer);
645  pm_buffer_append_string(output_buffer, "+-- ensure_clause:", 18);
646  if (cast->ensure_clause == NULL) {
647  pm_buffer_append_string(output_buffer, " nil\n", 5);
648  } else {
649  pm_buffer_append_byte(output_buffer, '\n');
650 
651  size_t prefix_length = prefix_buffer->length;
652  pm_buffer_append_string(prefix_buffer, "| ", 4);
653  pm_buffer_concat(output_buffer, prefix_buffer);
654  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->ensure_clause, prefix_buffer);
655  prefix_buffer->length = prefix_length;
656  }
657  }
658 
659  // end_keyword_loc
660  {
661  pm_buffer_concat(output_buffer, prefix_buffer);
662  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
663  pm_location_t *location = &cast->end_keyword_loc;
664  if (location->start == NULL) {
665  pm_buffer_append_string(output_buffer, " nil\n", 5);
666  } else {
667  pm_buffer_append_byte(output_buffer, ' ');
668  prettyprint_location(output_buffer, parser, location);
669  pm_buffer_append_string(output_buffer, " = \"", 4);
670  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
671  pm_buffer_append_string(output_buffer, "\"\n", 2);
672  }
673  }
674 
675  break;
676  }
677  case PM_BLOCK_ARGUMENT_NODE: {
679  pm_buffer_append_string(output_buffer, "@ BlockArgumentNode (location: ", 31);
680  prettyprint_location(output_buffer, parser, &node->location);
681  pm_buffer_append_string(output_buffer, ")\n", 2);
682 
683  // expression
684  {
685  pm_buffer_concat(output_buffer, prefix_buffer);
686  pm_buffer_append_string(output_buffer, "+-- expression:", 15);
687  if (cast->expression == NULL) {
688  pm_buffer_append_string(output_buffer, " nil\n", 5);
689  } else {
690  pm_buffer_append_byte(output_buffer, '\n');
691 
692  size_t prefix_length = prefix_buffer->length;
693  pm_buffer_append_string(prefix_buffer, "| ", 4);
694  pm_buffer_concat(output_buffer, prefix_buffer);
695  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->expression, prefix_buffer);
696  prefix_buffer->length = prefix_length;
697  }
698  }
699 
700  // operator_loc
701  {
702  pm_buffer_concat(output_buffer, prefix_buffer);
703  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
704  pm_location_t *location = &cast->operator_loc;
705  pm_buffer_append_byte(output_buffer, ' ');
706  prettyprint_location(output_buffer, parser, location);
707  pm_buffer_append_string(output_buffer, " = \"", 4);
708  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
709  pm_buffer_append_string(output_buffer, "\"\n", 2);
710  }
711 
712  break;
713  }
716  pm_buffer_append_string(output_buffer, "@ BlockLocalVariableNode (location: ", 36);
717  prettyprint_location(output_buffer, parser, &node->location);
718  pm_buffer_append_string(output_buffer, ")\n", 2);
719 
720  // ParameterFlags
721  {
722  pm_buffer_concat(output_buffer, prefix_buffer);
723  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
724  bool found = false;
726  if (found) pm_buffer_append_byte(output_buffer, ',');
727  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
728  found = true;
729  }
730  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
731  pm_buffer_append_byte(output_buffer, '\n');
732  }
733 
734  // name
735  {
736  pm_buffer_concat(output_buffer, prefix_buffer);
737  pm_buffer_append_string(output_buffer, "+-- name:", 9);
738  pm_buffer_append_byte(output_buffer, ' ');
739  prettyprint_constant(output_buffer, parser, cast->name);
740  pm_buffer_append_byte(output_buffer, '\n');
741  }
742 
743  break;
744  }
745  case PM_BLOCK_NODE: {
746  pm_block_node_t *cast = (pm_block_node_t *) node;
747  pm_buffer_append_string(output_buffer, "@ BlockNode (location: ", 23);
748  prettyprint_location(output_buffer, parser, &node->location);
749  pm_buffer_append_string(output_buffer, ")\n", 2);
750 
751  // locals
752  {
753  pm_buffer_concat(output_buffer, prefix_buffer);
754  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
755  pm_buffer_append_string(output_buffer, " [", 2);
756  for (uint32_t index = 0; index < cast->locals.size; index++) {
757  if (index != 0) pm_buffer_append_string(output_buffer, ", ", 2);
758  prettyprint_constant(output_buffer, parser, cast->locals.ids[index]);
759  }
760  pm_buffer_append_string(output_buffer, "]\n", 2);
761  }
762 
763  // parameters
764  {
765  pm_buffer_concat(output_buffer, prefix_buffer);
766  pm_buffer_append_string(output_buffer, "+-- parameters:", 15);
767  if (cast->parameters == NULL) {
768  pm_buffer_append_string(output_buffer, " nil\n", 5);
769  } else {
770  pm_buffer_append_byte(output_buffer, '\n');
771 
772  size_t prefix_length = prefix_buffer->length;
773  pm_buffer_append_string(prefix_buffer, "| ", 4);
774  pm_buffer_concat(output_buffer, prefix_buffer);
775  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parameters, prefix_buffer);
776  prefix_buffer->length = prefix_length;
777  }
778  }
779 
780  // body
781  {
782  pm_buffer_concat(output_buffer, prefix_buffer);
783  pm_buffer_append_string(output_buffer, "+-- body:", 9);
784  if (cast->body == NULL) {
785  pm_buffer_append_string(output_buffer, " nil\n", 5);
786  } else {
787  pm_buffer_append_byte(output_buffer, '\n');
788 
789  size_t prefix_length = prefix_buffer->length;
790  pm_buffer_append_string(prefix_buffer, "| ", 4);
791  pm_buffer_concat(output_buffer, prefix_buffer);
792  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body, prefix_buffer);
793  prefix_buffer->length = prefix_length;
794  }
795  }
796 
797  // opening_loc
798  {
799  pm_buffer_concat(output_buffer, prefix_buffer);
800  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
801  pm_location_t *location = &cast->opening_loc;
802  pm_buffer_append_byte(output_buffer, ' ');
803  prettyprint_location(output_buffer, parser, location);
804  pm_buffer_append_string(output_buffer, " = \"", 4);
805  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
806  pm_buffer_append_string(output_buffer, "\"\n", 2);
807  }
808 
809  // closing_loc
810  {
811  pm_buffer_concat(output_buffer, prefix_buffer);
812  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
813  pm_location_t *location = &cast->closing_loc;
814  pm_buffer_append_byte(output_buffer, ' ');
815  prettyprint_location(output_buffer, parser, location);
816  pm_buffer_append_string(output_buffer, " = \"", 4);
817  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
818  pm_buffer_append_string(output_buffer, "\"\n", 2);
819  }
820 
821  break;
822  }
825  pm_buffer_append_string(output_buffer, "@ BlockParameterNode (location: ", 32);
826  prettyprint_location(output_buffer, parser, &node->location);
827  pm_buffer_append_string(output_buffer, ")\n", 2);
828 
829  // ParameterFlags
830  {
831  pm_buffer_concat(output_buffer, prefix_buffer);
832  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
833  bool found = false;
835  if (found) pm_buffer_append_byte(output_buffer, ',');
836  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
837  found = true;
838  }
839  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
840  pm_buffer_append_byte(output_buffer, '\n');
841  }
842 
843  // name
844  {
845  pm_buffer_concat(output_buffer, prefix_buffer);
846  pm_buffer_append_string(output_buffer, "+-- name:", 9);
847  if (cast->name == 0) {
848  pm_buffer_append_string(output_buffer, " nil\n", 5);
849  } else {
850  pm_buffer_append_byte(output_buffer, ' ');
851  prettyprint_constant(output_buffer, parser, cast->name);
852  pm_buffer_append_byte(output_buffer, '\n');
853  }
854  }
855 
856  // name_loc
857  {
858  pm_buffer_concat(output_buffer, prefix_buffer);
859  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
860  pm_location_t *location = &cast->name_loc;
861  if (location->start == NULL) {
862  pm_buffer_append_string(output_buffer, " nil\n", 5);
863  } else {
864  pm_buffer_append_byte(output_buffer, ' ');
865  prettyprint_location(output_buffer, parser, location);
866  pm_buffer_append_string(output_buffer, " = \"", 4);
867  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
868  pm_buffer_append_string(output_buffer, "\"\n", 2);
869  }
870  }
871 
872  // operator_loc
873  {
874  pm_buffer_concat(output_buffer, prefix_buffer);
875  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
876  pm_location_t *location = &cast->operator_loc;
877  pm_buffer_append_byte(output_buffer, ' ');
878  prettyprint_location(output_buffer, parser, location);
879  pm_buffer_append_string(output_buffer, " = \"", 4);
880  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
881  pm_buffer_append_string(output_buffer, "\"\n", 2);
882  }
883 
884  break;
885  }
888  pm_buffer_append_string(output_buffer, "@ BlockParametersNode (location: ", 33);
889  prettyprint_location(output_buffer, parser, &node->location);
890  pm_buffer_append_string(output_buffer, ")\n", 2);
891 
892  // parameters
893  {
894  pm_buffer_concat(output_buffer, prefix_buffer);
895  pm_buffer_append_string(output_buffer, "+-- parameters:", 15);
896  if (cast->parameters == NULL) {
897  pm_buffer_append_string(output_buffer, " nil\n", 5);
898  } else {
899  pm_buffer_append_byte(output_buffer, '\n');
900 
901  size_t prefix_length = prefix_buffer->length;
902  pm_buffer_append_string(prefix_buffer, "| ", 4);
903  pm_buffer_concat(output_buffer, prefix_buffer);
904  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parameters, prefix_buffer);
905  prefix_buffer->length = prefix_length;
906  }
907  }
908 
909  // locals
910  {
911  pm_buffer_concat(output_buffer, prefix_buffer);
912  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
913  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->locals.size));
914 
915  size_t last_index = cast->locals.size;
916  for (uint32_t index = 0; index < last_index; index++) {
917  size_t prefix_length = prefix_buffer->length;
918  pm_buffer_append_string(prefix_buffer, "| ", 4);
919  pm_buffer_concat(output_buffer, prefix_buffer);
920  pm_buffer_append_string(output_buffer, "+-- ", 4);
921  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
922  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->locals.nodes[index], prefix_buffer);
923  prefix_buffer->length = prefix_length;
924  }
925  }
926 
927  // opening_loc
928  {
929  pm_buffer_concat(output_buffer, prefix_buffer);
930  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
931  pm_location_t *location = &cast->opening_loc;
932  if (location->start == NULL) {
933  pm_buffer_append_string(output_buffer, " nil\n", 5);
934  } else {
935  pm_buffer_append_byte(output_buffer, ' ');
936  prettyprint_location(output_buffer, parser, location);
937  pm_buffer_append_string(output_buffer, " = \"", 4);
938  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
939  pm_buffer_append_string(output_buffer, "\"\n", 2);
940  }
941  }
942 
943  // closing_loc
944  {
945  pm_buffer_concat(output_buffer, prefix_buffer);
946  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
947  pm_location_t *location = &cast->closing_loc;
948  if (location->start == NULL) {
949  pm_buffer_append_string(output_buffer, " nil\n", 5);
950  } else {
951  pm_buffer_append_byte(output_buffer, ' ');
952  prettyprint_location(output_buffer, parser, location);
953  pm_buffer_append_string(output_buffer, " = \"", 4);
954  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
955  pm_buffer_append_string(output_buffer, "\"\n", 2);
956  }
957  }
958 
959  break;
960  }
961  case PM_BREAK_NODE: {
962  pm_break_node_t *cast = (pm_break_node_t *) node;
963  pm_buffer_append_string(output_buffer, "@ BreakNode (location: ", 23);
964  prettyprint_location(output_buffer, parser, &node->location);
965  pm_buffer_append_string(output_buffer, ")\n", 2);
966 
967  // arguments
968  {
969  pm_buffer_concat(output_buffer, prefix_buffer);
970  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
971  if (cast->arguments == NULL) {
972  pm_buffer_append_string(output_buffer, " nil\n", 5);
973  } else {
974  pm_buffer_append_byte(output_buffer, '\n');
975 
976  size_t prefix_length = prefix_buffer->length;
977  pm_buffer_append_string(prefix_buffer, "| ", 4);
978  pm_buffer_concat(output_buffer, prefix_buffer);
979  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
980  prefix_buffer->length = prefix_length;
981  }
982  }
983 
984  // keyword_loc
985  {
986  pm_buffer_concat(output_buffer, prefix_buffer);
987  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
988  pm_location_t *location = &cast->keyword_loc;
989  pm_buffer_append_byte(output_buffer, ' ');
990  prettyprint_location(output_buffer, parser, location);
991  pm_buffer_append_string(output_buffer, " = \"", 4);
992  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
993  pm_buffer_append_string(output_buffer, "\"\n", 2);
994  }
995 
996  break;
997  }
998  case PM_CALL_AND_WRITE_NODE: {
1000  pm_buffer_append_string(output_buffer, "@ CallAndWriteNode (location: ", 30);
1001  prettyprint_location(output_buffer, parser, &node->location);
1002  pm_buffer_append_string(output_buffer, ")\n", 2);
1003 
1004  // CallNodeFlags
1005  {
1006  pm_buffer_concat(output_buffer, prefix_buffer);
1007  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
1008  bool found = false;
1010  if (found) pm_buffer_append_byte(output_buffer, ',');
1011  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
1012  found = true;
1013  }
1015  if (found) pm_buffer_append_byte(output_buffer, ',');
1016  pm_buffer_append_string(output_buffer, " variable_call", 14);
1017  found = true;
1018  }
1020  if (found) pm_buffer_append_byte(output_buffer, ',');
1021  pm_buffer_append_string(output_buffer, " attribute_write", 16);
1022  found = true;
1023  }
1025  if (found) pm_buffer_append_byte(output_buffer, ',');
1026  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
1027  found = true;
1028  }
1029  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
1030  pm_buffer_append_byte(output_buffer, '\n');
1031  }
1032 
1033  // receiver
1034  {
1035  pm_buffer_concat(output_buffer, prefix_buffer);
1036  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
1037  if (cast->receiver == NULL) {
1038  pm_buffer_append_string(output_buffer, " nil\n", 5);
1039  } else {
1040  pm_buffer_append_byte(output_buffer, '\n');
1041 
1042  size_t prefix_length = prefix_buffer->length;
1043  pm_buffer_append_string(prefix_buffer, "| ", 4);
1044  pm_buffer_concat(output_buffer, prefix_buffer);
1045  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
1046  prefix_buffer->length = prefix_length;
1047  }
1048  }
1049 
1050  // call_operator_loc
1051  {
1052  pm_buffer_concat(output_buffer, prefix_buffer);
1053  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
1054  pm_location_t *location = &cast->call_operator_loc;
1055  if (location->start == NULL) {
1056  pm_buffer_append_string(output_buffer, " nil\n", 5);
1057  } else {
1058  pm_buffer_append_byte(output_buffer, ' ');
1059  prettyprint_location(output_buffer, parser, location);
1060  pm_buffer_append_string(output_buffer, " = \"", 4);
1061  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1062  pm_buffer_append_string(output_buffer, "\"\n", 2);
1063  }
1064  }
1065 
1066  // message_loc
1067  {
1068  pm_buffer_concat(output_buffer, prefix_buffer);
1069  pm_buffer_append_string(output_buffer, "+-- message_loc:", 16);
1070  pm_location_t *location = &cast->message_loc;
1071  if (location->start == NULL) {
1072  pm_buffer_append_string(output_buffer, " nil\n", 5);
1073  } else {
1074  pm_buffer_append_byte(output_buffer, ' ');
1075  prettyprint_location(output_buffer, parser, location);
1076  pm_buffer_append_string(output_buffer, " = \"", 4);
1077  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1078  pm_buffer_append_string(output_buffer, "\"\n", 2);
1079  }
1080  }
1081 
1082  // read_name
1083  {
1084  pm_buffer_concat(output_buffer, prefix_buffer);
1085  pm_buffer_append_string(output_buffer, "+-- read_name:", 14);
1086  pm_buffer_append_byte(output_buffer, ' ');
1087  prettyprint_constant(output_buffer, parser, cast->read_name);
1088  pm_buffer_append_byte(output_buffer, '\n');
1089  }
1090 
1091  // write_name
1092  {
1093  pm_buffer_concat(output_buffer, prefix_buffer);
1094  pm_buffer_append_string(output_buffer, "+-- write_name:", 15);
1095  pm_buffer_append_byte(output_buffer, ' ');
1096  prettyprint_constant(output_buffer, parser, cast->write_name);
1097  pm_buffer_append_byte(output_buffer, '\n');
1098  }
1099 
1100  // operator_loc
1101  {
1102  pm_buffer_concat(output_buffer, prefix_buffer);
1103  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
1104  pm_location_t *location = &cast->operator_loc;
1105  pm_buffer_append_byte(output_buffer, ' ');
1106  prettyprint_location(output_buffer, parser, location);
1107  pm_buffer_append_string(output_buffer, " = \"", 4);
1108  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1109  pm_buffer_append_string(output_buffer, "\"\n", 2);
1110  }
1111 
1112  // value
1113  {
1114  pm_buffer_concat(output_buffer, prefix_buffer);
1115  pm_buffer_append_string(output_buffer, "+-- value:", 10);
1116  pm_buffer_append_byte(output_buffer, '\n');
1117 
1118  size_t prefix_length = prefix_buffer->length;
1119  pm_buffer_append_string(prefix_buffer, " ", 4);
1120  pm_buffer_concat(output_buffer, prefix_buffer);
1121  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
1122  prefix_buffer->length = prefix_length;
1123  }
1124 
1125  break;
1126  }
1127  case PM_CALL_NODE: {
1128  pm_call_node_t *cast = (pm_call_node_t *) node;
1129  pm_buffer_append_string(output_buffer, "@ CallNode (location: ", 22);
1130  prettyprint_location(output_buffer, parser, &node->location);
1131  pm_buffer_append_string(output_buffer, ")\n", 2);
1132 
1133  // CallNodeFlags
1134  {
1135  pm_buffer_concat(output_buffer, prefix_buffer);
1136  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
1137  bool found = false;
1139  if (found) pm_buffer_append_byte(output_buffer, ',');
1140  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
1141  found = true;
1142  }
1144  if (found) pm_buffer_append_byte(output_buffer, ',');
1145  pm_buffer_append_string(output_buffer, " variable_call", 14);
1146  found = true;
1147  }
1149  if (found) pm_buffer_append_byte(output_buffer, ',');
1150  pm_buffer_append_string(output_buffer, " attribute_write", 16);
1151  found = true;
1152  }
1154  if (found) pm_buffer_append_byte(output_buffer, ',');
1155  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
1156  found = true;
1157  }
1158  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
1159  pm_buffer_append_byte(output_buffer, '\n');
1160  }
1161 
1162  // receiver
1163  {
1164  pm_buffer_concat(output_buffer, prefix_buffer);
1165  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
1166  if (cast->receiver == NULL) {
1167  pm_buffer_append_string(output_buffer, " nil\n", 5);
1168  } else {
1169  pm_buffer_append_byte(output_buffer, '\n');
1170 
1171  size_t prefix_length = prefix_buffer->length;
1172  pm_buffer_append_string(prefix_buffer, "| ", 4);
1173  pm_buffer_concat(output_buffer, prefix_buffer);
1174  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
1175  prefix_buffer->length = prefix_length;
1176  }
1177  }
1178 
1179  // call_operator_loc
1180  {
1181  pm_buffer_concat(output_buffer, prefix_buffer);
1182  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
1183  pm_location_t *location = &cast->call_operator_loc;
1184  if (location->start == NULL) {
1185  pm_buffer_append_string(output_buffer, " nil\n", 5);
1186  } else {
1187  pm_buffer_append_byte(output_buffer, ' ');
1188  prettyprint_location(output_buffer, parser, location);
1189  pm_buffer_append_string(output_buffer, " = \"", 4);
1190  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1191  pm_buffer_append_string(output_buffer, "\"\n", 2);
1192  }
1193  }
1194 
1195  // name
1196  {
1197  pm_buffer_concat(output_buffer, prefix_buffer);
1198  pm_buffer_append_string(output_buffer, "+-- name:", 9);
1199  pm_buffer_append_byte(output_buffer, ' ');
1200  prettyprint_constant(output_buffer, parser, cast->name);
1201  pm_buffer_append_byte(output_buffer, '\n');
1202  }
1203 
1204  // message_loc
1205  {
1206  pm_buffer_concat(output_buffer, prefix_buffer);
1207  pm_buffer_append_string(output_buffer, "+-- message_loc:", 16);
1208  pm_location_t *location = &cast->message_loc;
1209  if (location->start == NULL) {
1210  pm_buffer_append_string(output_buffer, " nil\n", 5);
1211  } else {
1212  pm_buffer_append_byte(output_buffer, ' ');
1213  prettyprint_location(output_buffer, parser, location);
1214  pm_buffer_append_string(output_buffer, " = \"", 4);
1215  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1216  pm_buffer_append_string(output_buffer, "\"\n", 2);
1217  }
1218  }
1219 
1220  // opening_loc
1221  {
1222  pm_buffer_concat(output_buffer, prefix_buffer);
1223  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
1224  pm_location_t *location = &cast->opening_loc;
1225  if (location->start == NULL) {
1226  pm_buffer_append_string(output_buffer, " nil\n", 5);
1227  } else {
1228  pm_buffer_append_byte(output_buffer, ' ');
1229  prettyprint_location(output_buffer, parser, location);
1230  pm_buffer_append_string(output_buffer, " = \"", 4);
1231  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1232  pm_buffer_append_string(output_buffer, "\"\n", 2);
1233  }
1234  }
1235 
1236  // arguments
1237  {
1238  pm_buffer_concat(output_buffer, prefix_buffer);
1239  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
1240  if (cast->arguments == NULL) {
1241  pm_buffer_append_string(output_buffer, " nil\n", 5);
1242  } else {
1243  pm_buffer_append_byte(output_buffer, '\n');
1244 
1245  size_t prefix_length = prefix_buffer->length;
1246  pm_buffer_append_string(prefix_buffer, "| ", 4);
1247  pm_buffer_concat(output_buffer, prefix_buffer);
1248  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
1249  prefix_buffer->length = prefix_length;
1250  }
1251  }
1252 
1253  // closing_loc
1254  {
1255  pm_buffer_concat(output_buffer, prefix_buffer);
1256  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
1257  pm_location_t *location = &cast->closing_loc;
1258  if (location->start == NULL) {
1259  pm_buffer_append_string(output_buffer, " nil\n", 5);
1260  } else {
1261  pm_buffer_append_byte(output_buffer, ' ');
1262  prettyprint_location(output_buffer, parser, location);
1263  pm_buffer_append_string(output_buffer, " = \"", 4);
1264  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1265  pm_buffer_append_string(output_buffer, "\"\n", 2);
1266  }
1267  }
1268 
1269  // block
1270  {
1271  pm_buffer_concat(output_buffer, prefix_buffer);
1272  pm_buffer_append_string(output_buffer, "+-- block:", 10);
1273  if (cast->block == NULL) {
1274  pm_buffer_append_string(output_buffer, " nil\n", 5);
1275  } else {
1276  pm_buffer_append_byte(output_buffer, '\n');
1277 
1278  size_t prefix_length = prefix_buffer->length;
1279  pm_buffer_append_string(prefix_buffer, " ", 4);
1280  pm_buffer_concat(output_buffer, prefix_buffer);
1281  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
1282  prefix_buffer->length = prefix_length;
1283  }
1284  }
1285 
1286  break;
1287  }
1290  pm_buffer_append_string(output_buffer, "@ CallOperatorWriteNode (location: ", 35);
1291  prettyprint_location(output_buffer, parser, &node->location);
1292  pm_buffer_append_string(output_buffer, ")\n", 2);
1293 
1294  // CallNodeFlags
1295  {
1296  pm_buffer_concat(output_buffer, prefix_buffer);
1297  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
1298  bool found = false;
1300  if (found) pm_buffer_append_byte(output_buffer, ',');
1301  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
1302  found = true;
1303  }
1305  if (found) pm_buffer_append_byte(output_buffer, ',');
1306  pm_buffer_append_string(output_buffer, " variable_call", 14);
1307  found = true;
1308  }
1310  if (found) pm_buffer_append_byte(output_buffer, ',');
1311  pm_buffer_append_string(output_buffer, " attribute_write", 16);
1312  found = true;
1313  }
1315  if (found) pm_buffer_append_byte(output_buffer, ',');
1316  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
1317  found = true;
1318  }
1319  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
1320  pm_buffer_append_byte(output_buffer, '\n');
1321  }
1322 
1323  // receiver
1324  {
1325  pm_buffer_concat(output_buffer, prefix_buffer);
1326  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
1327  if (cast->receiver == NULL) {
1328  pm_buffer_append_string(output_buffer, " nil\n", 5);
1329  } else {
1330  pm_buffer_append_byte(output_buffer, '\n');
1331 
1332  size_t prefix_length = prefix_buffer->length;
1333  pm_buffer_append_string(prefix_buffer, "| ", 4);
1334  pm_buffer_concat(output_buffer, prefix_buffer);
1335  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
1336  prefix_buffer->length = prefix_length;
1337  }
1338  }
1339 
1340  // call_operator_loc
1341  {
1342  pm_buffer_concat(output_buffer, prefix_buffer);
1343  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
1344  pm_location_t *location = &cast->call_operator_loc;
1345  if (location->start == NULL) {
1346  pm_buffer_append_string(output_buffer, " nil\n", 5);
1347  } else {
1348  pm_buffer_append_byte(output_buffer, ' ');
1349  prettyprint_location(output_buffer, parser, location);
1350  pm_buffer_append_string(output_buffer, " = \"", 4);
1351  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1352  pm_buffer_append_string(output_buffer, "\"\n", 2);
1353  }
1354  }
1355 
1356  // message_loc
1357  {
1358  pm_buffer_concat(output_buffer, prefix_buffer);
1359  pm_buffer_append_string(output_buffer, "+-- message_loc:", 16);
1360  pm_location_t *location = &cast->message_loc;
1361  if (location->start == NULL) {
1362  pm_buffer_append_string(output_buffer, " nil\n", 5);
1363  } else {
1364  pm_buffer_append_byte(output_buffer, ' ');
1365  prettyprint_location(output_buffer, parser, location);
1366  pm_buffer_append_string(output_buffer, " = \"", 4);
1367  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1368  pm_buffer_append_string(output_buffer, "\"\n", 2);
1369  }
1370  }
1371 
1372  // read_name
1373  {
1374  pm_buffer_concat(output_buffer, prefix_buffer);
1375  pm_buffer_append_string(output_buffer, "+-- read_name:", 14);
1376  pm_buffer_append_byte(output_buffer, ' ');
1377  prettyprint_constant(output_buffer, parser, cast->read_name);
1378  pm_buffer_append_byte(output_buffer, '\n');
1379  }
1380 
1381  // write_name
1382  {
1383  pm_buffer_concat(output_buffer, prefix_buffer);
1384  pm_buffer_append_string(output_buffer, "+-- write_name:", 15);
1385  pm_buffer_append_byte(output_buffer, ' ');
1386  prettyprint_constant(output_buffer, parser, cast->write_name);
1387  pm_buffer_append_byte(output_buffer, '\n');
1388  }
1389 
1390  // binary_operator
1391  {
1392  pm_buffer_concat(output_buffer, prefix_buffer);
1393  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
1394  pm_buffer_append_byte(output_buffer, ' ');
1395  prettyprint_constant(output_buffer, parser, cast->binary_operator);
1396  pm_buffer_append_byte(output_buffer, '\n');
1397  }
1398 
1399  // binary_operator_loc
1400  {
1401  pm_buffer_concat(output_buffer, prefix_buffer);
1402  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
1403  pm_location_t *location = &cast->binary_operator_loc;
1404  pm_buffer_append_byte(output_buffer, ' ');
1405  prettyprint_location(output_buffer, parser, location);
1406  pm_buffer_append_string(output_buffer, " = \"", 4);
1407  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1408  pm_buffer_append_string(output_buffer, "\"\n", 2);
1409  }
1410 
1411  // value
1412  {
1413  pm_buffer_concat(output_buffer, prefix_buffer);
1414  pm_buffer_append_string(output_buffer, "+-- value:", 10);
1415  pm_buffer_append_byte(output_buffer, '\n');
1416 
1417  size_t prefix_length = prefix_buffer->length;
1418  pm_buffer_append_string(prefix_buffer, " ", 4);
1419  pm_buffer_concat(output_buffer, prefix_buffer);
1420  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
1421  prefix_buffer->length = prefix_length;
1422  }
1423 
1424  break;
1425  }
1426  case PM_CALL_OR_WRITE_NODE: {
1428  pm_buffer_append_string(output_buffer, "@ CallOrWriteNode (location: ", 29);
1429  prettyprint_location(output_buffer, parser, &node->location);
1430  pm_buffer_append_string(output_buffer, ")\n", 2);
1431 
1432  // CallNodeFlags
1433  {
1434  pm_buffer_concat(output_buffer, prefix_buffer);
1435  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
1436  bool found = false;
1438  if (found) pm_buffer_append_byte(output_buffer, ',');
1439  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
1440  found = true;
1441  }
1443  if (found) pm_buffer_append_byte(output_buffer, ',');
1444  pm_buffer_append_string(output_buffer, " variable_call", 14);
1445  found = true;
1446  }
1448  if (found) pm_buffer_append_byte(output_buffer, ',');
1449  pm_buffer_append_string(output_buffer, " attribute_write", 16);
1450  found = true;
1451  }
1453  if (found) pm_buffer_append_byte(output_buffer, ',');
1454  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
1455  found = true;
1456  }
1457  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
1458  pm_buffer_append_byte(output_buffer, '\n');
1459  }
1460 
1461  // receiver
1462  {
1463  pm_buffer_concat(output_buffer, prefix_buffer);
1464  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
1465  if (cast->receiver == NULL) {
1466  pm_buffer_append_string(output_buffer, " nil\n", 5);
1467  } else {
1468  pm_buffer_append_byte(output_buffer, '\n');
1469 
1470  size_t prefix_length = prefix_buffer->length;
1471  pm_buffer_append_string(prefix_buffer, "| ", 4);
1472  pm_buffer_concat(output_buffer, prefix_buffer);
1473  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
1474  prefix_buffer->length = prefix_length;
1475  }
1476  }
1477 
1478  // call_operator_loc
1479  {
1480  pm_buffer_concat(output_buffer, prefix_buffer);
1481  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
1482  pm_location_t *location = &cast->call_operator_loc;
1483  if (location->start == NULL) {
1484  pm_buffer_append_string(output_buffer, " nil\n", 5);
1485  } else {
1486  pm_buffer_append_byte(output_buffer, ' ');
1487  prettyprint_location(output_buffer, parser, location);
1488  pm_buffer_append_string(output_buffer, " = \"", 4);
1489  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1490  pm_buffer_append_string(output_buffer, "\"\n", 2);
1491  }
1492  }
1493 
1494  // message_loc
1495  {
1496  pm_buffer_concat(output_buffer, prefix_buffer);
1497  pm_buffer_append_string(output_buffer, "+-- message_loc:", 16);
1498  pm_location_t *location = &cast->message_loc;
1499  if (location->start == NULL) {
1500  pm_buffer_append_string(output_buffer, " nil\n", 5);
1501  } else {
1502  pm_buffer_append_byte(output_buffer, ' ');
1503  prettyprint_location(output_buffer, parser, location);
1504  pm_buffer_append_string(output_buffer, " = \"", 4);
1505  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1506  pm_buffer_append_string(output_buffer, "\"\n", 2);
1507  }
1508  }
1509 
1510  // read_name
1511  {
1512  pm_buffer_concat(output_buffer, prefix_buffer);
1513  pm_buffer_append_string(output_buffer, "+-- read_name:", 14);
1514  pm_buffer_append_byte(output_buffer, ' ');
1515  prettyprint_constant(output_buffer, parser, cast->read_name);
1516  pm_buffer_append_byte(output_buffer, '\n');
1517  }
1518 
1519  // write_name
1520  {
1521  pm_buffer_concat(output_buffer, prefix_buffer);
1522  pm_buffer_append_string(output_buffer, "+-- write_name:", 15);
1523  pm_buffer_append_byte(output_buffer, ' ');
1524  prettyprint_constant(output_buffer, parser, cast->write_name);
1525  pm_buffer_append_byte(output_buffer, '\n');
1526  }
1527 
1528  // operator_loc
1529  {
1530  pm_buffer_concat(output_buffer, prefix_buffer);
1531  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
1532  pm_location_t *location = &cast->operator_loc;
1533  pm_buffer_append_byte(output_buffer, ' ');
1534  prettyprint_location(output_buffer, parser, location);
1535  pm_buffer_append_string(output_buffer, " = \"", 4);
1536  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1537  pm_buffer_append_string(output_buffer, "\"\n", 2);
1538  }
1539 
1540  // value
1541  {
1542  pm_buffer_concat(output_buffer, prefix_buffer);
1543  pm_buffer_append_string(output_buffer, "+-- value:", 10);
1544  pm_buffer_append_byte(output_buffer, '\n');
1545 
1546  size_t prefix_length = prefix_buffer->length;
1547  pm_buffer_append_string(prefix_buffer, " ", 4);
1548  pm_buffer_concat(output_buffer, prefix_buffer);
1549  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
1550  prefix_buffer->length = prefix_length;
1551  }
1552 
1553  break;
1554  }
1555  case PM_CALL_TARGET_NODE: {
1557  pm_buffer_append_string(output_buffer, "@ CallTargetNode (location: ", 28);
1558  prettyprint_location(output_buffer, parser, &node->location);
1559  pm_buffer_append_string(output_buffer, ")\n", 2);
1560 
1561  // CallNodeFlags
1562  {
1563  pm_buffer_concat(output_buffer, prefix_buffer);
1564  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
1565  bool found = false;
1567  if (found) pm_buffer_append_byte(output_buffer, ',');
1568  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
1569  found = true;
1570  }
1572  if (found) pm_buffer_append_byte(output_buffer, ',');
1573  pm_buffer_append_string(output_buffer, " variable_call", 14);
1574  found = true;
1575  }
1577  if (found) pm_buffer_append_byte(output_buffer, ',');
1578  pm_buffer_append_string(output_buffer, " attribute_write", 16);
1579  found = true;
1580  }
1582  if (found) pm_buffer_append_byte(output_buffer, ',');
1583  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
1584  found = true;
1585  }
1586  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
1587  pm_buffer_append_byte(output_buffer, '\n');
1588  }
1589 
1590  // receiver
1591  {
1592  pm_buffer_concat(output_buffer, prefix_buffer);
1593  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
1594  pm_buffer_append_byte(output_buffer, '\n');
1595 
1596  size_t prefix_length = prefix_buffer->length;
1597  pm_buffer_append_string(prefix_buffer, "| ", 4);
1598  pm_buffer_concat(output_buffer, prefix_buffer);
1599  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
1600  prefix_buffer->length = prefix_length;
1601  }
1602 
1603  // call_operator_loc
1604  {
1605  pm_buffer_concat(output_buffer, prefix_buffer);
1606  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
1607  pm_location_t *location = &cast->call_operator_loc;
1608  pm_buffer_append_byte(output_buffer, ' ');
1609  prettyprint_location(output_buffer, parser, location);
1610  pm_buffer_append_string(output_buffer, " = \"", 4);
1611  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1612  pm_buffer_append_string(output_buffer, "\"\n", 2);
1613  }
1614 
1615  // name
1616  {
1617  pm_buffer_concat(output_buffer, prefix_buffer);
1618  pm_buffer_append_string(output_buffer, "+-- name:", 9);
1619  pm_buffer_append_byte(output_buffer, ' ');
1620  prettyprint_constant(output_buffer, parser, cast->name);
1621  pm_buffer_append_byte(output_buffer, '\n');
1622  }
1623 
1624  // message_loc
1625  {
1626  pm_buffer_concat(output_buffer, prefix_buffer);
1627  pm_buffer_append_string(output_buffer, "+-- message_loc:", 16);
1628  pm_location_t *location = &cast->message_loc;
1629  pm_buffer_append_byte(output_buffer, ' ');
1630  prettyprint_location(output_buffer, parser, location);
1631  pm_buffer_append_string(output_buffer, " = \"", 4);
1632  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1633  pm_buffer_append_string(output_buffer, "\"\n", 2);
1634  }
1635 
1636  break;
1637  }
1638  case PM_CAPTURE_PATTERN_NODE: {
1640  pm_buffer_append_string(output_buffer, "@ CapturePatternNode (location: ", 32);
1641  prettyprint_location(output_buffer, parser, &node->location);
1642  pm_buffer_append_string(output_buffer, ")\n", 2);
1643 
1644  // value
1645  {
1646  pm_buffer_concat(output_buffer, prefix_buffer);
1647  pm_buffer_append_string(output_buffer, "+-- value:", 10);
1648  pm_buffer_append_byte(output_buffer, '\n');
1649 
1650  size_t prefix_length = prefix_buffer->length;
1651  pm_buffer_append_string(prefix_buffer, "| ", 4);
1652  pm_buffer_concat(output_buffer, prefix_buffer);
1653  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
1654  prefix_buffer->length = prefix_length;
1655  }
1656 
1657  // target
1658  {
1659  pm_buffer_concat(output_buffer, prefix_buffer);
1660  pm_buffer_append_string(output_buffer, "+-- target:", 11);
1661  pm_buffer_append_byte(output_buffer, '\n');
1662 
1663  size_t prefix_length = prefix_buffer->length;
1664  pm_buffer_append_string(prefix_buffer, "| ", 4);
1665  pm_buffer_concat(output_buffer, prefix_buffer);
1666  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->target, prefix_buffer);
1667  prefix_buffer->length = prefix_length;
1668  }
1669 
1670  // operator_loc
1671  {
1672  pm_buffer_concat(output_buffer, prefix_buffer);
1673  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
1674  pm_location_t *location = &cast->operator_loc;
1675  pm_buffer_append_byte(output_buffer, ' ');
1676  prettyprint_location(output_buffer, parser, location);
1677  pm_buffer_append_string(output_buffer, " = \"", 4);
1678  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1679  pm_buffer_append_string(output_buffer, "\"\n", 2);
1680  }
1681 
1682  break;
1683  }
1684  case PM_CASE_MATCH_NODE: {
1685  pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
1686  pm_buffer_append_string(output_buffer, "@ CaseMatchNode (location: ", 27);
1687  prettyprint_location(output_buffer, parser, &node->location);
1688  pm_buffer_append_string(output_buffer, ")\n", 2);
1689 
1690  // predicate
1691  {
1692  pm_buffer_concat(output_buffer, prefix_buffer);
1693  pm_buffer_append_string(output_buffer, "+-- predicate:", 14);
1694  if (cast->predicate == NULL) {
1695  pm_buffer_append_string(output_buffer, " nil\n", 5);
1696  } else {
1697  pm_buffer_append_byte(output_buffer, '\n');
1698 
1699  size_t prefix_length = prefix_buffer->length;
1700  pm_buffer_append_string(prefix_buffer, "| ", 4);
1701  pm_buffer_concat(output_buffer, prefix_buffer);
1702  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->predicate, prefix_buffer);
1703  prefix_buffer->length = prefix_length;
1704  }
1705  }
1706 
1707  // conditions
1708  {
1709  pm_buffer_concat(output_buffer, prefix_buffer);
1710  pm_buffer_append_string(output_buffer, "+-- conditions:", 15);
1711  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->conditions.size));
1712 
1713  size_t last_index = cast->conditions.size;
1714  for (uint32_t index = 0; index < last_index; index++) {
1715  size_t prefix_length = prefix_buffer->length;
1716  pm_buffer_append_string(prefix_buffer, "| ", 4);
1717  pm_buffer_concat(output_buffer, prefix_buffer);
1718  pm_buffer_append_string(output_buffer, "+-- ", 4);
1719  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
1720  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->conditions.nodes[index], prefix_buffer);
1721  prefix_buffer->length = prefix_length;
1722  }
1723  }
1724 
1725  // else_clause
1726  {
1727  pm_buffer_concat(output_buffer, prefix_buffer);
1728  pm_buffer_append_string(output_buffer, "+-- else_clause:", 16);
1729  if (cast->else_clause == NULL) {
1730  pm_buffer_append_string(output_buffer, " nil\n", 5);
1731  } else {
1732  pm_buffer_append_byte(output_buffer, '\n');
1733 
1734  size_t prefix_length = prefix_buffer->length;
1735  pm_buffer_append_string(prefix_buffer, "| ", 4);
1736  pm_buffer_concat(output_buffer, prefix_buffer);
1737  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->else_clause, prefix_buffer);
1738  prefix_buffer->length = prefix_length;
1739  }
1740  }
1741 
1742  // case_keyword_loc
1743  {
1744  pm_buffer_concat(output_buffer, prefix_buffer);
1745  pm_buffer_append_string(output_buffer, "+-- case_keyword_loc:", 21);
1746  pm_location_t *location = &cast->case_keyword_loc;
1747  pm_buffer_append_byte(output_buffer, ' ');
1748  prettyprint_location(output_buffer, parser, location);
1749  pm_buffer_append_string(output_buffer, " = \"", 4);
1750  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1751  pm_buffer_append_string(output_buffer, "\"\n", 2);
1752  }
1753 
1754  // end_keyword_loc
1755  {
1756  pm_buffer_concat(output_buffer, prefix_buffer);
1757  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
1758  pm_location_t *location = &cast->end_keyword_loc;
1759  pm_buffer_append_byte(output_buffer, ' ');
1760  prettyprint_location(output_buffer, parser, location);
1761  pm_buffer_append_string(output_buffer, " = \"", 4);
1762  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1763  pm_buffer_append_string(output_buffer, "\"\n", 2);
1764  }
1765 
1766  break;
1767  }
1768  case PM_CASE_NODE: {
1769  pm_case_node_t *cast = (pm_case_node_t *) node;
1770  pm_buffer_append_string(output_buffer, "@ CaseNode (location: ", 22);
1771  prettyprint_location(output_buffer, parser, &node->location);
1772  pm_buffer_append_string(output_buffer, ")\n", 2);
1773 
1774  // predicate
1775  {
1776  pm_buffer_concat(output_buffer, prefix_buffer);
1777  pm_buffer_append_string(output_buffer, "+-- predicate:", 14);
1778  if (cast->predicate == NULL) {
1779  pm_buffer_append_string(output_buffer, " nil\n", 5);
1780  } else {
1781  pm_buffer_append_byte(output_buffer, '\n');
1782 
1783  size_t prefix_length = prefix_buffer->length;
1784  pm_buffer_append_string(prefix_buffer, "| ", 4);
1785  pm_buffer_concat(output_buffer, prefix_buffer);
1786  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->predicate, prefix_buffer);
1787  prefix_buffer->length = prefix_length;
1788  }
1789  }
1790 
1791  // conditions
1792  {
1793  pm_buffer_concat(output_buffer, prefix_buffer);
1794  pm_buffer_append_string(output_buffer, "+-- conditions:", 15);
1795  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->conditions.size));
1796 
1797  size_t last_index = cast->conditions.size;
1798  for (uint32_t index = 0; index < last_index; index++) {
1799  size_t prefix_length = prefix_buffer->length;
1800  pm_buffer_append_string(prefix_buffer, "| ", 4);
1801  pm_buffer_concat(output_buffer, prefix_buffer);
1802  pm_buffer_append_string(output_buffer, "+-- ", 4);
1803  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
1804  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->conditions.nodes[index], prefix_buffer);
1805  prefix_buffer->length = prefix_length;
1806  }
1807  }
1808 
1809  // else_clause
1810  {
1811  pm_buffer_concat(output_buffer, prefix_buffer);
1812  pm_buffer_append_string(output_buffer, "+-- else_clause:", 16);
1813  if (cast->else_clause == NULL) {
1814  pm_buffer_append_string(output_buffer, " nil\n", 5);
1815  } else {
1816  pm_buffer_append_byte(output_buffer, '\n');
1817 
1818  size_t prefix_length = prefix_buffer->length;
1819  pm_buffer_append_string(prefix_buffer, "| ", 4);
1820  pm_buffer_concat(output_buffer, prefix_buffer);
1821  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->else_clause, prefix_buffer);
1822  prefix_buffer->length = prefix_length;
1823  }
1824  }
1825 
1826  // case_keyword_loc
1827  {
1828  pm_buffer_concat(output_buffer, prefix_buffer);
1829  pm_buffer_append_string(output_buffer, "+-- case_keyword_loc:", 21);
1830  pm_location_t *location = &cast->case_keyword_loc;
1831  pm_buffer_append_byte(output_buffer, ' ');
1832  prettyprint_location(output_buffer, parser, location);
1833  pm_buffer_append_string(output_buffer, " = \"", 4);
1834  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1835  pm_buffer_append_string(output_buffer, "\"\n", 2);
1836  }
1837 
1838  // end_keyword_loc
1839  {
1840  pm_buffer_concat(output_buffer, prefix_buffer);
1841  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
1842  pm_location_t *location = &cast->end_keyword_loc;
1843  pm_buffer_append_byte(output_buffer, ' ');
1844  prettyprint_location(output_buffer, parser, location);
1845  pm_buffer_append_string(output_buffer, " = \"", 4);
1846  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1847  pm_buffer_append_string(output_buffer, "\"\n", 2);
1848  }
1849 
1850  break;
1851  }
1852  case PM_CLASS_NODE: {
1853  pm_class_node_t *cast = (pm_class_node_t *) node;
1854  pm_buffer_append_string(output_buffer, "@ ClassNode (location: ", 23);
1855  prettyprint_location(output_buffer, parser, &node->location);
1856  pm_buffer_append_string(output_buffer, ")\n", 2);
1857 
1858  // locals
1859  {
1860  pm_buffer_concat(output_buffer, prefix_buffer);
1861  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
1862  pm_buffer_append_string(output_buffer, " [", 2);
1863  for (uint32_t index = 0; index < cast->locals.size; index++) {
1864  if (index != 0) pm_buffer_append_string(output_buffer, ", ", 2);
1865  prettyprint_constant(output_buffer, parser, cast->locals.ids[index]);
1866  }
1867  pm_buffer_append_string(output_buffer, "]\n", 2);
1868  }
1869 
1870  // class_keyword_loc
1871  {
1872  pm_buffer_concat(output_buffer, prefix_buffer);
1873  pm_buffer_append_string(output_buffer, "+-- class_keyword_loc:", 22);
1874  pm_location_t *location = &cast->class_keyword_loc;
1875  pm_buffer_append_byte(output_buffer, ' ');
1876  prettyprint_location(output_buffer, parser, location);
1877  pm_buffer_append_string(output_buffer, " = \"", 4);
1878  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1879  pm_buffer_append_string(output_buffer, "\"\n", 2);
1880  }
1881 
1882  // constant_path
1883  {
1884  pm_buffer_concat(output_buffer, prefix_buffer);
1885  pm_buffer_append_string(output_buffer, "+-- constant_path:", 18);
1886  pm_buffer_append_byte(output_buffer, '\n');
1887 
1888  size_t prefix_length = prefix_buffer->length;
1889  pm_buffer_append_string(prefix_buffer, "| ", 4);
1890  pm_buffer_concat(output_buffer, prefix_buffer);
1891  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->constant_path, prefix_buffer);
1892  prefix_buffer->length = prefix_length;
1893  }
1894 
1895  // inheritance_operator_loc
1896  {
1897  pm_buffer_concat(output_buffer, prefix_buffer);
1898  pm_buffer_append_string(output_buffer, "+-- inheritance_operator_loc:", 29);
1899  pm_location_t *location = &cast->inheritance_operator_loc;
1900  if (location->start == NULL) {
1901  pm_buffer_append_string(output_buffer, " nil\n", 5);
1902  } else {
1903  pm_buffer_append_byte(output_buffer, ' ');
1904  prettyprint_location(output_buffer, parser, location);
1905  pm_buffer_append_string(output_buffer, " = \"", 4);
1906  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1907  pm_buffer_append_string(output_buffer, "\"\n", 2);
1908  }
1909  }
1910 
1911  // superclass
1912  {
1913  pm_buffer_concat(output_buffer, prefix_buffer);
1914  pm_buffer_append_string(output_buffer, "+-- superclass:", 15);
1915  if (cast->superclass == NULL) {
1916  pm_buffer_append_string(output_buffer, " nil\n", 5);
1917  } else {
1918  pm_buffer_append_byte(output_buffer, '\n');
1919 
1920  size_t prefix_length = prefix_buffer->length;
1921  pm_buffer_append_string(prefix_buffer, "| ", 4);
1922  pm_buffer_concat(output_buffer, prefix_buffer);
1923  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->superclass, prefix_buffer);
1924  prefix_buffer->length = prefix_length;
1925  }
1926  }
1927 
1928  // body
1929  {
1930  pm_buffer_concat(output_buffer, prefix_buffer);
1931  pm_buffer_append_string(output_buffer, "+-- body:", 9);
1932  if (cast->body == NULL) {
1933  pm_buffer_append_string(output_buffer, " nil\n", 5);
1934  } else {
1935  pm_buffer_append_byte(output_buffer, '\n');
1936 
1937  size_t prefix_length = prefix_buffer->length;
1938  pm_buffer_append_string(prefix_buffer, "| ", 4);
1939  pm_buffer_concat(output_buffer, prefix_buffer);
1940  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body, prefix_buffer);
1941  prefix_buffer->length = prefix_length;
1942  }
1943  }
1944 
1945  // end_keyword_loc
1946  {
1947  pm_buffer_concat(output_buffer, prefix_buffer);
1948  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
1949  pm_location_t *location = &cast->end_keyword_loc;
1950  pm_buffer_append_byte(output_buffer, ' ');
1951  prettyprint_location(output_buffer, parser, location);
1952  pm_buffer_append_string(output_buffer, " = \"", 4);
1953  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1954  pm_buffer_append_string(output_buffer, "\"\n", 2);
1955  }
1956 
1957  // name
1958  {
1959  pm_buffer_concat(output_buffer, prefix_buffer);
1960  pm_buffer_append_string(output_buffer, "+-- name:", 9);
1961  pm_buffer_append_byte(output_buffer, ' ');
1962  prettyprint_constant(output_buffer, parser, cast->name);
1963  pm_buffer_append_byte(output_buffer, '\n');
1964  }
1965 
1966  break;
1967  }
1970  pm_buffer_append_string(output_buffer, "@ ClassVariableAndWriteNode (location: ", 39);
1971  prettyprint_location(output_buffer, parser, &node->location);
1972  pm_buffer_append_string(output_buffer, ")\n", 2);
1973 
1974  // name
1975  {
1976  pm_buffer_concat(output_buffer, prefix_buffer);
1977  pm_buffer_append_string(output_buffer, "+-- name:", 9);
1978  pm_buffer_append_byte(output_buffer, ' ');
1979  prettyprint_constant(output_buffer, parser, cast->name);
1980  pm_buffer_append_byte(output_buffer, '\n');
1981  }
1982 
1983  // name_loc
1984  {
1985  pm_buffer_concat(output_buffer, prefix_buffer);
1986  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
1987  pm_location_t *location = &cast->name_loc;
1988  pm_buffer_append_byte(output_buffer, ' ');
1989  prettyprint_location(output_buffer, parser, location);
1990  pm_buffer_append_string(output_buffer, " = \"", 4);
1991  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
1992  pm_buffer_append_string(output_buffer, "\"\n", 2);
1993  }
1994 
1995  // operator_loc
1996  {
1997  pm_buffer_concat(output_buffer, prefix_buffer);
1998  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
1999  pm_location_t *location = &cast->operator_loc;
2000  pm_buffer_append_byte(output_buffer, ' ');
2001  prettyprint_location(output_buffer, parser, location);
2002  pm_buffer_append_string(output_buffer, " = \"", 4);
2003  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2004  pm_buffer_append_string(output_buffer, "\"\n", 2);
2005  }
2006 
2007  // value
2008  {
2009  pm_buffer_concat(output_buffer, prefix_buffer);
2010  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2011  pm_buffer_append_byte(output_buffer, '\n');
2012 
2013  size_t prefix_length = prefix_buffer->length;
2014  pm_buffer_append_string(prefix_buffer, " ", 4);
2015  pm_buffer_concat(output_buffer, prefix_buffer);
2016  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2017  prefix_buffer->length = prefix_length;
2018  }
2019 
2020  break;
2021  }
2024  pm_buffer_append_string(output_buffer, "@ ClassVariableOperatorWriteNode (location: ", 44);
2025  prettyprint_location(output_buffer, parser, &node->location);
2026  pm_buffer_append_string(output_buffer, ")\n", 2);
2027 
2028  // name
2029  {
2030  pm_buffer_concat(output_buffer, prefix_buffer);
2031  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2032  pm_buffer_append_byte(output_buffer, ' ');
2033  prettyprint_constant(output_buffer, parser, cast->name);
2034  pm_buffer_append_byte(output_buffer, '\n');
2035  }
2036 
2037  // name_loc
2038  {
2039  pm_buffer_concat(output_buffer, prefix_buffer);
2040  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2041  pm_location_t *location = &cast->name_loc;
2042  pm_buffer_append_byte(output_buffer, ' ');
2043  prettyprint_location(output_buffer, parser, location);
2044  pm_buffer_append_string(output_buffer, " = \"", 4);
2045  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2046  pm_buffer_append_string(output_buffer, "\"\n", 2);
2047  }
2048 
2049  // binary_operator_loc
2050  {
2051  pm_buffer_concat(output_buffer, prefix_buffer);
2052  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
2053  pm_location_t *location = &cast->binary_operator_loc;
2054  pm_buffer_append_byte(output_buffer, ' ');
2055  prettyprint_location(output_buffer, parser, location);
2056  pm_buffer_append_string(output_buffer, " = \"", 4);
2057  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2058  pm_buffer_append_string(output_buffer, "\"\n", 2);
2059  }
2060 
2061  // value
2062  {
2063  pm_buffer_concat(output_buffer, prefix_buffer);
2064  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2065  pm_buffer_append_byte(output_buffer, '\n');
2066 
2067  size_t prefix_length = prefix_buffer->length;
2068  pm_buffer_append_string(prefix_buffer, "| ", 4);
2069  pm_buffer_concat(output_buffer, prefix_buffer);
2070  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2071  prefix_buffer->length = prefix_length;
2072  }
2073 
2074  // binary_operator
2075  {
2076  pm_buffer_concat(output_buffer, prefix_buffer);
2077  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
2078  pm_buffer_append_byte(output_buffer, ' ');
2079  prettyprint_constant(output_buffer, parser, cast->binary_operator);
2080  pm_buffer_append_byte(output_buffer, '\n');
2081  }
2082 
2083  break;
2084  }
2087  pm_buffer_append_string(output_buffer, "@ ClassVariableOrWriteNode (location: ", 38);
2088  prettyprint_location(output_buffer, parser, &node->location);
2089  pm_buffer_append_string(output_buffer, ")\n", 2);
2090 
2091  // name
2092  {
2093  pm_buffer_concat(output_buffer, prefix_buffer);
2094  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2095  pm_buffer_append_byte(output_buffer, ' ');
2096  prettyprint_constant(output_buffer, parser, cast->name);
2097  pm_buffer_append_byte(output_buffer, '\n');
2098  }
2099 
2100  // name_loc
2101  {
2102  pm_buffer_concat(output_buffer, prefix_buffer);
2103  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2104  pm_location_t *location = &cast->name_loc;
2105  pm_buffer_append_byte(output_buffer, ' ');
2106  prettyprint_location(output_buffer, parser, location);
2107  pm_buffer_append_string(output_buffer, " = \"", 4);
2108  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2109  pm_buffer_append_string(output_buffer, "\"\n", 2);
2110  }
2111 
2112  // operator_loc
2113  {
2114  pm_buffer_concat(output_buffer, prefix_buffer);
2115  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2116  pm_location_t *location = &cast->operator_loc;
2117  pm_buffer_append_byte(output_buffer, ' ');
2118  prettyprint_location(output_buffer, parser, location);
2119  pm_buffer_append_string(output_buffer, " = \"", 4);
2120  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2121  pm_buffer_append_string(output_buffer, "\"\n", 2);
2122  }
2123 
2124  // value
2125  {
2126  pm_buffer_concat(output_buffer, prefix_buffer);
2127  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2128  pm_buffer_append_byte(output_buffer, '\n');
2129 
2130  size_t prefix_length = prefix_buffer->length;
2131  pm_buffer_append_string(prefix_buffer, " ", 4);
2132  pm_buffer_concat(output_buffer, prefix_buffer);
2133  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2134  prefix_buffer->length = prefix_length;
2135  }
2136 
2137  break;
2138  }
2141  pm_buffer_append_string(output_buffer, "@ ClassVariableReadNode (location: ", 35);
2142  prettyprint_location(output_buffer, parser, &node->location);
2143  pm_buffer_append_string(output_buffer, ")\n", 2);
2144 
2145  // name
2146  {
2147  pm_buffer_concat(output_buffer, prefix_buffer);
2148  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2149  pm_buffer_append_byte(output_buffer, ' ');
2150  prettyprint_constant(output_buffer, parser, cast->name);
2151  pm_buffer_append_byte(output_buffer, '\n');
2152  }
2153 
2154  break;
2155  }
2158  pm_buffer_append_string(output_buffer, "@ ClassVariableTargetNode (location: ", 37);
2159  prettyprint_location(output_buffer, parser, &node->location);
2160  pm_buffer_append_string(output_buffer, ")\n", 2);
2161 
2162  // name
2163  {
2164  pm_buffer_concat(output_buffer, prefix_buffer);
2165  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2166  pm_buffer_append_byte(output_buffer, ' ');
2167  prettyprint_constant(output_buffer, parser, cast->name);
2168  pm_buffer_append_byte(output_buffer, '\n');
2169  }
2170 
2171  break;
2172  }
2175  pm_buffer_append_string(output_buffer, "@ ClassVariableWriteNode (location: ", 36);
2176  prettyprint_location(output_buffer, parser, &node->location);
2177  pm_buffer_append_string(output_buffer, ")\n", 2);
2178 
2179  // name
2180  {
2181  pm_buffer_concat(output_buffer, prefix_buffer);
2182  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2183  pm_buffer_append_byte(output_buffer, ' ');
2184  prettyprint_constant(output_buffer, parser, cast->name);
2185  pm_buffer_append_byte(output_buffer, '\n');
2186  }
2187 
2188  // name_loc
2189  {
2190  pm_buffer_concat(output_buffer, prefix_buffer);
2191  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2192  pm_location_t *location = &cast->name_loc;
2193  pm_buffer_append_byte(output_buffer, ' ');
2194  prettyprint_location(output_buffer, parser, location);
2195  pm_buffer_append_string(output_buffer, " = \"", 4);
2196  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2197  pm_buffer_append_string(output_buffer, "\"\n", 2);
2198  }
2199 
2200  // value
2201  {
2202  pm_buffer_concat(output_buffer, prefix_buffer);
2203  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2204  pm_buffer_append_byte(output_buffer, '\n');
2205 
2206  size_t prefix_length = prefix_buffer->length;
2207  pm_buffer_append_string(prefix_buffer, "| ", 4);
2208  pm_buffer_concat(output_buffer, prefix_buffer);
2209  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2210  prefix_buffer->length = prefix_length;
2211  }
2212 
2213  // operator_loc
2214  {
2215  pm_buffer_concat(output_buffer, prefix_buffer);
2216  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2217  pm_location_t *location = &cast->operator_loc;
2218  pm_buffer_append_byte(output_buffer, ' ');
2219  prettyprint_location(output_buffer, parser, location);
2220  pm_buffer_append_string(output_buffer, " = \"", 4);
2221  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2222  pm_buffer_append_string(output_buffer, "\"\n", 2);
2223  }
2224 
2225  break;
2226  }
2229  pm_buffer_append_string(output_buffer, "@ ConstantAndWriteNode (location: ", 34);
2230  prettyprint_location(output_buffer, parser, &node->location);
2231  pm_buffer_append_string(output_buffer, ")\n", 2);
2232 
2233  // name
2234  {
2235  pm_buffer_concat(output_buffer, prefix_buffer);
2236  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2237  pm_buffer_append_byte(output_buffer, ' ');
2238  prettyprint_constant(output_buffer, parser, cast->name);
2239  pm_buffer_append_byte(output_buffer, '\n');
2240  }
2241 
2242  // name_loc
2243  {
2244  pm_buffer_concat(output_buffer, prefix_buffer);
2245  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2246  pm_location_t *location = &cast->name_loc;
2247  pm_buffer_append_byte(output_buffer, ' ');
2248  prettyprint_location(output_buffer, parser, location);
2249  pm_buffer_append_string(output_buffer, " = \"", 4);
2250  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2251  pm_buffer_append_string(output_buffer, "\"\n", 2);
2252  }
2253 
2254  // operator_loc
2255  {
2256  pm_buffer_concat(output_buffer, prefix_buffer);
2257  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2258  pm_location_t *location = &cast->operator_loc;
2259  pm_buffer_append_byte(output_buffer, ' ');
2260  prettyprint_location(output_buffer, parser, location);
2261  pm_buffer_append_string(output_buffer, " = \"", 4);
2262  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2263  pm_buffer_append_string(output_buffer, "\"\n", 2);
2264  }
2265 
2266  // value
2267  {
2268  pm_buffer_concat(output_buffer, prefix_buffer);
2269  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2270  pm_buffer_append_byte(output_buffer, '\n');
2271 
2272  size_t prefix_length = prefix_buffer->length;
2273  pm_buffer_append_string(prefix_buffer, " ", 4);
2274  pm_buffer_concat(output_buffer, prefix_buffer);
2275  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2276  prefix_buffer->length = prefix_length;
2277  }
2278 
2279  break;
2280  }
2283  pm_buffer_append_string(output_buffer, "@ ConstantOperatorWriteNode (location: ", 39);
2284  prettyprint_location(output_buffer, parser, &node->location);
2285  pm_buffer_append_string(output_buffer, ")\n", 2);
2286 
2287  // name
2288  {
2289  pm_buffer_concat(output_buffer, prefix_buffer);
2290  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2291  pm_buffer_append_byte(output_buffer, ' ');
2292  prettyprint_constant(output_buffer, parser, cast->name);
2293  pm_buffer_append_byte(output_buffer, '\n');
2294  }
2295 
2296  // name_loc
2297  {
2298  pm_buffer_concat(output_buffer, prefix_buffer);
2299  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2300  pm_location_t *location = &cast->name_loc;
2301  pm_buffer_append_byte(output_buffer, ' ');
2302  prettyprint_location(output_buffer, parser, location);
2303  pm_buffer_append_string(output_buffer, " = \"", 4);
2304  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2305  pm_buffer_append_string(output_buffer, "\"\n", 2);
2306  }
2307 
2308  // binary_operator_loc
2309  {
2310  pm_buffer_concat(output_buffer, prefix_buffer);
2311  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
2312  pm_location_t *location = &cast->binary_operator_loc;
2313  pm_buffer_append_byte(output_buffer, ' ');
2314  prettyprint_location(output_buffer, parser, location);
2315  pm_buffer_append_string(output_buffer, " = \"", 4);
2316  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2317  pm_buffer_append_string(output_buffer, "\"\n", 2);
2318  }
2319 
2320  // value
2321  {
2322  pm_buffer_concat(output_buffer, prefix_buffer);
2323  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2324  pm_buffer_append_byte(output_buffer, '\n');
2325 
2326  size_t prefix_length = prefix_buffer->length;
2327  pm_buffer_append_string(prefix_buffer, "| ", 4);
2328  pm_buffer_concat(output_buffer, prefix_buffer);
2329  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2330  prefix_buffer->length = prefix_length;
2331  }
2332 
2333  // binary_operator
2334  {
2335  pm_buffer_concat(output_buffer, prefix_buffer);
2336  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
2337  pm_buffer_append_byte(output_buffer, ' ');
2338  prettyprint_constant(output_buffer, parser, cast->binary_operator);
2339  pm_buffer_append_byte(output_buffer, '\n');
2340  }
2341 
2342  break;
2343  }
2346  pm_buffer_append_string(output_buffer, "@ ConstantOrWriteNode (location: ", 33);
2347  prettyprint_location(output_buffer, parser, &node->location);
2348  pm_buffer_append_string(output_buffer, ")\n", 2);
2349 
2350  // name
2351  {
2352  pm_buffer_concat(output_buffer, prefix_buffer);
2353  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2354  pm_buffer_append_byte(output_buffer, ' ');
2355  prettyprint_constant(output_buffer, parser, cast->name);
2356  pm_buffer_append_byte(output_buffer, '\n');
2357  }
2358 
2359  // name_loc
2360  {
2361  pm_buffer_concat(output_buffer, prefix_buffer);
2362  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2363  pm_location_t *location = &cast->name_loc;
2364  pm_buffer_append_byte(output_buffer, ' ');
2365  prettyprint_location(output_buffer, parser, location);
2366  pm_buffer_append_string(output_buffer, " = \"", 4);
2367  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2368  pm_buffer_append_string(output_buffer, "\"\n", 2);
2369  }
2370 
2371  // operator_loc
2372  {
2373  pm_buffer_concat(output_buffer, prefix_buffer);
2374  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2375  pm_location_t *location = &cast->operator_loc;
2376  pm_buffer_append_byte(output_buffer, ' ');
2377  prettyprint_location(output_buffer, parser, location);
2378  pm_buffer_append_string(output_buffer, " = \"", 4);
2379  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2380  pm_buffer_append_string(output_buffer, "\"\n", 2);
2381  }
2382 
2383  // value
2384  {
2385  pm_buffer_concat(output_buffer, prefix_buffer);
2386  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2387  pm_buffer_append_byte(output_buffer, '\n');
2388 
2389  size_t prefix_length = prefix_buffer->length;
2390  pm_buffer_append_string(prefix_buffer, " ", 4);
2391  pm_buffer_concat(output_buffer, prefix_buffer);
2392  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2393  prefix_buffer->length = prefix_length;
2394  }
2395 
2396  break;
2397  }
2400  pm_buffer_append_string(output_buffer, "@ ConstantPathAndWriteNode (location: ", 38);
2401  prettyprint_location(output_buffer, parser, &node->location);
2402  pm_buffer_append_string(output_buffer, ")\n", 2);
2403 
2404  // target
2405  {
2406  pm_buffer_concat(output_buffer, prefix_buffer);
2407  pm_buffer_append_string(output_buffer, "+-- target:", 11);
2408  pm_buffer_append_byte(output_buffer, '\n');
2409 
2410  size_t prefix_length = prefix_buffer->length;
2411  pm_buffer_append_string(prefix_buffer, "| ", 4);
2412  pm_buffer_concat(output_buffer, prefix_buffer);
2413  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->target, prefix_buffer);
2414  prefix_buffer->length = prefix_length;
2415  }
2416 
2417  // operator_loc
2418  {
2419  pm_buffer_concat(output_buffer, prefix_buffer);
2420  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2421  pm_location_t *location = &cast->operator_loc;
2422  pm_buffer_append_byte(output_buffer, ' ');
2423  prettyprint_location(output_buffer, parser, location);
2424  pm_buffer_append_string(output_buffer, " = \"", 4);
2425  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2426  pm_buffer_append_string(output_buffer, "\"\n", 2);
2427  }
2428 
2429  // value
2430  {
2431  pm_buffer_concat(output_buffer, prefix_buffer);
2432  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2433  pm_buffer_append_byte(output_buffer, '\n');
2434 
2435  size_t prefix_length = prefix_buffer->length;
2436  pm_buffer_append_string(prefix_buffer, " ", 4);
2437  pm_buffer_concat(output_buffer, prefix_buffer);
2438  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2439  prefix_buffer->length = prefix_length;
2440  }
2441 
2442  break;
2443  }
2444  case PM_CONSTANT_PATH_NODE: {
2446  pm_buffer_append_string(output_buffer, "@ ConstantPathNode (location: ", 30);
2447  prettyprint_location(output_buffer, parser, &node->location);
2448  pm_buffer_append_string(output_buffer, ")\n", 2);
2449 
2450  // parent
2451  {
2452  pm_buffer_concat(output_buffer, prefix_buffer);
2453  pm_buffer_append_string(output_buffer, "+-- parent:", 11);
2454  if (cast->parent == NULL) {
2455  pm_buffer_append_string(output_buffer, " nil\n", 5);
2456  } else {
2457  pm_buffer_append_byte(output_buffer, '\n');
2458 
2459  size_t prefix_length = prefix_buffer->length;
2460  pm_buffer_append_string(prefix_buffer, "| ", 4);
2461  pm_buffer_concat(output_buffer, prefix_buffer);
2462  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parent, prefix_buffer);
2463  prefix_buffer->length = prefix_length;
2464  }
2465  }
2466 
2467  // name
2468  {
2469  pm_buffer_concat(output_buffer, prefix_buffer);
2470  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2471  if (cast->name == 0) {
2472  pm_buffer_append_string(output_buffer, " nil\n", 5);
2473  } else {
2474  pm_buffer_append_byte(output_buffer, ' ');
2475  prettyprint_constant(output_buffer, parser, cast->name);
2476  pm_buffer_append_byte(output_buffer, '\n');
2477  }
2478  }
2479 
2480  // delimiter_loc
2481  {
2482  pm_buffer_concat(output_buffer, prefix_buffer);
2483  pm_buffer_append_string(output_buffer, "+-- delimiter_loc:", 18);
2484  pm_location_t *location = &cast->delimiter_loc;
2485  pm_buffer_append_byte(output_buffer, ' ');
2486  prettyprint_location(output_buffer, parser, location);
2487  pm_buffer_append_string(output_buffer, " = \"", 4);
2488  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2489  pm_buffer_append_string(output_buffer, "\"\n", 2);
2490  }
2491 
2492  // name_loc
2493  {
2494  pm_buffer_concat(output_buffer, prefix_buffer);
2495  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2496  pm_location_t *location = &cast->name_loc;
2497  pm_buffer_append_byte(output_buffer, ' ');
2498  prettyprint_location(output_buffer, parser, location);
2499  pm_buffer_append_string(output_buffer, " = \"", 4);
2500  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2501  pm_buffer_append_string(output_buffer, "\"\n", 2);
2502  }
2503 
2504  break;
2505  }
2508  pm_buffer_append_string(output_buffer, "@ ConstantPathOperatorWriteNode (location: ", 43);
2509  prettyprint_location(output_buffer, parser, &node->location);
2510  pm_buffer_append_string(output_buffer, ")\n", 2);
2511 
2512  // target
2513  {
2514  pm_buffer_concat(output_buffer, prefix_buffer);
2515  pm_buffer_append_string(output_buffer, "+-- target:", 11);
2516  pm_buffer_append_byte(output_buffer, '\n');
2517 
2518  size_t prefix_length = prefix_buffer->length;
2519  pm_buffer_append_string(prefix_buffer, "| ", 4);
2520  pm_buffer_concat(output_buffer, prefix_buffer);
2521  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->target, prefix_buffer);
2522  prefix_buffer->length = prefix_length;
2523  }
2524 
2525  // binary_operator_loc
2526  {
2527  pm_buffer_concat(output_buffer, prefix_buffer);
2528  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
2529  pm_location_t *location = &cast->binary_operator_loc;
2530  pm_buffer_append_byte(output_buffer, ' ');
2531  prettyprint_location(output_buffer, parser, location);
2532  pm_buffer_append_string(output_buffer, " = \"", 4);
2533  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2534  pm_buffer_append_string(output_buffer, "\"\n", 2);
2535  }
2536 
2537  // value
2538  {
2539  pm_buffer_concat(output_buffer, prefix_buffer);
2540  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2541  pm_buffer_append_byte(output_buffer, '\n');
2542 
2543  size_t prefix_length = prefix_buffer->length;
2544  pm_buffer_append_string(prefix_buffer, "| ", 4);
2545  pm_buffer_concat(output_buffer, prefix_buffer);
2546  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2547  prefix_buffer->length = prefix_length;
2548  }
2549 
2550  // binary_operator
2551  {
2552  pm_buffer_concat(output_buffer, prefix_buffer);
2553  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
2554  pm_buffer_append_byte(output_buffer, ' ');
2555  prettyprint_constant(output_buffer, parser, cast->binary_operator);
2556  pm_buffer_append_byte(output_buffer, '\n');
2557  }
2558 
2559  break;
2560  }
2563  pm_buffer_append_string(output_buffer, "@ ConstantPathOrWriteNode (location: ", 37);
2564  prettyprint_location(output_buffer, parser, &node->location);
2565  pm_buffer_append_string(output_buffer, ")\n", 2);
2566 
2567  // target
2568  {
2569  pm_buffer_concat(output_buffer, prefix_buffer);
2570  pm_buffer_append_string(output_buffer, "+-- target:", 11);
2571  pm_buffer_append_byte(output_buffer, '\n');
2572 
2573  size_t prefix_length = prefix_buffer->length;
2574  pm_buffer_append_string(prefix_buffer, "| ", 4);
2575  pm_buffer_concat(output_buffer, prefix_buffer);
2576  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->target, prefix_buffer);
2577  prefix_buffer->length = prefix_length;
2578  }
2579 
2580  // operator_loc
2581  {
2582  pm_buffer_concat(output_buffer, prefix_buffer);
2583  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2584  pm_location_t *location = &cast->operator_loc;
2585  pm_buffer_append_byte(output_buffer, ' ');
2586  prettyprint_location(output_buffer, parser, location);
2587  pm_buffer_append_string(output_buffer, " = \"", 4);
2588  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2589  pm_buffer_append_string(output_buffer, "\"\n", 2);
2590  }
2591 
2592  // value
2593  {
2594  pm_buffer_concat(output_buffer, prefix_buffer);
2595  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2596  pm_buffer_append_byte(output_buffer, '\n');
2597 
2598  size_t prefix_length = prefix_buffer->length;
2599  pm_buffer_append_string(prefix_buffer, " ", 4);
2600  pm_buffer_concat(output_buffer, prefix_buffer);
2601  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2602  prefix_buffer->length = prefix_length;
2603  }
2604 
2605  break;
2606  }
2609  pm_buffer_append_string(output_buffer, "@ ConstantPathTargetNode (location: ", 36);
2610  prettyprint_location(output_buffer, parser, &node->location);
2611  pm_buffer_append_string(output_buffer, ")\n", 2);
2612 
2613  // parent
2614  {
2615  pm_buffer_concat(output_buffer, prefix_buffer);
2616  pm_buffer_append_string(output_buffer, "+-- parent:", 11);
2617  if (cast->parent == NULL) {
2618  pm_buffer_append_string(output_buffer, " nil\n", 5);
2619  } else {
2620  pm_buffer_append_byte(output_buffer, '\n');
2621 
2622  size_t prefix_length = prefix_buffer->length;
2623  pm_buffer_append_string(prefix_buffer, "| ", 4);
2624  pm_buffer_concat(output_buffer, prefix_buffer);
2625  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parent, prefix_buffer);
2626  prefix_buffer->length = prefix_length;
2627  }
2628  }
2629 
2630  // name
2631  {
2632  pm_buffer_concat(output_buffer, prefix_buffer);
2633  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2634  if (cast->name == 0) {
2635  pm_buffer_append_string(output_buffer, " nil\n", 5);
2636  } else {
2637  pm_buffer_append_byte(output_buffer, ' ');
2638  prettyprint_constant(output_buffer, parser, cast->name);
2639  pm_buffer_append_byte(output_buffer, '\n');
2640  }
2641  }
2642 
2643  // delimiter_loc
2644  {
2645  pm_buffer_concat(output_buffer, prefix_buffer);
2646  pm_buffer_append_string(output_buffer, "+-- delimiter_loc:", 18);
2647  pm_location_t *location = &cast->delimiter_loc;
2648  pm_buffer_append_byte(output_buffer, ' ');
2649  prettyprint_location(output_buffer, parser, location);
2650  pm_buffer_append_string(output_buffer, " = \"", 4);
2651  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2652  pm_buffer_append_string(output_buffer, "\"\n", 2);
2653  }
2654 
2655  // name_loc
2656  {
2657  pm_buffer_concat(output_buffer, prefix_buffer);
2658  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2659  pm_location_t *location = &cast->name_loc;
2660  pm_buffer_append_byte(output_buffer, ' ');
2661  prettyprint_location(output_buffer, parser, location);
2662  pm_buffer_append_string(output_buffer, " = \"", 4);
2663  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2664  pm_buffer_append_string(output_buffer, "\"\n", 2);
2665  }
2666 
2667  break;
2668  }
2671  pm_buffer_append_string(output_buffer, "@ ConstantPathWriteNode (location: ", 35);
2672  prettyprint_location(output_buffer, parser, &node->location);
2673  pm_buffer_append_string(output_buffer, ")\n", 2);
2674 
2675  // target
2676  {
2677  pm_buffer_concat(output_buffer, prefix_buffer);
2678  pm_buffer_append_string(output_buffer, "+-- target:", 11);
2679  pm_buffer_append_byte(output_buffer, '\n');
2680 
2681  size_t prefix_length = prefix_buffer->length;
2682  pm_buffer_append_string(prefix_buffer, "| ", 4);
2683  pm_buffer_concat(output_buffer, prefix_buffer);
2684  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->target, prefix_buffer);
2685  prefix_buffer->length = prefix_length;
2686  }
2687 
2688  // operator_loc
2689  {
2690  pm_buffer_concat(output_buffer, prefix_buffer);
2691  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2692  pm_location_t *location = &cast->operator_loc;
2693  pm_buffer_append_byte(output_buffer, ' ');
2694  prettyprint_location(output_buffer, parser, location);
2695  pm_buffer_append_string(output_buffer, " = \"", 4);
2696  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2697  pm_buffer_append_string(output_buffer, "\"\n", 2);
2698  }
2699 
2700  // value
2701  {
2702  pm_buffer_concat(output_buffer, prefix_buffer);
2703  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2704  pm_buffer_append_byte(output_buffer, '\n');
2705 
2706  size_t prefix_length = prefix_buffer->length;
2707  pm_buffer_append_string(prefix_buffer, " ", 4);
2708  pm_buffer_concat(output_buffer, prefix_buffer);
2709  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2710  prefix_buffer->length = prefix_length;
2711  }
2712 
2713  break;
2714  }
2715  case PM_CONSTANT_READ_NODE: {
2717  pm_buffer_append_string(output_buffer, "@ ConstantReadNode (location: ", 30);
2718  prettyprint_location(output_buffer, parser, &node->location);
2719  pm_buffer_append_string(output_buffer, ")\n", 2);
2720 
2721  // name
2722  {
2723  pm_buffer_concat(output_buffer, prefix_buffer);
2724  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2725  pm_buffer_append_byte(output_buffer, ' ');
2726  prettyprint_constant(output_buffer, parser, cast->name);
2727  pm_buffer_append_byte(output_buffer, '\n');
2728  }
2729 
2730  break;
2731  }
2732  case PM_CONSTANT_TARGET_NODE: {
2734  pm_buffer_append_string(output_buffer, "@ ConstantTargetNode (location: ", 32);
2735  prettyprint_location(output_buffer, parser, &node->location);
2736  pm_buffer_append_string(output_buffer, ")\n", 2);
2737 
2738  // name
2739  {
2740  pm_buffer_concat(output_buffer, prefix_buffer);
2741  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2742  pm_buffer_append_byte(output_buffer, ' ');
2743  prettyprint_constant(output_buffer, parser, cast->name);
2744  pm_buffer_append_byte(output_buffer, '\n');
2745  }
2746 
2747  break;
2748  }
2749  case PM_CONSTANT_WRITE_NODE: {
2751  pm_buffer_append_string(output_buffer, "@ ConstantWriteNode (location: ", 31);
2752  prettyprint_location(output_buffer, parser, &node->location);
2753  pm_buffer_append_string(output_buffer, ")\n", 2);
2754 
2755  // name
2756  {
2757  pm_buffer_concat(output_buffer, prefix_buffer);
2758  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2759  pm_buffer_append_byte(output_buffer, ' ');
2760  prettyprint_constant(output_buffer, parser, cast->name);
2761  pm_buffer_append_byte(output_buffer, '\n');
2762  }
2763 
2764  // name_loc
2765  {
2766  pm_buffer_concat(output_buffer, prefix_buffer);
2767  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2768  pm_location_t *location = &cast->name_loc;
2769  pm_buffer_append_byte(output_buffer, ' ');
2770  prettyprint_location(output_buffer, parser, location);
2771  pm_buffer_append_string(output_buffer, " = \"", 4);
2772  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2773  pm_buffer_append_string(output_buffer, "\"\n", 2);
2774  }
2775 
2776  // value
2777  {
2778  pm_buffer_concat(output_buffer, prefix_buffer);
2779  pm_buffer_append_string(output_buffer, "+-- value:", 10);
2780  pm_buffer_append_byte(output_buffer, '\n');
2781 
2782  size_t prefix_length = prefix_buffer->length;
2783  pm_buffer_append_string(prefix_buffer, "| ", 4);
2784  pm_buffer_concat(output_buffer, prefix_buffer);
2785  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
2786  prefix_buffer->length = prefix_length;
2787  }
2788 
2789  // operator_loc
2790  {
2791  pm_buffer_concat(output_buffer, prefix_buffer);
2792  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2793  pm_location_t *location = &cast->operator_loc;
2794  pm_buffer_append_byte(output_buffer, ' ');
2795  prettyprint_location(output_buffer, parser, location);
2796  pm_buffer_append_string(output_buffer, " = \"", 4);
2797  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2798  pm_buffer_append_string(output_buffer, "\"\n", 2);
2799  }
2800 
2801  break;
2802  }
2803  case PM_DEF_NODE: {
2804  pm_def_node_t *cast = (pm_def_node_t *) node;
2805  pm_buffer_append_string(output_buffer, "@ DefNode (location: ", 21);
2806  prettyprint_location(output_buffer, parser, &node->location);
2807  pm_buffer_append_string(output_buffer, ")\n", 2);
2808 
2809  // name
2810  {
2811  pm_buffer_concat(output_buffer, prefix_buffer);
2812  pm_buffer_append_string(output_buffer, "+-- name:", 9);
2813  pm_buffer_append_byte(output_buffer, ' ');
2814  prettyprint_constant(output_buffer, parser, cast->name);
2815  pm_buffer_append_byte(output_buffer, '\n');
2816  }
2817 
2818  // name_loc
2819  {
2820  pm_buffer_concat(output_buffer, prefix_buffer);
2821  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
2822  pm_location_t *location = &cast->name_loc;
2823  pm_buffer_append_byte(output_buffer, ' ');
2824  prettyprint_location(output_buffer, parser, location);
2825  pm_buffer_append_string(output_buffer, " = \"", 4);
2826  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2827  pm_buffer_append_string(output_buffer, "\"\n", 2);
2828  }
2829 
2830  // receiver
2831  {
2832  pm_buffer_concat(output_buffer, prefix_buffer);
2833  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
2834  if (cast->receiver == NULL) {
2835  pm_buffer_append_string(output_buffer, " nil\n", 5);
2836  } else {
2837  pm_buffer_append_byte(output_buffer, '\n');
2838 
2839  size_t prefix_length = prefix_buffer->length;
2840  pm_buffer_append_string(prefix_buffer, "| ", 4);
2841  pm_buffer_concat(output_buffer, prefix_buffer);
2842  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
2843  prefix_buffer->length = prefix_length;
2844  }
2845  }
2846 
2847  // parameters
2848  {
2849  pm_buffer_concat(output_buffer, prefix_buffer);
2850  pm_buffer_append_string(output_buffer, "+-- parameters:", 15);
2851  if (cast->parameters == NULL) {
2852  pm_buffer_append_string(output_buffer, " nil\n", 5);
2853  } else {
2854  pm_buffer_append_byte(output_buffer, '\n');
2855 
2856  size_t prefix_length = prefix_buffer->length;
2857  pm_buffer_append_string(prefix_buffer, "| ", 4);
2858  pm_buffer_concat(output_buffer, prefix_buffer);
2859  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parameters, prefix_buffer);
2860  prefix_buffer->length = prefix_length;
2861  }
2862  }
2863 
2864  // body
2865  {
2866  pm_buffer_concat(output_buffer, prefix_buffer);
2867  pm_buffer_append_string(output_buffer, "+-- body:", 9);
2868  if (cast->body == NULL) {
2869  pm_buffer_append_string(output_buffer, " nil\n", 5);
2870  } else {
2871  pm_buffer_append_byte(output_buffer, '\n');
2872 
2873  size_t prefix_length = prefix_buffer->length;
2874  pm_buffer_append_string(prefix_buffer, "| ", 4);
2875  pm_buffer_concat(output_buffer, prefix_buffer);
2876  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body, prefix_buffer);
2877  prefix_buffer->length = prefix_length;
2878  }
2879  }
2880 
2881  // locals
2882  {
2883  pm_buffer_concat(output_buffer, prefix_buffer);
2884  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
2885  pm_buffer_append_string(output_buffer, " [", 2);
2886  for (uint32_t index = 0; index < cast->locals.size; index++) {
2887  if (index != 0) pm_buffer_append_string(output_buffer, ", ", 2);
2888  prettyprint_constant(output_buffer, parser, cast->locals.ids[index]);
2889  }
2890  pm_buffer_append_string(output_buffer, "]\n", 2);
2891  }
2892 
2893  // def_keyword_loc
2894  {
2895  pm_buffer_concat(output_buffer, prefix_buffer);
2896  pm_buffer_append_string(output_buffer, "+-- def_keyword_loc:", 20);
2897  pm_location_t *location = &cast->def_keyword_loc;
2898  pm_buffer_append_byte(output_buffer, ' ');
2899  prettyprint_location(output_buffer, parser, location);
2900  pm_buffer_append_string(output_buffer, " = \"", 4);
2901  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2902  pm_buffer_append_string(output_buffer, "\"\n", 2);
2903  }
2904 
2905  // operator_loc
2906  {
2907  pm_buffer_concat(output_buffer, prefix_buffer);
2908  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
2909  pm_location_t *location = &cast->operator_loc;
2910  if (location->start == NULL) {
2911  pm_buffer_append_string(output_buffer, " nil\n", 5);
2912  } else {
2913  pm_buffer_append_byte(output_buffer, ' ');
2914  prettyprint_location(output_buffer, parser, location);
2915  pm_buffer_append_string(output_buffer, " = \"", 4);
2916  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2917  pm_buffer_append_string(output_buffer, "\"\n", 2);
2918  }
2919  }
2920 
2921  // lparen_loc
2922  {
2923  pm_buffer_concat(output_buffer, prefix_buffer);
2924  pm_buffer_append_string(output_buffer, "+-- lparen_loc:", 15);
2925  pm_location_t *location = &cast->lparen_loc;
2926  if (location->start == NULL) {
2927  pm_buffer_append_string(output_buffer, " nil\n", 5);
2928  } else {
2929  pm_buffer_append_byte(output_buffer, ' ');
2930  prettyprint_location(output_buffer, parser, location);
2931  pm_buffer_append_string(output_buffer, " = \"", 4);
2932  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2933  pm_buffer_append_string(output_buffer, "\"\n", 2);
2934  }
2935  }
2936 
2937  // rparen_loc
2938  {
2939  pm_buffer_concat(output_buffer, prefix_buffer);
2940  pm_buffer_append_string(output_buffer, "+-- rparen_loc:", 15);
2941  pm_location_t *location = &cast->rparen_loc;
2942  if (location->start == NULL) {
2943  pm_buffer_append_string(output_buffer, " nil\n", 5);
2944  } else {
2945  pm_buffer_append_byte(output_buffer, ' ');
2946  prettyprint_location(output_buffer, parser, location);
2947  pm_buffer_append_string(output_buffer, " = \"", 4);
2948  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2949  pm_buffer_append_string(output_buffer, "\"\n", 2);
2950  }
2951  }
2952 
2953  // equal_loc
2954  {
2955  pm_buffer_concat(output_buffer, prefix_buffer);
2956  pm_buffer_append_string(output_buffer, "+-- equal_loc:", 14);
2957  pm_location_t *location = &cast->equal_loc;
2958  if (location->start == NULL) {
2959  pm_buffer_append_string(output_buffer, " nil\n", 5);
2960  } else {
2961  pm_buffer_append_byte(output_buffer, ' ');
2962  prettyprint_location(output_buffer, parser, location);
2963  pm_buffer_append_string(output_buffer, " = \"", 4);
2964  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2965  pm_buffer_append_string(output_buffer, "\"\n", 2);
2966  }
2967  }
2968 
2969  // end_keyword_loc
2970  {
2971  pm_buffer_concat(output_buffer, prefix_buffer);
2972  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
2973  pm_location_t *location = &cast->end_keyword_loc;
2974  if (location->start == NULL) {
2975  pm_buffer_append_string(output_buffer, " nil\n", 5);
2976  } else {
2977  pm_buffer_append_byte(output_buffer, ' ');
2978  prettyprint_location(output_buffer, parser, location);
2979  pm_buffer_append_string(output_buffer, " = \"", 4);
2980  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
2981  pm_buffer_append_string(output_buffer, "\"\n", 2);
2982  }
2983  }
2984 
2985  break;
2986  }
2987  case PM_DEFINED_NODE: {
2988  pm_defined_node_t *cast = (pm_defined_node_t *) node;
2989  pm_buffer_append_string(output_buffer, "@ DefinedNode (location: ", 25);
2990  prettyprint_location(output_buffer, parser, &node->location);
2991  pm_buffer_append_string(output_buffer, ")\n", 2);
2992 
2993  // lparen_loc
2994  {
2995  pm_buffer_concat(output_buffer, prefix_buffer);
2996  pm_buffer_append_string(output_buffer, "+-- lparen_loc:", 15);
2997  pm_location_t *location = &cast->lparen_loc;
2998  if (location->start == NULL) {
2999  pm_buffer_append_string(output_buffer, " nil\n", 5);
3000  } else {
3001  pm_buffer_append_byte(output_buffer, ' ');
3002  prettyprint_location(output_buffer, parser, location);
3003  pm_buffer_append_string(output_buffer, " = \"", 4);
3004  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3005  pm_buffer_append_string(output_buffer, "\"\n", 2);
3006  }
3007  }
3008 
3009  // value
3010  {
3011  pm_buffer_concat(output_buffer, prefix_buffer);
3012  pm_buffer_append_string(output_buffer, "+-- value:", 10);
3013  pm_buffer_append_byte(output_buffer, '\n');
3014 
3015  size_t prefix_length = prefix_buffer->length;
3016  pm_buffer_append_string(prefix_buffer, "| ", 4);
3017  pm_buffer_concat(output_buffer, prefix_buffer);
3018  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
3019  prefix_buffer->length = prefix_length;
3020  }
3021 
3022  // rparen_loc
3023  {
3024  pm_buffer_concat(output_buffer, prefix_buffer);
3025  pm_buffer_append_string(output_buffer, "+-- rparen_loc:", 15);
3026  pm_location_t *location = &cast->rparen_loc;
3027  if (location->start == NULL) {
3028  pm_buffer_append_string(output_buffer, " nil\n", 5);
3029  } else {
3030  pm_buffer_append_byte(output_buffer, ' ');
3031  prettyprint_location(output_buffer, parser, location);
3032  pm_buffer_append_string(output_buffer, " = \"", 4);
3033  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3034  pm_buffer_append_string(output_buffer, "\"\n", 2);
3035  }
3036  }
3037 
3038  // keyword_loc
3039  {
3040  pm_buffer_concat(output_buffer, prefix_buffer);
3041  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
3042  pm_location_t *location = &cast->keyword_loc;
3043  pm_buffer_append_byte(output_buffer, ' ');
3044  prettyprint_location(output_buffer, parser, location);
3045  pm_buffer_append_string(output_buffer, " = \"", 4);
3046  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3047  pm_buffer_append_string(output_buffer, "\"\n", 2);
3048  }
3049 
3050  break;
3051  }
3052  case PM_ELSE_NODE: {
3053  pm_else_node_t *cast = (pm_else_node_t *) node;
3054  pm_buffer_append_string(output_buffer, "@ ElseNode (location: ", 22);
3055  prettyprint_location(output_buffer, parser, &node->location);
3056  pm_buffer_append_string(output_buffer, ")\n", 2);
3057 
3058  // else_keyword_loc
3059  {
3060  pm_buffer_concat(output_buffer, prefix_buffer);
3061  pm_buffer_append_string(output_buffer, "+-- else_keyword_loc:", 21);
3062  pm_location_t *location = &cast->else_keyword_loc;
3063  pm_buffer_append_byte(output_buffer, ' ');
3064  prettyprint_location(output_buffer, parser, location);
3065  pm_buffer_append_string(output_buffer, " = \"", 4);
3066  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3067  pm_buffer_append_string(output_buffer, "\"\n", 2);
3068  }
3069 
3070  // statements
3071  {
3072  pm_buffer_concat(output_buffer, prefix_buffer);
3073  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
3074  if (cast->statements == NULL) {
3075  pm_buffer_append_string(output_buffer, " nil\n", 5);
3076  } else {
3077  pm_buffer_append_byte(output_buffer, '\n');
3078 
3079  size_t prefix_length = prefix_buffer->length;
3080  pm_buffer_append_string(prefix_buffer, "| ", 4);
3081  pm_buffer_concat(output_buffer, prefix_buffer);
3082  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
3083  prefix_buffer->length = prefix_length;
3084  }
3085  }
3086 
3087  // end_keyword_loc
3088  {
3089  pm_buffer_concat(output_buffer, prefix_buffer);
3090  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
3091  pm_location_t *location = &cast->end_keyword_loc;
3092  if (location->start == NULL) {
3093  pm_buffer_append_string(output_buffer, " nil\n", 5);
3094  } else {
3095  pm_buffer_append_byte(output_buffer, ' ');
3096  prettyprint_location(output_buffer, parser, location);
3097  pm_buffer_append_string(output_buffer, " = \"", 4);
3098  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3099  pm_buffer_append_string(output_buffer, "\"\n", 2);
3100  }
3101  }
3102 
3103  break;
3104  }
3107  pm_buffer_append_string(output_buffer, "@ EmbeddedStatementsNode (location: ", 36);
3108  prettyprint_location(output_buffer, parser, &node->location);
3109  pm_buffer_append_string(output_buffer, ")\n", 2);
3110 
3111  // opening_loc
3112  {
3113  pm_buffer_concat(output_buffer, prefix_buffer);
3114  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
3115  pm_location_t *location = &cast->opening_loc;
3116  pm_buffer_append_byte(output_buffer, ' ');
3117  prettyprint_location(output_buffer, parser, location);
3118  pm_buffer_append_string(output_buffer, " = \"", 4);
3119  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3120  pm_buffer_append_string(output_buffer, "\"\n", 2);
3121  }
3122 
3123  // statements
3124  {
3125  pm_buffer_concat(output_buffer, prefix_buffer);
3126  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
3127  if (cast->statements == NULL) {
3128  pm_buffer_append_string(output_buffer, " nil\n", 5);
3129  } else {
3130  pm_buffer_append_byte(output_buffer, '\n');
3131 
3132  size_t prefix_length = prefix_buffer->length;
3133  pm_buffer_append_string(prefix_buffer, "| ", 4);
3134  pm_buffer_concat(output_buffer, prefix_buffer);
3135  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
3136  prefix_buffer->length = prefix_length;
3137  }
3138  }
3139 
3140  // closing_loc
3141  {
3142  pm_buffer_concat(output_buffer, prefix_buffer);
3143  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
3144  pm_location_t *location = &cast->closing_loc;
3145  pm_buffer_append_byte(output_buffer, ' ');
3146  prettyprint_location(output_buffer, parser, location);
3147  pm_buffer_append_string(output_buffer, " = \"", 4);
3148  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3149  pm_buffer_append_string(output_buffer, "\"\n", 2);
3150  }
3151 
3152  break;
3153  }
3156  pm_buffer_append_string(output_buffer, "@ EmbeddedVariableNode (location: ", 34);
3157  prettyprint_location(output_buffer, parser, &node->location);
3158  pm_buffer_append_string(output_buffer, ")\n", 2);
3159 
3160  // operator_loc
3161  {
3162  pm_buffer_concat(output_buffer, prefix_buffer);
3163  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
3164  pm_location_t *location = &cast->operator_loc;
3165  pm_buffer_append_byte(output_buffer, ' ');
3166  prettyprint_location(output_buffer, parser, location);
3167  pm_buffer_append_string(output_buffer, " = \"", 4);
3168  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3169  pm_buffer_append_string(output_buffer, "\"\n", 2);
3170  }
3171 
3172  // variable
3173  {
3174  pm_buffer_concat(output_buffer, prefix_buffer);
3175  pm_buffer_append_string(output_buffer, "+-- variable:", 13);
3176  pm_buffer_append_byte(output_buffer, '\n');
3177 
3178  size_t prefix_length = prefix_buffer->length;
3179  pm_buffer_append_string(prefix_buffer, " ", 4);
3180  pm_buffer_concat(output_buffer, prefix_buffer);
3181  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->variable, prefix_buffer);
3182  prefix_buffer->length = prefix_length;
3183  }
3184 
3185  break;
3186  }
3187  case PM_ENSURE_NODE: {
3188  pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
3189  pm_buffer_append_string(output_buffer, "@ EnsureNode (location: ", 24);
3190  prettyprint_location(output_buffer, parser, &node->location);
3191  pm_buffer_append_string(output_buffer, ")\n", 2);
3192 
3193  // ensure_keyword_loc
3194  {
3195  pm_buffer_concat(output_buffer, prefix_buffer);
3196  pm_buffer_append_string(output_buffer, "+-- ensure_keyword_loc:", 23);
3197  pm_location_t *location = &cast->ensure_keyword_loc;
3198  pm_buffer_append_byte(output_buffer, ' ');
3199  prettyprint_location(output_buffer, parser, location);
3200  pm_buffer_append_string(output_buffer, " = \"", 4);
3201  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3202  pm_buffer_append_string(output_buffer, "\"\n", 2);
3203  }
3204 
3205  // statements
3206  {
3207  pm_buffer_concat(output_buffer, prefix_buffer);
3208  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
3209  if (cast->statements == NULL) {
3210  pm_buffer_append_string(output_buffer, " nil\n", 5);
3211  } else {
3212  pm_buffer_append_byte(output_buffer, '\n');
3213 
3214  size_t prefix_length = prefix_buffer->length;
3215  pm_buffer_append_string(prefix_buffer, "| ", 4);
3216  pm_buffer_concat(output_buffer, prefix_buffer);
3217  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
3218  prefix_buffer->length = prefix_length;
3219  }
3220  }
3221 
3222  // end_keyword_loc
3223  {
3224  pm_buffer_concat(output_buffer, prefix_buffer);
3225  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
3226  pm_location_t *location = &cast->end_keyword_loc;
3227  pm_buffer_append_byte(output_buffer, ' ');
3228  prettyprint_location(output_buffer, parser, location);
3229  pm_buffer_append_string(output_buffer, " = \"", 4);
3230  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3231  pm_buffer_append_string(output_buffer, "\"\n", 2);
3232  }
3233 
3234  break;
3235  }
3236  case PM_FALSE_NODE: {
3237  pm_buffer_append_string(output_buffer, "@ FalseNode (location: ", 23);
3238  prettyprint_location(output_buffer, parser, &node->location);
3239  pm_buffer_append_string(output_buffer, ")\n", 2);
3240 
3241  break;
3242  }
3243  case PM_FIND_PATTERN_NODE: {
3245  pm_buffer_append_string(output_buffer, "@ FindPatternNode (location: ", 29);
3246  prettyprint_location(output_buffer, parser, &node->location);
3247  pm_buffer_append_string(output_buffer, ")\n", 2);
3248 
3249  // constant
3250  {
3251  pm_buffer_concat(output_buffer, prefix_buffer);
3252  pm_buffer_append_string(output_buffer, "+-- constant:", 13);
3253  if (cast->constant == NULL) {
3254  pm_buffer_append_string(output_buffer, " nil\n", 5);
3255  } else {
3256  pm_buffer_append_byte(output_buffer, '\n');
3257 
3258  size_t prefix_length = prefix_buffer->length;
3259  pm_buffer_append_string(prefix_buffer, "| ", 4);
3260  pm_buffer_concat(output_buffer, prefix_buffer);
3261  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->constant, prefix_buffer);
3262  prefix_buffer->length = prefix_length;
3263  }
3264  }
3265 
3266  // left
3267  {
3268  pm_buffer_concat(output_buffer, prefix_buffer);
3269  pm_buffer_append_string(output_buffer, "+-- left:", 9);
3270  pm_buffer_append_byte(output_buffer, '\n');
3271 
3272  size_t prefix_length = prefix_buffer->length;
3273  pm_buffer_append_string(prefix_buffer, "| ", 4);
3274  pm_buffer_concat(output_buffer, prefix_buffer);
3275  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->left, prefix_buffer);
3276  prefix_buffer->length = prefix_length;
3277  }
3278 
3279  // requireds
3280  {
3281  pm_buffer_concat(output_buffer, prefix_buffer);
3282  pm_buffer_append_string(output_buffer, "+-- requireds:", 14);
3283  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->requireds.size));
3284 
3285  size_t last_index = cast->requireds.size;
3286  for (uint32_t index = 0; index < last_index; index++) {
3287  size_t prefix_length = prefix_buffer->length;
3288  pm_buffer_append_string(prefix_buffer, "| ", 4);
3289  pm_buffer_concat(output_buffer, prefix_buffer);
3290  pm_buffer_append_string(output_buffer, "+-- ", 4);
3291  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
3292  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->requireds.nodes[index], prefix_buffer);
3293  prefix_buffer->length = prefix_length;
3294  }
3295  }
3296 
3297  // right
3298  {
3299  pm_buffer_concat(output_buffer, prefix_buffer);
3300  pm_buffer_append_string(output_buffer, "+-- right:", 10);
3301  pm_buffer_append_byte(output_buffer, '\n');
3302 
3303  size_t prefix_length = prefix_buffer->length;
3304  pm_buffer_append_string(prefix_buffer, "| ", 4);
3305  pm_buffer_concat(output_buffer, prefix_buffer);
3306  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->right, prefix_buffer);
3307  prefix_buffer->length = prefix_length;
3308  }
3309 
3310  // opening_loc
3311  {
3312  pm_buffer_concat(output_buffer, prefix_buffer);
3313  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
3314  pm_location_t *location = &cast->opening_loc;
3315  if (location->start == NULL) {
3316  pm_buffer_append_string(output_buffer, " nil\n", 5);
3317  } else {
3318  pm_buffer_append_byte(output_buffer, ' ');
3319  prettyprint_location(output_buffer, parser, location);
3320  pm_buffer_append_string(output_buffer, " = \"", 4);
3321  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3322  pm_buffer_append_string(output_buffer, "\"\n", 2);
3323  }
3324  }
3325 
3326  // closing_loc
3327  {
3328  pm_buffer_concat(output_buffer, prefix_buffer);
3329  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
3330  pm_location_t *location = &cast->closing_loc;
3331  if (location->start == NULL) {
3332  pm_buffer_append_string(output_buffer, " nil\n", 5);
3333  } else {
3334  pm_buffer_append_byte(output_buffer, ' ');
3335  prettyprint_location(output_buffer, parser, location);
3336  pm_buffer_append_string(output_buffer, " = \"", 4);
3337  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3338  pm_buffer_append_string(output_buffer, "\"\n", 2);
3339  }
3340  }
3341 
3342  break;
3343  }
3344  case PM_FLIP_FLOP_NODE: {
3345  pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
3346  pm_buffer_append_string(output_buffer, "@ FlipFlopNode (location: ", 26);
3347  prettyprint_location(output_buffer, parser, &node->location);
3348  pm_buffer_append_string(output_buffer, ")\n", 2);
3349 
3350  // RangeFlags
3351  {
3352  pm_buffer_concat(output_buffer, prefix_buffer);
3353  pm_buffer_append_string(output_buffer, "+-- RangeFlags:", 15);
3354  bool found = false;
3355  if (cast->base.flags & PM_RANGE_FLAGS_EXCLUDE_END) {
3356  if (found) pm_buffer_append_byte(output_buffer, ',');
3357  pm_buffer_append_string(output_buffer, " exclude_end", 12);
3358  found = true;
3359  }
3360  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
3361  pm_buffer_append_byte(output_buffer, '\n');
3362  }
3363 
3364  // left
3365  {
3366  pm_buffer_concat(output_buffer, prefix_buffer);
3367  pm_buffer_append_string(output_buffer, "+-- left:", 9);
3368  if (cast->left == NULL) {
3369  pm_buffer_append_string(output_buffer, " nil\n", 5);
3370  } else {
3371  pm_buffer_append_byte(output_buffer, '\n');
3372 
3373  size_t prefix_length = prefix_buffer->length;
3374  pm_buffer_append_string(prefix_buffer, "| ", 4);
3375  pm_buffer_concat(output_buffer, prefix_buffer);
3376  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->left, prefix_buffer);
3377  prefix_buffer->length = prefix_length;
3378  }
3379  }
3380 
3381  // right
3382  {
3383  pm_buffer_concat(output_buffer, prefix_buffer);
3384  pm_buffer_append_string(output_buffer, "+-- right:", 10);
3385  if (cast->right == NULL) {
3386  pm_buffer_append_string(output_buffer, " nil\n", 5);
3387  } else {
3388  pm_buffer_append_byte(output_buffer, '\n');
3389 
3390  size_t prefix_length = prefix_buffer->length;
3391  pm_buffer_append_string(prefix_buffer, "| ", 4);
3392  pm_buffer_concat(output_buffer, prefix_buffer);
3393  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->right, prefix_buffer);
3394  prefix_buffer->length = prefix_length;
3395  }
3396  }
3397 
3398  // operator_loc
3399  {
3400  pm_buffer_concat(output_buffer, prefix_buffer);
3401  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
3402  pm_location_t *location = &cast->operator_loc;
3403  pm_buffer_append_byte(output_buffer, ' ');
3404  prettyprint_location(output_buffer, parser, location);
3405  pm_buffer_append_string(output_buffer, " = \"", 4);
3406  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3407  pm_buffer_append_string(output_buffer, "\"\n", 2);
3408  }
3409 
3410  break;
3411  }
3412  case PM_FLOAT_NODE: {
3413  pm_float_node_t *cast = (pm_float_node_t *) node;
3414  pm_buffer_append_string(output_buffer, "@ FloatNode (location: ", 23);
3415  prettyprint_location(output_buffer, parser, &node->location);
3416  pm_buffer_append_string(output_buffer, ")\n", 2);
3417 
3418  // value
3419  {
3420  pm_buffer_concat(output_buffer, prefix_buffer);
3421  pm_buffer_append_string(output_buffer, "+-- value:", 10);
3422  pm_buffer_append_format(output_buffer, " %f\n", cast->value);
3423  }
3424 
3425  break;
3426  }
3427  case PM_FOR_NODE: {
3428  pm_for_node_t *cast = (pm_for_node_t *) node;
3429  pm_buffer_append_string(output_buffer, "@ ForNode (location: ", 21);
3430  prettyprint_location(output_buffer, parser, &node->location);
3431  pm_buffer_append_string(output_buffer, ")\n", 2);
3432 
3433  // index
3434  {
3435  pm_buffer_concat(output_buffer, prefix_buffer);
3436  pm_buffer_append_string(output_buffer, "+-- index:", 10);
3437  pm_buffer_append_byte(output_buffer, '\n');
3438 
3439  size_t prefix_length = prefix_buffer->length;
3440  pm_buffer_append_string(prefix_buffer, "| ", 4);
3441  pm_buffer_concat(output_buffer, prefix_buffer);
3442  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->index, prefix_buffer);
3443  prefix_buffer->length = prefix_length;
3444  }
3445 
3446  // collection
3447  {
3448  pm_buffer_concat(output_buffer, prefix_buffer);
3449  pm_buffer_append_string(output_buffer, "+-- collection:", 15);
3450  pm_buffer_append_byte(output_buffer, '\n');
3451 
3452  size_t prefix_length = prefix_buffer->length;
3453  pm_buffer_append_string(prefix_buffer, "| ", 4);
3454  pm_buffer_concat(output_buffer, prefix_buffer);
3455  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->collection, prefix_buffer);
3456  prefix_buffer->length = prefix_length;
3457  }
3458 
3459  // statements
3460  {
3461  pm_buffer_concat(output_buffer, prefix_buffer);
3462  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
3463  if (cast->statements == NULL) {
3464  pm_buffer_append_string(output_buffer, " nil\n", 5);
3465  } else {
3466  pm_buffer_append_byte(output_buffer, '\n');
3467 
3468  size_t prefix_length = prefix_buffer->length;
3469  pm_buffer_append_string(prefix_buffer, "| ", 4);
3470  pm_buffer_concat(output_buffer, prefix_buffer);
3471  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
3472  prefix_buffer->length = prefix_length;
3473  }
3474  }
3475 
3476  // for_keyword_loc
3477  {
3478  pm_buffer_concat(output_buffer, prefix_buffer);
3479  pm_buffer_append_string(output_buffer, "+-- for_keyword_loc:", 20);
3480  pm_location_t *location = &cast->for_keyword_loc;
3481  pm_buffer_append_byte(output_buffer, ' ');
3482  prettyprint_location(output_buffer, parser, location);
3483  pm_buffer_append_string(output_buffer, " = \"", 4);
3484  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3485  pm_buffer_append_string(output_buffer, "\"\n", 2);
3486  }
3487 
3488  // in_keyword_loc
3489  {
3490  pm_buffer_concat(output_buffer, prefix_buffer);
3491  pm_buffer_append_string(output_buffer, "+-- in_keyword_loc:", 19);
3492  pm_location_t *location = &cast->in_keyword_loc;
3493  pm_buffer_append_byte(output_buffer, ' ');
3494  prettyprint_location(output_buffer, parser, location);
3495  pm_buffer_append_string(output_buffer, " = \"", 4);
3496  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3497  pm_buffer_append_string(output_buffer, "\"\n", 2);
3498  }
3499 
3500  // do_keyword_loc
3501  {
3502  pm_buffer_concat(output_buffer, prefix_buffer);
3503  pm_buffer_append_string(output_buffer, "+-- do_keyword_loc:", 19);
3504  pm_location_t *location = &cast->do_keyword_loc;
3505  if (location->start == NULL) {
3506  pm_buffer_append_string(output_buffer, " nil\n", 5);
3507  } else {
3508  pm_buffer_append_byte(output_buffer, ' ');
3509  prettyprint_location(output_buffer, parser, location);
3510  pm_buffer_append_string(output_buffer, " = \"", 4);
3511  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3512  pm_buffer_append_string(output_buffer, "\"\n", 2);
3513  }
3514  }
3515 
3516  // end_keyword_loc
3517  {
3518  pm_buffer_concat(output_buffer, prefix_buffer);
3519  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
3520  pm_location_t *location = &cast->end_keyword_loc;
3521  pm_buffer_append_byte(output_buffer, ' ');
3522  prettyprint_location(output_buffer, parser, location);
3523  pm_buffer_append_string(output_buffer, " = \"", 4);
3524  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3525  pm_buffer_append_string(output_buffer, "\"\n", 2);
3526  }
3527 
3528  break;
3529  }
3531  pm_buffer_append_string(output_buffer, "@ ForwardingArgumentsNode (location: ", 37);
3532  prettyprint_location(output_buffer, parser, &node->location);
3533  pm_buffer_append_string(output_buffer, ")\n", 2);
3534 
3535  break;
3536  }
3538  pm_buffer_append_string(output_buffer, "@ ForwardingParameterNode (location: ", 37);
3539  prettyprint_location(output_buffer, parser, &node->location);
3540  pm_buffer_append_string(output_buffer, ")\n", 2);
3541 
3542  break;
3543  }
3544  case PM_FORWARDING_SUPER_NODE: {
3546  pm_buffer_append_string(output_buffer, "@ ForwardingSuperNode (location: ", 33);
3547  prettyprint_location(output_buffer, parser, &node->location);
3548  pm_buffer_append_string(output_buffer, ")\n", 2);
3549 
3550  // block
3551  {
3552  pm_buffer_concat(output_buffer, prefix_buffer);
3553  pm_buffer_append_string(output_buffer, "+-- block:", 10);
3554  if (cast->block == NULL) {
3555  pm_buffer_append_string(output_buffer, " nil\n", 5);
3556  } else {
3557  pm_buffer_append_byte(output_buffer, '\n');
3558 
3559  size_t prefix_length = prefix_buffer->length;
3560  pm_buffer_append_string(prefix_buffer, " ", 4);
3561  pm_buffer_concat(output_buffer, prefix_buffer);
3562  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
3563  prefix_buffer->length = prefix_length;
3564  }
3565  }
3566 
3567  break;
3568  }
3571  pm_buffer_append_string(output_buffer, "@ GlobalVariableAndWriteNode (location: ", 40);
3572  prettyprint_location(output_buffer, parser, &node->location);
3573  pm_buffer_append_string(output_buffer, ")\n", 2);
3574 
3575  // name
3576  {
3577  pm_buffer_concat(output_buffer, prefix_buffer);
3578  pm_buffer_append_string(output_buffer, "+-- name:", 9);
3579  pm_buffer_append_byte(output_buffer, ' ');
3580  prettyprint_constant(output_buffer, parser, cast->name);
3581  pm_buffer_append_byte(output_buffer, '\n');
3582  }
3583 
3584  // name_loc
3585  {
3586  pm_buffer_concat(output_buffer, prefix_buffer);
3587  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
3588  pm_location_t *location = &cast->name_loc;
3589  pm_buffer_append_byte(output_buffer, ' ');
3590  prettyprint_location(output_buffer, parser, location);
3591  pm_buffer_append_string(output_buffer, " = \"", 4);
3592  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3593  pm_buffer_append_string(output_buffer, "\"\n", 2);
3594  }
3595 
3596  // operator_loc
3597  {
3598  pm_buffer_concat(output_buffer, prefix_buffer);
3599  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
3600  pm_location_t *location = &cast->operator_loc;
3601  pm_buffer_append_byte(output_buffer, ' ');
3602  prettyprint_location(output_buffer, parser, location);
3603  pm_buffer_append_string(output_buffer, " = \"", 4);
3604  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3605  pm_buffer_append_string(output_buffer, "\"\n", 2);
3606  }
3607 
3608  // value
3609  {
3610  pm_buffer_concat(output_buffer, prefix_buffer);
3611  pm_buffer_append_string(output_buffer, "+-- value:", 10);
3612  pm_buffer_append_byte(output_buffer, '\n');
3613 
3614  size_t prefix_length = prefix_buffer->length;
3615  pm_buffer_append_string(prefix_buffer, " ", 4);
3616  pm_buffer_concat(output_buffer, prefix_buffer);
3617  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
3618  prefix_buffer->length = prefix_length;
3619  }
3620 
3621  break;
3622  }
3625  pm_buffer_append_string(output_buffer, "@ GlobalVariableOperatorWriteNode (location: ", 45);
3626  prettyprint_location(output_buffer, parser, &node->location);
3627  pm_buffer_append_string(output_buffer, ")\n", 2);
3628 
3629  // name
3630  {
3631  pm_buffer_concat(output_buffer, prefix_buffer);
3632  pm_buffer_append_string(output_buffer, "+-- name:", 9);
3633  pm_buffer_append_byte(output_buffer, ' ');
3634  prettyprint_constant(output_buffer, parser, cast->name);
3635  pm_buffer_append_byte(output_buffer, '\n');
3636  }
3637 
3638  // name_loc
3639  {
3640  pm_buffer_concat(output_buffer, prefix_buffer);
3641  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
3642  pm_location_t *location = &cast->name_loc;
3643  pm_buffer_append_byte(output_buffer, ' ');
3644  prettyprint_location(output_buffer, parser, location);
3645  pm_buffer_append_string(output_buffer, " = \"", 4);
3646  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3647  pm_buffer_append_string(output_buffer, "\"\n", 2);
3648  }
3649 
3650  // binary_operator_loc
3651  {
3652  pm_buffer_concat(output_buffer, prefix_buffer);
3653  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
3654  pm_location_t *location = &cast->binary_operator_loc;
3655  pm_buffer_append_byte(output_buffer, ' ');
3656  prettyprint_location(output_buffer, parser, location);
3657  pm_buffer_append_string(output_buffer, " = \"", 4);
3658  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3659  pm_buffer_append_string(output_buffer, "\"\n", 2);
3660  }
3661 
3662  // value
3663  {
3664  pm_buffer_concat(output_buffer, prefix_buffer);
3665  pm_buffer_append_string(output_buffer, "+-- value:", 10);
3666  pm_buffer_append_byte(output_buffer, '\n');
3667 
3668  size_t prefix_length = prefix_buffer->length;
3669  pm_buffer_append_string(prefix_buffer, "| ", 4);
3670  pm_buffer_concat(output_buffer, prefix_buffer);
3671  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
3672  prefix_buffer->length = prefix_length;
3673  }
3674 
3675  // binary_operator
3676  {
3677  pm_buffer_concat(output_buffer, prefix_buffer);
3678  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
3679  pm_buffer_append_byte(output_buffer, ' ');
3680  prettyprint_constant(output_buffer, parser, cast->binary_operator);
3681  pm_buffer_append_byte(output_buffer, '\n');
3682  }
3683 
3684  break;
3685  }
3688  pm_buffer_append_string(output_buffer, "@ GlobalVariableOrWriteNode (location: ", 39);
3689  prettyprint_location(output_buffer, parser, &node->location);
3690  pm_buffer_append_string(output_buffer, ")\n", 2);
3691 
3692  // name
3693  {
3694  pm_buffer_concat(output_buffer, prefix_buffer);
3695  pm_buffer_append_string(output_buffer, "+-- name:", 9);
3696  pm_buffer_append_byte(output_buffer, ' ');
3697  prettyprint_constant(output_buffer, parser, cast->name);
3698  pm_buffer_append_byte(output_buffer, '\n');
3699  }
3700 
3701  // name_loc
3702  {
3703  pm_buffer_concat(output_buffer, prefix_buffer);
3704  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
3705  pm_location_t *location = &cast->name_loc;
3706  pm_buffer_append_byte(output_buffer, ' ');
3707  prettyprint_location(output_buffer, parser, location);
3708  pm_buffer_append_string(output_buffer, " = \"", 4);
3709  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3710  pm_buffer_append_string(output_buffer, "\"\n", 2);
3711  }
3712 
3713  // operator_loc
3714  {
3715  pm_buffer_concat(output_buffer, prefix_buffer);
3716  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
3717  pm_location_t *location = &cast->operator_loc;
3718  pm_buffer_append_byte(output_buffer, ' ');
3719  prettyprint_location(output_buffer, parser, location);
3720  pm_buffer_append_string(output_buffer, " = \"", 4);
3721  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3722  pm_buffer_append_string(output_buffer, "\"\n", 2);
3723  }
3724 
3725  // value
3726  {
3727  pm_buffer_concat(output_buffer, prefix_buffer);
3728  pm_buffer_append_string(output_buffer, "+-- value:", 10);
3729  pm_buffer_append_byte(output_buffer, '\n');
3730 
3731  size_t prefix_length = prefix_buffer->length;
3732  pm_buffer_append_string(prefix_buffer, " ", 4);
3733  pm_buffer_concat(output_buffer, prefix_buffer);
3734  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
3735  prefix_buffer->length = prefix_length;
3736  }
3737 
3738  break;
3739  }
3742  pm_buffer_append_string(output_buffer, "@ GlobalVariableReadNode (location: ", 36);
3743  prettyprint_location(output_buffer, parser, &node->location);
3744  pm_buffer_append_string(output_buffer, ")\n", 2);
3745 
3746  // name
3747  {
3748  pm_buffer_concat(output_buffer, prefix_buffer);
3749  pm_buffer_append_string(output_buffer, "+-- name:", 9);
3750  pm_buffer_append_byte(output_buffer, ' ');
3751  prettyprint_constant(output_buffer, parser, cast->name);
3752  pm_buffer_append_byte(output_buffer, '\n');
3753  }
3754 
3755  break;
3756  }
3759  pm_buffer_append_string(output_buffer, "@ GlobalVariableTargetNode (location: ", 38);
3760  prettyprint_location(output_buffer, parser, &node->location);
3761  pm_buffer_append_string(output_buffer, ")\n", 2);
3762 
3763  // name
3764  {
3765  pm_buffer_concat(output_buffer, prefix_buffer);
3766  pm_buffer_append_string(output_buffer, "+-- name:", 9);
3767  pm_buffer_append_byte(output_buffer, ' ');
3768  prettyprint_constant(output_buffer, parser, cast->name);
3769  pm_buffer_append_byte(output_buffer, '\n');
3770  }
3771 
3772  break;
3773  }
3776  pm_buffer_append_string(output_buffer, "@ GlobalVariableWriteNode (location: ", 37);
3777  prettyprint_location(output_buffer, parser, &node->location);
3778  pm_buffer_append_string(output_buffer, ")\n", 2);
3779 
3780  // name
3781  {
3782  pm_buffer_concat(output_buffer, prefix_buffer);
3783  pm_buffer_append_string(output_buffer, "+-- name:", 9);
3784  pm_buffer_append_byte(output_buffer, ' ');
3785  prettyprint_constant(output_buffer, parser, cast->name);
3786  pm_buffer_append_byte(output_buffer, '\n');
3787  }
3788 
3789  // name_loc
3790  {
3791  pm_buffer_concat(output_buffer, prefix_buffer);
3792  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
3793  pm_location_t *location = &cast->name_loc;
3794  pm_buffer_append_byte(output_buffer, ' ');
3795  prettyprint_location(output_buffer, parser, location);
3796  pm_buffer_append_string(output_buffer, " = \"", 4);
3797  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3798  pm_buffer_append_string(output_buffer, "\"\n", 2);
3799  }
3800 
3801  // value
3802  {
3803  pm_buffer_concat(output_buffer, prefix_buffer);
3804  pm_buffer_append_string(output_buffer, "+-- value:", 10);
3805  pm_buffer_append_byte(output_buffer, '\n');
3806 
3807  size_t prefix_length = prefix_buffer->length;
3808  pm_buffer_append_string(prefix_buffer, "| ", 4);
3809  pm_buffer_concat(output_buffer, prefix_buffer);
3810  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
3811  prefix_buffer->length = prefix_length;
3812  }
3813 
3814  // operator_loc
3815  {
3816  pm_buffer_concat(output_buffer, prefix_buffer);
3817  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
3818  pm_location_t *location = &cast->operator_loc;
3819  pm_buffer_append_byte(output_buffer, ' ');
3820  prettyprint_location(output_buffer, parser, location);
3821  pm_buffer_append_string(output_buffer, " = \"", 4);
3822  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3823  pm_buffer_append_string(output_buffer, "\"\n", 2);
3824  }
3825 
3826  break;
3827  }
3828  case PM_HASH_NODE: {
3829  pm_hash_node_t *cast = (pm_hash_node_t *) node;
3830  pm_buffer_append_string(output_buffer, "@ HashNode (location: ", 22);
3831  prettyprint_location(output_buffer, parser, &node->location);
3832  pm_buffer_append_string(output_buffer, ")\n", 2);
3833 
3834  // opening_loc
3835  {
3836  pm_buffer_concat(output_buffer, prefix_buffer);
3837  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
3838  pm_location_t *location = &cast->opening_loc;
3839  pm_buffer_append_byte(output_buffer, ' ');
3840  prettyprint_location(output_buffer, parser, location);
3841  pm_buffer_append_string(output_buffer, " = \"", 4);
3842  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3843  pm_buffer_append_string(output_buffer, "\"\n", 2);
3844  }
3845 
3846  // elements
3847  {
3848  pm_buffer_concat(output_buffer, prefix_buffer);
3849  pm_buffer_append_string(output_buffer, "+-- elements:", 13);
3850  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->elements.size));
3851 
3852  size_t last_index = cast->elements.size;
3853  for (uint32_t index = 0; index < last_index; index++) {
3854  size_t prefix_length = prefix_buffer->length;
3855  pm_buffer_append_string(prefix_buffer, "| ", 4);
3856  pm_buffer_concat(output_buffer, prefix_buffer);
3857  pm_buffer_append_string(output_buffer, "+-- ", 4);
3858  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
3859  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->elements.nodes[index], prefix_buffer);
3860  prefix_buffer->length = prefix_length;
3861  }
3862  }
3863 
3864  // closing_loc
3865  {
3866  pm_buffer_concat(output_buffer, prefix_buffer);
3867  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
3868  pm_location_t *location = &cast->closing_loc;
3869  pm_buffer_append_byte(output_buffer, ' ');
3870  prettyprint_location(output_buffer, parser, location);
3871  pm_buffer_append_string(output_buffer, " = \"", 4);
3872  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3873  pm_buffer_append_string(output_buffer, "\"\n", 2);
3874  }
3875 
3876  break;
3877  }
3878  case PM_HASH_PATTERN_NODE: {
3880  pm_buffer_append_string(output_buffer, "@ HashPatternNode (location: ", 29);
3881  prettyprint_location(output_buffer, parser, &node->location);
3882  pm_buffer_append_string(output_buffer, ")\n", 2);
3883 
3884  // constant
3885  {
3886  pm_buffer_concat(output_buffer, prefix_buffer);
3887  pm_buffer_append_string(output_buffer, "+-- constant:", 13);
3888  if (cast->constant == NULL) {
3889  pm_buffer_append_string(output_buffer, " nil\n", 5);
3890  } else {
3891  pm_buffer_append_byte(output_buffer, '\n');
3892 
3893  size_t prefix_length = prefix_buffer->length;
3894  pm_buffer_append_string(prefix_buffer, "| ", 4);
3895  pm_buffer_concat(output_buffer, prefix_buffer);
3896  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->constant, prefix_buffer);
3897  prefix_buffer->length = prefix_length;
3898  }
3899  }
3900 
3901  // elements
3902  {
3903  pm_buffer_concat(output_buffer, prefix_buffer);
3904  pm_buffer_append_string(output_buffer, "+-- elements:", 13);
3905  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->elements.size));
3906 
3907  size_t last_index = cast->elements.size;
3908  for (uint32_t index = 0; index < last_index; index++) {
3909  size_t prefix_length = prefix_buffer->length;
3910  pm_buffer_append_string(prefix_buffer, "| ", 4);
3911  pm_buffer_concat(output_buffer, prefix_buffer);
3912  pm_buffer_append_string(output_buffer, "+-- ", 4);
3913  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
3914  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->elements.nodes[index], prefix_buffer);
3915  prefix_buffer->length = prefix_length;
3916  }
3917  }
3918 
3919  // rest
3920  {
3921  pm_buffer_concat(output_buffer, prefix_buffer);
3922  pm_buffer_append_string(output_buffer, "+-- rest:", 9);
3923  if (cast->rest == NULL) {
3924  pm_buffer_append_string(output_buffer, " nil\n", 5);
3925  } else {
3926  pm_buffer_append_byte(output_buffer, '\n');
3927 
3928  size_t prefix_length = prefix_buffer->length;
3929  pm_buffer_append_string(prefix_buffer, "| ", 4);
3930  pm_buffer_concat(output_buffer, prefix_buffer);
3931  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rest, prefix_buffer);
3932  prefix_buffer->length = prefix_length;
3933  }
3934  }
3935 
3936  // opening_loc
3937  {
3938  pm_buffer_concat(output_buffer, prefix_buffer);
3939  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
3940  pm_location_t *location = &cast->opening_loc;
3941  if (location->start == NULL) {
3942  pm_buffer_append_string(output_buffer, " nil\n", 5);
3943  } else {
3944  pm_buffer_append_byte(output_buffer, ' ');
3945  prettyprint_location(output_buffer, parser, location);
3946  pm_buffer_append_string(output_buffer, " = \"", 4);
3947  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3948  pm_buffer_append_string(output_buffer, "\"\n", 2);
3949  }
3950  }
3951 
3952  // closing_loc
3953  {
3954  pm_buffer_concat(output_buffer, prefix_buffer);
3955  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
3956  pm_location_t *location = &cast->closing_loc;
3957  if (location->start == NULL) {
3958  pm_buffer_append_string(output_buffer, " nil\n", 5);
3959  } else {
3960  pm_buffer_append_byte(output_buffer, ' ');
3961  prettyprint_location(output_buffer, parser, location);
3962  pm_buffer_append_string(output_buffer, " = \"", 4);
3963  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3964  pm_buffer_append_string(output_buffer, "\"\n", 2);
3965  }
3966  }
3967 
3968  break;
3969  }
3970  case PM_IF_NODE: {
3971  pm_if_node_t *cast = (pm_if_node_t *) node;
3972  pm_buffer_append_string(output_buffer, "@ IfNode (location: ", 20);
3973  prettyprint_location(output_buffer, parser, &node->location);
3974  pm_buffer_append_string(output_buffer, ")\n", 2);
3975 
3976  // if_keyword_loc
3977  {
3978  pm_buffer_concat(output_buffer, prefix_buffer);
3979  pm_buffer_append_string(output_buffer, "+-- if_keyword_loc:", 19);
3980  pm_location_t *location = &cast->if_keyword_loc;
3981  if (location->start == NULL) {
3982  pm_buffer_append_string(output_buffer, " nil\n", 5);
3983  } else {
3984  pm_buffer_append_byte(output_buffer, ' ');
3985  prettyprint_location(output_buffer, parser, location);
3986  pm_buffer_append_string(output_buffer, " = \"", 4);
3987  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
3988  pm_buffer_append_string(output_buffer, "\"\n", 2);
3989  }
3990  }
3991 
3992  // predicate
3993  {
3994  pm_buffer_concat(output_buffer, prefix_buffer);
3995  pm_buffer_append_string(output_buffer, "+-- predicate:", 14);
3996  pm_buffer_append_byte(output_buffer, '\n');
3997 
3998  size_t prefix_length = prefix_buffer->length;
3999  pm_buffer_append_string(prefix_buffer, "| ", 4);
4000  pm_buffer_concat(output_buffer, prefix_buffer);
4001  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->predicate, prefix_buffer);
4002  prefix_buffer->length = prefix_length;
4003  }
4004 
4005  // then_keyword_loc
4006  {
4007  pm_buffer_concat(output_buffer, prefix_buffer);
4008  pm_buffer_append_string(output_buffer, "+-- then_keyword_loc:", 21);
4009  pm_location_t *location = &cast->then_keyword_loc;
4010  if (location->start == NULL) {
4011  pm_buffer_append_string(output_buffer, " nil\n", 5);
4012  } else {
4013  pm_buffer_append_byte(output_buffer, ' ');
4014  prettyprint_location(output_buffer, parser, location);
4015  pm_buffer_append_string(output_buffer, " = \"", 4);
4016  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4017  pm_buffer_append_string(output_buffer, "\"\n", 2);
4018  }
4019  }
4020 
4021  // statements
4022  {
4023  pm_buffer_concat(output_buffer, prefix_buffer);
4024  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
4025  if (cast->statements == NULL) {
4026  pm_buffer_append_string(output_buffer, " nil\n", 5);
4027  } else {
4028  pm_buffer_append_byte(output_buffer, '\n');
4029 
4030  size_t prefix_length = prefix_buffer->length;
4031  pm_buffer_append_string(prefix_buffer, "| ", 4);
4032  pm_buffer_concat(output_buffer, prefix_buffer);
4033  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
4034  prefix_buffer->length = prefix_length;
4035  }
4036  }
4037 
4038  // subsequent
4039  {
4040  pm_buffer_concat(output_buffer, prefix_buffer);
4041  pm_buffer_append_string(output_buffer, "+-- subsequent:", 15);
4042  if (cast->subsequent == NULL) {
4043  pm_buffer_append_string(output_buffer, " nil\n", 5);
4044  } else {
4045  pm_buffer_append_byte(output_buffer, '\n');
4046 
4047  size_t prefix_length = prefix_buffer->length;
4048  pm_buffer_append_string(prefix_buffer, "| ", 4);
4049  pm_buffer_concat(output_buffer, prefix_buffer);
4050  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->subsequent, prefix_buffer);
4051  prefix_buffer->length = prefix_length;
4052  }
4053  }
4054 
4055  // end_keyword_loc
4056  {
4057  pm_buffer_concat(output_buffer, prefix_buffer);
4058  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
4059  pm_location_t *location = &cast->end_keyword_loc;
4060  if (location->start == NULL) {
4061  pm_buffer_append_string(output_buffer, " nil\n", 5);
4062  } else {
4063  pm_buffer_append_byte(output_buffer, ' ');
4064  prettyprint_location(output_buffer, parser, location);
4065  pm_buffer_append_string(output_buffer, " = \"", 4);
4066  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4067  pm_buffer_append_string(output_buffer, "\"\n", 2);
4068  }
4069  }
4070 
4071  break;
4072  }
4073  case PM_IMAGINARY_NODE: {
4074  pm_imaginary_node_t *cast = (pm_imaginary_node_t *) node;
4075  pm_buffer_append_string(output_buffer, "@ ImaginaryNode (location: ", 27);
4076  prettyprint_location(output_buffer, parser, &node->location);
4077  pm_buffer_append_string(output_buffer, ")\n", 2);
4078 
4079  // numeric
4080  {
4081  pm_buffer_concat(output_buffer, prefix_buffer);
4082  pm_buffer_append_string(output_buffer, "+-- numeric:", 12);
4083  pm_buffer_append_byte(output_buffer, '\n');
4084 
4085  size_t prefix_length = prefix_buffer->length;
4086  pm_buffer_append_string(prefix_buffer, " ", 4);
4087  pm_buffer_concat(output_buffer, prefix_buffer);
4088  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->numeric, prefix_buffer);
4089  prefix_buffer->length = prefix_length;
4090  }
4091 
4092  break;
4093  }
4094  case PM_IMPLICIT_NODE: {
4095  pm_implicit_node_t *cast = (pm_implicit_node_t *) node;
4096  pm_buffer_append_string(output_buffer, "@ ImplicitNode (location: ", 26);
4097  prettyprint_location(output_buffer, parser, &node->location);
4098  pm_buffer_append_string(output_buffer, ")\n", 2);
4099 
4100  // value
4101  {
4102  pm_buffer_concat(output_buffer, prefix_buffer);
4103  pm_buffer_append_string(output_buffer, "+-- value:", 10);
4104  pm_buffer_append_byte(output_buffer, '\n');
4105 
4106  size_t prefix_length = prefix_buffer->length;
4107  pm_buffer_append_string(prefix_buffer, " ", 4);
4108  pm_buffer_concat(output_buffer, prefix_buffer);
4109  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
4110  prefix_buffer->length = prefix_length;
4111  }
4112 
4113  break;
4114  }
4115  case PM_IMPLICIT_REST_NODE: {
4116  pm_buffer_append_string(output_buffer, "@ ImplicitRestNode (location: ", 30);
4117  prettyprint_location(output_buffer, parser, &node->location);
4118  pm_buffer_append_string(output_buffer, ")\n", 2);
4119 
4120  break;
4121  }
4122  case PM_IN_NODE: {
4123  pm_in_node_t *cast = (pm_in_node_t *) node;
4124  pm_buffer_append_string(output_buffer, "@ InNode (location: ", 20);
4125  prettyprint_location(output_buffer, parser, &node->location);
4126  pm_buffer_append_string(output_buffer, ")\n", 2);
4127 
4128  // pattern
4129  {
4130  pm_buffer_concat(output_buffer, prefix_buffer);
4131  pm_buffer_append_string(output_buffer, "+-- pattern:", 12);
4132  pm_buffer_append_byte(output_buffer, '\n');
4133 
4134  size_t prefix_length = prefix_buffer->length;
4135  pm_buffer_append_string(prefix_buffer, "| ", 4);
4136  pm_buffer_concat(output_buffer, prefix_buffer);
4137  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->pattern, prefix_buffer);
4138  prefix_buffer->length = prefix_length;
4139  }
4140 
4141  // statements
4142  {
4143  pm_buffer_concat(output_buffer, prefix_buffer);
4144  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
4145  if (cast->statements == NULL) {
4146  pm_buffer_append_string(output_buffer, " nil\n", 5);
4147  } else {
4148  pm_buffer_append_byte(output_buffer, '\n');
4149 
4150  size_t prefix_length = prefix_buffer->length;
4151  pm_buffer_append_string(prefix_buffer, "| ", 4);
4152  pm_buffer_concat(output_buffer, prefix_buffer);
4153  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
4154  prefix_buffer->length = prefix_length;
4155  }
4156  }
4157 
4158  // in_loc
4159  {
4160  pm_buffer_concat(output_buffer, prefix_buffer);
4161  pm_buffer_append_string(output_buffer, "+-- in_loc:", 11);
4162  pm_location_t *location = &cast->in_loc;
4163  pm_buffer_append_byte(output_buffer, ' ');
4164  prettyprint_location(output_buffer, parser, location);
4165  pm_buffer_append_string(output_buffer, " = \"", 4);
4166  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4167  pm_buffer_append_string(output_buffer, "\"\n", 2);
4168  }
4169 
4170  // then_loc
4171  {
4172  pm_buffer_concat(output_buffer, prefix_buffer);
4173  pm_buffer_append_string(output_buffer, "+-- then_loc:", 13);
4174  pm_location_t *location = &cast->then_loc;
4175  if (location->start == NULL) {
4176  pm_buffer_append_string(output_buffer, " nil\n", 5);
4177  } else {
4178  pm_buffer_append_byte(output_buffer, ' ');
4179  prettyprint_location(output_buffer, parser, location);
4180  pm_buffer_append_string(output_buffer, " = \"", 4);
4181  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4182  pm_buffer_append_string(output_buffer, "\"\n", 2);
4183  }
4184  }
4185 
4186  break;
4187  }
4188  case PM_INDEX_AND_WRITE_NODE: {
4190  pm_buffer_append_string(output_buffer, "@ IndexAndWriteNode (location: ", 31);
4191  prettyprint_location(output_buffer, parser, &node->location);
4192  pm_buffer_append_string(output_buffer, ")\n", 2);
4193 
4194  // CallNodeFlags
4195  {
4196  pm_buffer_concat(output_buffer, prefix_buffer);
4197  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
4198  bool found = false;
4200  if (found) pm_buffer_append_byte(output_buffer, ',');
4201  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
4202  found = true;
4203  }
4205  if (found) pm_buffer_append_byte(output_buffer, ',');
4206  pm_buffer_append_string(output_buffer, " variable_call", 14);
4207  found = true;
4208  }
4210  if (found) pm_buffer_append_byte(output_buffer, ',');
4211  pm_buffer_append_string(output_buffer, " attribute_write", 16);
4212  found = true;
4213  }
4215  if (found) pm_buffer_append_byte(output_buffer, ',');
4216  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
4217  found = true;
4218  }
4219  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
4220  pm_buffer_append_byte(output_buffer, '\n');
4221  }
4222 
4223  // receiver
4224  {
4225  pm_buffer_concat(output_buffer, prefix_buffer);
4226  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
4227  if (cast->receiver == NULL) {
4228  pm_buffer_append_string(output_buffer, " nil\n", 5);
4229  } else {
4230  pm_buffer_append_byte(output_buffer, '\n');
4231 
4232  size_t prefix_length = prefix_buffer->length;
4233  pm_buffer_append_string(prefix_buffer, "| ", 4);
4234  pm_buffer_concat(output_buffer, prefix_buffer);
4235  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
4236  prefix_buffer->length = prefix_length;
4237  }
4238  }
4239 
4240  // call_operator_loc
4241  {
4242  pm_buffer_concat(output_buffer, prefix_buffer);
4243  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
4244  pm_location_t *location = &cast->call_operator_loc;
4245  if (location->start == NULL) {
4246  pm_buffer_append_string(output_buffer, " nil\n", 5);
4247  } else {
4248  pm_buffer_append_byte(output_buffer, ' ');
4249  prettyprint_location(output_buffer, parser, location);
4250  pm_buffer_append_string(output_buffer, " = \"", 4);
4251  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4252  pm_buffer_append_string(output_buffer, "\"\n", 2);
4253  }
4254  }
4255 
4256  // opening_loc
4257  {
4258  pm_buffer_concat(output_buffer, prefix_buffer);
4259  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
4260  pm_location_t *location = &cast->opening_loc;
4261  pm_buffer_append_byte(output_buffer, ' ');
4262  prettyprint_location(output_buffer, parser, location);
4263  pm_buffer_append_string(output_buffer, " = \"", 4);
4264  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4265  pm_buffer_append_string(output_buffer, "\"\n", 2);
4266  }
4267 
4268  // arguments
4269  {
4270  pm_buffer_concat(output_buffer, prefix_buffer);
4271  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
4272  if (cast->arguments == NULL) {
4273  pm_buffer_append_string(output_buffer, " nil\n", 5);
4274  } else {
4275  pm_buffer_append_byte(output_buffer, '\n');
4276 
4277  size_t prefix_length = prefix_buffer->length;
4278  pm_buffer_append_string(prefix_buffer, "| ", 4);
4279  pm_buffer_concat(output_buffer, prefix_buffer);
4280  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
4281  prefix_buffer->length = prefix_length;
4282  }
4283  }
4284 
4285  // closing_loc
4286  {
4287  pm_buffer_concat(output_buffer, prefix_buffer);
4288  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
4289  pm_location_t *location = &cast->closing_loc;
4290  pm_buffer_append_byte(output_buffer, ' ');
4291  prettyprint_location(output_buffer, parser, location);
4292  pm_buffer_append_string(output_buffer, " = \"", 4);
4293  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4294  pm_buffer_append_string(output_buffer, "\"\n", 2);
4295  }
4296 
4297  // block
4298  {
4299  pm_buffer_concat(output_buffer, prefix_buffer);
4300  pm_buffer_append_string(output_buffer, "+-- block:", 10);
4301  if (cast->block == NULL) {
4302  pm_buffer_append_string(output_buffer, " nil\n", 5);
4303  } else {
4304  pm_buffer_append_byte(output_buffer, '\n');
4305 
4306  size_t prefix_length = prefix_buffer->length;
4307  pm_buffer_append_string(prefix_buffer, "| ", 4);
4308  pm_buffer_concat(output_buffer, prefix_buffer);
4309  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
4310  prefix_buffer->length = prefix_length;
4311  }
4312  }
4313 
4314  // operator_loc
4315  {
4316  pm_buffer_concat(output_buffer, prefix_buffer);
4317  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
4318  pm_location_t *location = &cast->operator_loc;
4319  pm_buffer_append_byte(output_buffer, ' ');
4320  prettyprint_location(output_buffer, parser, location);
4321  pm_buffer_append_string(output_buffer, " = \"", 4);
4322  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4323  pm_buffer_append_string(output_buffer, "\"\n", 2);
4324  }
4325 
4326  // value
4327  {
4328  pm_buffer_concat(output_buffer, prefix_buffer);
4329  pm_buffer_append_string(output_buffer, "+-- value:", 10);
4330  pm_buffer_append_byte(output_buffer, '\n');
4331 
4332  size_t prefix_length = prefix_buffer->length;
4333  pm_buffer_append_string(prefix_buffer, " ", 4);
4334  pm_buffer_concat(output_buffer, prefix_buffer);
4335  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
4336  prefix_buffer->length = prefix_length;
4337  }
4338 
4339  break;
4340  }
4343  pm_buffer_append_string(output_buffer, "@ IndexOperatorWriteNode (location: ", 36);
4344  prettyprint_location(output_buffer, parser, &node->location);
4345  pm_buffer_append_string(output_buffer, ")\n", 2);
4346 
4347  // CallNodeFlags
4348  {
4349  pm_buffer_concat(output_buffer, prefix_buffer);
4350  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
4351  bool found = false;
4353  if (found) pm_buffer_append_byte(output_buffer, ',');
4354  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
4355  found = true;
4356  }
4358  if (found) pm_buffer_append_byte(output_buffer, ',');
4359  pm_buffer_append_string(output_buffer, " variable_call", 14);
4360  found = true;
4361  }
4363  if (found) pm_buffer_append_byte(output_buffer, ',');
4364  pm_buffer_append_string(output_buffer, " attribute_write", 16);
4365  found = true;
4366  }
4368  if (found) pm_buffer_append_byte(output_buffer, ',');
4369  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
4370  found = true;
4371  }
4372  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
4373  pm_buffer_append_byte(output_buffer, '\n');
4374  }
4375 
4376  // receiver
4377  {
4378  pm_buffer_concat(output_buffer, prefix_buffer);
4379  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
4380  if (cast->receiver == NULL) {
4381  pm_buffer_append_string(output_buffer, " nil\n", 5);
4382  } else {
4383  pm_buffer_append_byte(output_buffer, '\n');
4384 
4385  size_t prefix_length = prefix_buffer->length;
4386  pm_buffer_append_string(prefix_buffer, "| ", 4);
4387  pm_buffer_concat(output_buffer, prefix_buffer);
4388  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
4389  prefix_buffer->length = prefix_length;
4390  }
4391  }
4392 
4393  // call_operator_loc
4394  {
4395  pm_buffer_concat(output_buffer, prefix_buffer);
4396  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
4397  pm_location_t *location = &cast->call_operator_loc;
4398  if (location->start == NULL) {
4399  pm_buffer_append_string(output_buffer, " nil\n", 5);
4400  } else {
4401  pm_buffer_append_byte(output_buffer, ' ');
4402  prettyprint_location(output_buffer, parser, location);
4403  pm_buffer_append_string(output_buffer, " = \"", 4);
4404  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4405  pm_buffer_append_string(output_buffer, "\"\n", 2);
4406  }
4407  }
4408 
4409  // opening_loc
4410  {
4411  pm_buffer_concat(output_buffer, prefix_buffer);
4412  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
4413  pm_location_t *location = &cast->opening_loc;
4414  pm_buffer_append_byte(output_buffer, ' ');
4415  prettyprint_location(output_buffer, parser, location);
4416  pm_buffer_append_string(output_buffer, " = \"", 4);
4417  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4418  pm_buffer_append_string(output_buffer, "\"\n", 2);
4419  }
4420 
4421  // arguments
4422  {
4423  pm_buffer_concat(output_buffer, prefix_buffer);
4424  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
4425  if (cast->arguments == NULL) {
4426  pm_buffer_append_string(output_buffer, " nil\n", 5);
4427  } else {
4428  pm_buffer_append_byte(output_buffer, '\n');
4429 
4430  size_t prefix_length = prefix_buffer->length;
4431  pm_buffer_append_string(prefix_buffer, "| ", 4);
4432  pm_buffer_concat(output_buffer, prefix_buffer);
4433  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
4434  prefix_buffer->length = prefix_length;
4435  }
4436  }
4437 
4438  // closing_loc
4439  {
4440  pm_buffer_concat(output_buffer, prefix_buffer);
4441  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
4442  pm_location_t *location = &cast->closing_loc;
4443  pm_buffer_append_byte(output_buffer, ' ');
4444  prettyprint_location(output_buffer, parser, location);
4445  pm_buffer_append_string(output_buffer, " = \"", 4);
4446  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4447  pm_buffer_append_string(output_buffer, "\"\n", 2);
4448  }
4449 
4450  // block
4451  {
4452  pm_buffer_concat(output_buffer, prefix_buffer);
4453  pm_buffer_append_string(output_buffer, "+-- block:", 10);
4454  if (cast->block == NULL) {
4455  pm_buffer_append_string(output_buffer, " nil\n", 5);
4456  } else {
4457  pm_buffer_append_byte(output_buffer, '\n');
4458 
4459  size_t prefix_length = prefix_buffer->length;
4460  pm_buffer_append_string(prefix_buffer, "| ", 4);
4461  pm_buffer_concat(output_buffer, prefix_buffer);
4462  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
4463  prefix_buffer->length = prefix_length;
4464  }
4465  }
4466 
4467  // binary_operator
4468  {
4469  pm_buffer_concat(output_buffer, prefix_buffer);
4470  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
4471  pm_buffer_append_byte(output_buffer, ' ');
4472  prettyprint_constant(output_buffer, parser, cast->binary_operator);
4473  pm_buffer_append_byte(output_buffer, '\n');
4474  }
4475 
4476  // binary_operator_loc
4477  {
4478  pm_buffer_concat(output_buffer, prefix_buffer);
4479  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
4480  pm_location_t *location = &cast->binary_operator_loc;
4481  pm_buffer_append_byte(output_buffer, ' ');
4482  prettyprint_location(output_buffer, parser, location);
4483  pm_buffer_append_string(output_buffer, " = \"", 4);
4484  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4485  pm_buffer_append_string(output_buffer, "\"\n", 2);
4486  }
4487 
4488  // value
4489  {
4490  pm_buffer_concat(output_buffer, prefix_buffer);
4491  pm_buffer_append_string(output_buffer, "+-- value:", 10);
4492  pm_buffer_append_byte(output_buffer, '\n');
4493 
4494  size_t prefix_length = prefix_buffer->length;
4495  pm_buffer_append_string(prefix_buffer, " ", 4);
4496  pm_buffer_concat(output_buffer, prefix_buffer);
4497  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
4498  prefix_buffer->length = prefix_length;
4499  }
4500 
4501  break;
4502  }
4503  case PM_INDEX_OR_WRITE_NODE: {
4505  pm_buffer_append_string(output_buffer, "@ IndexOrWriteNode (location: ", 30);
4506  prettyprint_location(output_buffer, parser, &node->location);
4507  pm_buffer_append_string(output_buffer, ")\n", 2);
4508 
4509  // CallNodeFlags
4510  {
4511  pm_buffer_concat(output_buffer, prefix_buffer);
4512  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
4513  bool found = false;
4515  if (found) pm_buffer_append_byte(output_buffer, ',');
4516  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
4517  found = true;
4518  }
4520  if (found) pm_buffer_append_byte(output_buffer, ',');
4521  pm_buffer_append_string(output_buffer, " variable_call", 14);
4522  found = true;
4523  }
4525  if (found) pm_buffer_append_byte(output_buffer, ',');
4526  pm_buffer_append_string(output_buffer, " attribute_write", 16);
4527  found = true;
4528  }
4530  if (found) pm_buffer_append_byte(output_buffer, ',');
4531  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
4532  found = true;
4533  }
4534  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
4535  pm_buffer_append_byte(output_buffer, '\n');
4536  }
4537 
4538  // receiver
4539  {
4540  pm_buffer_concat(output_buffer, prefix_buffer);
4541  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
4542  if (cast->receiver == NULL) {
4543  pm_buffer_append_string(output_buffer, " nil\n", 5);
4544  } else {
4545  pm_buffer_append_byte(output_buffer, '\n');
4546 
4547  size_t prefix_length = prefix_buffer->length;
4548  pm_buffer_append_string(prefix_buffer, "| ", 4);
4549  pm_buffer_concat(output_buffer, prefix_buffer);
4550  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
4551  prefix_buffer->length = prefix_length;
4552  }
4553  }
4554 
4555  // call_operator_loc
4556  {
4557  pm_buffer_concat(output_buffer, prefix_buffer);
4558  pm_buffer_append_string(output_buffer, "+-- call_operator_loc:", 22);
4559  pm_location_t *location = &cast->call_operator_loc;
4560  if (location->start == NULL) {
4561  pm_buffer_append_string(output_buffer, " nil\n", 5);
4562  } else {
4563  pm_buffer_append_byte(output_buffer, ' ');
4564  prettyprint_location(output_buffer, parser, location);
4565  pm_buffer_append_string(output_buffer, " = \"", 4);
4566  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4567  pm_buffer_append_string(output_buffer, "\"\n", 2);
4568  }
4569  }
4570 
4571  // opening_loc
4572  {
4573  pm_buffer_concat(output_buffer, prefix_buffer);
4574  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
4575  pm_location_t *location = &cast->opening_loc;
4576  pm_buffer_append_byte(output_buffer, ' ');
4577  prettyprint_location(output_buffer, parser, location);
4578  pm_buffer_append_string(output_buffer, " = \"", 4);
4579  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4580  pm_buffer_append_string(output_buffer, "\"\n", 2);
4581  }
4582 
4583  // arguments
4584  {
4585  pm_buffer_concat(output_buffer, prefix_buffer);
4586  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
4587  if (cast->arguments == NULL) {
4588  pm_buffer_append_string(output_buffer, " nil\n", 5);
4589  } else {
4590  pm_buffer_append_byte(output_buffer, '\n');
4591 
4592  size_t prefix_length = prefix_buffer->length;
4593  pm_buffer_append_string(prefix_buffer, "| ", 4);
4594  pm_buffer_concat(output_buffer, prefix_buffer);
4595  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
4596  prefix_buffer->length = prefix_length;
4597  }
4598  }
4599 
4600  // closing_loc
4601  {
4602  pm_buffer_concat(output_buffer, prefix_buffer);
4603  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
4604  pm_location_t *location = &cast->closing_loc;
4605  pm_buffer_append_byte(output_buffer, ' ');
4606  prettyprint_location(output_buffer, parser, location);
4607  pm_buffer_append_string(output_buffer, " = \"", 4);
4608  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4609  pm_buffer_append_string(output_buffer, "\"\n", 2);
4610  }
4611 
4612  // block
4613  {
4614  pm_buffer_concat(output_buffer, prefix_buffer);
4615  pm_buffer_append_string(output_buffer, "+-- block:", 10);
4616  if (cast->block == NULL) {
4617  pm_buffer_append_string(output_buffer, " nil\n", 5);
4618  } else {
4619  pm_buffer_append_byte(output_buffer, '\n');
4620 
4621  size_t prefix_length = prefix_buffer->length;
4622  pm_buffer_append_string(prefix_buffer, "| ", 4);
4623  pm_buffer_concat(output_buffer, prefix_buffer);
4624  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
4625  prefix_buffer->length = prefix_length;
4626  }
4627  }
4628 
4629  // operator_loc
4630  {
4631  pm_buffer_concat(output_buffer, prefix_buffer);
4632  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
4633  pm_location_t *location = &cast->operator_loc;
4634  pm_buffer_append_byte(output_buffer, ' ');
4635  prettyprint_location(output_buffer, parser, location);
4636  pm_buffer_append_string(output_buffer, " = \"", 4);
4637  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4638  pm_buffer_append_string(output_buffer, "\"\n", 2);
4639  }
4640 
4641  // value
4642  {
4643  pm_buffer_concat(output_buffer, prefix_buffer);
4644  pm_buffer_append_string(output_buffer, "+-- value:", 10);
4645  pm_buffer_append_byte(output_buffer, '\n');
4646 
4647  size_t prefix_length = prefix_buffer->length;
4648  pm_buffer_append_string(prefix_buffer, " ", 4);
4649  pm_buffer_concat(output_buffer, prefix_buffer);
4650  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
4651  prefix_buffer->length = prefix_length;
4652  }
4653 
4654  break;
4655  }
4656  case PM_INDEX_TARGET_NODE: {
4658  pm_buffer_append_string(output_buffer, "@ IndexTargetNode (location: ", 29);
4659  prettyprint_location(output_buffer, parser, &node->location);
4660  pm_buffer_append_string(output_buffer, ")\n", 2);
4661 
4662  // CallNodeFlags
4663  {
4664  pm_buffer_concat(output_buffer, prefix_buffer);
4665  pm_buffer_append_string(output_buffer, "+-- CallNodeFlags:", 18);
4666  bool found = false;
4668  if (found) pm_buffer_append_byte(output_buffer, ',');
4669  pm_buffer_append_string(output_buffer, " safe_navigation", 16);
4670  found = true;
4671  }
4673  if (found) pm_buffer_append_byte(output_buffer, ',');
4674  pm_buffer_append_string(output_buffer, " variable_call", 14);
4675  found = true;
4676  }
4678  if (found) pm_buffer_append_byte(output_buffer, ',');
4679  pm_buffer_append_string(output_buffer, " attribute_write", 16);
4680  found = true;
4681  }
4683  if (found) pm_buffer_append_byte(output_buffer, ',');
4684  pm_buffer_append_string(output_buffer, " ignore_visibility", 18);
4685  found = true;
4686  }
4687  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
4688  pm_buffer_append_byte(output_buffer, '\n');
4689  }
4690 
4691  // receiver
4692  {
4693  pm_buffer_concat(output_buffer, prefix_buffer);
4694  pm_buffer_append_string(output_buffer, "+-- receiver:", 13);
4695  pm_buffer_append_byte(output_buffer, '\n');
4696 
4697  size_t prefix_length = prefix_buffer->length;
4698  pm_buffer_append_string(prefix_buffer, "| ", 4);
4699  pm_buffer_concat(output_buffer, prefix_buffer);
4700  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->receiver, prefix_buffer);
4701  prefix_buffer->length = prefix_length;
4702  }
4703 
4704  // opening_loc
4705  {
4706  pm_buffer_concat(output_buffer, prefix_buffer);
4707  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
4708  pm_location_t *location = &cast->opening_loc;
4709  pm_buffer_append_byte(output_buffer, ' ');
4710  prettyprint_location(output_buffer, parser, location);
4711  pm_buffer_append_string(output_buffer, " = \"", 4);
4712  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4713  pm_buffer_append_string(output_buffer, "\"\n", 2);
4714  }
4715 
4716  // arguments
4717  {
4718  pm_buffer_concat(output_buffer, prefix_buffer);
4719  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
4720  if (cast->arguments == NULL) {
4721  pm_buffer_append_string(output_buffer, " nil\n", 5);
4722  } else {
4723  pm_buffer_append_byte(output_buffer, '\n');
4724 
4725  size_t prefix_length = prefix_buffer->length;
4726  pm_buffer_append_string(prefix_buffer, "| ", 4);
4727  pm_buffer_concat(output_buffer, prefix_buffer);
4728  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
4729  prefix_buffer->length = prefix_length;
4730  }
4731  }
4732 
4733  // closing_loc
4734  {
4735  pm_buffer_concat(output_buffer, prefix_buffer);
4736  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
4737  pm_location_t *location = &cast->closing_loc;
4738  pm_buffer_append_byte(output_buffer, ' ');
4739  prettyprint_location(output_buffer, parser, location);
4740  pm_buffer_append_string(output_buffer, " = \"", 4);
4741  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4742  pm_buffer_append_string(output_buffer, "\"\n", 2);
4743  }
4744 
4745  // block
4746  {
4747  pm_buffer_concat(output_buffer, prefix_buffer);
4748  pm_buffer_append_string(output_buffer, "+-- block:", 10);
4749  if (cast->block == NULL) {
4750  pm_buffer_append_string(output_buffer, " nil\n", 5);
4751  } else {
4752  pm_buffer_append_byte(output_buffer, '\n');
4753 
4754  size_t prefix_length = prefix_buffer->length;
4755  pm_buffer_append_string(prefix_buffer, " ", 4);
4756  pm_buffer_concat(output_buffer, prefix_buffer);
4757  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
4758  prefix_buffer->length = prefix_length;
4759  }
4760  }
4761 
4762  break;
4763  }
4766  pm_buffer_append_string(output_buffer, "@ InstanceVariableAndWriteNode (location: ", 42);
4767  prettyprint_location(output_buffer, parser, &node->location);
4768  pm_buffer_append_string(output_buffer, ")\n", 2);
4769 
4770  // name
4771  {
4772  pm_buffer_concat(output_buffer, prefix_buffer);
4773  pm_buffer_append_string(output_buffer, "+-- name:", 9);
4774  pm_buffer_append_byte(output_buffer, ' ');
4775  prettyprint_constant(output_buffer, parser, cast->name);
4776  pm_buffer_append_byte(output_buffer, '\n');
4777  }
4778 
4779  // name_loc
4780  {
4781  pm_buffer_concat(output_buffer, prefix_buffer);
4782  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
4783  pm_location_t *location = &cast->name_loc;
4784  pm_buffer_append_byte(output_buffer, ' ');
4785  prettyprint_location(output_buffer, parser, location);
4786  pm_buffer_append_string(output_buffer, " = \"", 4);
4787  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4788  pm_buffer_append_string(output_buffer, "\"\n", 2);
4789  }
4790 
4791  // operator_loc
4792  {
4793  pm_buffer_concat(output_buffer, prefix_buffer);
4794  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
4795  pm_location_t *location = &cast->operator_loc;
4796  pm_buffer_append_byte(output_buffer, ' ');
4797  prettyprint_location(output_buffer, parser, location);
4798  pm_buffer_append_string(output_buffer, " = \"", 4);
4799  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4800  pm_buffer_append_string(output_buffer, "\"\n", 2);
4801  }
4802 
4803  // value
4804  {
4805  pm_buffer_concat(output_buffer, prefix_buffer);
4806  pm_buffer_append_string(output_buffer, "+-- value:", 10);
4807  pm_buffer_append_byte(output_buffer, '\n');
4808 
4809  size_t prefix_length = prefix_buffer->length;
4810  pm_buffer_append_string(prefix_buffer, " ", 4);
4811  pm_buffer_concat(output_buffer, prefix_buffer);
4812  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
4813  prefix_buffer->length = prefix_length;
4814  }
4815 
4816  break;
4817  }
4820  pm_buffer_append_string(output_buffer, "@ InstanceVariableOperatorWriteNode (location: ", 47);
4821  prettyprint_location(output_buffer, parser, &node->location);
4822  pm_buffer_append_string(output_buffer, ")\n", 2);
4823 
4824  // name
4825  {
4826  pm_buffer_concat(output_buffer, prefix_buffer);
4827  pm_buffer_append_string(output_buffer, "+-- name:", 9);
4828  pm_buffer_append_byte(output_buffer, ' ');
4829  prettyprint_constant(output_buffer, parser, cast->name);
4830  pm_buffer_append_byte(output_buffer, '\n');
4831  }
4832 
4833  // name_loc
4834  {
4835  pm_buffer_concat(output_buffer, prefix_buffer);
4836  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
4837  pm_location_t *location = &cast->name_loc;
4838  pm_buffer_append_byte(output_buffer, ' ');
4839  prettyprint_location(output_buffer, parser, location);
4840  pm_buffer_append_string(output_buffer, " = \"", 4);
4841  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4842  pm_buffer_append_string(output_buffer, "\"\n", 2);
4843  }
4844 
4845  // binary_operator_loc
4846  {
4847  pm_buffer_concat(output_buffer, prefix_buffer);
4848  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
4849  pm_location_t *location = &cast->binary_operator_loc;
4850  pm_buffer_append_byte(output_buffer, ' ');
4851  prettyprint_location(output_buffer, parser, location);
4852  pm_buffer_append_string(output_buffer, " = \"", 4);
4853  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4854  pm_buffer_append_string(output_buffer, "\"\n", 2);
4855  }
4856 
4857  // value
4858  {
4859  pm_buffer_concat(output_buffer, prefix_buffer);
4860  pm_buffer_append_string(output_buffer, "+-- value:", 10);
4861  pm_buffer_append_byte(output_buffer, '\n');
4862 
4863  size_t prefix_length = prefix_buffer->length;
4864  pm_buffer_append_string(prefix_buffer, "| ", 4);
4865  pm_buffer_concat(output_buffer, prefix_buffer);
4866  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
4867  prefix_buffer->length = prefix_length;
4868  }
4869 
4870  // binary_operator
4871  {
4872  pm_buffer_concat(output_buffer, prefix_buffer);
4873  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
4874  pm_buffer_append_byte(output_buffer, ' ');
4875  prettyprint_constant(output_buffer, parser, cast->binary_operator);
4876  pm_buffer_append_byte(output_buffer, '\n');
4877  }
4878 
4879  break;
4880  }
4883  pm_buffer_append_string(output_buffer, "@ InstanceVariableOrWriteNode (location: ", 41);
4884  prettyprint_location(output_buffer, parser, &node->location);
4885  pm_buffer_append_string(output_buffer, ")\n", 2);
4886 
4887  // name
4888  {
4889  pm_buffer_concat(output_buffer, prefix_buffer);
4890  pm_buffer_append_string(output_buffer, "+-- name:", 9);
4891  pm_buffer_append_byte(output_buffer, ' ');
4892  prettyprint_constant(output_buffer, parser, cast->name);
4893  pm_buffer_append_byte(output_buffer, '\n');
4894  }
4895 
4896  // name_loc
4897  {
4898  pm_buffer_concat(output_buffer, prefix_buffer);
4899  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
4900  pm_location_t *location = &cast->name_loc;
4901  pm_buffer_append_byte(output_buffer, ' ');
4902  prettyprint_location(output_buffer, parser, location);
4903  pm_buffer_append_string(output_buffer, " = \"", 4);
4904  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4905  pm_buffer_append_string(output_buffer, "\"\n", 2);
4906  }
4907 
4908  // operator_loc
4909  {
4910  pm_buffer_concat(output_buffer, prefix_buffer);
4911  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
4912  pm_location_t *location = &cast->operator_loc;
4913  pm_buffer_append_byte(output_buffer, ' ');
4914  prettyprint_location(output_buffer, parser, location);
4915  pm_buffer_append_string(output_buffer, " = \"", 4);
4916  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4917  pm_buffer_append_string(output_buffer, "\"\n", 2);
4918  }
4919 
4920  // value
4921  {
4922  pm_buffer_concat(output_buffer, prefix_buffer);
4923  pm_buffer_append_string(output_buffer, "+-- value:", 10);
4924  pm_buffer_append_byte(output_buffer, '\n');
4925 
4926  size_t prefix_length = prefix_buffer->length;
4927  pm_buffer_append_string(prefix_buffer, " ", 4);
4928  pm_buffer_concat(output_buffer, prefix_buffer);
4929  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
4930  prefix_buffer->length = prefix_length;
4931  }
4932 
4933  break;
4934  }
4937  pm_buffer_append_string(output_buffer, "@ InstanceVariableReadNode (location: ", 38);
4938  prettyprint_location(output_buffer, parser, &node->location);
4939  pm_buffer_append_string(output_buffer, ")\n", 2);
4940 
4941  // name
4942  {
4943  pm_buffer_concat(output_buffer, prefix_buffer);
4944  pm_buffer_append_string(output_buffer, "+-- name:", 9);
4945  pm_buffer_append_byte(output_buffer, ' ');
4946  prettyprint_constant(output_buffer, parser, cast->name);
4947  pm_buffer_append_byte(output_buffer, '\n');
4948  }
4949 
4950  break;
4951  }
4954  pm_buffer_append_string(output_buffer, "@ InstanceVariableTargetNode (location: ", 40);
4955  prettyprint_location(output_buffer, parser, &node->location);
4956  pm_buffer_append_string(output_buffer, ")\n", 2);
4957 
4958  // name
4959  {
4960  pm_buffer_concat(output_buffer, prefix_buffer);
4961  pm_buffer_append_string(output_buffer, "+-- name:", 9);
4962  pm_buffer_append_byte(output_buffer, ' ');
4963  prettyprint_constant(output_buffer, parser, cast->name);
4964  pm_buffer_append_byte(output_buffer, '\n');
4965  }
4966 
4967  break;
4968  }
4971  pm_buffer_append_string(output_buffer, "@ InstanceVariableWriteNode (location: ", 39);
4972  prettyprint_location(output_buffer, parser, &node->location);
4973  pm_buffer_append_string(output_buffer, ")\n", 2);
4974 
4975  // name
4976  {
4977  pm_buffer_concat(output_buffer, prefix_buffer);
4978  pm_buffer_append_string(output_buffer, "+-- name:", 9);
4979  pm_buffer_append_byte(output_buffer, ' ');
4980  prettyprint_constant(output_buffer, parser, cast->name);
4981  pm_buffer_append_byte(output_buffer, '\n');
4982  }
4983 
4984  // name_loc
4985  {
4986  pm_buffer_concat(output_buffer, prefix_buffer);
4987  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
4988  pm_location_t *location = &cast->name_loc;
4989  pm_buffer_append_byte(output_buffer, ' ');
4990  prettyprint_location(output_buffer, parser, location);
4991  pm_buffer_append_string(output_buffer, " = \"", 4);
4992  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
4993  pm_buffer_append_string(output_buffer, "\"\n", 2);
4994  }
4995 
4996  // value
4997  {
4998  pm_buffer_concat(output_buffer, prefix_buffer);
4999  pm_buffer_append_string(output_buffer, "+-- value:", 10);
5000  pm_buffer_append_byte(output_buffer, '\n');
5001 
5002  size_t prefix_length = prefix_buffer->length;
5003  pm_buffer_append_string(prefix_buffer, "| ", 4);
5004  pm_buffer_concat(output_buffer, prefix_buffer);
5005  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
5006  prefix_buffer->length = prefix_length;
5007  }
5008 
5009  // operator_loc
5010  {
5011  pm_buffer_concat(output_buffer, prefix_buffer);
5012  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
5013  pm_location_t *location = &cast->operator_loc;
5014  pm_buffer_append_byte(output_buffer, ' ');
5015  prettyprint_location(output_buffer, parser, location);
5016  pm_buffer_append_string(output_buffer, " = \"", 4);
5017  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5018  pm_buffer_append_string(output_buffer, "\"\n", 2);
5019  }
5020 
5021  break;
5022  }
5023  case PM_INTEGER_NODE: {
5024  pm_integer_node_t *cast = (pm_integer_node_t *) node;
5025  pm_buffer_append_string(output_buffer, "@ IntegerNode (location: ", 25);
5026  prettyprint_location(output_buffer, parser, &node->location);
5027  pm_buffer_append_string(output_buffer, ")\n", 2);
5028 
5029  // IntegerBaseFlags
5030  {
5031  pm_buffer_concat(output_buffer, prefix_buffer);
5032  pm_buffer_append_string(output_buffer, "+-- IntegerBaseFlags:", 21);
5033  bool found = false;
5034  if (cast->base.flags & PM_INTEGER_BASE_FLAGS_BINARY) {
5035  if (found) pm_buffer_append_byte(output_buffer, ',');
5036  pm_buffer_append_string(output_buffer, " binary", 7);
5037  found = true;
5038  }
5040  if (found) pm_buffer_append_byte(output_buffer, ',');
5041  pm_buffer_append_string(output_buffer, " decimal", 8);
5042  found = true;
5043  }
5044  if (cast->base.flags & PM_INTEGER_BASE_FLAGS_OCTAL) {
5045  if (found) pm_buffer_append_byte(output_buffer, ',');
5046  pm_buffer_append_string(output_buffer, " octal", 6);
5047  found = true;
5048  }
5050  if (found) pm_buffer_append_byte(output_buffer, ',');
5051  pm_buffer_append_string(output_buffer, " hexadecimal", 12);
5052  found = true;
5053  }
5054  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
5055  pm_buffer_append_byte(output_buffer, '\n');
5056  }
5057 
5058  // value
5059  {
5060  pm_buffer_concat(output_buffer, prefix_buffer);
5061  pm_buffer_append_string(output_buffer, "+-- value:", 10);
5062  const pm_integer_t *integer = &cast->value;
5063  pm_buffer_append_byte(output_buffer, ' ');
5064  pm_integer_string(output_buffer, integer);
5065  pm_buffer_append_byte(output_buffer, '\n');
5066  }
5067 
5068  break;
5069  }
5072  pm_buffer_append_string(output_buffer, "@ InterpolatedMatchLastLineNode (location: ", 43);
5073  prettyprint_location(output_buffer, parser, &node->location);
5074  pm_buffer_append_string(output_buffer, ")\n", 2);
5075 
5076  // RegularExpressionFlags
5077  {
5078  pm_buffer_concat(output_buffer, prefix_buffer);
5079  pm_buffer_append_string(output_buffer, "+-- RegularExpressionFlags:", 27);
5080  bool found = false;
5082  if (found) pm_buffer_append_byte(output_buffer, ',');
5083  pm_buffer_append_string(output_buffer, " ignore_case", 12);
5084  found = true;
5085  }
5087  if (found) pm_buffer_append_byte(output_buffer, ',');
5088  pm_buffer_append_string(output_buffer, " extended", 9);
5089  found = true;
5090  }
5092  if (found) pm_buffer_append_byte(output_buffer, ',');
5093  pm_buffer_append_string(output_buffer, " multi_line", 11);
5094  found = true;
5095  }
5097  if (found) pm_buffer_append_byte(output_buffer, ',');
5098  pm_buffer_append_string(output_buffer, " once", 5);
5099  found = true;
5100  }
5102  if (found) pm_buffer_append_byte(output_buffer, ',');
5103  pm_buffer_append_string(output_buffer, " euc_jp", 7);
5104  found = true;
5105  }
5107  if (found) pm_buffer_append_byte(output_buffer, ',');
5108  pm_buffer_append_string(output_buffer, " ascii_8bit", 11);
5109  found = true;
5110  }
5112  if (found) pm_buffer_append_byte(output_buffer, ',');
5113  pm_buffer_append_string(output_buffer, " windows_31j", 12);
5114  found = true;
5115  }
5117  if (found) pm_buffer_append_byte(output_buffer, ',');
5118  pm_buffer_append_string(output_buffer, " utf_8", 6);
5119  found = true;
5120  }
5122  if (found) pm_buffer_append_byte(output_buffer, ',');
5123  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
5124  found = true;
5125  }
5127  if (found) pm_buffer_append_byte(output_buffer, ',');
5128  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
5129  found = true;
5130  }
5132  if (found) pm_buffer_append_byte(output_buffer, ',');
5133  pm_buffer_append_string(output_buffer, " forced_us_ascii_encoding", 25);
5134  found = true;
5135  }
5136  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
5137  pm_buffer_append_byte(output_buffer, '\n');
5138  }
5139 
5140  // opening_loc
5141  {
5142  pm_buffer_concat(output_buffer, prefix_buffer);
5143  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
5144  pm_location_t *location = &cast->opening_loc;
5145  pm_buffer_append_byte(output_buffer, ' ');
5146  prettyprint_location(output_buffer, parser, location);
5147  pm_buffer_append_string(output_buffer, " = \"", 4);
5148  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5149  pm_buffer_append_string(output_buffer, "\"\n", 2);
5150  }
5151 
5152  // parts
5153  {
5154  pm_buffer_concat(output_buffer, prefix_buffer);
5155  pm_buffer_append_string(output_buffer, "+-- parts:", 10);
5156  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->parts.size));
5157 
5158  size_t last_index = cast->parts.size;
5159  for (uint32_t index = 0; index < last_index; index++) {
5160  size_t prefix_length = prefix_buffer->length;
5161  pm_buffer_append_string(prefix_buffer, "| ", 4);
5162  pm_buffer_concat(output_buffer, prefix_buffer);
5163  pm_buffer_append_string(output_buffer, "+-- ", 4);
5164  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
5165  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parts.nodes[index], prefix_buffer);
5166  prefix_buffer->length = prefix_length;
5167  }
5168  }
5169 
5170  // closing_loc
5171  {
5172  pm_buffer_concat(output_buffer, prefix_buffer);
5173  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
5174  pm_location_t *location = &cast->closing_loc;
5175  pm_buffer_append_byte(output_buffer, ' ');
5176  prettyprint_location(output_buffer, parser, location);
5177  pm_buffer_append_string(output_buffer, " = \"", 4);
5178  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5179  pm_buffer_append_string(output_buffer, "\"\n", 2);
5180  }
5181 
5182  break;
5183  }
5186  pm_buffer_append_string(output_buffer, "@ InterpolatedRegularExpressionNode (location: ", 47);
5187  prettyprint_location(output_buffer, parser, &node->location);
5188  pm_buffer_append_string(output_buffer, ")\n", 2);
5189 
5190  // RegularExpressionFlags
5191  {
5192  pm_buffer_concat(output_buffer, prefix_buffer);
5193  pm_buffer_append_string(output_buffer, "+-- RegularExpressionFlags:", 27);
5194  bool found = false;
5196  if (found) pm_buffer_append_byte(output_buffer, ',');
5197  pm_buffer_append_string(output_buffer, " ignore_case", 12);
5198  found = true;
5199  }
5201  if (found) pm_buffer_append_byte(output_buffer, ',');
5202  pm_buffer_append_string(output_buffer, " extended", 9);
5203  found = true;
5204  }
5206  if (found) pm_buffer_append_byte(output_buffer, ',');
5207  pm_buffer_append_string(output_buffer, " multi_line", 11);
5208  found = true;
5209  }
5211  if (found) pm_buffer_append_byte(output_buffer, ',');
5212  pm_buffer_append_string(output_buffer, " once", 5);
5213  found = true;
5214  }
5216  if (found) pm_buffer_append_byte(output_buffer, ',');
5217  pm_buffer_append_string(output_buffer, " euc_jp", 7);
5218  found = true;
5219  }
5221  if (found) pm_buffer_append_byte(output_buffer, ',');
5222  pm_buffer_append_string(output_buffer, " ascii_8bit", 11);
5223  found = true;
5224  }
5226  if (found) pm_buffer_append_byte(output_buffer, ',');
5227  pm_buffer_append_string(output_buffer, " windows_31j", 12);
5228  found = true;
5229  }
5231  if (found) pm_buffer_append_byte(output_buffer, ',');
5232  pm_buffer_append_string(output_buffer, " utf_8", 6);
5233  found = true;
5234  }
5236  if (found) pm_buffer_append_byte(output_buffer, ',');
5237  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
5238  found = true;
5239  }
5241  if (found) pm_buffer_append_byte(output_buffer, ',');
5242  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
5243  found = true;
5244  }
5246  if (found) pm_buffer_append_byte(output_buffer, ',');
5247  pm_buffer_append_string(output_buffer, " forced_us_ascii_encoding", 25);
5248  found = true;
5249  }
5250  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
5251  pm_buffer_append_byte(output_buffer, '\n');
5252  }
5253 
5254  // opening_loc
5255  {
5256  pm_buffer_concat(output_buffer, prefix_buffer);
5257  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
5258  pm_location_t *location = &cast->opening_loc;
5259  pm_buffer_append_byte(output_buffer, ' ');
5260  prettyprint_location(output_buffer, parser, location);
5261  pm_buffer_append_string(output_buffer, " = \"", 4);
5262  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5263  pm_buffer_append_string(output_buffer, "\"\n", 2);
5264  }
5265 
5266  // parts
5267  {
5268  pm_buffer_concat(output_buffer, prefix_buffer);
5269  pm_buffer_append_string(output_buffer, "+-- parts:", 10);
5270  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->parts.size));
5271 
5272  size_t last_index = cast->parts.size;
5273  for (uint32_t index = 0; index < last_index; index++) {
5274  size_t prefix_length = prefix_buffer->length;
5275  pm_buffer_append_string(prefix_buffer, "| ", 4);
5276  pm_buffer_concat(output_buffer, prefix_buffer);
5277  pm_buffer_append_string(output_buffer, "+-- ", 4);
5278  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
5279  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parts.nodes[index], prefix_buffer);
5280  prefix_buffer->length = prefix_length;
5281  }
5282  }
5283 
5284  // closing_loc
5285  {
5286  pm_buffer_concat(output_buffer, prefix_buffer);
5287  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
5288  pm_location_t *location = &cast->closing_loc;
5289  pm_buffer_append_byte(output_buffer, ' ');
5290  prettyprint_location(output_buffer, parser, location);
5291  pm_buffer_append_string(output_buffer, " = \"", 4);
5292  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5293  pm_buffer_append_string(output_buffer, "\"\n", 2);
5294  }
5295 
5296  break;
5297  }
5300  pm_buffer_append_string(output_buffer, "@ InterpolatedStringNode (location: ", 36);
5301  prettyprint_location(output_buffer, parser, &node->location);
5302  pm_buffer_append_string(output_buffer, ")\n", 2);
5303 
5304  // InterpolatedStringNodeFlags
5305  {
5306  pm_buffer_concat(output_buffer, prefix_buffer);
5307  pm_buffer_append_string(output_buffer, "+-- InterpolatedStringNodeFlags:", 32);
5308  bool found = false;
5310  if (found) pm_buffer_append_byte(output_buffer, ',');
5311  pm_buffer_append_string(output_buffer, " frozen", 7);
5312  found = true;
5313  }
5315  if (found) pm_buffer_append_byte(output_buffer, ',');
5316  pm_buffer_append_string(output_buffer, " mutable", 8);
5317  found = true;
5318  }
5319  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
5320  pm_buffer_append_byte(output_buffer, '\n');
5321  }
5322 
5323  // opening_loc
5324  {
5325  pm_buffer_concat(output_buffer, prefix_buffer);
5326  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
5327  pm_location_t *location = &cast->opening_loc;
5328  if (location->start == NULL) {
5329  pm_buffer_append_string(output_buffer, " nil\n", 5);
5330  } else {
5331  pm_buffer_append_byte(output_buffer, ' ');
5332  prettyprint_location(output_buffer, parser, location);
5333  pm_buffer_append_string(output_buffer, " = \"", 4);
5334  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5335  pm_buffer_append_string(output_buffer, "\"\n", 2);
5336  }
5337  }
5338 
5339  // parts
5340  {
5341  pm_buffer_concat(output_buffer, prefix_buffer);
5342  pm_buffer_append_string(output_buffer, "+-- parts:", 10);
5343  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->parts.size));
5344 
5345  size_t last_index = cast->parts.size;
5346  for (uint32_t index = 0; index < last_index; index++) {
5347  size_t prefix_length = prefix_buffer->length;
5348  pm_buffer_append_string(prefix_buffer, "| ", 4);
5349  pm_buffer_concat(output_buffer, prefix_buffer);
5350  pm_buffer_append_string(output_buffer, "+-- ", 4);
5351  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
5352  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parts.nodes[index], prefix_buffer);
5353  prefix_buffer->length = prefix_length;
5354  }
5355  }
5356 
5357  // closing_loc
5358  {
5359  pm_buffer_concat(output_buffer, prefix_buffer);
5360  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
5361  pm_location_t *location = &cast->closing_loc;
5362  if (location->start == NULL) {
5363  pm_buffer_append_string(output_buffer, " nil\n", 5);
5364  } else {
5365  pm_buffer_append_byte(output_buffer, ' ');
5366  prettyprint_location(output_buffer, parser, location);
5367  pm_buffer_append_string(output_buffer, " = \"", 4);
5368  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5369  pm_buffer_append_string(output_buffer, "\"\n", 2);
5370  }
5371  }
5372 
5373  break;
5374  }
5377  pm_buffer_append_string(output_buffer, "@ InterpolatedSymbolNode (location: ", 36);
5378  prettyprint_location(output_buffer, parser, &node->location);
5379  pm_buffer_append_string(output_buffer, ")\n", 2);
5380 
5381  // opening_loc
5382  {
5383  pm_buffer_concat(output_buffer, prefix_buffer);
5384  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
5385  pm_location_t *location = &cast->opening_loc;
5386  if (location->start == NULL) {
5387  pm_buffer_append_string(output_buffer, " nil\n", 5);
5388  } else {
5389  pm_buffer_append_byte(output_buffer, ' ');
5390  prettyprint_location(output_buffer, parser, location);
5391  pm_buffer_append_string(output_buffer, " = \"", 4);
5392  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5393  pm_buffer_append_string(output_buffer, "\"\n", 2);
5394  }
5395  }
5396 
5397  // parts
5398  {
5399  pm_buffer_concat(output_buffer, prefix_buffer);
5400  pm_buffer_append_string(output_buffer, "+-- parts:", 10);
5401  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->parts.size));
5402 
5403  size_t last_index = cast->parts.size;
5404  for (uint32_t index = 0; index < last_index; index++) {
5405  size_t prefix_length = prefix_buffer->length;
5406  pm_buffer_append_string(prefix_buffer, "| ", 4);
5407  pm_buffer_concat(output_buffer, prefix_buffer);
5408  pm_buffer_append_string(output_buffer, "+-- ", 4);
5409  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
5410  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parts.nodes[index], prefix_buffer);
5411  prefix_buffer->length = prefix_length;
5412  }
5413  }
5414 
5415  // closing_loc
5416  {
5417  pm_buffer_concat(output_buffer, prefix_buffer);
5418  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
5419  pm_location_t *location = &cast->closing_loc;
5420  if (location->start == NULL) {
5421  pm_buffer_append_string(output_buffer, " nil\n", 5);
5422  } else {
5423  pm_buffer_append_byte(output_buffer, ' ');
5424  prettyprint_location(output_buffer, parser, location);
5425  pm_buffer_append_string(output_buffer, " = \"", 4);
5426  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5427  pm_buffer_append_string(output_buffer, "\"\n", 2);
5428  }
5429  }
5430 
5431  break;
5432  }
5435  pm_buffer_append_string(output_buffer, "@ InterpolatedXStringNode (location: ", 37);
5436  prettyprint_location(output_buffer, parser, &node->location);
5437  pm_buffer_append_string(output_buffer, ")\n", 2);
5438 
5439  // opening_loc
5440  {
5441  pm_buffer_concat(output_buffer, prefix_buffer);
5442  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
5443  pm_location_t *location = &cast->opening_loc;
5444  pm_buffer_append_byte(output_buffer, ' ');
5445  prettyprint_location(output_buffer, parser, location);
5446  pm_buffer_append_string(output_buffer, " = \"", 4);
5447  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5448  pm_buffer_append_string(output_buffer, "\"\n", 2);
5449  }
5450 
5451  // parts
5452  {
5453  pm_buffer_concat(output_buffer, prefix_buffer);
5454  pm_buffer_append_string(output_buffer, "+-- parts:", 10);
5455  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->parts.size));
5456 
5457  size_t last_index = cast->parts.size;
5458  for (uint32_t index = 0; index < last_index; index++) {
5459  size_t prefix_length = prefix_buffer->length;
5460  pm_buffer_append_string(prefix_buffer, "| ", 4);
5461  pm_buffer_concat(output_buffer, prefix_buffer);
5462  pm_buffer_append_string(output_buffer, "+-- ", 4);
5463  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
5464  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parts.nodes[index], prefix_buffer);
5465  prefix_buffer->length = prefix_length;
5466  }
5467  }
5468 
5469  // closing_loc
5470  {
5471  pm_buffer_concat(output_buffer, prefix_buffer);
5472  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
5473  pm_location_t *location = &cast->closing_loc;
5474  pm_buffer_append_byte(output_buffer, ' ');
5475  prettyprint_location(output_buffer, parser, location);
5476  pm_buffer_append_string(output_buffer, " = \"", 4);
5477  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5478  pm_buffer_append_string(output_buffer, "\"\n", 2);
5479  }
5480 
5481  break;
5482  }
5484  pm_buffer_append_string(output_buffer, "@ ItLocalVariableReadNode (location: ", 37);
5485  prettyprint_location(output_buffer, parser, &node->location);
5486  pm_buffer_append_string(output_buffer, ")\n", 2);
5487 
5488  break;
5489  }
5490  case PM_IT_PARAMETERS_NODE: {
5491  pm_buffer_append_string(output_buffer, "@ ItParametersNode (location: ", 30);
5492  prettyprint_location(output_buffer, parser, &node->location);
5493  pm_buffer_append_string(output_buffer, ")\n", 2);
5494 
5495  break;
5496  }
5497  case PM_KEYWORD_HASH_NODE: {
5499  pm_buffer_append_string(output_buffer, "@ KeywordHashNode (location: ", 29);
5500  prettyprint_location(output_buffer, parser, &node->location);
5501  pm_buffer_append_string(output_buffer, ")\n", 2);
5502 
5503  // KeywordHashNodeFlags
5504  {
5505  pm_buffer_concat(output_buffer, prefix_buffer);
5506  pm_buffer_append_string(output_buffer, "+-- KeywordHashNodeFlags:", 25);
5507  bool found = false;
5509  if (found) pm_buffer_append_byte(output_buffer, ',');
5510  pm_buffer_append_string(output_buffer, " symbol_keys", 12);
5511  found = true;
5512  }
5513  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
5514  pm_buffer_append_byte(output_buffer, '\n');
5515  }
5516 
5517  // elements
5518  {
5519  pm_buffer_concat(output_buffer, prefix_buffer);
5520  pm_buffer_append_string(output_buffer, "+-- elements:", 13);
5521  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->elements.size));
5522 
5523  size_t last_index = cast->elements.size;
5524  for (uint32_t index = 0; index < last_index; index++) {
5525  size_t prefix_length = prefix_buffer->length;
5526  pm_buffer_append_string(prefix_buffer, " ", 4);
5527  pm_buffer_concat(output_buffer, prefix_buffer);
5528  pm_buffer_append_string(output_buffer, "+-- ", 4);
5529  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
5530  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->elements.nodes[index], prefix_buffer);
5531  prefix_buffer->length = prefix_length;
5532  }
5533  }
5534 
5535  break;
5536  }
5539  pm_buffer_append_string(output_buffer, "@ KeywordRestParameterNode (location: ", 38);
5540  prettyprint_location(output_buffer, parser, &node->location);
5541  pm_buffer_append_string(output_buffer, ")\n", 2);
5542 
5543  // ParameterFlags
5544  {
5545  pm_buffer_concat(output_buffer, prefix_buffer);
5546  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
5547  bool found = false;
5549  if (found) pm_buffer_append_byte(output_buffer, ',');
5550  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
5551  found = true;
5552  }
5553  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
5554  pm_buffer_append_byte(output_buffer, '\n');
5555  }
5556 
5557  // name
5558  {
5559  pm_buffer_concat(output_buffer, prefix_buffer);
5560  pm_buffer_append_string(output_buffer, "+-- name:", 9);
5561  if (cast->name == 0) {
5562  pm_buffer_append_string(output_buffer, " nil\n", 5);
5563  } else {
5564  pm_buffer_append_byte(output_buffer, ' ');
5565  prettyprint_constant(output_buffer, parser, cast->name);
5566  pm_buffer_append_byte(output_buffer, '\n');
5567  }
5568  }
5569 
5570  // name_loc
5571  {
5572  pm_buffer_concat(output_buffer, prefix_buffer);
5573  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
5574  pm_location_t *location = &cast->name_loc;
5575  if (location->start == NULL) {
5576  pm_buffer_append_string(output_buffer, " nil\n", 5);
5577  } else {
5578  pm_buffer_append_byte(output_buffer, ' ');
5579  prettyprint_location(output_buffer, parser, location);
5580  pm_buffer_append_string(output_buffer, " = \"", 4);
5581  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5582  pm_buffer_append_string(output_buffer, "\"\n", 2);
5583  }
5584  }
5585 
5586  // operator_loc
5587  {
5588  pm_buffer_concat(output_buffer, prefix_buffer);
5589  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
5590  pm_location_t *location = &cast->operator_loc;
5591  pm_buffer_append_byte(output_buffer, ' ');
5592  prettyprint_location(output_buffer, parser, location);
5593  pm_buffer_append_string(output_buffer, " = \"", 4);
5594  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5595  pm_buffer_append_string(output_buffer, "\"\n", 2);
5596  }
5597 
5598  break;
5599  }
5600  case PM_LAMBDA_NODE: {
5601  pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
5602  pm_buffer_append_string(output_buffer, "@ LambdaNode (location: ", 24);
5603  prettyprint_location(output_buffer, parser, &node->location);
5604  pm_buffer_append_string(output_buffer, ")\n", 2);
5605 
5606  // locals
5607  {
5608  pm_buffer_concat(output_buffer, prefix_buffer);
5609  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
5610  pm_buffer_append_string(output_buffer, " [", 2);
5611  for (uint32_t index = 0; index < cast->locals.size; index++) {
5612  if (index != 0) pm_buffer_append_string(output_buffer, ", ", 2);
5613  prettyprint_constant(output_buffer, parser, cast->locals.ids[index]);
5614  }
5615  pm_buffer_append_string(output_buffer, "]\n", 2);
5616  }
5617 
5618  // operator_loc
5619  {
5620  pm_buffer_concat(output_buffer, prefix_buffer);
5621  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
5622  pm_location_t *location = &cast->operator_loc;
5623  pm_buffer_append_byte(output_buffer, ' ');
5624  prettyprint_location(output_buffer, parser, location);
5625  pm_buffer_append_string(output_buffer, " = \"", 4);
5626  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5627  pm_buffer_append_string(output_buffer, "\"\n", 2);
5628  }
5629 
5630  // opening_loc
5631  {
5632  pm_buffer_concat(output_buffer, prefix_buffer);
5633  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
5634  pm_location_t *location = &cast->opening_loc;
5635  pm_buffer_append_byte(output_buffer, ' ');
5636  prettyprint_location(output_buffer, parser, location);
5637  pm_buffer_append_string(output_buffer, " = \"", 4);
5638  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5639  pm_buffer_append_string(output_buffer, "\"\n", 2);
5640  }
5641 
5642  // closing_loc
5643  {
5644  pm_buffer_concat(output_buffer, prefix_buffer);
5645  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
5646  pm_location_t *location = &cast->closing_loc;
5647  pm_buffer_append_byte(output_buffer, ' ');
5648  prettyprint_location(output_buffer, parser, location);
5649  pm_buffer_append_string(output_buffer, " = \"", 4);
5650  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5651  pm_buffer_append_string(output_buffer, "\"\n", 2);
5652  }
5653 
5654  // parameters
5655  {
5656  pm_buffer_concat(output_buffer, prefix_buffer);
5657  pm_buffer_append_string(output_buffer, "+-- parameters:", 15);
5658  if (cast->parameters == NULL) {
5659  pm_buffer_append_string(output_buffer, " nil\n", 5);
5660  } else {
5661  pm_buffer_append_byte(output_buffer, '\n');
5662 
5663  size_t prefix_length = prefix_buffer->length;
5664  pm_buffer_append_string(prefix_buffer, "| ", 4);
5665  pm_buffer_concat(output_buffer, prefix_buffer);
5666  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->parameters, prefix_buffer);
5667  prefix_buffer->length = prefix_length;
5668  }
5669  }
5670 
5671  // body
5672  {
5673  pm_buffer_concat(output_buffer, prefix_buffer);
5674  pm_buffer_append_string(output_buffer, "+-- body:", 9);
5675  if (cast->body == NULL) {
5676  pm_buffer_append_string(output_buffer, " nil\n", 5);
5677  } else {
5678  pm_buffer_append_byte(output_buffer, '\n');
5679 
5680  size_t prefix_length = prefix_buffer->length;
5681  pm_buffer_append_string(prefix_buffer, " ", 4);
5682  pm_buffer_concat(output_buffer, prefix_buffer);
5683  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body, prefix_buffer);
5684  prefix_buffer->length = prefix_length;
5685  }
5686  }
5687 
5688  break;
5689  }
5692  pm_buffer_append_string(output_buffer, "@ LocalVariableAndWriteNode (location: ", 39);
5693  prettyprint_location(output_buffer, parser, &node->location);
5694  pm_buffer_append_string(output_buffer, ")\n", 2);
5695 
5696  // name_loc
5697  {
5698  pm_buffer_concat(output_buffer, prefix_buffer);
5699  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
5700  pm_location_t *location = &cast->name_loc;
5701  pm_buffer_append_byte(output_buffer, ' ');
5702  prettyprint_location(output_buffer, parser, location);
5703  pm_buffer_append_string(output_buffer, " = \"", 4);
5704  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5705  pm_buffer_append_string(output_buffer, "\"\n", 2);
5706  }
5707 
5708  // operator_loc
5709  {
5710  pm_buffer_concat(output_buffer, prefix_buffer);
5711  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
5712  pm_location_t *location = &cast->operator_loc;
5713  pm_buffer_append_byte(output_buffer, ' ');
5714  prettyprint_location(output_buffer, parser, location);
5715  pm_buffer_append_string(output_buffer, " = \"", 4);
5716  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5717  pm_buffer_append_string(output_buffer, "\"\n", 2);
5718  }
5719 
5720  // value
5721  {
5722  pm_buffer_concat(output_buffer, prefix_buffer);
5723  pm_buffer_append_string(output_buffer, "+-- value:", 10);
5724  pm_buffer_append_byte(output_buffer, '\n');
5725 
5726  size_t prefix_length = prefix_buffer->length;
5727  pm_buffer_append_string(prefix_buffer, "| ", 4);
5728  pm_buffer_concat(output_buffer, prefix_buffer);
5729  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
5730  prefix_buffer->length = prefix_length;
5731  }
5732 
5733  // name
5734  {
5735  pm_buffer_concat(output_buffer, prefix_buffer);
5736  pm_buffer_append_string(output_buffer, "+-- name:", 9);
5737  pm_buffer_append_byte(output_buffer, ' ');
5738  prettyprint_constant(output_buffer, parser, cast->name);
5739  pm_buffer_append_byte(output_buffer, '\n');
5740  }
5741 
5742  // depth
5743  {
5744  pm_buffer_concat(output_buffer, prefix_buffer);
5745  pm_buffer_append_string(output_buffer, "+-- depth:", 10);
5746  pm_buffer_append_format(output_buffer, " %" PRIu32 "\n", cast->depth);
5747  }
5748 
5749  break;
5750  }
5753  pm_buffer_append_string(output_buffer, "@ LocalVariableOperatorWriteNode (location: ", 44);
5754  prettyprint_location(output_buffer, parser, &node->location);
5755  pm_buffer_append_string(output_buffer, ")\n", 2);
5756 
5757  // name_loc
5758  {
5759  pm_buffer_concat(output_buffer, prefix_buffer);
5760  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
5761  pm_location_t *location = &cast->name_loc;
5762  pm_buffer_append_byte(output_buffer, ' ');
5763  prettyprint_location(output_buffer, parser, location);
5764  pm_buffer_append_string(output_buffer, " = \"", 4);
5765  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5766  pm_buffer_append_string(output_buffer, "\"\n", 2);
5767  }
5768 
5769  // binary_operator_loc
5770  {
5771  pm_buffer_concat(output_buffer, prefix_buffer);
5772  pm_buffer_append_string(output_buffer, "+-- binary_operator_loc:", 24);
5773  pm_location_t *location = &cast->binary_operator_loc;
5774  pm_buffer_append_byte(output_buffer, ' ');
5775  prettyprint_location(output_buffer, parser, location);
5776  pm_buffer_append_string(output_buffer, " = \"", 4);
5777  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5778  pm_buffer_append_string(output_buffer, "\"\n", 2);
5779  }
5780 
5781  // value
5782  {
5783  pm_buffer_concat(output_buffer, prefix_buffer);
5784  pm_buffer_append_string(output_buffer, "+-- value:", 10);
5785  pm_buffer_append_byte(output_buffer, '\n');
5786 
5787  size_t prefix_length = prefix_buffer->length;
5788  pm_buffer_append_string(prefix_buffer, "| ", 4);
5789  pm_buffer_concat(output_buffer, prefix_buffer);
5790  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
5791  prefix_buffer->length = prefix_length;
5792  }
5793 
5794  // name
5795  {
5796  pm_buffer_concat(output_buffer, prefix_buffer);
5797  pm_buffer_append_string(output_buffer, "+-- name:", 9);
5798  pm_buffer_append_byte(output_buffer, ' ');
5799  prettyprint_constant(output_buffer, parser, cast->name);
5800  pm_buffer_append_byte(output_buffer, '\n');
5801  }
5802 
5803  // binary_operator
5804  {
5805  pm_buffer_concat(output_buffer, prefix_buffer);
5806  pm_buffer_append_string(output_buffer, "+-- binary_operator:", 20);
5807  pm_buffer_append_byte(output_buffer, ' ');
5808  prettyprint_constant(output_buffer, parser, cast->binary_operator);
5809  pm_buffer_append_byte(output_buffer, '\n');
5810  }
5811 
5812  // depth
5813  {
5814  pm_buffer_concat(output_buffer, prefix_buffer);
5815  pm_buffer_append_string(output_buffer, "+-- depth:", 10);
5816  pm_buffer_append_format(output_buffer, " %" PRIu32 "\n", cast->depth);
5817  }
5818 
5819  break;
5820  }
5823  pm_buffer_append_string(output_buffer, "@ LocalVariableOrWriteNode (location: ", 38);
5824  prettyprint_location(output_buffer, parser, &node->location);
5825  pm_buffer_append_string(output_buffer, ")\n", 2);
5826 
5827  // name_loc
5828  {
5829  pm_buffer_concat(output_buffer, prefix_buffer);
5830  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
5831  pm_location_t *location = &cast->name_loc;
5832  pm_buffer_append_byte(output_buffer, ' ');
5833  prettyprint_location(output_buffer, parser, location);
5834  pm_buffer_append_string(output_buffer, " = \"", 4);
5835  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5836  pm_buffer_append_string(output_buffer, "\"\n", 2);
5837  }
5838 
5839  // operator_loc
5840  {
5841  pm_buffer_concat(output_buffer, prefix_buffer);
5842  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
5843  pm_location_t *location = &cast->operator_loc;
5844  pm_buffer_append_byte(output_buffer, ' ');
5845  prettyprint_location(output_buffer, parser, location);
5846  pm_buffer_append_string(output_buffer, " = \"", 4);
5847  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5848  pm_buffer_append_string(output_buffer, "\"\n", 2);
5849  }
5850 
5851  // value
5852  {
5853  pm_buffer_concat(output_buffer, prefix_buffer);
5854  pm_buffer_append_string(output_buffer, "+-- value:", 10);
5855  pm_buffer_append_byte(output_buffer, '\n');
5856 
5857  size_t prefix_length = prefix_buffer->length;
5858  pm_buffer_append_string(prefix_buffer, "| ", 4);
5859  pm_buffer_concat(output_buffer, prefix_buffer);
5860  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
5861  prefix_buffer->length = prefix_length;
5862  }
5863 
5864  // name
5865  {
5866  pm_buffer_concat(output_buffer, prefix_buffer);
5867  pm_buffer_append_string(output_buffer, "+-- name:", 9);
5868  pm_buffer_append_byte(output_buffer, ' ');
5869  prettyprint_constant(output_buffer, parser, cast->name);
5870  pm_buffer_append_byte(output_buffer, '\n');
5871  }
5872 
5873  // depth
5874  {
5875  pm_buffer_concat(output_buffer, prefix_buffer);
5876  pm_buffer_append_string(output_buffer, "+-- depth:", 10);
5877  pm_buffer_append_format(output_buffer, " %" PRIu32 "\n", cast->depth);
5878  }
5879 
5880  break;
5881  }
5884  pm_buffer_append_string(output_buffer, "@ LocalVariableReadNode (location: ", 35);
5885  prettyprint_location(output_buffer, parser, &node->location);
5886  pm_buffer_append_string(output_buffer, ")\n", 2);
5887 
5888  // name
5889  {
5890  pm_buffer_concat(output_buffer, prefix_buffer);
5891  pm_buffer_append_string(output_buffer, "+-- name:", 9);
5892  pm_buffer_append_byte(output_buffer, ' ');
5893  prettyprint_constant(output_buffer, parser, cast->name);
5894  pm_buffer_append_byte(output_buffer, '\n');
5895  }
5896 
5897  // depth
5898  {
5899  pm_buffer_concat(output_buffer, prefix_buffer);
5900  pm_buffer_append_string(output_buffer, "+-- depth:", 10);
5901  pm_buffer_append_format(output_buffer, " %" PRIu32 "\n", cast->depth);
5902  }
5903 
5904  break;
5905  }
5908  pm_buffer_append_string(output_buffer, "@ LocalVariableTargetNode (location: ", 37);
5909  prettyprint_location(output_buffer, parser, &node->location);
5910  pm_buffer_append_string(output_buffer, ")\n", 2);
5911 
5912  // name
5913  {
5914  pm_buffer_concat(output_buffer, prefix_buffer);
5915  pm_buffer_append_string(output_buffer, "+-- name:", 9);
5916  pm_buffer_append_byte(output_buffer, ' ');
5917  prettyprint_constant(output_buffer, parser, cast->name);
5918  pm_buffer_append_byte(output_buffer, '\n');
5919  }
5920 
5921  // depth
5922  {
5923  pm_buffer_concat(output_buffer, prefix_buffer);
5924  pm_buffer_append_string(output_buffer, "+-- depth:", 10);
5925  pm_buffer_append_format(output_buffer, " %" PRIu32 "\n", cast->depth);
5926  }
5927 
5928  break;
5929  }
5932  pm_buffer_append_string(output_buffer, "@ LocalVariableWriteNode (location: ", 36);
5933  prettyprint_location(output_buffer, parser, &node->location);
5934  pm_buffer_append_string(output_buffer, ")\n", 2);
5935 
5936  // name
5937  {
5938  pm_buffer_concat(output_buffer, prefix_buffer);
5939  pm_buffer_append_string(output_buffer, "+-- name:", 9);
5940  pm_buffer_append_byte(output_buffer, ' ');
5941  prettyprint_constant(output_buffer, parser, cast->name);
5942  pm_buffer_append_byte(output_buffer, '\n');
5943  }
5944 
5945  // depth
5946  {
5947  pm_buffer_concat(output_buffer, prefix_buffer);
5948  pm_buffer_append_string(output_buffer, "+-- depth:", 10);
5949  pm_buffer_append_format(output_buffer, " %" PRIu32 "\n", cast->depth);
5950  }
5951 
5952  // name_loc
5953  {
5954  pm_buffer_concat(output_buffer, prefix_buffer);
5955  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
5956  pm_location_t *location = &cast->name_loc;
5957  pm_buffer_append_byte(output_buffer, ' ');
5958  prettyprint_location(output_buffer, parser, location);
5959  pm_buffer_append_string(output_buffer, " = \"", 4);
5960  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5961  pm_buffer_append_string(output_buffer, "\"\n", 2);
5962  }
5963 
5964  // value
5965  {
5966  pm_buffer_concat(output_buffer, prefix_buffer);
5967  pm_buffer_append_string(output_buffer, "+-- value:", 10);
5968  pm_buffer_append_byte(output_buffer, '\n');
5969 
5970  size_t prefix_length = prefix_buffer->length;
5971  pm_buffer_append_string(prefix_buffer, "| ", 4);
5972  pm_buffer_concat(output_buffer, prefix_buffer);
5973  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
5974  prefix_buffer->length = prefix_length;
5975  }
5976 
5977  // operator_loc
5978  {
5979  pm_buffer_concat(output_buffer, prefix_buffer);
5980  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
5981  pm_location_t *location = &cast->operator_loc;
5982  pm_buffer_append_byte(output_buffer, ' ');
5983  prettyprint_location(output_buffer, parser, location);
5984  pm_buffer_append_string(output_buffer, " = \"", 4);
5985  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
5986  pm_buffer_append_string(output_buffer, "\"\n", 2);
5987  }
5988 
5989  break;
5990  }
5991  case PM_MATCH_LAST_LINE_NODE: {
5993  pm_buffer_append_string(output_buffer, "@ MatchLastLineNode (location: ", 31);
5994  prettyprint_location(output_buffer, parser, &node->location);
5995  pm_buffer_append_string(output_buffer, ")\n", 2);
5996 
5997  // RegularExpressionFlags
5998  {
5999  pm_buffer_concat(output_buffer, prefix_buffer);
6000  pm_buffer_append_string(output_buffer, "+-- RegularExpressionFlags:", 27);
6001  bool found = false;
6003  if (found) pm_buffer_append_byte(output_buffer, ',');
6004  pm_buffer_append_string(output_buffer, " ignore_case", 12);
6005  found = true;
6006  }
6008  if (found) pm_buffer_append_byte(output_buffer, ',');
6009  pm_buffer_append_string(output_buffer, " extended", 9);
6010  found = true;
6011  }
6013  if (found) pm_buffer_append_byte(output_buffer, ',');
6014  pm_buffer_append_string(output_buffer, " multi_line", 11);
6015  found = true;
6016  }
6018  if (found) pm_buffer_append_byte(output_buffer, ',');
6019  pm_buffer_append_string(output_buffer, " once", 5);
6020  found = true;
6021  }
6023  if (found) pm_buffer_append_byte(output_buffer, ',');
6024  pm_buffer_append_string(output_buffer, " euc_jp", 7);
6025  found = true;
6026  }
6028  if (found) pm_buffer_append_byte(output_buffer, ',');
6029  pm_buffer_append_string(output_buffer, " ascii_8bit", 11);
6030  found = true;
6031  }
6033  if (found) pm_buffer_append_byte(output_buffer, ',');
6034  pm_buffer_append_string(output_buffer, " windows_31j", 12);
6035  found = true;
6036  }
6038  if (found) pm_buffer_append_byte(output_buffer, ',');
6039  pm_buffer_append_string(output_buffer, " utf_8", 6);
6040  found = true;
6041  }
6043  if (found) pm_buffer_append_byte(output_buffer, ',');
6044  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
6045  found = true;
6046  }
6048  if (found) pm_buffer_append_byte(output_buffer, ',');
6049  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
6050  found = true;
6051  }
6053  if (found) pm_buffer_append_byte(output_buffer, ',');
6054  pm_buffer_append_string(output_buffer, " forced_us_ascii_encoding", 25);
6055  found = true;
6056  }
6057  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
6058  pm_buffer_append_byte(output_buffer, '\n');
6059  }
6060 
6061  // opening_loc
6062  {
6063  pm_buffer_concat(output_buffer, prefix_buffer);
6064  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
6065  pm_location_t *location = &cast->opening_loc;
6066  pm_buffer_append_byte(output_buffer, ' ');
6067  prettyprint_location(output_buffer, parser, location);
6068  pm_buffer_append_string(output_buffer, " = \"", 4);
6069  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6070  pm_buffer_append_string(output_buffer, "\"\n", 2);
6071  }
6072 
6073  // content_loc
6074  {
6075  pm_buffer_concat(output_buffer, prefix_buffer);
6076  pm_buffer_append_string(output_buffer, "+-- content_loc:", 16);
6077  pm_location_t *location = &cast->content_loc;
6078  pm_buffer_append_byte(output_buffer, ' ');
6079  prettyprint_location(output_buffer, parser, location);
6080  pm_buffer_append_string(output_buffer, " = \"", 4);
6081  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6082  pm_buffer_append_string(output_buffer, "\"\n", 2);
6083  }
6084 
6085  // closing_loc
6086  {
6087  pm_buffer_concat(output_buffer, prefix_buffer);
6088  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
6089  pm_location_t *location = &cast->closing_loc;
6090  pm_buffer_append_byte(output_buffer, ' ');
6091  prettyprint_location(output_buffer, parser, location);
6092  pm_buffer_append_string(output_buffer, " = \"", 4);
6093  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6094  pm_buffer_append_string(output_buffer, "\"\n", 2);
6095  }
6096 
6097  // unescaped
6098  {
6099  pm_buffer_concat(output_buffer, prefix_buffer);
6100  pm_buffer_append_string(output_buffer, "+-- unescaped:", 14);
6101  pm_buffer_append_string(output_buffer, " \"", 2);
6102  pm_buffer_append_source(output_buffer, pm_string_source(&cast->unescaped), pm_string_length(&cast->unescaped), PM_BUFFER_ESCAPING_RUBY);
6103  pm_buffer_append_string(output_buffer, "\"\n", 2);
6104  }
6105 
6106  break;
6107  }
6108  case PM_MATCH_PREDICATE_NODE: {
6110  pm_buffer_append_string(output_buffer, "@ MatchPredicateNode (location: ", 32);
6111  prettyprint_location(output_buffer, parser, &node->location);
6112  pm_buffer_append_string(output_buffer, ")\n", 2);
6113 
6114  // value
6115  {
6116  pm_buffer_concat(output_buffer, prefix_buffer);
6117  pm_buffer_append_string(output_buffer, "+-- value:", 10);
6118  pm_buffer_append_byte(output_buffer, '\n');
6119 
6120  size_t prefix_length = prefix_buffer->length;
6121  pm_buffer_append_string(prefix_buffer, "| ", 4);
6122  pm_buffer_concat(output_buffer, prefix_buffer);
6123  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
6124  prefix_buffer->length = prefix_length;
6125  }
6126 
6127  // pattern
6128  {
6129  pm_buffer_concat(output_buffer, prefix_buffer);
6130  pm_buffer_append_string(output_buffer, "+-- pattern:", 12);
6131  pm_buffer_append_byte(output_buffer, '\n');
6132 
6133  size_t prefix_length = prefix_buffer->length;
6134  pm_buffer_append_string(prefix_buffer, "| ", 4);
6135  pm_buffer_concat(output_buffer, prefix_buffer);
6136  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->pattern, prefix_buffer);
6137  prefix_buffer->length = prefix_length;
6138  }
6139 
6140  // operator_loc
6141  {
6142  pm_buffer_concat(output_buffer, prefix_buffer);
6143  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
6144  pm_location_t *location = &cast->operator_loc;
6145  pm_buffer_append_byte(output_buffer, ' ');
6146  prettyprint_location(output_buffer, parser, location);
6147  pm_buffer_append_string(output_buffer, " = \"", 4);
6148  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6149  pm_buffer_append_string(output_buffer, "\"\n", 2);
6150  }
6151 
6152  break;
6153  }
6154  case PM_MATCH_REQUIRED_NODE: {
6156  pm_buffer_append_string(output_buffer, "@ MatchRequiredNode (location: ", 31);
6157  prettyprint_location(output_buffer, parser, &node->location);
6158  pm_buffer_append_string(output_buffer, ")\n", 2);
6159 
6160  // value
6161  {
6162  pm_buffer_concat(output_buffer, prefix_buffer);
6163  pm_buffer_append_string(output_buffer, "+-- value:", 10);
6164  pm_buffer_append_byte(output_buffer, '\n');
6165 
6166  size_t prefix_length = prefix_buffer->length;
6167  pm_buffer_append_string(prefix_buffer, "| ", 4);
6168  pm_buffer_concat(output_buffer, prefix_buffer);
6169  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
6170  prefix_buffer->length = prefix_length;
6171  }
6172 
6173  // pattern
6174  {
6175  pm_buffer_concat(output_buffer, prefix_buffer);
6176  pm_buffer_append_string(output_buffer, "+-- pattern:", 12);
6177  pm_buffer_append_byte(output_buffer, '\n');
6178 
6179  size_t prefix_length = prefix_buffer->length;
6180  pm_buffer_append_string(prefix_buffer, "| ", 4);
6181  pm_buffer_concat(output_buffer, prefix_buffer);
6182  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->pattern, prefix_buffer);
6183  prefix_buffer->length = prefix_length;
6184  }
6185 
6186  // operator_loc
6187  {
6188  pm_buffer_concat(output_buffer, prefix_buffer);
6189  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
6190  pm_location_t *location = &cast->operator_loc;
6191  pm_buffer_append_byte(output_buffer, ' ');
6192  prettyprint_location(output_buffer, parser, location);
6193  pm_buffer_append_string(output_buffer, " = \"", 4);
6194  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6195  pm_buffer_append_string(output_buffer, "\"\n", 2);
6196  }
6197 
6198  break;
6199  }
6200  case PM_MATCH_WRITE_NODE: {
6202  pm_buffer_append_string(output_buffer, "@ MatchWriteNode (location: ", 28);
6203  prettyprint_location(output_buffer, parser, &node->location);
6204  pm_buffer_append_string(output_buffer, ")\n", 2);
6205 
6206  // call
6207  {
6208  pm_buffer_concat(output_buffer, prefix_buffer);
6209  pm_buffer_append_string(output_buffer, "+-- call:", 9);
6210  pm_buffer_append_byte(output_buffer, '\n');
6211 
6212  size_t prefix_length = prefix_buffer->length;
6213  pm_buffer_append_string(prefix_buffer, "| ", 4);
6214  pm_buffer_concat(output_buffer, prefix_buffer);
6215  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->call, prefix_buffer);
6216  prefix_buffer->length = prefix_length;
6217  }
6218 
6219  // targets
6220  {
6221  pm_buffer_concat(output_buffer, prefix_buffer);
6222  pm_buffer_append_string(output_buffer, "+-- targets:", 12);
6223  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->targets.size));
6224 
6225  size_t last_index = cast->targets.size;
6226  for (uint32_t index = 0; index < last_index; index++) {
6227  size_t prefix_length = prefix_buffer->length;
6228  pm_buffer_append_string(prefix_buffer, " ", 4);
6229  pm_buffer_concat(output_buffer, prefix_buffer);
6230  pm_buffer_append_string(output_buffer, "+-- ", 4);
6231  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6232  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->targets.nodes[index], prefix_buffer);
6233  prefix_buffer->length = prefix_length;
6234  }
6235  }
6236 
6237  break;
6238  }
6239  case PM_MISSING_NODE: {
6240  pm_buffer_append_string(output_buffer, "@ MissingNode (location: ", 25);
6241  prettyprint_location(output_buffer, parser, &node->location);
6242  pm_buffer_append_string(output_buffer, ")\n", 2);
6243 
6244  break;
6245  }
6246  case PM_MODULE_NODE: {
6247  pm_module_node_t *cast = (pm_module_node_t *) node;
6248  pm_buffer_append_string(output_buffer, "@ ModuleNode (location: ", 24);
6249  prettyprint_location(output_buffer, parser, &node->location);
6250  pm_buffer_append_string(output_buffer, ")\n", 2);
6251 
6252  // locals
6253  {
6254  pm_buffer_concat(output_buffer, prefix_buffer);
6255  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
6256  pm_buffer_append_string(output_buffer, " [", 2);
6257  for (uint32_t index = 0; index < cast->locals.size; index++) {
6258  if (index != 0) pm_buffer_append_string(output_buffer, ", ", 2);
6259  prettyprint_constant(output_buffer, parser, cast->locals.ids[index]);
6260  }
6261  pm_buffer_append_string(output_buffer, "]\n", 2);
6262  }
6263 
6264  // module_keyword_loc
6265  {
6266  pm_buffer_concat(output_buffer, prefix_buffer);
6267  pm_buffer_append_string(output_buffer, "+-- module_keyword_loc:", 23);
6268  pm_location_t *location = &cast->module_keyword_loc;
6269  pm_buffer_append_byte(output_buffer, ' ');
6270  prettyprint_location(output_buffer, parser, location);
6271  pm_buffer_append_string(output_buffer, " = \"", 4);
6272  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6273  pm_buffer_append_string(output_buffer, "\"\n", 2);
6274  }
6275 
6276  // constant_path
6277  {
6278  pm_buffer_concat(output_buffer, prefix_buffer);
6279  pm_buffer_append_string(output_buffer, "+-- constant_path:", 18);
6280  pm_buffer_append_byte(output_buffer, '\n');
6281 
6282  size_t prefix_length = prefix_buffer->length;
6283  pm_buffer_append_string(prefix_buffer, "| ", 4);
6284  pm_buffer_concat(output_buffer, prefix_buffer);
6285  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->constant_path, prefix_buffer);
6286  prefix_buffer->length = prefix_length;
6287  }
6288 
6289  // body
6290  {
6291  pm_buffer_concat(output_buffer, prefix_buffer);
6292  pm_buffer_append_string(output_buffer, "+-- body:", 9);
6293  if (cast->body == NULL) {
6294  pm_buffer_append_string(output_buffer, " nil\n", 5);
6295  } else {
6296  pm_buffer_append_byte(output_buffer, '\n');
6297 
6298  size_t prefix_length = prefix_buffer->length;
6299  pm_buffer_append_string(prefix_buffer, "| ", 4);
6300  pm_buffer_concat(output_buffer, prefix_buffer);
6301  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body, prefix_buffer);
6302  prefix_buffer->length = prefix_length;
6303  }
6304  }
6305 
6306  // end_keyword_loc
6307  {
6308  pm_buffer_concat(output_buffer, prefix_buffer);
6309  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
6310  pm_location_t *location = &cast->end_keyword_loc;
6311  pm_buffer_append_byte(output_buffer, ' ');
6312  prettyprint_location(output_buffer, parser, location);
6313  pm_buffer_append_string(output_buffer, " = \"", 4);
6314  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6315  pm_buffer_append_string(output_buffer, "\"\n", 2);
6316  }
6317 
6318  // name
6319  {
6320  pm_buffer_concat(output_buffer, prefix_buffer);
6321  pm_buffer_append_string(output_buffer, "+-- name:", 9);
6322  pm_buffer_append_byte(output_buffer, ' ');
6323  prettyprint_constant(output_buffer, parser, cast->name);
6324  pm_buffer_append_byte(output_buffer, '\n');
6325  }
6326 
6327  break;
6328  }
6329  case PM_MULTI_TARGET_NODE: {
6331  pm_buffer_append_string(output_buffer, "@ MultiTargetNode (location: ", 29);
6332  prettyprint_location(output_buffer, parser, &node->location);
6333  pm_buffer_append_string(output_buffer, ")\n", 2);
6334 
6335  // lefts
6336  {
6337  pm_buffer_concat(output_buffer, prefix_buffer);
6338  pm_buffer_append_string(output_buffer, "+-- lefts:", 10);
6339  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->lefts.size));
6340 
6341  size_t last_index = cast->lefts.size;
6342  for (uint32_t index = 0; index < last_index; index++) {
6343  size_t prefix_length = prefix_buffer->length;
6344  pm_buffer_append_string(prefix_buffer, "| ", 4);
6345  pm_buffer_concat(output_buffer, prefix_buffer);
6346  pm_buffer_append_string(output_buffer, "+-- ", 4);
6347  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6348  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->lefts.nodes[index], prefix_buffer);
6349  prefix_buffer->length = prefix_length;
6350  }
6351  }
6352 
6353  // rest
6354  {
6355  pm_buffer_concat(output_buffer, prefix_buffer);
6356  pm_buffer_append_string(output_buffer, "+-- rest:", 9);
6357  if (cast->rest == NULL) {
6358  pm_buffer_append_string(output_buffer, " nil\n", 5);
6359  } else {
6360  pm_buffer_append_byte(output_buffer, '\n');
6361 
6362  size_t prefix_length = prefix_buffer->length;
6363  pm_buffer_append_string(prefix_buffer, "| ", 4);
6364  pm_buffer_concat(output_buffer, prefix_buffer);
6365  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rest, prefix_buffer);
6366  prefix_buffer->length = prefix_length;
6367  }
6368  }
6369 
6370  // rights
6371  {
6372  pm_buffer_concat(output_buffer, prefix_buffer);
6373  pm_buffer_append_string(output_buffer, "+-- rights:", 11);
6374  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->rights.size));
6375 
6376  size_t last_index = cast->rights.size;
6377  for (uint32_t index = 0; index < last_index; index++) {
6378  size_t prefix_length = prefix_buffer->length;
6379  pm_buffer_append_string(prefix_buffer, "| ", 4);
6380  pm_buffer_concat(output_buffer, prefix_buffer);
6381  pm_buffer_append_string(output_buffer, "+-- ", 4);
6382  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6383  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rights.nodes[index], prefix_buffer);
6384  prefix_buffer->length = prefix_length;
6385  }
6386  }
6387 
6388  // lparen_loc
6389  {
6390  pm_buffer_concat(output_buffer, prefix_buffer);
6391  pm_buffer_append_string(output_buffer, "+-- lparen_loc:", 15);
6392  pm_location_t *location = &cast->lparen_loc;
6393  if (location->start == NULL) {
6394  pm_buffer_append_string(output_buffer, " nil\n", 5);
6395  } else {
6396  pm_buffer_append_byte(output_buffer, ' ');
6397  prettyprint_location(output_buffer, parser, location);
6398  pm_buffer_append_string(output_buffer, " = \"", 4);
6399  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6400  pm_buffer_append_string(output_buffer, "\"\n", 2);
6401  }
6402  }
6403 
6404  // rparen_loc
6405  {
6406  pm_buffer_concat(output_buffer, prefix_buffer);
6407  pm_buffer_append_string(output_buffer, "+-- rparen_loc:", 15);
6408  pm_location_t *location = &cast->rparen_loc;
6409  if (location->start == NULL) {
6410  pm_buffer_append_string(output_buffer, " nil\n", 5);
6411  } else {
6412  pm_buffer_append_byte(output_buffer, ' ');
6413  prettyprint_location(output_buffer, parser, location);
6414  pm_buffer_append_string(output_buffer, " = \"", 4);
6415  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6416  pm_buffer_append_string(output_buffer, "\"\n", 2);
6417  }
6418  }
6419 
6420  break;
6421  }
6422  case PM_MULTI_WRITE_NODE: {
6424  pm_buffer_append_string(output_buffer, "@ MultiWriteNode (location: ", 28);
6425  prettyprint_location(output_buffer, parser, &node->location);
6426  pm_buffer_append_string(output_buffer, ")\n", 2);
6427 
6428  // lefts
6429  {
6430  pm_buffer_concat(output_buffer, prefix_buffer);
6431  pm_buffer_append_string(output_buffer, "+-- lefts:", 10);
6432  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->lefts.size));
6433 
6434  size_t last_index = cast->lefts.size;
6435  for (uint32_t index = 0; index < last_index; index++) {
6436  size_t prefix_length = prefix_buffer->length;
6437  pm_buffer_append_string(prefix_buffer, "| ", 4);
6438  pm_buffer_concat(output_buffer, prefix_buffer);
6439  pm_buffer_append_string(output_buffer, "+-- ", 4);
6440  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6441  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->lefts.nodes[index], prefix_buffer);
6442  prefix_buffer->length = prefix_length;
6443  }
6444  }
6445 
6446  // rest
6447  {
6448  pm_buffer_concat(output_buffer, prefix_buffer);
6449  pm_buffer_append_string(output_buffer, "+-- rest:", 9);
6450  if (cast->rest == NULL) {
6451  pm_buffer_append_string(output_buffer, " nil\n", 5);
6452  } else {
6453  pm_buffer_append_byte(output_buffer, '\n');
6454 
6455  size_t prefix_length = prefix_buffer->length;
6456  pm_buffer_append_string(prefix_buffer, "| ", 4);
6457  pm_buffer_concat(output_buffer, prefix_buffer);
6458  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rest, prefix_buffer);
6459  prefix_buffer->length = prefix_length;
6460  }
6461  }
6462 
6463  // rights
6464  {
6465  pm_buffer_concat(output_buffer, prefix_buffer);
6466  pm_buffer_append_string(output_buffer, "+-- rights:", 11);
6467  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->rights.size));
6468 
6469  size_t last_index = cast->rights.size;
6470  for (uint32_t index = 0; index < last_index; index++) {
6471  size_t prefix_length = prefix_buffer->length;
6472  pm_buffer_append_string(prefix_buffer, "| ", 4);
6473  pm_buffer_concat(output_buffer, prefix_buffer);
6474  pm_buffer_append_string(output_buffer, "+-- ", 4);
6475  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6476  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rights.nodes[index], prefix_buffer);
6477  prefix_buffer->length = prefix_length;
6478  }
6479  }
6480 
6481  // lparen_loc
6482  {
6483  pm_buffer_concat(output_buffer, prefix_buffer);
6484  pm_buffer_append_string(output_buffer, "+-- lparen_loc:", 15);
6485  pm_location_t *location = &cast->lparen_loc;
6486  if (location->start == NULL) {
6487  pm_buffer_append_string(output_buffer, " nil\n", 5);
6488  } else {
6489  pm_buffer_append_byte(output_buffer, ' ');
6490  prettyprint_location(output_buffer, parser, location);
6491  pm_buffer_append_string(output_buffer, " = \"", 4);
6492  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6493  pm_buffer_append_string(output_buffer, "\"\n", 2);
6494  }
6495  }
6496 
6497  // rparen_loc
6498  {
6499  pm_buffer_concat(output_buffer, prefix_buffer);
6500  pm_buffer_append_string(output_buffer, "+-- rparen_loc:", 15);
6501  pm_location_t *location = &cast->rparen_loc;
6502  if (location->start == NULL) {
6503  pm_buffer_append_string(output_buffer, " nil\n", 5);
6504  } else {
6505  pm_buffer_append_byte(output_buffer, ' ');
6506  prettyprint_location(output_buffer, parser, location);
6507  pm_buffer_append_string(output_buffer, " = \"", 4);
6508  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6509  pm_buffer_append_string(output_buffer, "\"\n", 2);
6510  }
6511  }
6512 
6513  // operator_loc
6514  {
6515  pm_buffer_concat(output_buffer, prefix_buffer);
6516  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
6517  pm_location_t *location = &cast->operator_loc;
6518  pm_buffer_append_byte(output_buffer, ' ');
6519  prettyprint_location(output_buffer, parser, location);
6520  pm_buffer_append_string(output_buffer, " = \"", 4);
6521  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6522  pm_buffer_append_string(output_buffer, "\"\n", 2);
6523  }
6524 
6525  // value
6526  {
6527  pm_buffer_concat(output_buffer, prefix_buffer);
6528  pm_buffer_append_string(output_buffer, "+-- value:", 10);
6529  pm_buffer_append_byte(output_buffer, '\n');
6530 
6531  size_t prefix_length = prefix_buffer->length;
6532  pm_buffer_append_string(prefix_buffer, " ", 4);
6533  pm_buffer_concat(output_buffer, prefix_buffer);
6534  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
6535  prefix_buffer->length = prefix_length;
6536  }
6537 
6538  break;
6539  }
6540  case PM_NEXT_NODE: {
6541  pm_next_node_t *cast = (pm_next_node_t *) node;
6542  pm_buffer_append_string(output_buffer, "@ NextNode (location: ", 22);
6543  prettyprint_location(output_buffer, parser, &node->location);
6544  pm_buffer_append_string(output_buffer, ")\n", 2);
6545 
6546  // arguments
6547  {
6548  pm_buffer_concat(output_buffer, prefix_buffer);
6549  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
6550  if (cast->arguments == NULL) {
6551  pm_buffer_append_string(output_buffer, " nil\n", 5);
6552  } else {
6553  pm_buffer_append_byte(output_buffer, '\n');
6554 
6555  size_t prefix_length = prefix_buffer->length;
6556  pm_buffer_append_string(prefix_buffer, "| ", 4);
6557  pm_buffer_concat(output_buffer, prefix_buffer);
6558  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
6559  prefix_buffer->length = prefix_length;
6560  }
6561  }
6562 
6563  // keyword_loc
6564  {
6565  pm_buffer_concat(output_buffer, prefix_buffer);
6566  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
6567  pm_location_t *location = &cast->keyword_loc;
6568  pm_buffer_append_byte(output_buffer, ' ');
6569  prettyprint_location(output_buffer, parser, location);
6570  pm_buffer_append_string(output_buffer, " = \"", 4);
6571  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6572  pm_buffer_append_string(output_buffer, "\"\n", 2);
6573  }
6574 
6575  break;
6576  }
6577  case PM_NIL_NODE: {
6578  pm_buffer_append_string(output_buffer, "@ NilNode (location: ", 21);
6579  prettyprint_location(output_buffer, parser, &node->location);
6580  pm_buffer_append_string(output_buffer, ")\n", 2);
6581 
6582  break;
6583  }
6586  pm_buffer_append_string(output_buffer, "@ NoKeywordsParameterNode (location: ", 37);
6587  prettyprint_location(output_buffer, parser, &node->location);
6588  pm_buffer_append_string(output_buffer, ")\n", 2);
6589 
6590  // operator_loc
6591  {
6592  pm_buffer_concat(output_buffer, prefix_buffer);
6593  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
6594  pm_location_t *location = &cast->operator_loc;
6595  pm_buffer_append_byte(output_buffer, ' ');
6596  prettyprint_location(output_buffer, parser, location);
6597  pm_buffer_append_string(output_buffer, " = \"", 4);
6598  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6599  pm_buffer_append_string(output_buffer, "\"\n", 2);
6600  }
6601 
6602  // keyword_loc
6603  {
6604  pm_buffer_concat(output_buffer, prefix_buffer);
6605  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
6606  pm_location_t *location = &cast->keyword_loc;
6607  pm_buffer_append_byte(output_buffer, ' ');
6608  prettyprint_location(output_buffer, parser, location);
6609  pm_buffer_append_string(output_buffer, " = \"", 4);
6610  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6611  pm_buffer_append_string(output_buffer, "\"\n", 2);
6612  }
6613 
6614  break;
6615  }
6618  pm_buffer_append_string(output_buffer, "@ NumberedParametersNode (location: ", 36);
6619  prettyprint_location(output_buffer, parser, &node->location);
6620  pm_buffer_append_string(output_buffer, ")\n", 2);
6621 
6622  // maximum
6623  {
6624  pm_buffer_concat(output_buffer, prefix_buffer);
6625  pm_buffer_append_string(output_buffer, "+-- maximum:", 12);
6626  pm_buffer_append_format(output_buffer, " %" PRIu8 "\n", cast->maximum);
6627  }
6628 
6629  break;
6630  }
6633  pm_buffer_append_string(output_buffer, "@ NumberedReferenceReadNode (location: ", 39);
6634  prettyprint_location(output_buffer, parser, &node->location);
6635  pm_buffer_append_string(output_buffer, ")\n", 2);
6636 
6637  // number
6638  {
6639  pm_buffer_concat(output_buffer, prefix_buffer);
6640  pm_buffer_append_string(output_buffer, "+-- number:", 11);
6641  pm_buffer_append_format(output_buffer, " %" PRIu32 "\n", cast->number);
6642  }
6643 
6644  break;
6645  }
6648  pm_buffer_append_string(output_buffer, "@ OptionalKeywordParameterNode (location: ", 42);
6649  prettyprint_location(output_buffer, parser, &node->location);
6650  pm_buffer_append_string(output_buffer, ")\n", 2);
6651 
6652  // ParameterFlags
6653  {
6654  pm_buffer_concat(output_buffer, prefix_buffer);
6655  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
6656  bool found = false;
6658  if (found) pm_buffer_append_byte(output_buffer, ',');
6659  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
6660  found = true;
6661  }
6662  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
6663  pm_buffer_append_byte(output_buffer, '\n');
6664  }
6665 
6666  // name
6667  {
6668  pm_buffer_concat(output_buffer, prefix_buffer);
6669  pm_buffer_append_string(output_buffer, "+-- name:", 9);
6670  pm_buffer_append_byte(output_buffer, ' ');
6671  prettyprint_constant(output_buffer, parser, cast->name);
6672  pm_buffer_append_byte(output_buffer, '\n');
6673  }
6674 
6675  // name_loc
6676  {
6677  pm_buffer_concat(output_buffer, prefix_buffer);
6678  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
6679  pm_location_t *location = &cast->name_loc;
6680  pm_buffer_append_byte(output_buffer, ' ');
6681  prettyprint_location(output_buffer, parser, location);
6682  pm_buffer_append_string(output_buffer, " = \"", 4);
6683  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6684  pm_buffer_append_string(output_buffer, "\"\n", 2);
6685  }
6686 
6687  // value
6688  {
6689  pm_buffer_concat(output_buffer, prefix_buffer);
6690  pm_buffer_append_string(output_buffer, "+-- value:", 10);
6691  pm_buffer_append_byte(output_buffer, '\n');
6692 
6693  size_t prefix_length = prefix_buffer->length;
6694  pm_buffer_append_string(prefix_buffer, " ", 4);
6695  pm_buffer_concat(output_buffer, prefix_buffer);
6696  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
6697  prefix_buffer->length = prefix_length;
6698  }
6699 
6700  break;
6701  }
6704  pm_buffer_append_string(output_buffer, "@ OptionalParameterNode (location: ", 35);
6705  prettyprint_location(output_buffer, parser, &node->location);
6706  pm_buffer_append_string(output_buffer, ")\n", 2);
6707 
6708  // ParameterFlags
6709  {
6710  pm_buffer_concat(output_buffer, prefix_buffer);
6711  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
6712  bool found = false;
6714  if (found) pm_buffer_append_byte(output_buffer, ',');
6715  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
6716  found = true;
6717  }
6718  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
6719  pm_buffer_append_byte(output_buffer, '\n');
6720  }
6721 
6722  // name
6723  {
6724  pm_buffer_concat(output_buffer, prefix_buffer);
6725  pm_buffer_append_string(output_buffer, "+-- name:", 9);
6726  pm_buffer_append_byte(output_buffer, ' ');
6727  prettyprint_constant(output_buffer, parser, cast->name);
6728  pm_buffer_append_byte(output_buffer, '\n');
6729  }
6730 
6731  // name_loc
6732  {
6733  pm_buffer_concat(output_buffer, prefix_buffer);
6734  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
6735  pm_location_t *location = &cast->name_loc;
6736  pm_buffer_append_byte(output_buffer, ' ');
6737  prettyprint_location(output_buffer, parser, location);
6738  pm_buffer_append_string(output_buffer, " = \"", 4);
6739  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6740  pm_buffer_append_string(output_buffer, "\"\n", 2);
6741  }
6742 
6743  // operator_loc
6744  {
6745  pm_buffer_concat(output_buffer, prefix_buffer);
6746  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
6747  pm_location_t *location = &cast->operator_loc;
6748  pm_buffer_append_byte(output_buffer, ' ');
6749  prettyprint_location(output_buffer, parser, location);
6750  pm_buffer_append_string(output_buffer, " = \"", 4);
6751  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6752  pm_buffer_append_string(output_buffer, "\"\n", 2);
6753  }
6754 
6755  // value
6756  {
6757  pm_buffer_concat(output_buffer, prefix_buffer);
6758  pm_buffer_append_string(output_buffer, "+-- value:", 10);
6759  pm_buffer_append_byte(output_buffer, '\n');
6760 
6761  size_t prefix_length = prefix_buffer->length;
6762  pm_buffer_append_string(prefix_buffer, " ", 4);
6763  pm_buffer_concat(output_buffer, prefix_buffer);
6764  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->value, prefix_buffer);
6765  prefix_buffer->length = prefix_length;
6766  }
6767 
6768  break;
6769  }
6770  case PM_OR_NODE: {
6771  pm_or_node_t *cast = (pm_or_node_t *) node;
6772  pm_buffer_append_string(output_buffer, "@ OrNode (location: ", 20);
6773  prettyprint_location(output_buffer, parser, &node->location);
6774  pm_buffer_append_string(output_buffer, ")\n", 2);
6775 
6776  // left
6777  {
6778  pm_buffer_concat(output_buffer, prefix_buffer);
6779  pm_buffer_append_string(output_buffer, "+-- left:", 9);
6780  pm_buffer_append_byte(output_buffer, '\n');
6781 
6782  size_t prefix_length = prefix_buffer->length;
6783  pm_buffer_append_string(prefix_buffer, "| ", 4);
6784  pm_buffer_concat(output_buffer, prefix_buffer);
6785  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->left, prefix_buffer);
6786  prefix_buffer->length = prefix_length;
6787  }
6788 
6789  // right
6790  {
6791  pm_buffer_concat(output_buffer, prefix_buffer);
6792  pm_buffer_append_string(output_buffer, "+-- right:", 10);
6793  pm_buffer_append_byte(output_buffer, '\n');
6794 
6795  size_t prefix_length = prefix_buffer->length;
6796  pm_buffer_append_string(prefix_buffer, "| ", 4);
6797  pm_buffer_concat(output_buffer, prefix_buffer);
6798  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->right, prefix_buffer);
6799  prefix_buffer->length = prefix_length;
6800  }
6801 
6802  // operator_loc
6803  {
6804  pm_buffer_concat(output_buffer, prefix_buffer);
6805  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
6806  pm_location_t *location = &cast->operator_loc;
6807  pm_buffer_append_byte(output_buffer, ' ');
6808  prettyprint_location(output_buffer, parser, location);
6809  pm_buffer_append_string(output_buffer, " = \"", 4);
6810  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6811  pm_buffer_append_string(output_buffer, "\"\n", 2);
6812  }
6813 
6814  break;
6815  }
6816  case PM_PARAMETERS_NODE: {
6817  pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
6818  pm_buffer_append_string(output_buffer, "@ ParametersNode (location: ", 28);
6819  prettyprint_location(output_buffer, parser, &node->location);
6820  pm_buffer_append_string(output_buffer, ")\n", 2);
6821 
6822  // requireds
6823  {
6824  pm_buffer_concat(output_buffer, prefix_buffer);
6825  pm_buffer_append_string(output_buffer, "+-- requireds:", 14);
6826  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->requireds.size));
6827 
6828  size_t last_index = cast->requireds.size;
6829  for (uint32_t index = 0; index < last_index; index++) {
6830  size_t prefix_length = prefix_buffer->length;
6831  pm_buffer_append_string(prefix_buffer, "| ", 4);
6832  pm_buffer_concat(output_buffer, prefix_buffer);
6833  pm_buffer_append_string(output_buffer, "+-- ", 4);
6834  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6835  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->requireds.nodes[index], prefix_buffer);
6836  prefix_buffer->length = prefix_length;
6837  }
6838  }
6839 
6840  // optionals
6841  {
6842  pm_buffer_concat(output_buffer, prefix_buffer);
6843  pm_buffer_append_string(output_buffer, "+-- optionals:", 14);
6844  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->optionals.size));
6845 
6846  size_t last_index = cast->optionals.size;
6847  for (uint32_t index = 0; index < last_index; index++) {
6848  size_t prefix_length = prefix_buffer->length;
6849  pm_buffer_append_string(prefix_buffer, "| ", 4);
6850  pm_buffer_concat(output_buffer, prefix_buffer);
6851  pm_buffer_append_string(output_buffer, "+-- ", 4);
6852  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6853  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->optionals.nodes[index], prefix_buffer);
6854  prefix_buffer->length = prefix_length;
6855  }
6856  }
6857 
6858  // rest
6859  {
6860  pm_buffer_concat(output_buffer, prefix_buffer);
6861  pm_buffer_append_string(output_buffer, "+-- rest:", 9);
6862  if (cast->rest == NULL) {
6863  pm_buffer_append_string(output_buffer, " nil\n", 5);
6864  } else {
6865  pm_buffer_append_byte(output_buffer, '\n');
6866 
6867  size_t prefix_length = prefix_buffer->length;
6868  pm_buffer_append_string(prefix_buffer, "| ", 4);
6869  pm_buffer_concat(output_buffer, prefix_buffer);
6870  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rest, prefix_buffer);
6871  prefix_buffer->length = prefix_length;
6872  }
6873  }
6874 
6875  // posts
6876  {
6877  pm_buffer_concat(output_buffer, prefix_buffer);
6878  pm_buffer_append_string(output_buffer, "+-- posts:", 10);
6879  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->posts.size));
6880 
6881  size_t last_index = cast->posts.size;
6882  for (uint32_t index = 0; index < last_index; index++) {
6883  size_t prefix_length = prefix_buffer->length;
6884  pm_buffer_append_string(prefix_buffer, "| ", 4);
6885  pm_buffer_concat(output_buffer, prefix_buffer);
6886  pm_buffer_append_string(output_buffer, "+-- ", 4);
6887  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6888  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->posts.nodes[index], prefix_buffer);
6889  prefix_buffer->length = prefix_length;
6890  }
6891  }
6892 
6893  // keywords
6894  {
6895  pm_buffer_concat(output_buffer, prefix_buffer);
6896  pm_buffer_append_string(output_buffer, "+-- keywords:", 13);
6897  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->keywords.size));
6898 
6899  size_t last_index = cast->keywords.size;
6900  for (uint32_t index = 0; index < last_index; index++) {
6901  size_t prefix_length = prefix_buffer->length;
6902  pm_buffer_append_string(prefix_buffer, "| ", 4);
6903  pm_buffer_concat(output_buffer, prefix_buffer);
6904  pm_buffer_append_string(output_buffer, "+-- ", 4);
6905  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
6906  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->keywords.nodes[index], prefix_buffer);
6907  prefix_buffer->length = prefix_length;
6908  }
6909  }
6910 
6911  // keyword_rest
6912  {
6913  pm_buffer_concat(output_buffer, prefix_buffer);
6914  pm_buffer_append_string(output_buffer, "+-- keyword_rest:", 17);
6915  if (cast->keyword_rest == NULL) {
6916  pm_buffer_append_string(output_buffer, " nil\n", 5);
6917  } else {
6918  pm_buffer_append_byte(output_buffer, '\n');
6919 
6920  size_t prefix_length = prefix_buffer->length;
6921  pm_buffer_append_string(prefix_buffer, "| ", 4);
6922  pm_buffer_concat(output_buffer, prefix_buffer);
6923  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->keyword_rest, prefix_buffer);
6924  prefix_buffer->length = prefix_length;
6925  }
6926  }
6927 
6928  // block
6929  {
6930  pm_buffer_concat(output_buffer, prefix_buffer);
6931  pm_buffer_append_string(output_buffer, "+-- block:", 10);
6932  if (cast->block == NULL) {
6933  pm_buffer_append_string(output_buffer, " nil\n", 5);
6934  } else {
6935  pm_buffer_append_byte(output_buffer, '\n');
6936 
6937  size_t prefix_length = prefix_buffer->length;
6938  pm_buffer_append_string(prefix_buffer, " ", 4);
6939  pm_buffer_concat(output_buffer, prefix_buffer);
6940  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
6941  prefix_buffer->length = prefix_length;
6942  }
6943  }
6944 
6945  break;
6946  }
6947  case PM_PARENTHESES_NODE: {
6949  pm_buffer_append_string(output_buffer, "@ ParenthesesNode (location: ", 29);
6950  prettyprint_location(output_buffer, parser, &node->location);
6951  pm_buffer_append_string(output_buffer, ")\n", 2);
6952 
6953  // body
6954  {
6955  pm_buffer_concat(output_buffer, prefix_buffer);
6956  pm_buffer_append_string(output_buffer, "+-- body:", 9);
6957  if (cast->body == NULL) {
6958  pm_buffer_append_string(output_buffer, " nil\n", 5);
6959  } else {
6960  pm_buffer_append_byte(output_buffer, '\n');
6961 
6962  size_t prefix_length = prefix_buffer->length;
6963  pm_buffer_append_string(prefix_buffer, "| ", 4);
6964  pm_buffer_concat(output_buffer, prefix_buffer);
6965  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body, prefix_buffer);
6966  prefix_buffer->length = prefix_length;
6967  }
6968  }
6969 
6970  // opening_loc
6971  {
6972  pm_buffer_concat(output_buffer, prefix_buffer);
6973  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
6974  pm_location_t *location = &cast->opening_loc;
6975  pm_buffer_append_byte(output_buffer, ' ');
6976  prettyprint_location(output_buffer, parser, location);
6977  pm_buffer_append_string(output_buffer, " = \"", 4);
6978  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6979  pm_buffer_append_string(output_buffer, "\"\n", 2);
6980  }
6981 
6982  // closing_loc
6983  {
6984  pm_buffer_concat(output_buffer, prefix_buffer);
6985  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
6986  pm_location_t *location = &cast->closing_loc;
6987  pm_buffer_append_byte(output_buffer, ' ');
6988  prettyprint_location(output_buffer, parser, location);
6989  pm_buffer_append_string(output_buffer, " = \"", 4);
6990  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
6991  pm_buffer_append_string(output_buffer, "\"\n", 2);
6992  }
6993 
6994  break;
6995  }
6998  pm_buffer_append_string(output_buffer, "@ PinnedExpressionNode (location: ", 34);
6999  prettyprint_location(output_buffer, parser, &node->location);
7000  pm_buffer_append_string(output_buffer, ")\n", 2);
7001 
7002  // expression
7003  {
7004  pm_buffer_concat(output_buffer, prefix_buffer);
7005  pm_buffer_append_string(output_buffer, "+-- expression:", 15);
7006  pm_buffer_append_byte(output_buffer, '\n');
7007 
7008  size_t prefix_length = prefix_buffer->length;
7009  pm_buffer_append_string(prefix_buffer, "| ", 4);
7010  pm_buffer_concat(output_buffer, prefix_buffer);
7011  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->expression, prefix_buffer);
7012  prefix_buffer->length = prefix_length;
7013  }
7014 
7015  // operator_loc
7016  {
7017  pm_buffer_concat(output_buffer, prefix_buffer);
7018  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
7019  pm_location_t *location = &cast->operator_loc;
7020  pm_buffer_append_byte(output_buffer, ' ');
7021  prettyprint_location(output_buffer, parser, location);
7022  pm_buffer_append_string(output_buffer, " = \"", 4);
7023  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7024  pm_buffer_append_string(output_buffer, "\"\n", 2);
7025  }
7026 
7027  // lparen_loc
7028  {
7029  pm_buffer_concat(output_buffer, prefix_buffer);
7030  pm_buffer_append_string(output_buffer, "+-- lparen_loc:", 15);
7031  pm_location_t *location = &cast->lparen_loc;
7032  pm_buffer_append_byte(output_buffer, ' ');
7033  prettyprint_location(output_buffer, parser, location);
7034  pm_buffer_append_string(output_buffer, " = \"", 4);
7035  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7036  pm_buffer_append_string(output_buffer, "\"\n", 2);
7037  }
7038 
7039  // rparen_loc
7040  {
7041  pm_buffer_concat(output_buffer, prefix_buffer);
7042  pm_buffer_append_string(output_buffer, "+-- rparen_loc:", 15);
7043  pm_location_t *location = &cast->rparen_loc;
7044  pm_buffer_append_byte(output_buffer, ' ');
7045  prettyprint_location(output_buffer, parser, location);
7046  pm_buffer_append_string(output_buffer, " = \"", 4);
7047  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7048  pm_buffer_append_string(output_buffer, "\"\n", 2);
7049  }
7050 
7051  break;
7052  }
7053  case PM_PINNED_VARIABLE_NODE: {
7055  pm_buffer_append_string(output_buffer, "@ PinnedVariableNode (location: ", 32);
7056  prettyprint_location(output_buffer, parser, &node->location);
7057  pm_buffer_append_string(output_buffer, ")\n", 2);
7058 
7059  // variable
7060  {
7061  pm_buffer_concat(output_buffer, prefix_buffer);
7062  pm_buffer_append_string(output_buffer, "+-- variable:", 13);
7063  pm_buffer_append_byte(output_buffer, '\n');
7064 
7065  size_t prefix_length = prefix_buffer->length;
7066  pm_buffer_append_string(prefix_buffer, "| ", 4);
7067  pm_buffer_concat(output_buffer, prefix_buffer);
7068  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->variable, prefix_buffer);
7069  prefix_buffer->length = prefix_length;
7070  }
7071 
7072  // operator_loc
7073  {
7074  pm_buffer_concat(output_buffer, prefix_buffer);
7075  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
7076  pm_location_t *location = &cast->operator_loc;
7077  pm_buffer_append_byte(output_buffer, ' ');
7078  prettyprint_location(output_buffer, parser, location);
7079  pm_buffer_append_string(output_buffer, " = \"", 4);
7080  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7081  pm_buffer_append_string(output_buffer, "\"\n", 2);
7082  }
7083 
7084  break;
7085  }
7086  case PM_POST_EXECUTION_NODE: {
7088  pm_buffer_append_string(output_buffer, "@ PostExecutionNode (location: ", 31);
7089  prettyprint_location(output_buffer, parser, &node->location);
7090  pm_buffer_append_string(output_buffer, ")\n", 2);
7091 
7092  // statements
7093  {
7094  pm_buffer_concat(output_buffer, prefix_buffer);
7095  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
7096  if (cast->statements == NULL) {
7097  pm_buffer_append_string(output_buffer, " nil\n", 5);
7098  } else {
7099  pm_buffer_append_byte(output_buffer, '\n');
7100 
7101  size_t prefix_length = prefix_buffer->length;
7102  pm_buffer_append_string(prefix_buffer, "| ", 4);
7103  pm_buffer_concat(output_buffer, prefix_buffer);
7104  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
7105  prefix_buffer->length = prefix_length;
7106  }
7107  }
7108 
7109  // keyword_loc
7110  {
7111  pm_buffer_concat(output_buffer, prefix_buffer);
7112  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
7113  pm_location_t *location = &cast->keyword_loc;
7114  pm_buffer_append_byte(output_buffer, ' ');
7115  prettyprint_location(output_buffer, parser, location);
7116  pm_buffer_append_string(output_buffer, " = \"", 4);
7117  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7118  pm_buffer_append_string(output_buffer, "\"\n", 2);
7119  }
7120 
7121  // opening_loc
7122  {
7123  pm_buffer_concat(output_buffer, prefix_buffer);
7124  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
7125  pm_location_t *location = &cast->opening_loc;
7126  pm_buffer_append_byte(output_buffer, ' ');
7127  prettyprint_location(output_buffer, parser, location);
7128  pm_buffer_append_string(output_buffer, " = \"", 4);
7129  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7130  pm_buffer_append_string(output_buffer, "\"\n", 2);
7131  }
7132 
7133  // closing_loc
7134  {
7135  pm_buffer_concat(output_buffer, prefix_buffer);
7136  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
7137  pm_location_t *location = &cast->closing_loc;
7138  pm_buffer_append_byte(output_buffer, ' ');
7139  prettyprint_location(output_buffer, parser, location);
7140  pm_buffer_append_string(output_buffer, " = \"", 4);
7141  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7142  pm_buffer_append_string(output_buffer, "\"\n", 2);
7143  }
7144 
7145  break;
7146  }
7147  case PM_PRE_EXECUTION_NODE: {
7149  pm_buffer_append_string(output_buffer, "@ PreExecutionNode (location: ", 30);
7150  prettyprint_location(output_buffer, parser, &node->location);
7151  pm_buffer_append_string(output_buffer, ")\n", 2);
7152 
7153  // statements
7154  {
7155  pm_buffer_concat(output_buffer, prefix_buffer);
7156  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
7157  if (cast->statements == NULL) {
7158  pm_buffer_append_string(output_buffer, " nil\n", 5);
7159  } else {
7160  pm_buffer_append_byte(output_buffer, '\n');
7161 
7162  size_t prefix_length = prefix_buffer->length;
7163  pm_buffer_append_string(prefix_buffer, "| ", 4);
7164  pm_buffer_concat(output_buffer, prefix_buffer);
7165  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
7166  prefix_buffer->length = prefix_length;
7167  }
7168  }
7169 
7170  // keyword_loc
7171  {
7172  pm_buffer_concat(output_buffer, prefix_buffer);
7173  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
7174  pm_location_t *location = &cast->keyword_loc;
7175  pm_buffer_append_byte(output_buffer, ' ');
7176  prettyprint_location(output_buffer, parser, location);
7177  pm_buffer_append_string(output_buffer, " = \"", 4);
7178  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7179  pm_buffer_append_string(output_buffer, "\"\n", 2);
7180  }
7181 
7182  // opening_loc
7183  {
7184  pm_buffer_concat(output_buffer, prefix_buffer);
7185  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
7186  pm_location_t *location = &cast->opening_loc;
7187  pm_buffer_append_byte(output_buffer, ' ');
7188  prettyprint_location(output_buffer, parser, location);
7189  pm_buffer_append_string(output_buffer, " = \"", 4);
7190  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7191  pm_buffer_append_string(output_buffer, "\"\n", 2);
7192  }
7193 
7194  // closing_loc
7195  {
7196  pm_buffer_concat(output_buffer, prefix_buffer);
7197  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
7198  pm_location_t *location = &cast->closing_loc;
7199  pm_buffer_append_byte(output_buffer, ' ');
7200  prettyprint_location(output_buffer, parser, location);
7201  pm_buffer_append_string(output_buffer, " = \"", 4);
7202  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7203  pm_buffer_append_string(output_buffer, "\"\n", 2);
7204  }
7205 
7206  break;
7207  }
7208  case PM_PROGRAM_NODE: {
7209  pm_program_node_t *cast = (pm_program_node_t *) node;
7210  pm_buffer_append_string(output_buffer, "@ ProgramNode (location: ", 25);
7211  prettyprint_location(output_buffer, parser, &node->location);
7212  pm_buffer_append_string(output_buffer, ")\n", 2);
7213 
7214  // locals
7215  {
7216  pm_buffer_concat(output_buffer, prefix_buffer);
7217  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
7218  pm_buffer_append_string(output_buffer, " [", 2);
7219  for (uint32_t index = 0; index < cast->locals.size; index++) {
7220  if (index != 0) pm_buffer_append_string(output_buffer, ", ", 2);
7221  prettyprint_constant(output_buffer, parser, cast->locals.ids[index]);
7222  }
7223  pm_buffer_append_string(output_buffer, "]\n", 2);
7224  }
7225 
7226  // statements
7227  {
7228  pm_buffer_concat(output_buffer, prefix_buffer);
7229  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
7230  pm_buffer_append_byte(output_buffer, '\n');
7231 
7232  size_t prefix_length = prefix_buffer->length;
7233  pm_buffer_append_string(prefix_buffer, " ", 4);
7234  pm_buffer_concat(output_buffer, prefix_buffer);
7235  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
7236  prefix_buffer->length = prefix_length;
7237  }
7238 
7239  break;
7240  }
7241  case PM_RANGE_NODE: {
7242  pm_range_node_t *cast = (pm_range_node_t *) node;
7243  pm_buffer_append_string(output_buffer, "@ RangeNode (location: ", 23);
7244  prettyprint_location(output_buffer, parser, &node->location);
7245  pm_buffer_append_string(output_buffer, ")\n", 2);
7246 
7247  // RangeFlags
7248  {
7249  pm_buffer_concat(output_buffer, prefix_buffer);
7250  pm_buffer_append_string(output_buffer, "+-- RangeFlags:", 15);
7251  bool found = false;
7252  if (cast->base.flags & PM_RANGE_FLAGS_EXCLUDE_END) {
7253  if (found) pm_buffer_append_byte(output_buffer, ',');
7254  pm_buffer_append_string(output_buffer, " exclude_end", 12);
7255  found = true;
7256  }
7257  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7258  pm_buffer_append_byte(output_buffer, '\n');
7259  }
7260 
7261  // left
7262  {
7263  pm_buffer_concat(output_buffer, prefix_buffer);
7264  pm_buffer_append_string(output_buffer, "+-- left:", 9);
7265  if (cast->left == NULL) {
7266  pm_buffer_append_string(output_buffer, " nil\n", 5);
7267  } else {
7268  pm_buffer_append_byte(output_buffer, '\n');
7269 
7270  size_t prefix_length = prefix_buffer->length;
7271  pm_buffer_append_string(prefix_buffer, "| ", 4);
7272  pm_buffer_concat(output_buffer, prefix_buffer);
7273  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->left, prefix_buffer);
7274  prefix_buffer->length = prefix_length;
7275  }
7276  }
7277 
7278  // right
7279  {
7280  pm_buffer_concat(output_buffer, prefix_buffer);
7281  pm_buffer_append_string(output_buffer, "+-- right:", 10);
7282  if (cast->right == NULL) {
7283  pm_buffer_append_string(output_buffer, " nil\n", 5);
7284  } else {
7285  pm_buffer_append_byte(output_buffer, '\n');
7286 
7287  size_t prefix_length = prefix_buffer->length;
7288  pm_buffer_append_string(prefix_buffer, "| ", 4);
7289  pm_buffer_concat(output_buffer, prefix_buffer);
7290  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->right, prefix_buffer);
7291  prefix_buffer->length = prefix_length;
7292  }
7293  }
7294 
7295  // operator_loc
7296  {
7297  pm_buffer_concat(output_buffer, prefix_buffer);
7298  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
7299  pm_location_t *location = &cast->operator_loc;
7300  pm_buffer_append_byte(output_buffer, ' ');
7301  prettyprint_location(output_buffer, parser, location);
7302  pm_buffer_append_string(output_buffer, " = \"", 4);
7303  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7304  pm_buffer_append_string(output_buffer, "\"\n", 2);
7305  }
7306 
7307  break;
7308  }
7309  case PM_RATIONAL_NODE: {
7310  pm_rational_node_t *cast = (pm_rational_node_t *) node;
7311  pm_buffer_append_string(output_buffer, "@ RationalNode (location: ", 26);
7312  prettyprint_location(output_buffer, parser, &node->location);
7313  pm_buffer_append_string(output_buffer, ")\n", 2);
7314 
7315  // IntegerBaseFlags
7316  {
7317  pm_buffer_concat(output_buffer, prefix_buffer);
7318  pm_buffer_append_string(output_buffer, "+-- IntegerBaseFlags:", 21);
7319  bool found = false;
7320  if (cast->base.flags & PM_INTEGER_BASE_FLAGS_BINARY) {
7321  if (found) pm_buffer_append_byte(output_buffer, ',');
7322  pm_buffer_append_string(output_buffer, " binary", 7);
7323  found = true;
7324  }
7326  if (found) pm_buffer_append_byte(output_buffer, ',');
7327  pm_buffer_append_string(output_buffer, " decimal", 8);
7328  found = true;
7329  }
7330  if (cast->base.flags & PM_INTEGER_BASE_FLAGS_OCTAL) {
7331  if (found) pm_buffer_append_byte(output_buffer, ',');
7332  pm_buffer_append_string(output_buffer, " octal", 6);
7333  found = true;
7334  }
7336  if (found) pm_buffer_append_byte(output_buffer, ',');
7337  pm_buffer_append_string(output_buffer, " hexadecimal", 12);
7338  found = true;
7339  }
7340  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7341  pm_buffer_append_byte(output_buffer, '\n');
7342  }
7343 
7344  // numerator
7345  {
7346  pm_buffer_concat(output_buffer, prefix_buffer);
7347  pm_buffer_append_string(output_buffer, "+-- numerator:", 14);
7348  const pm_integer_t *integer = &cast->numerator;
7349  pm_buffer_append_byte(output_buffer, ' ');
7350  pm_integer_string(output_buffer, integer);
7351  pm_buffer_append_byte(output_buffer, '\n');
7352  }
7353 
7354  // denominator
7355  {
7356  pm_buffer_concat(output_buffer, prefix_buffer);
7357  pm_buffer_append_string(output_buffer, "+-- denominator:", 16);
7358  const pm_integer_t *integer = &cast->denominator;
7359  pm_buffer_append_byte(output_buffer, ' ');
7360  pm_integer_string(output_buffer, integer);
7361  pm_buffer_append_byte(output_buffer, '\n');
7362  }
7363 
7364  break;
7365  }
7366  case PM_REDO_NODE: {
7367  pm_buffer_append_string(output_buffer, "@ RedoNode (location: ", 22);
7368  prettyprint_location(output_buffer, parser, &node->location);
7369  pm_buffer_append_string(output_buffer, ")\n", 2);
7370 
7371  break;
7372  }
7375  pm_buffer_append_string(output_buffer, "@ RegularExpressionNode (location: ", 35);
7376  prettyprint_location(output_buffer, parser, &node->location);
7377  pm_buffer_append_string(output_buffer, ")\n", 2);
7378 
7379  // RegularExpressionFlags
7380  {
7381  pm_buffer_concat(output_buffer, prefix_buffer);
7382  pm_buffer_append_string(output_buffer, "+-- RegularExpressionFlags:", 27);
7383  bool found = false;
7385  if (found) pm_buffer_append_byte(output_buffer, ',');
7386  pm_buffer_append_string(output_buffer, " ignore_case", 12);
7387  found = true;
7388  }
7390  if (found) pm_buffer_append_byte(output_buffer, ',');
7391  pm_buffer_append_string(output_buffer, " extended", 9);
7392  found = true;
7393  }
7395  if (found) pm_buffer_append_byte(output_buffer, ',');
7396  pm_buffer_append_string(output_buffer, " multi_line", 11);
7397  found = true;
7398  }
7400  if (found) pm_buffer_append_byte(output_buffer, ',');
7401  pm_buffer_append_string(output_buffer, " once", 5);
7402  found = true;
7403  }
7405  if (found) pm_buffer_append_byte(output_buffer, ',');
7406  pm_buffer_append_string(output_buffer, " euc_jp", 7);
7407  found = true;
7408  }
7410  if (found) pm_buffer_append_byte(output_buffer, ',');
7411  pm_buffer_append_string(output_buffer, " ascii_8bit", 11);
7412  found = true;
7413  }
7415  if (found) pm_buffer_append_byte(output_buffer, ',');
7416  pm_buffer_append_string(output_buffer, " windows_31j", 12);
7417  found = true;
7418  }
7420  if (found) pm_buffer_append_byte(output_buffer, ',');
7421  pm_buffer_append_string(output_buffer, " utf_8", 6);
7422  found = true;
7423  }
7425  if (found) pm_buffer_append_byte(output_buffer, ',');
7426  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
7427  found = true;
7428  }
7430  if (found) pm_buffer_append_byte(output_buffer, ',');
7431  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
7432  found = true;
7433  }
7435  if (found) pm_buffer_append_byte(output_buffer, ',');
7436  pm_buffer_append_string(output_buffer, " forced_us_ascii_encoding", 25);
7437  found = true;
7438  }
7439  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7440  pm_buffer_append_byte(output_buffer, '\n');
7441  }
7442 
7443  // opening_loc
7444  {
7445  pm_buffer_concat(output_buffer, prefix_buffer);
7446  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
7447  pm_location_t *location = &cast->opening_loc;
7448  pm_buffer_append_byte(output_buffer, ' ');
7449  prettyprint_location(output_buffer, parser, location);
7450  pm_buffer_append_string(output_buffer, " = \"", 4);
7451  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7452  pm_buffer_append_string(output_buffer, "\"\n", 2);
7453  }
7454 
7455  // content_loc
7456  {
7457  pm_buffer_concat(output_buffer, prefix_buffer);
7458  pm_buffer_append_string(output_buffer, "+-- content_loc:", 16);
7459  pm_location_t *location = &cast->content_loc;
7460  pm_buffer_append_byte(output_buffer, ' ');
7461  prettyprint_location(output_buffer, parser, location);
7462  pm_buffer_append_string(output_buffer, " = \"", 4);
7463  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7464  pm_buffer_append_string(output_buffer, "\"\n", 2);
7465  }
7466 
7467  // closing_loc
7468  {
7469  pm_buffer_concat(output_buffer, prefix_buffer);
7470  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
7471  pm_location_t *location = &cast->closing_loc;
7472  pm_buffer_append_byte(output_buffer, ' ');
7473  prettyprint_location(output_buffer, parser, location);
7474  pm_buffer_append_string(output_buffer, " = \"", 4);
7475  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7476  pm_buffer_append_string(output_buffer, "\"\n", 2);
7477  }
7478 
7479  // unescaped
7480  {
7481  pm_buffer_concat(output_buffer, prefix_buffer);
7482  pm_buffer_append_string(output_buffer, "+-- unescaped:", 14);
7483  pm_buffer_append_string(output_buffer, " \"", 2);
7484  pm_buffer_append_source(output_buffer, pm_string_source(&cast->unescaped), pm_string_length(&cast->unescaped), PM_BUFFER_ESCAPING_RUBY);
7485  pm_buffer_append_string(output_buffer, "\"\n", 2);
7486  }
7487 
7488  break;
7489  }
7492  pm_buffer_append_string(output_buffer, "@ RequiredKeywordParameterNode (location: ", 42);
7493  prettyprint_location(output_buffer, parser, &node->location);
7494  pm_buffer_append_string(output_buffer, ")\n", 2);
7495 
7496  // ParameterFlags
7497  {
7498  pm_buffer_concat(output_buffer, prefix_buffer);
7499  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
7500  bool found = false;
7502  if (found) pm_buffer_append_byte(output_buffer, ',');
7503  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
7504  found = true;
7505  }
7506  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7507  pm_buffer_append_byte(output_buffer, '\n');
7508  }
7509 
7510  // name
7511  {
7512  pm_buffer_concat(output_buffer, prefix_buffer);
7513  pm_buffer_append_string(output_buffer, "+-- name:", 9);
7514  pm_buffer_append_byte(output_buffer, ' ');
7515  prettyprint_constant(output_buffer, parser, cast->name);
7516  pm_buffer_append_byte(output_buffer, '\n');
7517  }
7518 
7519  // name_loc
7520  {
7521  pm_buffer_concat(output_buffer, prefix_buffer);
7522  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
7523  pm_location_t *location = &cast->name_loc;
7524  pm_buffer_append_byte(output_buffer, ' ');
7525  prettyprint_location(output_buffer, parser, location);
7526  pm_buffer_append_string(output_buffer, " = \"", 4);
7527  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7528  pm_buffer_append_string(output_buffer, "\"\n", 2);
7529  }
7530 
7531  break;
7532  }
7535  pm_buffer_append_string(output_buffer, "@ RequiredParameterNode (location: ", 35);
7536  prettyprint_location(output_buffer, parser, &node->location);
7537  pm_buffer_append_string(output_buffer, ")\n", 2);
7538 
7539  // ParameterFlags
7540  {
7541  pm_buffer_concat(output_buffer, prefix_buffer);
7542  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
7543  bool found = false;
7545  if (found) pm_buffer_append_byte(output_buffer, ',');
7546  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
7547  found = true;
7548  }
7549  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7550  pm_buffer_append_byte(output_buffer, '\n');
7551  }
7552 
7553  // name
7554  {
7555  pm_buffer_concat(output_buffer, prefix_buffer);
7556  pm_buffer_append_string(output_buffer, "+-- name:", 9);
7557  pm_buffer_append_byte(output_buffer, ' ');
7558  prettyprint_constant(output_buffer, parser, cast->name);
7559  pm_buffer_append_byte(output_buffer, '\n');
7560  }
7561 
7562  break;
7563  }
7564  case PM_RESCUE_MODIFIER_NODE: {
7566  pm_buffer_append_string(output_buffer, "@ RescueModifierNode (location: ", 32);
7567  prettyprint_location(output_buffer, parser, &node->location);
7568  pm_buffer_append_string(output_buffer, ")\n", 2);
7569 
7570  // expression
7571  {
7572  pm_buffer_concat(output_buffer, prefix_buffer);
7573  pm_buffer_append_string(output_buffer, "+-- expression:", 15);
7574  pm_buffer_append_byte(output_buffer, '\n');
7575 
7576  size_t prefix_length = prefix_buffer->length;
7577  pm_buffer_append_string(prefix_buffer, "| ", 4);
7578  pm_buffer_concat(output_buffer, prefix_buffer);
7579  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->expression, prefix_buffer);
7580  prefix_buffer->length = prefix_length;
7581  }
7582 
7583  // keyword_loc
7584  {
7585  pm_buffer_concat(output_buffer, prefix_buffer);
7586  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
7587  pm_location_t *location = &cast->keyword_loc;
7588  pm_buffer_append_byte(output_buffer, ' ');
7589  prettyprint_location(output_buffer, parser, location);
7590  pm_buffer_append_string(output_buffer, " = \"", 4);
7591  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7592  pm_buffer_append_string(output_buffer, "\"\n", 2);
7593  }
7594 
7595  // rescue_expression
7596  {
7597  pm_buffer_concat(output_buffer, prefix_buffer);
7598  pm_buffer_append_string(output_buffer, "+-- rescue_expression:", 22);
7599  pm_buffer_append_byte(output_buffer, '\n');
7600 
7601  size_t prefix_length = prefix_buffer->length;
7602  pm_buffer_append_string(prefix_buffer, " ", 4);
7603  pm_buffer_concat(output_buffer, prefix_buffer);
7604  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->rescue_expression, prefix_buffer);
7605  prefix_buffer->length = prefix_length;
7606  }
7607 
7608  break;
7609  }
7610  case PM_RESCUE_NODE: {
7611  pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
7612  pm_buffer_append_string(output_buffer, "@ RescueNode (location: ", 24);
7613  prettyprint_location(output_buffer, parser, &node->location);
7614  pm_buffer_append_string(output_buffer, ")\n", 2);
7615 
7616  // keyword_loc
7617  {
7618  pm_buffer_concat(output_buffer, prefix_buffer);
7619  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
7620  pm_location_t *location = &cast->keyword_loc;
7621  pm_buffer_append_byte(output_buffer, ' ');
7622  prettyprint_location(output_buffer, parser, location);
7623  pm_buffer_append_string(output_buffer, " = \"", 4);
7624  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7625  pm_buffer_append_string(output_buffer, "\"\n", 2);
7626  }
7627 
7628  // exceptions
7629  {
7630  pm_buffer_concat(output_buffer, prefix_buffer);
7631  pm_buffer_append_string(output_buffer, "+-- exceptions:", 15);
7632  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->exceptions.size));
7633 
7634  size_t last_index = cast->exceptions.size;
7635  for (uint32_t index = 0; index < last_index; index++) {
7636  size_t prefix_length = prefix_buffer->length;
7637  pm_buffer_append_string(prefix_buffer, "| ", 4);
7638  pm_buffer_concat(output_buffer, prefix_buffer);
7639  pm_buffer_append_string(output_buffer, "+-- ", 4);
7640  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
7641  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->exceptions.nodes[index], prefix_buffer);
7642  prefix_buffer->length = prefix_length;
7643  }
7644  }
7645 
7646  // operator_loc
7647  {
7648  pm_buffer_concat(output_buffer, prefix_buffer);
7649  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
7650  pm_location_t *location = &cast->operator_loc;
7651  if (location->start == NULL) {
7652  pm_buffer_append_string(output_buffer, " nil\n", 5);
7653  } else {
7654  pm_buffer_append_byte(output_buffer, ' ');
7655  prettyprint_location(output_buffer, parser, location);
7656  pm_buffer_append_string(output_buffer, " = \"", 4);
7657  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7658  pm_buffer_append_string(output_buffer, "\"\n", 2);
7659  }
7660  }
7661 
7662  // reference
7663  {
7664  pm_buffer_concat(output_buffer, prefix_buffer);
7665  pm_buffer_append_string(output_buffer, "+-- reference:", 14);
7666  if (cast->reference == NULL) {
7667  pm_buffer_append_string(output_buffer, " nil\n", 5);
7668  } else {
7669  pm_buffer_append_byte(output_buffer, '\n');
7670 
7671  size_t prefix_length = prefix_buffer->length;
7672  pm_buffer_append_string(prefix_buffer, "| ", 4);
7673  pm_buffer_concat(output_buffer, prefix_buffer);
7674  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->reference, prefix_buffer);
7675  prefix_buffer->length = prefix_length;
7676  }
7677  }
7678 
7679  // statements
7680  {
7681  pm_buffer_concat(output_buffer, prefix_buffer);
7682  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
7683  if (cast->statements == NULL) {
7684  pm_buffer_append_string(output_buffer, " nil\n", 5);
7685  } else {
7686  pm_buffer_append_byte(output_buffer, '\n');
7687 
7688  size_t prefix_length = prefix_buffer->length;
7689  pm_buffer_append_string(prefix_buffer, "| ", 4);
7690  pm_buffer_concat(output_buffer, prefix_buffer);
7691  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
7692  prefix_buffer->length = prefix_length;
7693  }
7694  }
7695 
7696  // subsequent
7697  {
7698  pm_buffer_concat(output_buffer, prefix_buffer);
7699  pm_buffer_append_string(output_buffer, "+-- subsequent:", 15);
7700  if (cast->subsequent == NULL) {
7701  pm_buffer_append_string(output_buffer, " nil\n", 5);
7702  } else {
7703  pm_buffer_append_byte(output_buffer, '\n');
7704 
7705  size_t prefix_length = prefix_buffer->length;
7706  pm_buffer_append_string(prefix_buffer, " ", 4);
7707  pm_buffer_concat(output_buffer, prefix_buffer);
7708  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->subsequent, prefix_buffer);
7709  prefix_buffer->length = prefix_length;
7710  }
7711  }
7712 
7713  break;
7714  }
7715  case PM_REST_PARAMETER_NODE: {
7717  pm_buffer_append_string(output_buffer, "@ RestParameterNode (location: ", 31);
7718  prettyprint_location(output_buffer, parser, &node->location);
7719  pm_buffer_append_string(output_buffer, ")\n", 2);
7720 
7721  // ParameterFlags
7722  {
7723  pm_buffer_concat(output_buffer, prefix_buffer);
7724  pm_buffer_append_string(output_buffer, "+-- ParameterFlags:", 19);
7725  bool found = false;
7727  if (found) pm_buffer_append_byte(output_buffer, ',');
7728  pm_buffer_append_string(output_buffer, " repeated_parameter", 19);
7729  found = true;
7730  }
7731  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7732  pm_buffer_append_byte(output_buffer, '\n');
7733  }
7734 
7735  // name
7736  {
7737  pm_buffer_concat(output_buffer, prefix_buffer);
7738  pm_buffer_append_string(output_buffer, "+-- name:", 9);
7739  if (cast->name == 0) {
7740  pm_buffer_append_string(output_buffer, " nil\n", 5);
7741  } else {
7742  pm_buffer_append_byte(output_buffer, ' ');
7743  prettyprint_constant(output_buffer, parser, cast->name);
7744  pm_buffer_append_byte(output_buffer, '\n');
7745  }
7746  }
7747 
7748  // name_loc
7749  {
7750  pm_buffer_concat(output_buffer, prefix_buffer);
7751  pm_buffer_append_string(output_buffer, "+-- name_loc:", 13);
7752  pm_location_t *location = &cast->name_loc;
7753  if (location->start == NULL) {
7754  pm_buffer_append_string(output_buffer, " nil\n", 5);
7755  } else {
7756  pm_buffer_append_byte(output_buffer, ' ');
7757  prettyprint_location(output_buffer, parser, location);
7758  pm_buffer_append_string(output_buffer, " = \"", 4);
7759  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7760  pm_buffer_append_string(output_buffer, "\"\n", 2);
7761  }
7762  }
7763 
7764  // operator_loc
7765  {
7766  pm_buffer_concat(output_buffer, prefix_buffer);
7767  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
7768  pm_location_t *location = &cast->operator_loc;
7769  pm_buffer_append_byte(output_buffer, ' ');
7770  prettyprint_location(output_buffer, parser, location);
7771  pm_buffer_append_string(output_buffer, " = \"", 4);
7772  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7773  pm_buffer_append_string(output_buffer, "\"\n", 2);
7774  }
7775 
7776  break;
7777  }
7778  case PM_RETRY_NODE: {
7779  pm_buffer_append_string(output_buffer, "@ RetryNode (location: ", 23);
7780  prettyprint_location(output_buffer, parser, &node->location);
7781  pm_buffer_append_string(output_buffer, ")\n", 2);
7782 
7783  break;
7784  }
7785  case PM_RETURN_NODE: {
7786  pm_return_node_t *cast = (pm_return_node_t *) node;
7787  pm_buffer_append_string(output_buffer, "@ ReturnNode (location: ", 24);
7788  prettyprint_location(output_buffer, parser, &node->location);
7789  pm_buffer_append_string(output_buffer, ")\n", 2);
7790 
7791  // keyword_loc
7792  {
7793  pm_buffer_concat(output_buffer, prefix_buffer);
7794  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
7795  pm_location_t *location = &cast->keyword_loc;
7796  pm_buffer_append_byte(output_buffer, ' ');
7797  prettyprint_location(output_buffer, parser, location);
7798  pm_buffer_append_string(output_buffer, " = \"", 4);
7799  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7800  pm_buffer_append_string(output_buffer, "\"\n", 2);
7801  }
7802 
7803  // arguments
7804  {
7805  pm_buffer_concat(output_buffer, prefix_buffer);
7806  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
7807  if (cast->arguments == NULL) {
7808  pm_buffer_append_string(output_buffer, " nil\n", 5);
7809  } else {
7810  pm_buffer_append_byte(output_buffer, '\n');
7811 
7812  size_t prefix_length = prefix_buffer->length;
7813  pm_buffer_append_string(prefix_buffer, " ", 4);
7814  pm_buffer_concat(output_buffer, prefix_buffer);
7815  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
7816  prefix_buffer->length = prefix_length;
7817  }
7818  }
7819 
7820  break;
7821  }
7822  case PM_SELF_NODE: {
7823  pm_buffer_append_string(output_buffer, "@ SelfNode (location: ", 22);
7824  prettyprint_location(output_buffer, parser, &node->location);
7825  pm_buffer_append_string(output_buffer, ")\n", 2);
7826 
7827  break;
7828  }
7831  pm_buffer_append_string(output_buffer, "@ ShareableConstantNode (location: ", 35);
7832  prettyprint_location(output_buffer, parser, &node->location);
7833  pm_buffer_append_string(output_buffer, ")\n", 2);
7834 
7835  // ShareableConstantNodeFlags
7836  {
7837  pm_buffer_concat(output_buffer, prefix_buffer);
7838  pm_buffer_append_string(output_buffer, "+-- ShareableConstantNodeFlags:", 31);
7839  bool found = false;
7841  if (found) pm_buffer_append_byte(output_buffer, ',');
7842  pm_buffer_append_string(output_buffer, " literal", 8);
7843  found = true;
7844  }
7846  if (found) pm_buffer_append_byte(output_buffer, ',');
7847  pm_buffer_append_string(output_buffer, " experimental_everything", 24);
7848  found = true;
7849  }
7851  if (found) pm_buffer_append_byte(output_buffer, ',');
7852  pm_buffer_append_string(output_buffer, " experimental_copy", 18);
7853  found = true;
7854  }
7855  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7856  pm_buffer_append_byte(output_buffer, '\n');
7857  }
7858 
7859  // write
7860  {
7861  pm_buffer_concat(output_buffer, prefix_buffer);
7862  pm_buffer_append_string(output_buffer, "+-- write:", 10);
7863  pm_buffer_append_byte(output_buffer, '\n');
7864 
7865  size_t prefix_length = prefix_buffer->length;
7866  pm_buffer_append_string(prefix_buffer, " ", 4);
7867  pm_buffer_concat(output_buffer, prefix_buffer);
7868  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->write, prefix_buffer);
7869  prefix_buffer->length = prefix_length;
7870  }
7871 
7872  break;
7873  }
7874  case PM_SINGLETON_CLASS_NODE: {
7876  pm_buffer_append_string(output_buffer, "@ SingletonClassNode (location: ", 32);
7877  prettyprint_location(output_buffer, parser, &node->location);
7878  pm_buffer_append_string(output_buffer, ")\n", 2);
7879 
7880  // locals
7881  {
7882  pm_buffer_concat(output_buffer, prefix_buffer);
7883  pm_buffer_append_string(output_buffer, "+-- locals:", 11);
7884  pm_buffer_append_string(output_buffer, " [", 2);
7885  for (uint32_t index = 0; index < cast->locals.size; index++) {
7886  if (index != 0) pm_buffer_append_string(output_buffer, ", ", 2);
7887  prettyprint_constant(output_buffer, parser, cast->locals.ids[index]);
7888  }
7889  pm_buffer_append_string(output_buffer, "]\n", 2);
7890  }
7891 
7892  // class_keyword_loc
7893  {
7894  pm_buffer_concat(output_buffer, prefix_buffer);
7895  pm_buffer_append_string(output_buffer, "+-- class_keyword_loc:", 22);
7896  pm_location_t *location = &cast->class_keyword_loc;
7897  pm_buffer_append_byte(output_buffer, ' ');
7898  prettyprint_location(output_buffer, parser, location);
7899  pm_buffer_append_string(output_buffer, " = \"", 4);
7900  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7901  pm_buffer_append_string(output_buffer, "\"\n", 2);
7902  }
7903 
7904  // operator_loc
7905  {
7906  pm_buffer_concat(output_buffer, prefix_buffer);
7907  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
7908  pm_location_t *location = &cast->operator_loc;
7909  pm_buffer_append_byte(output_buffer, ' ');
7910  prettyprint_location(output_buffer, parser, location);
7911  pm_buffer_append_string(output_buffer, " = \"", 4);
7912  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7913  pm_buffer_append_string(output_buffer, "\"\n", 2);
7914  }
7915 
7916  // expression
7917  {
7918  pm_buffer_concat(output_buffer, prefix_buffer);
7919  pm_buffer_append_string(output_buffer, "+-- expression:", 15);
7920  pm_buffer_append_byte(output_buffer, '\n');
7921 
7922  size_t prefix_length = prefix_buffer->length;
7923  pm_buffer_append_string(prefix_buffer, "| ", 4);
7924  pm_buffer_concat(output_buffer, prefix_buffer);
7925  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->expression, prefix_buffer);
7926  prefix_buffer->length = prefix_length;
7927  }
7928 
7929  // body
7930  {
7931  pm_buffer_concat(output_buffer, prefix_buffer);
7932  pm_buffer_append_string(output_buffer, "+-- body:", 9);
7933  if (cast->body == NULL) {
7934  pm_buffer_append_string(output_buffer, " nil\n", 5);
7935  } else {
7936  pm_buffer_append_byte(output_buffer, '\n');
7937 
7938  size_t prefix_length = prefix_buffer->length;
7939  pm_buffer_append_string(prefix_buffer, "| ", 4);
7940  pm_buffer_concat(output_buffer, prefix_buffer);
7941  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body, prefix_buffer);
7942  prefix_buffer->length = prefix_length;
7943  }
7944  }
7945 
7946  // end_keyword_loc
7947  {
7948  pm_buffer_concat(output_buffer, prefix_buffer);
7949  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
7950  pm_location_t *location = &cast->end_keyword_loc;
7951  pm_buffer_append_byte(output_buffer, ' ');
7952  prettyprint_location(output_buffer, parser, location);
7953  pm_buffer_append_string(output_buffer, " = \"", 4);
7954  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
7955  pm_buffer_append_string(output_buffer, "\"\n", 2);
7956  }
7957 
7958  break;
7959  }
7960  case PM_SOURCE_ENCODING_NODE: {
7961  pm_buffer_append_string(output_buffer, "@ SourceEncodingNode (location: ", 32);
7962  prettyprint_location(output_buffer, parser, &node->location);
7963  pm_buffer_append_string(output_buffer, ")\n", 2);
7964 
7965  break;
7966  }
7967  case PM_SOURCE_FILE_NODE: {
7969  pm_buffer_append_string(output_buffer, "@ SourceFileNode (location: ", 28);
7970  prettyprint_location(output_buffer, parser, &node->location);
7971  pm_buffer_append_string(output_buffer, ")\n", 2);
7972 
7973  // StringFlags
7974  {
7975  pm_buffer_concat(output_buffer, prefix_buffer);
7976  pm_buffer_append_string(output_buffer, "+-- StringFlags:", 16);
7977  bool found = false;
7979  if (found) pm_buffer_append_byte(output_buffer, ',');
7980  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
7981  found = true;
7982  }
7984  if (found) pm_buffer_append_byte(output_buffer, ',');
7985  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
7986  found = true;
7987  }
7988  if (cast->base.flags & PM_STRING_FLAGS_FROZEN) {
7989  if (found) pm_buffer_append_byte(output_buffer, ',');
7990  pm_buffer_append_string(output_buffer, " frozen", 7);
7991  found = true;
7992  }
7993  if (cast->base.flags & PM_STRING_FLAGS_MUTABLE) {
7994  if (found) pm_buffer_append_byte(output_buffer, ',');
7995  pm_buffer_append_string(output_buffer, " mutable", 8);
7996  found = true;
7997  }
7998  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
7999  pm_buffer_append_byte(output_buffer, '\n');
8000  }
8001 
8002  // filepath
8003  {
8004  pm_buffer_concat(output_buffer, prefix_buffer);
8005  pm_buffer_append_string(output_buffer, "+-- filepath:", 13);
8006  pm_buffer_append_string(output_buffer, " \"", 2);
8007  pm_buffer_append_source(output_buffer, pm_string_source(&cast->filepath), pm_string_length(&cast->filepath), PM_BUFFER_ESCAPING_RUBY);
8008  pm_buffer_append_string(output_buffer, "\"\n", 2);
8009  }
8010 
8011  break;
8012  }
8013  case PM_SOURCE_LINE_NODE: {
8014  pm_buffer_append_string(output_buffer, "@ SourceLineNode (location: ", 28);
8015  prettyprint_location(output_buffer, parser, &node->location);
8016  pm_buffer_append_string(output_buffer, ")\n", 2);
8017 
8018  break;
8019  }
8020  case PM_SPLAT_NODE: {
8021  pm_splat_node_t *cast = (pm_splat_node_t *) node;
8022  pm_buffer_append_string(output_buffer, "@ SplatNode (location: ", 23);
8023  prettyprint_location(output_buffer, parser, &node->location);
8024  pm_buffer_append_string(output_buffer, ")\n", 2);
8025 
8026  // operator_loc
8027  {
8028  pm_buffer_concat(output_buffer, prefix_buffer);
8029  pm_buffer_append_string(output_buffer, "+-- operator_loc:", 17);
8030  pm_location_t *location = &cast->operator_loc;
8031  pm_buffer_append_byte(output_buffer, ' ');
8032  prettyprint_location(output_buffer, parser, location);
8033  pm_buffer_append_string(output_buffer, " = \"", 4);
8034  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8035  pm_buffer_append_string(output_buffer, "\"\n", 2);
8036  }
8037 
8038  // expression
8039  {
8040  pm_buffer_concat(output_buffer, prefix_buffer);
8041  pm_buffer_append_string(output_buffer, "+-- expression:", 15);
8042  if (cast->expression == NULL) {
8043  pm_buffer_append_string(output_buffer, " nil\n", 5);
8044  } else {
8045  pm_buffer_append_byte(output_buffer, '\n');
8046 
8047  size_t prefix_length = prefix_buffer->length;
8048  pm_buffer_append_string(prefix_buffer, " ", 4);
8049  pm_buffer_concat(output_buffer, prefix_buffer);
8050  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->expression, prefix_buffer);
8051  prefix_buffer->length = prefix_length;
8052  }
8053  }
8054 
8055  break;
8056  }
8057  case PM_STATEMENTS_NODE: {
8058  pm_statements_node_t *cast = (pm_statements_node_t *) node;
8059  pm_buffer_append_string(output_buffer, "@ StatementsNode (location: ", 28);
8060  prettyprint_location(output_buffer, parser, &node->location);
8061  pm_buffer_append_string(output_buffer, ")\n", 2);
8062 
8063  // body
8064  {
8065  pm_buffer_concat(output_buffer, prefix_buffer);
8066  pm_buffer_append_string(output_buffer, "+-- body:", 9);
8067  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->body.size));
8068 
8069  size_t last_index = cast->body.size;
8070  for (uint32_t index = 0; index < last_index; index++) {
8071  size_t prefix_length = prefix_buffer->length;
8072  pm_buffer_append_string(prefix_buffer, " ", 4);
8073  pm_buffer_concat(output_buffer, prefix_buffer);
8074  pm_buffer_append_string(output_buffer, "+-- ", 4);
8075  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
8076  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->body.nodes[index], prefix_buffer);
8077  prefix_buffer->length = prefix_length;
8078  }
8079  }
8080 
8081  break;
8082  }
8083  case PM_STRING_NODE: {
8084  pm_string_node_t *cast = (pm_string_node_t *) node;
8085  pm_buffer_append_string(output_buffer, "@ StringNode (location: ", 24);
8086  prettyprint_location(output_buffer, parser, &node->location);
8087  pm_buffer_append_string(output_buffer, ")\n", 2);
8088 
8089  // StringFlags
8090  {
8091  pm_buffer_concat(output_buffer, prefix_buffer);
8092  pm_buffer_append_string(output_buffer, "+-- StringFlags:", 16);
8093  bool found = false;
8095  if (found) pm_buffer_append_byte(output_buffer, ',');
8096  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
8097  found = true;
8098  }
8100  if (found) pm_buffer_append_byte(output_buffer, ',');
8101  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
8102  found = true;
8103  }
8104  if (cast->base.flags & PM_STRING_FLAGS_FROZEN) {
8105  if (found) pm_buffer_append_byte(output_buffer, ',');
8106  pm_buffer_append_string(output_buffer, " frozen", 7);
8107  found = true;
8108  }
8109  if (cast->base.flags & PM_STRING_FLAGS_MUTABLE) {
8110  if (found) pm_buffer_append_byte(output_buffer, ',');
8111  pm_buffer_append_string(output_buffer, " mutable", 8);
8112  found = true;
8113  }
8114  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
8115  pm_buffer_append_byte(output_buffer, '\n');
8116  }
8117 
8118  // opening_loc
8119  {
8120  pm_buffer_concat(output_buffer, prefix_buffer);
8121  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
8122  pm_location_t *location = &cast->opening_loc;
8123  if (location->start == NULL) {
8124  pm_buffer_append_string(output_buffer, " nil\n", 5);
8125  } else {
8126  pm_buffer_append_byte(output_buffer, ' ');
8127  prettyprint_location(output_buffer, parser, location);
8128  pm_buffer_append_string(output_buffer, " = \"", 4);
8129  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8130  pm_buffer_append_string(output_buffer, "\"\n", 2);
8131  }
8132  }
8133 
8134  // content_loc
8135  {
8136  pm_buffer_concat(output_buffer, prefix_buffer);
8137  pm_buffer_append_string(output_buffer, "+-- content_loc:", 16);
8138  pm_location_t *location = &cast->content_loc;
8139  pm_buffer_append_byte(output_buffer, ' ');
8140  prettyprint_location(output_buffer, parser, location);
8141  pm_buffer_append_string(output_buffer, " = \"", 4);
8142  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8143  pm_buffer_append_string(output_buffer, "\"\n", 2);
8144  }
8145 
8146  // closing_loc
8147  {
8148  pm_buffer_concat(output_buffer, prefix_buffer);
8149  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
8150  pm_location_t *location = &cast->closing_loc;
8151  if (location->start == NULL) {
8152  pm_buffer_append_string(output_buffer, " nil\n", 5);
8153  } else {
8154  pm_buffer_append_byte(output_buffer, ' ');
8155  prettyprint_location(output_buffer, parser, location);
8156  pm_buffer_append_string(output_buffer, " = \"", 4);
8157  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8158  pm_buffer_append_string(output_buffer, "\"\n", 2);
8159  }
8160  }
8161 
8162  // unescaped
8163  {
8164  pm_buffer_concat(output_buffer, prefix_buffer);
8165  pm_buffer_append_string(output_buffer, "+-- unescaped:", 14);
8166  pm_buffer_append_string(output_buffer, " \"", 2);
8167  pm_buffer_append_source(output_buffer, pm_string_source(&cast->unescaped), pm_string_length(&cast->unescaped), PM_BUFFER_ESCAPING_RUBY);
8168  pm_buffer_append_string(output_buffer, "\"\n", 2);
8169  }
8170 
8171  break;
8172  }
8173  case PM_SUPER_NODE: {
8174  pm_super_node_t *cast = (pm_super_node_t *) node;
8175  pm_buffer_append_string(output_buffer, "@ SuperNode (location: ", 23);
8176  prettyprint_location(output_buffer, parser, &node->location);
8177  pm_buffer_append_string(output_buffer, ")\n", 2);
8178 
8179  // keyword_loc
8180  {
8181  pm_buffer_concat(output_buffer, prefix_buffer);
8182  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
8183  pm_location_t *location = &cast->keyword_loc;
8184  pm_buffer_append_byte(output_buffer, ' ');
8185  prettyprint_location(output_buffer, parser, location);
8186  pm_buffer_append_string(output_buffer, " = \"", 4);
8187  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8188  pm_buffer_append_string(output_buffer, "\"\n", 2);
8189  }
8190 
8191  // lparen_loc
8192  {
8193  pm_buffer_concat(output_buffer, prefix_buffer);
8194  pm_buffer_append_string(output_buffer, "+-- lparen_loc:", 15);
8195  pm_location_t *location = &cast->lparen_loc;
8196  if (location->start == NULL) {
8197  pm_buffer_append_string(output_buffer, " nil\n", 5);
8198  } else {
8199  pm_buffer_append_byte(output_buffer, ' ');
8200  prettyprint_location(output_buffer, parser, location);
8201  pm_buffer_append_string(output_buffer, " = \"", 4);
8202  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8203  pm_buffer_append_string(output_buffer, "\"\n", 2);
8204  }
8205  }
8206 
8207  // arguments
8208  {
8209  pm_buffer_concat(output_buffer, prefix_buffer);
8210  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
8211  if (cast->arguments == NULL) {
8212  pm_buffer_append_string(output_buffer, " nil\n", 5);
8213  } else {
8214  pm_buffer_append_byte(output_buffer, '\n');
8215 
8216  size_t prefix_length = prefix_buffer->length;
8217  pm_buffer_append_string(prefix_buffer, "| ", 4);
8218  pm_buffer_concat(output_buffer, prefix_buffer);
8219  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
8220  prefix_buffer->length = prefix_length;
8221  }
8222  }
8223 
8224  // rparen_loc
8225  {
8226  pm_buffer_concat(output_buffer, prefix_buffer);
8227  pm_buffer_append_string(output_buffer, "+-- rparen_loc:", 15);
8228  pm_location_t *location = &cast->rparen_loc;
8229  if (location->start == NULL) {
8230  pm_buffer_append_string(output_buffer, " nil\n", 5);
8231  } else {
8232  pm_buffer_append_byte(output_buffer, ' ');
8233  prettyprint_location(output_buffer, parser, location);
8234  pm_buffer_append_string(output_buffer, " = \"", 4);
8235  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8236  pm_buffer_append_string(output_buffer, "\"\n", 2);
8237  }
8238  }
8239 
8240  // block
8241  {
8242  pm_buffer_concat(output_buffer, prefix_buffer);
8243  pm_buffer_append_string(output_buffer, "+-- block:", 10);
8244  if (cast->block == NULL) {
8245  pm_buffer_append_string(output_buffer, " nil\n", 5);
8246  } else {
8247  pm_buffer_append_byte(output_buffer, '\n');
8248 
8249  size_t prefix_length = prefix_buffer->length;
8250  pm_buffer_append_string(prefix_buffer, " ", 4);
8251  pm_buffer_concat(output_buffer, prefix_buffer);
8252  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->block, prefix_buffer);
8253  prefix_buffer->length = prefix_length;
8254  }
8255  }
8256 
8257  break;
8258  }
8259  case PM_SYMBOL_NODE: {
8260  pm_symbol_node_t *cast = (pm_symbol_node_t *) node;
8261  pm_buffer_append_string(output_buffer, "@ SymbolNode (location: ", 24);
8262  prettyprint_location(output_buffer, parser, &node->location);
8263  pm_buffer_append_string(output_buffer, ")\n", 2);
8264 
8265  // SymbolFlags
8266  {
8267  pm_buffer_concat(output_buffer, prefix_buffer);
8268  pm_buffer_append_string(output_buffer, "+-- SymbolFlags:", 16);
8269  bool found = false;
8271  if (found) pm_buffer_append_byte(output_buffer, ',');
8272  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
8273  found = true;
8274  }
8276  if (found) pm_buffer_append_byte(output_buffer, ',');
8277  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
8278  found = true;
8279  }
8281  if (found) pm_buffer_append_byte(output_buffer, ',');
8282  pm_buffer_append_string(output_buffer, " forced_us_ascii_encoding", 25);
8283  found = true;
8284  }
8285  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
8286  pm_buffer_append_byte(output_buffer, '\n');
8287  }
8288 
8289  // opening_loc
8290  {
8291  pm_buffer_concat(output_buffer, prefix_buffer);
8292  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
8293  pm_location_t *location = &cast->opening_loc;
8294  if (location->start == NULL) {
8295  pm_buffer_append_string(output_buffer, " nil\n", 5);
8296  } else {
8297  pm_buffer_append_byte(output_buffer, ' ');
8298  prettyprint_location(output_buffer, parser, location);
8299  pm_buffer_append_string(output_buffer, " = \"", 4);
8300  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8301  pm_buffer_append_string(output_buffer, "\"\n", 2);
8302  }
8303  }
8304 
8305  // value_loc
8306  {
8307  pm_buffer_concat(output_buffer, prefix_buffer);
8308  pm_buffer_append_string(output_buffer, "+-- value_loc:", 14);
8309  pm_location_t *location = &cast->value_loc;
8310  if (location->start == NULL) {
8311  pm_buffer_append_string(output_buffer, " nil\n", 5);
8312  } else {
8313  pm_buffer_append_byte(output_buffer, ' ');
8314  prettyprint_location(output_buffer, parser, location);
8315  pm_buffer_append_string(output_buffer, " = \"", 4);
8316  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8317  pm_buffer_append_string(output_buffer, "\"\n", 2);
8318  }
8319  }
8320 
8321  // closing_loc
8322  {
8323  pm_buffer_concat(output_buffer, prefix_buffer);
8324  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
8325  pm_location_t *location = &cast->closing_loc;
8326  if (location->start == NULL) {
8327  pm_buffer_append_string(output_buffer, " nil\n", 5);
8328  } else {
8329  pm_buffer_append_byte(output_buffer, ' ');
8330  prettyprint_location(output_buffer, parser, location);
8331  pm_buffer_append_string(output_buffer, " = \"", 4);
8332  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8333  pm_buffer_append_string(output_buffer, "\"\n", 2);
8334  }
8335  }
8336 
8337  // unescaped
8338  {
8339  pm_buffer_concat(output_buffer, prefix_buffer);
8340  pm_buffer_append_string(output_buffer, "+-- unescaped:", 14);
8341  pm_buffer_append_string(output_buffer, " \"", 2);
8342  pm_buffer_append_source(output_buffer, pm_string_source(&cast->unescaped), pm_string_length(&cast->unescaped), PM_BUFFER_ESCAPING_RUBY);
8343  pm_buffer_append_string(output_buffer, "\"\n", 2);
8344  }
8345 
8346  break;
8347  }
8348  case PM_TRUE_NODE: {
8349  pm_buffer_append_string(output_buffer, "@ TrueNode (location: ", 22);
8350  prettyprint_location(output_buffer, parser, &node->location);
8351  pm_buffer_append_string(output_buffer, ")\n", 2);
8352 
8353  break;
8354  }
8355  case PM_UNDEF_NODE: {
8356  pm_undef_node_t *cast = (pm_undef_node_t *) node;
8357  pm_buffer_append_string(output_buffer, "@ UndefNode (location: ", 23);
8358  prettyprint_location(output_buffer, parser, &node->location);
8359  pm_buffer_append_string(output_buffer, ")\n", 2);
8360 
8361  // names
8362  {
8363  pm_buffer_concat(output_buffer, prefix_buffer);
8364  pm_buffer_append_string(output_buffer, "+-- names:", 10);
8365  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->names.size));
8366 
8367  size_t last_index = cast->names.size;
8368  for (uint32_t index = 0; index < last_index; index++) {
8369  size_t prefix_length = prefix_buffer->length;
8370  pm_buffer_append_string(prefix_buffer, "| ", 4);
8371  pm_buffer_concat(output_buffer, prefix_buffer);
8372  pm_buffer_append_string(output_buffer, "+-- ", 4);
8373  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
8374  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->names.nodes[index], prefix_buffer);
8375  prefix_buffer->length = prefix_length;
8376  }
8377  }
8378 
8379  // keyword_loc
8380  {
8381  pm_buffer_concat(output_buffer, prefix_buffer);
8382  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
8383  pm_location_t *location = &cast->keyword_loc;
8384  pm_buffer_append_byte(output_buffer, ' ');
8385  prettyprint_location(output_buffer, parser, location);
8386  pm_buffer_append_string(output_buffer, " = \"", 4);
8387  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8388  pm_buffer_append_string(output_buffer, "\"\n", 2);
8389  }
8390 
8391  break;
8392  }
8393  case PM_UNLESS_NODE: {
8394  pm_unless_node_t *cast = (pm_unless_node_t *) node;
8395  pm_buffer_append_string(output_buffer, "@ UnlessNode (location: ", 24);
8396  prettyprint_location(output_buffer, parser, &node->location);
8397  pm_buffer_append_string(output_buffer, ")\n", 2);
8398 
8399  // keyword_loc
8400  {
8401  pm_buffer_concat(output_buffer, prefix_buffer);
8402  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
8403  pm_location_t *location = &cast->keyword_loc;
8404  pm_buffer_append_byte(output_buffer, ' ');
8405  prettyprint_location(output_buffer, parser, location);
8406  pm_buffer_append_string(output_buffer, " = \"", 4);
8407  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8408  pm_buffer_append_string(output_buffer, "\"\n", 2);
8409  }
8410 
8411  // predicate
8412  {
8413  pm_buffer_concat(output_buffer, prefix_buffer);
8414  pm_buffer_append_string(output_buffer, "+-- predicate:", 14);
8415  pm_buffer_append_byte(output_buffer, '\n');
8416 
8417  size_t prefix_length = prefix_buffer->length;
8418  pm_buffer_append_string(prefix_buffer, "| ", 4);
8419  pm_buffer_concat(output_buffer, prefix_buffer);
8420  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->predicate, prefix_buffer);
8421  prefix_buffer->length = prefix_length;
8422  }
8423 
8424  // then_keyword_loc
8425  {
8426  pm_buffer_concat(output_buffer, prefix_buffer);
8427  pm_buffer_append_string(output_buffer, "+-- then_keyword_loc:", 21);
8428  pm_location_t *location = &cast->then_keyword_loc;
8429  if (location->start == NULL) {
8430  pm_buffer_append_string(output_buffer, " nil\n", 5);
8431  } else {
8432  pm_buffer_append_byte(output_buffer, ' ');
8433  prettyprint_location(output_buffer, parser, location);
8434  pm_buffer_append_string(output_buffer, " = \"", 4);
8435  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8436  pm_buffer_append_string(output_buffer, "\"\n", 2);
8437  }
8438  }
8439 
8440  // statements
8441  {
8442  pm_buffer_concat(output_buffer, prefix_buffer);
8443  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
8444  if (cast->statements == NULL) {
8445  pm_buffer_append_string(output_buffer, " nil\n", 5);
8446  } else {
8447  pm_buffer_append_byte(output_buffer, '\n');
8448 
8449  size_t prefix_length = prefix_buffer->length;
8450  pm_buffer_append_string(prefix_buffer, "| ", 4);
8451  pm_buffer_concat(output_buffer, prefix_buffer);
8452  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
8453  prefix_buffer->length = prefix_length;
8454  }
8455  }
8456 
8457  // else_clause
8458  {
8459  pm_buffer_concat(output_buffer, prefix_buffer);
8460  pm_buffer_append_string(output_buffer, "+-- else_clause:", 16);
8461  if (cast->else_clause == NULL) {
8462  pm_buffer_append_string(output_buffer, " nil\n", 5);
8463  } else {
8464  pm_buffer_append_byte(output_buffer, '\n');
8465 
8466  size_t prefix_length = prefix_buffer->length;
8467  pm_buffer_append_string(prefix_buffer, "| ", 4);
8468  pm_buffer_concat(output_buffer, prefix_buffer);
8469  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->else_clause, prefix_buffer);
8470  prefix_buffer->length = prefix_length;
8471  }
8472  }
8473 
8474  // end_keyword_loc
8475  {
8476  pm_buffer_concat(output_buffer, prefix_buffer);
8477  pm_buffer_append_string(output_buffer, "+-- end_keyword_loc:", 20);
8478  pm_location_t *location = &cast->end_keyword_loc;
8479  if (location->start == NULL) {
8480  pm_buffer_append_string(output_buffer, " nil\n", 5);
8481  } else {
8482  pm_buffer_append_byte(output_buffer, ' ');
8483  prettyprint_location(output_buffer, parser, location);
8484  pm_buffer_append_string(output_buffer, " = \"", 4);
8485  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8486  pm_buffer_append_string(output_buffer, "\"\n", 2);
8487  }
8488  }
8489 
8490  break;
8491  }
8492  case PM_UNTIL_NODE: {
8493  pm_until_node_t *cast = (pm_until_node_t *) node;
8494  pm_buffer_append_string(output_buffer, "@ UntilNode (location: ", 23);
8495  prettyprint_location(output_buffer, parser, &node->location);
8496  pm_buffer_append_string(output_buffer, ")\n", 2);
8497 
8498  // LoopFlags
8499  {
8500  pm_buffer_concat(output_buffer, prefix_buffer);
8501  pm_buffer_append_string(output_buffer, "+-- LoopFlags:", 14);
8502  bool found = false;
8503  if (cast->base.flags & PM_LOOP_FLAGS_BEGIN_MODIFIER) {
8504  if (found) pm_buffer_append_byte(output_buffer, ',');
8505  pm_buffer_append_string(output_buffer, " begin_modifier", 15);
8506  found = true;
8507  }
8508  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
8509  pm_buffer_append_byte(output_buffer, '\n');
8510  }
8511 
8512  // keyword_loc
8513  {
8514  pm_buffer_concat(output_buffer, prefix_buffer);
8515  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
8516  pm_location_t *location = &cast->keyword_loc;
8517  pm_buffer_append_byte(output_buffer, ' ');
8518  prettyprint_location(output_buffer, parser, location);
8519  pm_buffer_append_string(output_buffer, " = \"", 4);
8520  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8521  pm_buffer_append_string(output_buffer, "\"\n", 2);
8522  }
8523 
8524  // closing_loc
8525  {
8526  pm_buffer_concat(output_buffer, prefix_buffer);
8527  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
8528  pm_location_t *location = &cast->closing_loc;
8529  if (location->start == NULL) {
8530  pm_buffer_append_string(output_buffer, " nil\n", 5);
8531  } else {
8532  pm_buffer_append_byte(output_buffer, ' ');
8533  prettyprint_location(output_buffer, parser, location);
8534  pm_buffer_append_string(output_buffer, " = \"", 4);
8535  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8536  pm_buffer_append_string(output_buffer, "\"\n", 2);
8537  }
8538  }
8539 
8540  // predicate
8541  {
8542  pm_buffer_concat(output_buffer, prefix_buffer);
8543  pm_buffer_append_string(output_buffer, "+-- predicate:", 14);
8544  pm_buffer_append_byte(output_buffer, '\n');
8545 
8546  size_t prefix_length = prefix_buffer->length;
8547  pm_buffer_append_string(prefix_buffer, "| ", 4);
8548  pm_buffer_concat(output_buffer, prefix_buffer);
8549  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->predicate, prefix_buffer);
8550  prefix_buffer->length = prefix_length;
8551  }
8552 
8553  // statements
8554  {
8555  pm_buffer_concat(output_buffer, prefix_buffer);
8556  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
8557  if (cast->statements == NULL) {
8558  pm_buffer_append_string(output_buffer, " nil\n", 5);
8559  } else {
8560  pm_buffer_append_byte(output_buffer, '\n');
8561 
8562  size_t prefix_length = prefix_buffer->length;
8563  pm_buffer_append_string(prefix_buffer, " ", 4);
8564  pm_buffer_concat(output_buffer, prefix_buffer);
8565  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
8566  prefix_buffer->length = prefix_length;
8567  }
8568  }
8569 
8570  break;
8571  }
8572  case PM_WHEN_NODE: {
8573  pm_when_node_t *cast = (pm_when_node_t *) node;
8574  pm_buffer_append_string(output_buffer, "@ WhenNode (location: ", 22);
8575  prettyprint_location(output_buffer, parser, &node->location);
8576  pm_buffer_append_string(output_buffer, ")\n", 2);
8577 
8578  // keyword_loc
8579  {
8580  pm_buffer_concat(output_buffer, prefix_buffer);
8581  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
8582  pm_location_t *location = &cast->keyword_loc;
8583  pm_buffer_append_byte(output_buffer, ' ');
8584  prettyprint_location(output_buffer, parser, location);
8585  pm_buffer_append_string(output_buffer, " = \"", 4);
8586  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8587  pm_buffer_append_string(output_buffer, "\"\n", 2);
8588  }
8589 
8590  // conditions
8591  {
8592  pm_buffer_concat(output_buffer, prefix_buffer);
8593  pm_buffer_append_string(output_buffer, "+-- conditions:", 15);
8594  pm_buffer_append_format(output_buffer, " (length: %lu)\n", (unsigned long) (cast->conditions.size));
8595 
8596  size_t last_index = cast->conditions.size;
8597  for (uint32_t index = 0; index < last_index; index++) {
8598  size_t prefix_length = prefix_buffer->length;
8599  pm_buffer_append_string(prefix_buffer, "| ", 4);
8600  pm_buffer_concat(output_buffer, prefix_buffer);
8601  pm_buffer_append_string(output_buffer, "+-- ", 4);
8602  pm_buffer_append_string(prefix_buffer, (index == last_index - 1) ? " " : "| ", 4);
8603  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->conditions.nodes[index], prefix_buffer);
8604  prefix_buffer->length = prefix_length;
8605  }
8606  }
8607 
8608  // then_keyword_loc
8609  {
8610  pm_buffer_concat(output_buffer, prefix_buffer);
8611  pm_buffer_append_string(output_buffer, "+-- then_keyword_loc:", 21);
8612  pm_location_t *location = &cast->then_keyword_loc;
8613  if (location->start == NULL) {
8614  pm_buffer_append_string(output_buffer, " nil\n", 5);
8615  } else {
8616  pm_buffer_append_byte(output_buffer, ' ');
8617  prettyprint_location(output_buffer, parser, location);
8618  pm_buffer_append_string(output_buffer, " = \"", 4);
8619  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8620  pm_buffer_append_string(output_buffer, "\"\n", 2);
8621  }
8622  }
8623 
8624  // statements
8625  {
8626  pm_buffer_concat(output_buffer, prefix_buffer);
8627  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
8628  if (cast->statements == NULL) {
8629  pm_buffer_append_string(output_buffer, " nil\n", 5);
8630  } else {
8631  pm_buffer_append_byte(output_buffer, '\n');
8632 
8633  size_t prefix_length = prefix_buffer->length;
8634  pm_buffer_append_string(prefix_buffer, " ", 4);
8635  pm_buffer_concat(output_buffer, prefix_buffer);
8636  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
8637  prefix_buffer->length = prefix_length;
8638  }
8639  }
8640 
8641  break;
8642  }
8643  case PM_WHILE_NODE: {
8644  pm_while_node_t *cast = (pm_while_node_t *) node;
8645  pm_buffer_append_string(output_buffer, "@ WhileNode (location: ", 23);
8646  prettyprint_location(output_buffer, parser, &node->location);
8647  pm_buffer_append_string(output_buffer, ")\n", 2);
8648 
8649  // LoopFlags
8650  {
8651  pm_buffer_concat(output_buffer, prefix_buffer);
8652  pm_buffer_append_string(output_buffer, "+-- LoopFlags:", 14);
8653  bool found = false;
8654  if (cast->base.flags & PM_LOOP_FLAGS_BEGIN_MODIFIER) {
8655  if (found) pm_buffer_append_byte(output_buffer, ',');
8656  pm_buffer_append_string(output_buffer, " begin_modifier", 15);
8657  found = true;
8658  }
8659  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
8660  pm_buffer_append_byte(output_buffer, '\n');
8661  }
8662 
8663  // keyword_loc
8664  {
8665  pm_buffer_concat(output_buffer, prefix_buffer);
8666  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
8667  pm_location_t *location = &cast->keyword_loc;
8668  pm_buffer_append_byte(output_buffer, ' ');
8669  prettyprint_location(output_buffer, parser, location);
8670  pm_buffer_append_string(output_buffer, " = \"", 4);
8671  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8672  pm_buffer_append_string(output_buffer, "\"\n", 2);
8673  }
8674 
8675  // closing_loc
8676  {
8677  pm_buffer_concat(output_buffer, prefix_buffer);
8678  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
8679  pm_location_t *location = &cast->closing_loc;
8680  if (location->start == NULL) {
8681  pm_buffer_append_string(output_buffer, " nil\n", 5);
8682  } else {
8683  pm_buffer_append_byte(output_buffer, ' ');
8684  prettyprint_location(output_buffer, parser, location);
8685  pm_buffer_append_string(output_buffer, " = \"", 4);
8686  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8687  pm_buffer_append_string(output_buffer, "\"\n", 2);
8688  }
8689  }
8690 
8691  // predicate
8692  {
8693  pm_buffer_concat(output_buffer, prefix_buffer);
8694  pm_buffer_append_string(output_buffer, "+-- predicate:", 14);
8695  pm_buffer_append_byte(output_buffer, '\n');
8696 
8697  size_t prefix_length = prefix_buffer->length;
8698  pm_buffer_append_string(prefix_buffer, "| ", 4);
8699  pm_buffer_concat(output_buffer, prefix_buffer);
8700  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->predicate, prefix_buffer);
8701  prefix_buffer->length = prefix_length;
8702  }
8703 
8704  // statements
8705  {
8706  pm_buffer_concat(output_buffer, prefix_buffer);
8707  pm_buffer_append_string(output_buffer, "+-- statements:", 15);
8708  if (cast->statements == NULL) {
8709  pm_buffer_append_string(output_buffer, " nil\n", 5);
8710  } else {
8711  pm_buffer_append_byte(output_buffer, '\n');
8712 
8713  size_t prefix_length = prefix_buffer->length;
8714  pm_buffer_append_string(prefix_buffer, " ", 4);
8715  pm_buffer_concat(output_buffer, prefix_buffer);
8716  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->statements, prefix_buffer);
8717  prefix_buffer->length = prefix_length;
8718  }
8719  }
8720 
8721  break;
8722  }
8723  case PM_X_STRING_NODE: {
8724  pm_x_string_node_t *cast = (pm_x_string_node_t *) node;
8725  pm_buffer_append_string(output_buffer, "@ XStringNode (location: ", 25);
8726  prettyprint_location(output_buffer, parser, &node->location);
8727  pm_buffer_append_string(output_buffer, ")\n", 2);
8728 
8729  // EncodingFlags
8730  {
8731  pm_buffer_concat(output_buffer, prefix_buffer);
8732  pm_buffer_append_string(output_buffer, "+-- EncodingFlags:", 18);
8733  bool found = false;
8735  if (found) pm_buffer_append_byte(output_buffer, ',');
8736  pm_buffer_append_string(output_buffer, " forced_utf8_encoding", 21);
8737  found = true;
8738  }
8740  if (found) pm_buffer_append_byte(output_buffer, ',');
8741  pm_buffer_append_string(output_buffer, " forced_binary_encoding", 23);
8742  found = true;
8743  }
8744  if (!found) pm_buffer_append_string(output_buffer, " nil", 4);
8745  pm_buffer_append_byte(output_buffer, '\n');
8746  }
8747 
8748  // opening_loc
8749  {
8750  pm_buffer_concat(output_buffer, prefix_buffer);
8751  pm_buffer_append_string(output_buffer, "+-- opening_loc:", 16);
8752  pm_location_t *location = &cast->opening_loc;
8753  pm_buffer_append_byte(output_buffer, ' ');
8754  prettyprint_location(output_buffer, parser, location);
8755  pm_buffer_append_string(output_buffer, " = \"", 4);
8756  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8757  pm_buffer_append_string(output_buffer, "\"\n", 2);
8758  }
8759 
8760  // content_loc
8761  {
8762  pm_buffer_concat(output_buffer, prefix_buffer);
8763  pm_buffer_append_string(output_buffer, "+-- content_loc:", 16);
8764  pm_location_t *location = &cast->content_loc;
8765  pm_buffer_append_byte(output_buffer, ' ');
8766  prettyprint_location(output_buffer, parser, location);
8767  pm_buffer_append_string(output_buffer, " = \"", 4);
8768  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8769  pm_buffer_append_string(output_buffer, "\"\n", 2);
8770  }
8771 
8772  // closing_loc
8773  {
8774  pm_buffer_concat(output_buffer, prefix_buffer);
8775  pm_buffer_append_string(output_buffer, "+-- closing_loc:", 16);
8776  pm_location_t *location = &cast->closing_loc;
8777  pm_buffer_append_byte(output_buffer, ' ');
8778  prettyprint_location(output_buffer, parser, location);
8779  pm_buffer_append_string(output_buffer, " = \"", 4);
8780  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8781  pm_buffer_append_string(output_buffer, "\"\n", 2);
8782  }
8783 
8784  // unescaped
8785  {
8786  pm_buffer_concat(output_buffer, prefix_buffer);
8787  pm_buffer_append_string(output_buffer, "+-- unescaped:", 14);
8788  pm_buffer_append_string(output_buffer, " \"", 2);
8789  pm_buffer_append_source(output_buffer, pm_string_source(&cast->unescaped), pm_string_length(&cast->unescaped), PM_BUFFER_ESCAPING_RUBY);
8790  pm_buffer_append_string(output_buffer, "\"\n", 2);
8791  }
8792 
8793  break;
8794  }
8795  case PM_YIELD_NODE: {
8796  pm_yield_node_t *cast = (pm_yield_node_t *) node;
8797  pm_buffer_append_string(output_buffer, "@ YieldNode (location: ", 23);
8798  prettyprint_location(output_buffer, parser, &node->location);
8799  pm_buffer_append_string(output_buffer, ")\n", 2);
8800 
8801  // keyword_loc
8802  {
8803  pm_buffer_concat(output_buffer, prefix_buffer);
8804  pm_buffer_append_string(output_buffer, "+-- keyword_loc:", 16);
8805  pm_location_t *location = &cast->keyword_loc;
8806  pm_buffer_append_byte(output_buffer, ' ');
8807  prettyprint_location(output_buffer, parser, location);
8808  pm_buffer_append_string(output_buffer, " = \"", 4);
8809  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8810  pm_buffer_append_string(output_buffer, "\"\n", 2);
8811  }
8812 
8813  // lparen_loc
8814  {
8815  pm_buffer_concat(output_buffer, prefix_buffer);
8816  pm_buffer_append_string(output_buffer, "+-- lparen_loc:", 15);
8817  pm_location_t *location = &cast->lparen_loc;
8818  if (location->start == NULL) {
8819  pm_buffer_append_string(output_buffer, " nil\n", 5);
8820  } else {
8821  pm_buffer_append_byte(output_buffer, ' ');
8822  prettyprint_location(output_buffer, parser, location);
8823  pm_buffer_append_string(output_buffer, " = \"", 4);
8824  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8825  pm_buffer_append_string(output_buffer, "\"\n", 2);
8826  }
8827  }
8828 
8829  // arguments
8830  {
8831  pm_buffer_concat(output_buffer, prefix_buffer);
8832  pm_buffer_append_string(output_buffer, "+-- arguments:", 14);
8833  if (cast->arguments == NULL) {
8834  pm_buffer_append_string(output_buffer, " nil\n", 5);
8835  } else {
8836  pm_buffer_append_byte(output_buffer, '\n');
8837 
8838  size_t prefix_length = prefix_buffer->length;
8839  pm_buffer_append_string(prefix_buffer, "| ", 4);
8840  pm_buffer_concat(output_buffer, prefix_buffer);
8841  prettyprint_node(output_buffer, parser, (pm_node_t *) cast->arguments, prefix_buffer);
8842  prefix_buffer->length = prefix_length;
8843  }
8844  }
8845 
8846  // rparen_loc
8847  {
8848  pm_buffer_concat(output_buffer, prefix_buffer);
8849  pm_buffer_append_string(output_buffer, "+-- rparen_loc:", 15);
8850  pm_location_t *location = &cast->rparen_loc;
8851  if (location->start == NULL) {
8852  pm_buffer_append_string(output_buffer, " nil\n", 5);
8853  } else {
8854  pm_buffer_append_byte(output_buffer, ' ');
8855  prettyprint_location(output_buffer, parser, location);
8856  pm_buffer_append_string(output_buffer, " = \"", 4);
8857  pm_buffer_append_source(output_buffer, location->start, (size_t) (location->end - location->start), PM_BUFFER_ESCAPING_RUBY);
8858  pm_buffer_append_string(output_buffer, "\"\n", 2);
8859  }
8860  }
8861 
8862  break;
8863  }
8864  }
8865 }
8866 
8871 pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node) {
8872  pm_buffer_t prefix_buffer = { 0 };
8873  prettyprint_node(output_buffer, parser, node, &prefix_buffer);
8874  pm_buffer_free(&prefix_buffer);
8875 }
8876 
8877 #endif
@ PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE
mutable by virtue of a frozen_string_literal: false comment or --disable-frozen-string-literal; only ...
Definition: ast.h:7812
@ PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN
frozen by virtue of a frozen_string_literal: true comment or --enable-frozen-string-literal; only for...
Definition: ast.h:7809
@ PM_RANGE_FLAGS_EXCLUDE_END
...
Definition: ast.h:7844
@ PM_DEFINED_NODE
DefinedNode.
Definition: ast.h:709
@ PM_PRE_EXECUTION_NODE
PreExecutionNode.
Definition: ast.h:931
@ PM_RETRY_NODE
RetryNode.
Definition: ast.h:964
@ PM_REDO_NODE
RedoNode.
Definition: ast.h:943
@ PM_CONSTANT_PATH_WRITE_NODE
ConstantPathWriteNode.
Definition: ast.h:694
@ PM_INDEX_AND_WRITE_NODE
IndexAndWriteNode.
Definition: ast.h:787
@ PM_SOURCE_LINE_NODE
SourceLineNode.
Definition: ast.h:985
@ PM_UNLESS_NODE
UnlessNode.
Definition: ast.h:1009
@ PM_EMBEDDED_VARIABLE_NODE
EmbeddedVariableNode.
Definition: ast.h:718
@ PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
GlobalVariableOperatorWriteNode.
Definition: ast.h:751
@ PM_CALL_NODE
CallNode.
Definition: ast.h:628
@ PM_NIL_NODE
NilNode.
Definition: ast.h:895
@ PM_GLOBAL_VARIABLE_READ_NODE
GlobalVariableReadNode.
Definition: ast.h:757
@ PM_RATIONAL_NODE
RationalNode.
Definition: ast.h:940
@ PM_YIELD_NODE
YieldNode.
Definition: ast.h:1024
@ PM_LOCAL_VARIABLE_AND_WRITE_NODE
LocalVariableAndWriteNode.
Definition: ast.h:850
@ PM_CONSTANT_AND_WRITE_NODE
ConstantAndWriteNode.
Definition: ast.h:670
@ PM_CLASS_NODE
ClassNode.
Definition: ast.h:649
@ PM_FIND_PATTERN_NODE
FindPatternNode.
Definition: ast.h:727
@ PM_CALL_OPERATOR_WRITE_NODE
CallOperatorWriteNode.
Definition: ast.h:631
@ PM_MATCH_WRITE_NODE
MatchWriteNode.
Definition: ast.h:877
@ PM_ARRAY_NODE
ArrayNode.
Definition: ast.h:589
@ PM_CONSTANT_PATH_TARGET_NODE
ConstantPathTargetNode.
Definition: ast.h:691
@ PM_PROGRAM_NODE
ProgramNode.
Definition: ast.h:934
@ PM_OR_NODE
OrNode.
Definition: ast.h:913
@ PM_MULTI_WRITE_NODE
MultiWriteNode.
Definition: ast.h:889
@ PM_IF_NODE
IfNode.
Definition: ast.h:772
@ PM_IMPLICIT_NODE
ImplicitNode.
Definition: ast.h:778
@ PM_ARGUMENTS_NODE
ArgumentsNode.
Definition: ast.h:586
@ PM_FORWARDING_SUPER_NODE
ForwardingSuperNode.
Definition: ast.h:745
@ PM_WHILE_NODE
WhileNode.
Definition: ast.h:1018
@ PM_INTERPOLATED_STRING_NODE
InterpolatedStringNode.
Definition: ast.h:826
@ PM_FALSE_NODE
FalseNode.
Definition: ast.h:724
@ PM_FORWARDING_PARAMETER_NODE
ForwardingParameterNode.
Definition: ast.h:742
@ PM_BLOCK_LOCAL_VARIABLE_NODE
BlockLocalVariableNode.
Definition: ast.h:610
@ PM_HASH_NODE
HashNode.
Definition: ast.h:766
@ PM_UNTIL_NODE
UntilNode.
Definition: ast.h:1012
@ PM_MATCH_PREDICATE_NODE
MatchPredicateNode.
Definition: ast.h:871
@ PM_X_STRING_NODE
XStringNode.
Definition: ast.h:1021
@ PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
LocalVariableOperatorWriteNode.
Definition: ast.h:853
@ PM_LOCAL_VARIABLE_OR_WRITE_NODE
LocalVariableOrWriteNode.
Definition: ast.h:856
@ PM_INSTANCE_VARIABLE_AND_WRITE_NODE
InstanceVariableAndWriteNode.
Definition: ast.h:799
@ PM_GLOBAL_VARIABLE_TARGET_NODE
GlobalVariableTargetNode.
Definition: ast.h:760
@ PM_AND_NODE
AndNode.
Definition: ast.h:583
@ PM_CONSTANT_TARGET_NODE
ConstantTargetNode.
Definition: ast.h:700
@ PM_IT_LOCAL_VARIABLE_READ_NODE
ItLocalVariableReadNode.
Definition: ast.h:835
@ PM_CONSTANT_PATH_AND_WRITE_NODE
ConstantPathAndWriteNode.
Definition: ast.h:679
@ PM_IN_NODE
InNode.
Definition: ast.h:784
@ PM_BLOCK_PARAMETER_NODE
BlockParameterNode.
Definition: ast.h:616
@ PM_CAPTURE_PATTERN_NODE
CapturePatternNode.
Definition: ast.h:640
@ PM_SOURCE_FILE_NODE
SourceFileNode.
Definition: ast.h:982
@ PM_NO_KEYWORDS_PARAMETER_NODE
NoKeywordsParameterNode.
Definition: ast.h:898
@ PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
ConstantPathOperatorWriteNode.
Definition: ast.h:685
@ PM_MULTI_TARGET_NODE
MultiTargetNode.
Definition: ast.h:886
@ PM_SPLAT_NODE
SplatNode.
Definition: ast.h:988
@ PM_LAMBDA_NODE
LambdaNode.
Definition: ast.h:847
@ PM_CLASS_VARIABLE_READ_NODE
ClassVariableReadNode.
Definition: ast.h:661
@ PM_REQUIRED_KEYWORD_PARAMETER_NODE
RequiredKeywordParameterNode.
Definition: ast.h:949
@ PM_CALL_TARGET_NODE
CallTargetNode.
Definition: ast.h:637
@ PM_ELSE_NODE
ElseNode.
Definition: ast.h:712
@ PM_INTERPOLATED_MATCH_LAST_LINE_NODE
InterpolatedMatchLastLineNode.
Definition: ast.h:820
@ PM_WHEN_NODE
WhenNode.
Definition: ast.h:1015
@ PM_NUMBERED_PARAMETERS_NODE
NumberedParametersNode.
Definition: ast.h:901
@ PM_SYMBOL_NODE
SymbolNode.
Definition: ast.h:1000
@ PM_RESCUE_MODIFIER_NODE
RescueModifierNode.
Definition: ast.h:955
@ PM_ALIAS_METHOD_NODE
AliasMethodNode.
Definition: ast.h:577
@ PM_MATCH_REQUIRED_NODE
MatchRequiredNode.
Definition: ast.h:874
@ PM_FORWARDING_ARGUMENTS_NODE
ForwardingArgumentsNode.
Definition: ast.h:739
@ PM_BACK_REFERENCE_READ_NODE
BackReferenceReadNode.
Definition: ast.h:601
@ PM_SCOPE_NODE
A special kind of node used for compilation.
Definition: ast.h:1027
@ PM_BLOCK_ARGUMENT_NODE
BlockArgumentNode.
Definition: ast.h:607
@ PM_MISSING_NODE
MissingNode.
Definition: ast.h:880
@ PM_SELF_NODE
SelfNode.
Definition: ast.h:970
@ PM_IMPLICIT_REST_NODE
ImplicitRestNode.
Definition: ast.h:781
@ PM_TRUE_NODE
TrueNode.
Definition: ast.h:1003
@ PM_ASSOC_SPLAT_NODE
AssocSplatNode.
Definition: ast.h:598
@ PM_CLASS_VARIABLE_AND_WRITE_NODE
ClassVariableAndWriteNode.
Definition: ast.h:652
@ PM_RANGE_NODE
RangeNode.
Definition: ast.h:937
@ PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
InstanceVariableOperatorWriteNode.
Definition: ast.h:802
@ PM_LOCAL_VARIABLE_READ_NODE
LocalVariableReadNode.
Definition: ast.h:859
@ PM_SHAREABLE_CONSTANT_NODE
ShareableConstantNode.
Definition: ast.h:973
@ PM_NEXT_NODE
NextNode.
Definition: ast.h:892
@ PM_INSTANCE_VARIABLE_OR_WRITE_NODE
InstanceVariableOrWriteNode.
Definition: ast.h:805
@ PM_REGULAR_EXPRESSION_NODE
RegularExpressionNode.
Definition: ast.h:946
@ PM_CLASS_VARIABLE_OR_WRITE_NODE
ClassVariableOrWriteNode.
Definition: ast.h:658
@ PM_BLOCK_PARAMETERS_NODE
BlockParametersNode.
Definition: ast.h:619
@ PM_CONSTANT_WRITE_NODE
ConstantWriteNode.
Definition: ast.h:703
@ PM_HASH_PATTERN_NODE
HashPatternNode.
Definition: ast.h:769
@ PM_INDEX_OPERATOR_WRITE_NODE
IndexOperatorWriteNode.
Definition: ast.h:790
@ PM_UNDEF_NODE
UndefNode.
Definition: ast.h:1006
@ PM_ALTERNATION_PATTERN_NODE
AlternationPatternNode.
Definition: ast.h:580
@ PM_ENSURE_NODE
EnsureNode.
Definition: ast.h:721
@ PM_LOCAL_VARIABLE_WRITE_NODE
LocalVariableWriteNode.
Definition: ast.h:865
@ PM_SINGLETON_CLASS_NODE
SingletonClassNode.
Definition: ast.h:976
@ PM_KEYWORD_HASH_NODE
KeywordHashNode.
Definition: ast.h:841
@ PM_PARENTHESES_NODE
ParenthesesNode.
Definition: ast.h:919
@ PM_FOR_NODE
ForNode.
Definition: ast.h:736
@ PM_CLASS_VARIABLE_WRITE_NODE
ClassVariableWriteNode.
Definition: ast.h:667
@ PM_POST_EXECUTION_NODE
PostExecutionNode.
Definition: ast.h:928
@ PM_CONSTANT_OPERATOR_WRITE_NODE
ConstantOperatorWriteNode.
Definition: ast.h:673
@ PM_RETURN_NODE
ReturnNode.
Definition: ast.h:967
@ PM_MODULE_NODE
ModuleNode.
Definition: ast.h:883
@ PM_ARRAY_PATTERN_NODE
ArrayPatternNode.
Definition: ast.h:592
@ PM_SUPER_NODE
SuperNode.
Definition: ast.h:997
@ PM_MATCH_LAST_LINE_NODE
MatchLastLineNode.
Definition: ast.h:868
@ PM_CONSTANT_PATH_NODE
ConstantPathNode.
Definition: ast.h:682
@ PM_INTERPOLATED_SYMBOL_NODE
InterpolatedSymbolNode.
Definition: ast.h:829
@ PM_CALL_AND_WRITE_NODE
CallAndWriteNode.
Definition: ast.h:625
@ PM_OPTIONAL_KEYWORD_PARAMETER_NODE
OptionalKeywordParameterNode.
Definition: ast.h:907
@ PM_CLASS_VARIABLE_TARGET_NODE
ClassVariableTargetNode.
Definition: ast.h:664
@ PM_CASE_MATCH_NODE
CaseMatchNode.
Definition: ast.h:643
@ PM_BREAK_NODE
BreakNode.
Definition: ast.h:622
@ PM_CALL_OR_WRITE_NODE
CallOrWriteNode.
Definition: ast.h:634
@ PM_IMAGINARY_NODE
ImaginaryNode.
Definition: ast.h:775
@ PM_DEF_NODE
DefNode.
Definition: ast.h:706
@ PM_CONSTANT_READ_NODE
ConstantReadNode.
Definition: ast.h:697
@ PM_GLOBAL_VARIABLE_WRITE_NODE
GlobalVariableWriteNode.
Definition: ast.h:763
@ PM_SOURCE_ENCODING_NODE
SourceEncodingNode.
Definition: ast.h:979
@ PM_BEGIN_NODE
BeginNode.
Definition: ast.h:604
@ PM_INTERPOLATED_X_STRING_NODE
InterpolatedXStringNode.
Definition: ast.h:832
@ PM_INSTANCE_VARIABLE_READ_NODE
InstanceVariableReadNode.
Definition: ast.h:808
@ PM_FLIP_FLOP_NODE
FlipFlopNode.
Definition: ast.h:730
@ PM_PINNED_VARIABLE_NODE
PinnedVariableNode.
Definition: ast.h:925
@ PM_REQUIRED_PARAMETER_NODE
RequiredParameterNode.
Definition: ast.h:952
@ PM_INSTANCE_VARIABLE_WRITE_NODE
InstanceVariableWriteNode.
Definition: ast.h:814
@ PM_INSTANCE_VARIABLE_TARGET_NODE
InstanceVariableTargetNode.
Definition: ast.h:811
@ PM_GLOBAL_VARIABLE_AND_WRITE_NODE
GlobalVariableAndWriteNode.
Definition: ast.h:748
@ PM_CASE_NODE
CaseNode.
Definition: ast.h:646
@ PM_RESCUE_NODE
RescueNode.
Definition: ast.h:958
@ PM_FLOAT_NODE
FloatNode.
Definition: ast.h:733
@ PM_ASSOC_NODE
AssocNode.
Definition: ast.h:595
@ PM_IT_PARAMETERS_NODE
ItParametersNode.
Definition: ast.h:838
@ PM_INTEGER_NODE
IntegerNode.
Definition: ast.h:817
@ PM_LOCAL_VARIABLE_TARGET_NODE
LocalVariableTargetNode.
Definition: ast.h:862
@ PM_STRING_NODE
StringNode.
Definition: ast.h:994
@ PM_INDEX_OR_WRITE_NODE
IndexOrWriteNode.
Definition: ast.h:793
@ PM_ALIAS_GLOBAL_VARIABLE_NODE
AliasGlobalVariableNode.
Definition: ast.h:574
@ PM_PARAMETERS_NODE
ParametersNode.
Definition: ast.h:916
@ PM_NUMBERED_REFERENCE_READ_NODE
NumberedReferenceReadNode.
Definition: ast.h:904
@ PM_CONSTANT_PATH_OR_WRITE_NODE
ConstantPathOrWriteNode.
Definition: ast.h:688
@ PM_GLOBAL_VARIABLE_OR_WRITE_NODE
GlobalVariableOrWriteNode.
Definition: ast.h:754
@ PM_CONSTANT_OR_WRITE_NODE
ConstantOrWriteNode.
Definition: ast.h:676
@ PM_STATEMENTS_NODE
StatementsNode.
Definition: ast.h:991
@ PM_OPTIONAL_PARAMETER_NODE
OptionalParameterNode.
Definition: ast.h:910
@ PM_PINNED_EXPRESSION_NODE
PinnedExpressionNode.
Definition: ast.h:922
@ PM_BLOCK_NODE
BlockNode.
Definition: ast.h:613
@ PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
ClassVariableOperatorWriteNode.
Definition: ast.h:655
@ PM_REST_PARAMETER_NODE
RestParameterNode.
Definition: ast.h:961
@ PM_EMBEDDED_STATEMENTS_NODE
EmbeddedStatementsNode.
Definition: ast.h:715
@ PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
InterpolatedRegularExpressionNode.
Definition: ast.h:823
@ PM_INDEX_TARGET_NODE
IndexTargetNode.
Definition: ast.h:796
@ PM_KEYWORD_REST_PARAMETER_NODE
KeywordRestParameterNode.
Definition: ast.h:844
@ PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING
internal bytes forced the encoding to UTF-8
Definition: ast.h:7921
@ PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING
internal bytes forced the encoding to US-ASCII
Definition: ast.h:7927
@ PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING
internal bytes forced the encoding to binary
Definition: ast.h:7924
@ PM_STRING_FLAGS_FROZEN
frozen by virtue of a frozen_string_literal: true comment or --enable-frozen-string-literal
Definition: ast.h:7910
@ PM_STRING_FLAGS_FORCED_BINARY_ENCODING
internal bytes forced the encoding to binary
Definition: ast.h:7907
@ PM_STRING_FLAGS_MUTABLE
mutable by virtue of a frozen_string_literal: false comment or --disable-frozen-string-literal
Definition: ast.h:7913
@ PM_STRING_FLAGS_FORCED_UTF8_ENCODING
internal bytes forced the encoding to UTF-8
Definition: ast.h:7904
@ PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT
if the arguments contain a splat
Definition: ast.h:7745
@ PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING
if the arguments contain forwarding
Definition: ast.h:7736
@ PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS
if the arguments contain keywords
Definition: ast.h:7739
@ PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT
if the arguments contain a keyword splat
Definition: ast.h:7742
@ PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS
if the arguments contain multiple splats
Definition: ast.h:7748
#define PM_NODE_TYPE(node)
Cast the type to an enum to allow the compiler to provide exhaustiveness checking.
Definition: ast.h:1053
@ PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT
if array contains splat nodes
Definition: ast.h:7756
@ PM_INTEGER_BASE_FLAGS_HEXADECIMAL
0x prefix
Definition: ast.h:7801
@ PM_INTEGER_BASE_FLAGS_OCTAL
0o or 0 prefix
Definition: ast.h:7798
@ PM_INTEGER_BASE_FLAGS_DECIMAL
0d or no prefix
Definition: ast.h:7795
@ PM_INTEGER_BASE_FLAGS_BINARY
0b prefix
Definition: ast.h:7792
@ PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
a call that ignores method visibility
Definition: ast.h:7773
@ PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
&.
Definition: ast.h:7764
@ PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
a call that is an attribute write, so the value being written should be returned
Definition: ast.h:7770
@ PM_CALL_NODE_FLAGS_VARIABLE_CALL
a call that could have been a local variable
Definition: ast.h:7767
@ PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING
constant writes that should be modified with shareable constant value experimental everything
Definition: ast.h:7893
@ PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL
constant writes that should be modified with shareable constant value literal
Definition: ast.h:7890
@ PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY
constant writes that should be modified with shareable constant value experimental copy
Definition: ast.h:7896
@ PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS
a keyword hash which only has AssocNode elements all with symbol keys, which means the elements can b...
Definition: ast.h:7820
@ PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
internal bytes forced the encoding to binary
Definition: ast.h:7879
@ PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
internal bytes forced the encoding to US-ASCII
Definition: ast.h:7882
@ PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
e - forces the EUC-JP encoding
Definition: ast.h:7864
@ PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
i - ignores the case of characters when matching
Definition: ast.h:7852
@ PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
internal bytes forced the encoding to UTF-8
Definition: ast.h:7876
@ PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
n - forces the ASCII-8BIT encoding
Definition: ast.h:7867
@ PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
m - allows $ to match the end of lines within strings
Definition: ast.h:7858
@ PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
x - ignores whitespace and allows comments in regular expressions
Definition: ast.h:7855
@ PM_REGULAR_EXPRESSION_FLAGS_ONCE
o - only interpolates values into the regular expression once
Definition: ast.h:7861
@ PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
s - forces the Windows-31J encoding
Definition: ast.h:7870
@ PM_REGULAR_EXPRESSION_FLAGS_UTF_8
u - forces the UTF-8 encoding
Definition: ast.h:7873
@ PM_PARAMETER_FLAGS_REPEATED_PARAMETER
a parameter name that has been repeated in the method signature
Definition: ast.h:7836
@ PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING
internal bytes forced the encoding to binary
Definition: ast.h:7784
@ PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING
internal bytes forced the encoding to UTF-8
Definition: ast.h:7781
@ PM_LOOP_FLAGS_BEGIN_MODIFIER
a loop after a begin statement, so the body is executed first before the condition
Definition: ast.h:7828
void pm_buffer_append_format(pm_buffer_t *buffer, const char *format,...) PRISM_ATTRIBUTE_FORMAT(2
Append a formatted string to the buffer.
void void pm_buffer_append_string(pm_buffer_t *buffer, const char *value, size_t length)
Append a string to the buffer.
Definition: pm_buffer.c:119
void pm_buffer_append_source(pm_buffer_t *buffer, const uint8_t *source, size_t length, pm_buffer_escaping_t escaping)
Append a slice of source code to the buffer.
Definition: pm_buffer.c:179
void pm_buffer_append_byte(pm_buffer_t *buffer, uint8_t value)
Append a single byte to the buffer.
Definition: pm_buffer.c:135
PRISM_EXPORTED_FUNCTION void pm_buffer_free(pm_buffer_t *buffer)
Free the memory associated with the buffer.
Definition: pm_buffer.c:315
void pm_buffer_concat(pm_buffer_t *destination, const pm_buffer_t *source)
Concatenate one buffer onto another.
Definition: pm_buffer.c:261
uint32_t pm_constant_id_t
A constant id is a unique identifier for a constant in the constant pool.
pm_constant_t * pm_constant_pool_id_to_constant(const pm_constant_pool_t *pool, pm_constant_id_t constant_id)
Return a pointer to the constant indicated by the given constant id.
PRISM_EXPORTED_FUNCTION void pm_integer_string(pm_buffer_t *buffer, const pm_integer_t *integer)
Convert an integer to a decimal string.
Definition: pm_integer.c:607
pm_line_column_t pm_newline_list_line_column(const pm_newline_list_t *list, const uint8_t *cursor, int32_t start_line)
Returns the line and column of the given offset.
PRISM_EXPORTED_FUNCTION size_t pm_string_length(const pm_string_t *string)
Returns the length associated with the string.
Definition: pm_string.c:353
PRISM_EXPORTED_FUNCTION const uint8_t * pm_string_source(const pm_string_t *string)
Returns the start pointer associated with the string.
Definition: pm_string.c:361
An AST node pretty-printer.
PRISM_EXPORTED_FUNCTION void pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node)
Pretty-prints the AST represented by the given node to the given buffer.
Definition: prettyprint.c:8871
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition: defines.h:50
AliasGlobalVariableNode.
Definition: ast.h:1107
struct pm_node * old_name
AliasGlobalVariableNode::old_name.
Definition: ast.h:1130
struct pm_node * new_name
AliasGlobalVariableNode::new_name.
Definition: ast.h:1120
pm_location_t keyword_loc
AliasGlobalVariableNode::keyword_loc.
Definition: ast.h:1140
AliasMethodNode.
Definition: ast.h:1155
struct pm_node * old_name
AliasMethodNode::old_name.
Definition: ast.h:1190
struct pm_node * new_name
AliasMethodNode::new_name.
Definition: ast.h:1174
pm_location_t keyword_loc
AliasMethodNode::keyword_loc.
Definition: ast.h:1200
AlternationPatternNode.
Definition: ast.h:1215
pm_location_t operator_loc
AlternationPatternNode::operator_loc.
Definition: ast.h:1248
struct pm_node * left
AlternationPatternNode::left.
Definition: ast.h:1228
struct pm_node * right
AlternationPatternNode::right.
Definition: ast.h:1238
AndNode.
Definition: ast.h:1263
struct pm_node * left
AndNode::left.
Definition: ast.h:1279
struct pm_node * right
AndNode::right.
Definition: ast.h:1292
pm_location_t operator_loc
AndNode::operator_loc.
Definition: ast.h:1302
ArgumentsNode.
Definition: ast.h:1324
pm_node_t base
The embedded base node.
Definition: ast.h:1326
struct pm_node_list arguments
ArgumentsNode::arguments.
Definition: ast.h:1337
ArrayNode.
Definition: ast.h:1355
pm_node_t base
The embedded base node.
Definition: ast.h:1357
pm_location_t closing_loc
ArrayNode::closing_loc.
Definition: ast.h:1389
struct pm_node_list elements
ArrayNode::elements.
Definition: ast.h:1365
pm_location_t opening_loc
ArrayNode::opening_loc.
Definition: ast.h:1377
ArrayPatternNode.
Definition: ast.h:1416
struct pm_node_list requireds
ArrayPatternNode::requireds.
Definition: ast.h:1434
struct pm_node * rest
ArrayPatternNode::rest.
Definition: ast.h:1444
struct pm_node * constant
ArrayPatternNode::constant.
Definition: ast.h:1424
pm_location_t opening_loc
ArrayPatternNode::opening_loc.
Definition: ast.h:1464
pm_location_t closing_loc
ArrayPatternNode::closing_loc.
Definition: ast.h:1474
struct pm_node_list posts
ArrayPatternNode::posts.
Definition: ast.h:1454
AssocNode.
Definition: ast.h:1489
struct pm_node * value
AssocNode::value.
Definition: ast.h:1521
struct pm_node * key
AssocNode::key.
Definition: ast.h:1508
pm_location_t operator_loc
AssocNode::operator_loc.
Definition: ast.h:1531
AssocSplatNode.
Definition: ast.h:1546
struct pm_node * value
AssocSplatNode::value.
Definition: ast.h:1559
pm_location_t operator_loc
AssocSplatNode::operator_loc.
Definition: ast.h:1569
BackReferenceReadNode.
Definition: ast.h:1584
pm_constant_id_t name
BackReferenceReadNode::name.
Definition: ast.h:1598
BeginNode.
Definition: ast.h:1615
struct pm_ensure_node * ensure_clause
BeginNode::ensure_clause.
Definition: ast.h:1668
struct pm_rescue_node * rescue_clause
BeginNode::rescue_clause.
Definition: ast.h:1648
struct pm_statements_node * statements
BeginNode::statements.
Definition: ast.h:1638
pm_location_t end_keyword_loc
BeginNode::end_keyword_loc.
Definition: ast.h:1678
pm_location_t begin_keyword_loc
BeginNode::begin_keyword_loc.
Definition: ast.h:1628
struct pm_else_node * else_clause
BeginNode::else_clause.
Definition: ast.h:1658
BlockArgumentNode.
Definition: ast.h:1693
struct pm_node * expression
BlockArgumentNode::expression.
Definition: ast.h:1706
pm_location_t operator_loc
BlockArgumentNode::operator_loc.
Definition: ast.h:1716
BlockLocalVariableNode.
Definition: ast.h:1734
pm_node_t base
The embedded base node.
Definition: ast.h:1736
pm_constant_id_t name
BlockLocalVariableNode::name.
Definition: ast.h:1747
BlockNode.
Definition: ast.h:1762
pm_location_t closing_loc
BlockNode::closing_loc.
Definition: ast.h:1819
struct pm_node * parameters
BlockNode::parameters.
Definition: ast.h:1789
pm_location_t opening_loc
BlockNode::opening_loc.
Definition: ast.h:1809
struct pm_node * body
BlockNode::body.
Definition: ast.h:1799
pm_constant_id_list_t locals
BlockNode::locals.
Definition: ast.h:1775
BlockParameterNode.
Definition: ast.h:1838
pm_location_t operator_loc
BlockParameterNode::operator_loc.
Definition: ast.h:1873
pm_location_t name_loc
BlockParameterNode::name_loc.
Definition: ast.h:1862
pm_constant_id_t name
BlockParameterNode::name.
Definition: ast.h:1852
pm_node_t base
The embedded base node.
Definition: ast.h:1840
BlockParametersNode.
Definition: ast.h:1892
struct pm_parameters_node * parameters
BlockParametersNode::parameters.
Definition: ast.h:1909
struct pm_node_list locals
BlockParametersNode::locals.
Definition: ast.h:1923
pm_location_t closing_loc
BlockParametersNode::closing_loc.
Definition: ast.h:1951
pm_location_t opening_loc
BlockParametersNode::opening_loc.
Definition: ast.h:1937
BreakNode.
Definition: ast.h:1966
struct pm_arguments_node * arguments
BreakNode::arguments.
Definition: ast.h:1979
pm_location_t keyword_loc
BreakNode::keyword_loc.
Definition: ast.h:1989
A pm_buffer_t is a simple memory buffer that stores data in a contiguous block of memory.
Definition: pm_buffer.h:22
size_t length
The length of the buffer in bytes.
Definition: pm_buffer.h:24
CallAndWriteNode.
Definition: ast.h:2010
pm_location_t operator_loc
CallAndWriteNode::operator_loc.
Definition: ast.h:2073
struct pm_node * value
CallAndWriteNode::value.
Definition: ast.h:2083
pm_node_t base
The embedded base node.
Definition: ast.h:2012
pm_location_t call_operator_loc
CallAndWriteNode::call_operator_loc.
Definition: ast.h:2033
pm_location_t message_loc
CallAndWriteNode::message_loc.
Definition: ast.h:2043
pm_constant_id_t read_name
CallAndWriteNode::read_name.
Definition: ast.h:2053
pm_constant_id_t write_name
CallAndWriteNode::write_name.
Definition: ast.h:2063
struct pm_node * receiver
CallAndWriteNode::receiver.
Definition: ast.h:2023
CallNode.
Definition: ast.h:2119
pm_location_t opening_loc
CallNode::opening_loc.
Definition: ast.h:2180
pm_location_t closing_loc
CallNode::closing_loc.
Definition: ast.h:2200
struct pm_node * receiver
CallNode::receiver.
Definition: ast.h:2138
pm_constant_id_t name
CallNode::name.
Definition: ast.h:2161
pm_node_t base
The embedded base node.
Definition: ast.h:2121
pm_location_t call_operator_loc
CallNode::call_operator_loc.
Definition: ast.h:2151
pm_location_t message_loc
CallNode::message_loc.
Definition: ast.h:2171
struct pm_arguments_node * arguments
CallNode::arguments.
Definition: ast.h:2190
struct pm_node * block
CallNode::block.
Definition: ast.h:2210
CallOperatorWriteNode.
Definition: ast.h:2231
pm_constant_id_t read_name
CallOperatorWriteNode::read_name.
Definition: ast.h:2274
pm_constant_id_t binary_operator
CallOperatorWriteNode::binary_operator.
Definition: ast.h:2294
pm_location_t binary_operator_loc
CallOperatorWriteNode::binary_operator_loc.
Definition: ast.h:2304
struct pm_node * receiver
CallOperatorWriteNode::receiver.
Definition: ast.h:2244
pm_node_t base
The embedded base node.
Definition: ast.h:2233
pm_constant_id_t write_name
CallOperatorWriteNode::write_name.
Definition: ast.h:2284
pm_location_t message_loc
CallOperatorWriteNode::message_loc.
Definition: ast.h:2264
struct pm_node * value
CallOperatorWriteNode::value.
Definition: ast.h:2314
pm_location_t call_operator_loc
CallOperatorWriteNode::call_operator_loc.
Definition: ast.h:2254
CallOrWriteNode.
Definition: ast.h:2335
pm_location_t operator_loc
CallOrWriteNode::operator_loc.
Definition: ast.h:2398
pm_location_t call_operator_loc
CallOrWriteNode::call_operator_loc.
Definition: ast.h:2358
pm_node_t base
The embedded base node.
Definition: ast.h:2337
struct pm_node * receiver
CallOrWriteNode::receiver.
Definition: ast.h:2348
struct pm_node * value
CallOrWriteNode::value.
Definition: ast.h:2408
pm_constant_id_t write_name
CallOrWriteNode::write_name.
Definition: ast.h:2388
pm_constant_id_t read_name
CallOrWriteNode::read_name.
Definition: ast.h:2378
pm_location_t message_loc
CallOrWriteNode::message_loc.
Definition: ast.h:2368
CallTargetNode.
Definition: ast.h:2437
pm_node_t base
The embedded base node.
Definition: ast.h:2439
pm_constant_id_t name
CallTargetNode::name.
Definition: ast.h:2470
struct pm_node * receiver
CallTargetNode::receiver.
Definition: ast.h:2450
pm_location_t call_operator_loc
CallTargetNode::call_operator_loc.
Definition: ast.h:2460
pm_location_t message_loc
CallTargetNode::message_loc.
Definition: ast.h:2480
CapturePatternNode.
Definition: ast.h:2495
struct pm_local_variable_target_node * target
CapturePatternNode::target.
Definition: ast.h:2518
pm_location_t operator_loc
CapturePatternNode::operator_loc.
Definition: ast.h:2528
struct pm_node * value
CapturePatternNode::value.
Definition: ast.h:2508
CaseMatchNode.
Definition: ast.h:2545
pm_location_t end_keyword_loc
CaseMatchNode::end_keyword_loc.
Definition: ast.h:2598
struct pm_node_list conditions
CaseMatchNode::conditions.
Definition: ast.h:2568
pm_location_t case_keyword_loc
CaseMatchNode::case_keyword_loc.
Definition: ast.h:2588
struct pm_else_node * else_clause
CaseMatchNode::else_clause.
Definition: ast.h:2578
struct pm_node * predicate
CaseMatchNode::predicate.
Definition: ast.h:2558
CaseNode.
Definition: ast.h:2615
struct pm_node * predicate
CaseNode::predicate.
Definition: ast.h:2628
struct pm_else_node * else_clause
CaseNode::else_clause.
Definition: ast.h:2648
struct pm_node_list conditions
CaseNode::conditions.
Definition: ast.h:2638
pm_location_t case_keyword_loc
CaseNode::case_keyword_loc.
Definition: ast.h:2658
pm_location_t end_keyword_loc
CaseNode::end_keyword_loc.
Definition: ast.h:2668
ClassNode.
Definition: ast.h:2683
pm_location_t class_keyword_loc
ClassNode::class_keyword_loc.
Definition: ast.h:2696
pm_location_t end_keyword_loc
ClassNode::end_keyword_loc.
Definition: ast.h:2721
struct pm_node * constant_path
ClassNode::constant_path.
Definition: ast.h:2701
pm_constant_id_list_t locals
ClassNode::locals.
Definition: ast.h:2691
pm_location_t inheritance_operator_loc
ClassNode::inheritance_operator_loc.
Definition: ast.h:2706
pm_constant_id_t name
ClassNode::name.
Definition: ast.h:2726
struct pm_node * body
ClassNode::body.
Definition: ast.h:2716
struct pm_node * superclass
ClassNode::superclass.
Definition: ast.h:2711
ClassVariableAndWriteNode.
Definition: ast.h:2741
struct pm_node * value
ClassVariableAndWriteNode::value.
Definition: ast.h:2784
pm_constant_id_t name
ClassVariableAndWriteNode::name.
Definition: ast.h:2754
pm_location_t operator_loc
ClassVariableAndWriteNode::operator_loc.
Definition: ast.h:2774
pm_location_t name_loc
ClassVariableAndWriteNode::name_loc.
Definition: ast.h:2764
ClassVariableOperatorWriteNode.
Definition: ast.h:2799
pm_constant_id_t name
ClassVariableOperatorWriteNode::name.
Definition: ast.h:2807
pm_location_t name_loc
ClassVariableOperatorWriteNode::name_loc.
Definition: ast.h:2812
pm_constant_id_t binary_operator
ClassVariableOperatorWriteNode::binary_operator.
Definition: ast.h:2827
struct pm_node * value
ClassVariableOperatorWriteNode::value.
Definition: ast.h:2822
pm_location_t binary_operator_loc
ClassVariableOperatorWriteNode::binary_operator_loc.
Definition: ast.h:2817
ClassVariableOrWriteNode.
Definition: ast.h:2842
pm_location_t name_loc
ClassVariableOrWriteNode::name_loc.
Definition: ast.h:2855
pm_location_t operator_loc
ClassVariableOrWriteNode::operator_loc.
Definition: ast.h:2860
pm_constant_id_t name
ClassVariableOrWriteNode::name.
Definition: ast.h:2850
struct pm_node * value
ClassVariableOrWriteNode::value.
Definition: ast.h:2865
ClassVariableReadNode.
Definition: ast.h:2880
pm_constant_id_t name
ClassVariableReadNode::name.
Definition: ast.h:2894
ClassVariableTargetNode.
Definition: ast.h:2909
pm_constant_id_t name
ClassVariableTargetNode::name.
Definition: ast.h:2917
ClassVariableWriteNode.
Definition: ast.h:2932
pm_location_t name_loc
ClassVariableWriteNode::name_loc.
Definition: ast.h:2956
struct pm_node * value
ClassVariableWriteNode::value.
Definition: ast.h:2969
pm_location_t operator_loc
ClassVariableWriteNode::operator_loc.
Definition: ast.h:2979
pm_constant_id_t name
ClassVariableWriteNode::name.
Definition: ast.h:2946
ConstantAndWriteNode.
Definition: ast.h:2994
pm_location_t operator_loc
ConstantAndWriteNode::operator_loc.
Definition: ast.h:3012
pm_location_t name_loc
ConstantAndWriteNode::name_loc.
Definition: ast.h:3007
pm_constant_id_t name
ConstantAndWriteNode::name.
Definition: ast.h:3002
struct pm_node * value
ConstantAndWriteNode::value.
Definition: ast.h:3017
size_t size
The number of constant ids in the list.
pm_constant_id_t * ids
The constant ids in the list.
ConstantOperatorWriteNode.
Definition: ast.h:3032
pm_constant_id_t name
ConstantOperatorWriteNode::name.
Definition: ast.h:3040
pm_location_t name_loc
ConstantOperatorWriteNode::name_loc.
Definition: ast.h:3045
pm_constant_id_t binary_operator
ConstantOperatorWriteNode::binary_operator.
Definition: ast.h:3060
pm_location_t binary_operator_loc
ConstantOperatorWriteNode::binary_operator_loc.
Definition: ast.h:3050
struct pm_node * value
ConstantOperatorWriteNode::value.
Definition: ast.h:3055
ConstantOrWriteNode.
Definition: ast.h:3075
pm_location_t operator_loc
ConstantOrWriteNode::operator_loc.
Definition: ast.h:3093
pm_location_t name_loc
ConstantOrWriteNode::name_loc.
Definition: ast.h:3088
pm_constant_id_t name
ConstantOrWriteNode::name.
Definition: ast.h:3083
struct pm_node * value
ConstantOrWriteNode::value.
Definition: ast.h:3098
ConstantPathAndWriteNode.
Definition: ast.h:3113
struct pm_constant_path_node * target
ConstantPathAndWriteNode::target.
Definition: ast.h:3121
pm_location_t operator_loc
ConstantPathAndWriteNode::operator_loc.
Definition: ast.h:3126
struct pm_node * value
ConstantPathAndWriteNode::value.
Definition: ast.h:3131
ConstantPathNode.
Definition: ast.h:3146
pm_location_t delimiter_loc
ConstantPathNode::delimiter_loc.
Definition: ast.h:3185
pm_location_t name_loc
ConstantPathNode::name_loc.
Definition: ast.h:3198
pm_constant_id_t name
ConstantPathNode::name.
Definition: ast.h:3172
struct pm_node * parent
ConstantPathNode::parent.
Definition: ast.h:3165
ConstantPathOperatorWriteNode.
Definition: ast.h:3213
struct pm_constant_path_node * target
ConstantPathOperatorWriteNode::target.
Definition: ast.h:3221
struct pm_node * value
ConstantPathOperatorWriteNode::value.
Definition: ast.h:3231
pm_constant_id_t binary_operator
ConstantPathOperatorWriteNode::binary_operator.
Definition: ast.h:3236
pm_location_t binary_operator_loc
ConstantPathOperatorWriteNode::binary_operator_loc.
Definition: ast.h:3226
ConstantPathOrWriteNode.
Definition: ast.h:3251
pm_location_t operator_loc
ConstantPathOrWriteNode::operator_loc.
Definition: ast.h:3264
struct pm_node * value
ConstantPathOrWriteNode::value.
Definition: ast.h:3269
struct pm_constant_path_node * target
ConstantPathOrWriteNode::target.
Definition: ast.h:3259
ConstantPathTargetNode.
Definition: ast.h:3284
struct pm_node * parent
ConstantPathTargetNode::parent.
Definition: ast.h:3292
pm_location_t delimiter_loc
ConstantPathTargetNode::delimiter_loc.
Definition: ast.h:3302
pm_constant_id_t name
ConstantPathTargetNode::name.
Definition: ast.h:3297
pm_location_t name_loc
ConstantPathTargetNode::name_loc.
Definition: ast.h:3307
ConstantPathWriteNode.
Definition: ast.h:3328
struct pm_constant_path_node * target
ConstantPathWriteNode::target.
Definition: ast.h:3344
pm_location_t operator_loc
ConstantPathWriteNode::operator_loc.
Definition: ast.h:3354
struct pm_node * value
ConstantPathWriteNode::value.
Definition: ast.h:3364
ConstantReadNode.
Definition: ast.h:3379
pm_constant_id_t name
ConstantReadNode::name.
Definition: ast.h:3393
A constant in the pool which effectively stores a string.
size_t length
The length of the string.
const uint8_t * start
A pointer to the start of the string.
ConstantTargetNode.
Definition: ast.h:3408
pm_constant_id_t name
ConstantTargetNode::name.
Definition: ast.h:3416
ConstantWriteNode.
Definition: ast.h:3431
struct pm_node * value
ConstantWriteNode::value.
Definition: ast.h:3468
pm_constant_id_t name
ConstantWriteNode::name.
Definition: ast.h:3445
pm_location_t name_loc
ConstantWriteNode::name_loc.
Definition: ast.h:3455
pm_location_t operator_loc
ConstantWriteNode::operator_loc.
Definition: ast.h:3478
DefNode.
Definition: ast.h:3494
struct pm_parameters_node * parameters
DefNode::parameters.
Definition: ast.h:3517
pm_location_t end_keyword_loc
DefNode::end_keyword_loc.
Definition: ast.h:3557
pm_constant_id_t name
DefNode::name.
Definition: ast.h:3502
pm_location_t name_loc
DefNode::name_loc.
Definition: ast.h:3507
pm_location_t rparen_loc
DefNode::rparen_loc.
Definition: ast.h:3547
struct pm_node * body
DefNode::body.
Definition: ast.h:3522
pm_location_t equal_loc
DefNode::equal_loc.
Definition: ast.h:3552
pm_location_t def_keyword_loc
DefNode::def_keyword_loc.
Definition: ast.h:3532
struct pm_node * receiver
DefNode::receiver.
Definition: ast.h:3512
pm_location_t lparen_loc
DefNode::lparen_loc.
Definition: ast.h:3542
pm_location_t operator_loc
DefNode::operator_loc.
Definition: ast.h:3537
pm_constant_id_list_t locals
DefNode::locals.
Definition: ast.h:3527
DefinedNode.
Definition: ast.h:3572
pm_location_t lparen_loc
DefinedNode::lparen_loc.
Definition: ast.h:3580
pm_location_t rparen_loc
DefinedNode::rparen_loc.
Definition: ast.h:3590
pm_location_t keyword_loc
DefinedNode::keyword_loc.
Definition: ast.h:3595
struct pm_node * value
DefinedNode::value.
Definition: ast.h:3585
ElseNode.
Definition: ast.h:3610
struct pm_statements_node * statements
ElseNode::statements.
Definition: ast.h:3623
pm_location_t else_keyword_loc
ElseNode::else_keyword_loc.
Definition: ast.h:3618
pm_location_t end_keyword_loc
ElseNode::end_keyword_loc.
Definition: ast.h:3628
EmbeddedStatementsNode.
Definition: ast.h:3643
pm_location_t closing_loc
EmbeddedStatementsNode::closing_loc.
Definition: ast.h:3661
struct pm_statements_node * statements
EmbeddedStatementsNode::statements.
Definition: ast.h:3656
pm_location_t opening_loc
EmbeddedStatementsNode::opening_loc.
Definition: ast.h:3651
EmbeddedVariableNode.
Definition: ast.h:3676
struct pm_node * variable
EmbeddedVariableNode::variable.
Definition: ast.h:3689
pm_location_t operator_loc
EmbeddedVariableNode::operator_loc.
Definition: ast.h:3684
EnsureNode.
Definition: ast.h:3708
struct pm_statements_node * statements
EnsureNode::statements.
Definition: ast.h:3721
pm_location_t ensure_keyword_loc
EnsureNode::ensure_keyword_loc.
Definition: ast.h:3716
pm_location_t end_keyword_loc
EnsureNode::end_keyword_loc.
Definition: ast.h:3726
FindPatternNode.
Definition: ast.h:3765
struct pm_node * constant
FindPatternNode::constant.
Definition: ast.h:3773
struct pm_node * right
FindPatternNode::right.
Definition: ast.h:3788
pm_location_t opening_loc
FindPatternNode::opening_loc.
Definition: ast.h:3793
struct pm_node_list requireds
FindPatternNode::requireds.
Definition: ast.h:3783
struct pm_splat_node * left
FindPatternNode::left.
Definition: ast.h:3778
pm_location_t closing_loc
FindPatternNode::closing_loc.
Definition: ast.h:3798
FlipFlopNode.
Definition: ast.h:3816
pm_node_t base
The embedded base node.
Definition: ast.h:3818
pm_location_t operator_loc
FlipFlopNode::operator_loc.
Definition: ast.h:3834
struct pm_node * left
FlipFlopNode::left.
Definition: ast.h:3824
struct pm_node * right
FlipFlopNode::right.
Definition: ast.h:3829
FloatNode.
Definition: ast.h:3849
double value
FloatNode::value.
Definition: ast.h:3859
ForNode.
Definition: ast.h:3874
struct pm_statements_node * statements
ForNode::statements.
Definition: ast.h:3909
struct pm_node * index
ForNode::index.
Definition: ast.h:3887
struct pm_node * collection
ForNode::collection.
Definition: ast.h:3897
pm_location_t end_keyword_loc
ForNode::end_keyword_loc.
Definition: ast.h:3949
pm_location_t for_keyword_loc
ForNode::for_keyword_loc.
Definition: ast.h:3919
pm_location_t do_keyword_loc
ForNode::do_keyword_loc.
Definition: ast.h:3939
pm_location_t in_keyword_loc
ForNode::in_keyword_loc.
Definition: ast.h:3929
ForwardingSuperNode.
Definition: ast.h:4003
struct pm_block_node * block
ForwardingSuperNode::block.
Definition: ast.h:4011
GlobalVariableAndWriteNode.
Definition: ast.h:4026
pm_location_t operator_loc
GlobalVariableAndWriteNode::operator_loc.
Definition: ast.h:4044
pm_location_t name_loc
GlobalVariableAndWriteNode::name_loc.
Definition: ast.h:4039
struct pm_node * value
GlobalVariableAndWriteNode::value.
Definition: ast.h:4049
pm_constant_id_t name
GlobalVariableAndWriteNode::name.
Definition: ast.h:4034
GlobalVariableOperatorWriteNode.
Definition: ast.h:4064
pm_constant_id_t name
GlobalVariableOperatorWriteNode::name.
Definition: ast.h:4072
pm_constant_id_t binary_operator
GlobalVariableOperatorWriteNode::binary_operator.
Definition: ast.h:4092
struct pm_node * value
GlobalVariableOperatorWriteNode::value.
Definition: ast.h:4087
pm_location_t name_loc
GlobalVariableOperatorWriteNode::name_loc.
Definition: ast.h:4077
pm_location_t binary_operator_loc
GlobalVariableOperatorWriteNode::binary_operator_loc.
Definition: ast.h:4082
GlobalVariableOrWriteNode.
Definition: ast.h:4107
pm_constant_id_t name
GlobalVariableOrWriteNode::name.
Definition: ast.h:4115
pm_location_t name_loc
GlobalVariableOrWriteNode::name_loc.
Definition: ast.h:4120
pm_location_t operator_loc
GlobalVariableOrWriteNode::operator_loc.
Definition: ast.h:4125
struct pm_node * value
GlobalVariableOrWriteNode::value.
Definition: ast.h:4130
GlobalVariableReadNode.
Definition: ast.h:4145
pm_constant_id_t name
GlobalVariableReadNode::name.
Definition: ast.h:4159
GlobalVariableTargetNode.
Definition: ast.h:4174
pm_constant_id_t name
GlobalVariableTargetNode::name.
Definition: ast.h:4182
GlobalVariableWriteNode.
Definition: ast.h:4197
struct pm_node * value
GlobalVariableWriteNode::value.
Definition: ast.h:4234
pm_location_t name_loc
GlobalVariableWriteNode::name_loc.
Definition: ast.h:4221
pm_location_t operator_loc
GlobalVariableWriteNode::operator_loc.
Definition: ast.h:4244
pm_constant_id_t name
GlobalVariableWriteNode::name.
Definition: ast.h:4211
HashNode.
Definition: ast.h:4259
struct pm_node_list elements
HashNode::elements.
Definition: ast.h:4285
pm_location_t closing_loc
HashNode::closing_loc.
Definition: ast.h:4295
pm_location_t opening_loc
HashNode::opening_loc.
Definition: ast.h:4272
HashPatternNode.
Definition: ast.h:4313
struct pm_node_list elements
HashPatternNode::elements.
Definition: ast.h:4326
pm_location_t opening_loc
HashPatternNode::opening_loc.
Definition: ast.h:4336
struct pm_node * rest
HashPatternNode::rest.
Definition: ast.h:4331
pm_location_t closing_loc
HashPatternNode::closing_loc.
Definition: ast.h:4341
struct pm_node * constant
HashPatternNode::constant.
Definition: ast.h:4321
IfNode.
Definition: ast.h:4362
struct pm_node * predicate
IfNode::predicate.
Definition: ast.h:4395
pm_location_t end_keyword_loc
IfNode::end_keyword_loc.
Definition: ast.h:4453
pm_location_t if_keyword_loc
IfNode::if_keyword_loc.
Definition: ast.h:4377
struct pm_statements_node * statements
IfNode::statements.
Definition: ast.h:4422
struct pm_node * subsequent
IfNode::subsequent.
Definition: ast.h:4441
pm_location_t then_keyword_loc
IfNode::then_keyword_loc.
Definition: ast.h:4408
ImaginaryNode.
Definition: ast.h:4468
struct pm_node * numeric
ImaginaryNode::numeric.
Definition: ast.h:4476
ImplicitNode.
Definition: ast.h:4497
struct pm_node * value
ImplicitNode::value.
Definition: ast.h:4505
InNode.
Definition: ast.h:4547
struct pm_statements_node * statements
InNode::statements.
Definition: ast.h:4560
struct pm_node * pattern
InNode::pattern.
Definition: ast.h:4555
pm_location_t then_loc
InNode::then_loc.
Definition: ast.h:4570
pm_location_t in_loc
InNode::in_loc.
Definition: ast.h:4565
IndexAndWriteNode.
Definition: ast.h:4591
struct pm_arguments_node * arguments
IndexAndWriteNode::arguments.
Definition: ast.h:4614
struct pm_node * receiver
IndexAndWriteNode::receiver.
Definition: ast.h:4599
pm_node_t base
The embedded base node.
Definition: ast.h:4593
struct pm_block_argument_node * block
IndexAndWriteNode::block.
Definition: ast.h:4624
struct pm_node * value
IndexAndWriteNode::value.
Definition: ast.h:4634
pm_location_t operator_loc
IndexAndWriteNode::operator_loc.
Definition: ast.h:4629
pm_location_t closing_loc
IndexAndWriteNode::closing_loc.
Definition: ast.h:4619
pm_location_t opening_loc
IndexAndWriteNode::opening_loc.
Definition: ast.h:4609
pm_location_t call_operator_loc
IndexAndWriteNode::call_operator_loc.
Definition: ast.h:4604
IndexOperatorWriteNode.
Definition: ast.h:4655
pm_node_t base
The embedded base node.
Definition: ast.h:4657
struct pm_block_argument_node * block
IndexOperatorWriteNode::block.
Definition: ast.h:4688
pm_location_t binary_operator_loc
IndexOperatorWriteNode::binary_operator_loc.
Definition: ast.h:4698
struct pm_node * value
IndexOperatorWriteNode::value.
Definition: ast.h:4703
pm_location_t opening_loc
IndexOperatorWriteNode::opening_loc.
Definition: ast.h:4673
pm_location_t call_operator_loc
IndexOperatorWriteNode::call_operator_loc.
Definition: ast.h:4668
pm_location_t closing_loc
IndexOperatorWriteNode::closing_loc.
Definition: ast.h:4683
struct pm_arguments_node * arguments
IndexOperatorWriteNode::arguments.
Definition: ast.h:4678
pm_constant_id_t binary_operator
IndexOperatorWriteNode::binary_operator.
Definition: ast.h:4693
struct pm_node * receiver
IndexOperatorWriteNode::receiver.
Definition: ast.h:4663
IndexOrWriteNode.
Definition: ast.h:4724
pm_location_t closing_loc
IndexOrWriteNode::closing_loc.
Definition: ast.h:4752
pm_location_t call_operator_loc
IndexOrWriteNode::call_operator_loc.
Definition: ast.h:4737
pm_node_t base
The embedded base node.
Definition: ast.h:4726
struct pm_block_argument_node * block
IndexOrWriteNode::block.
Definition: ast.h:4757
pm_location_t operator_loc
IndexOrWriteNode::operator_loc.
Definition: ast.h:4762
struct pm_node * receiver
IndexOrWriteNode::receiver.
Definition: ast.h:4732
pm_location_t opening_loc
IndexOrWriteNode::opening_loc.
Definition: ast.h:4742
struct pm_node * value
IndexOrWriteNode::value.
Definition: ast.h:4767
struct pm_arguments_node * arguments
IndexOrWriteNode::arguments.
Definition: ast.h:4747
IndexTargetNode.
Definition: ast.h:4796
pm_node_t base
The embedded base node.
Definition: ast.h:4798
struct pm_node * receiver
IndexTargetNode::receiver.
Definition: ast.h:4804
pm_location_t closing_loc
IndexTargetNode::closing_loc.
Definition: ast.h:4819
struct pm_arguments_node * arguments
IndexTargetNode::arguments.
Definition: ast.h:4814
pm_location_t opening_loc
IndexTargetNode::opening_loc.
Definition: ast.h:4809
struct pm_block_argument_node * block
IndexTargetNode::block.
Definition: ast.h:4824
InstanceVariableAndWriteNode.
Definition: ast.h:4839
pm_location_t operator_loc
InstanceVariableAndWriteNode::operator_loc.
Definition: ast.h:4857
pm_location_t name_loc
InstanceVariableAndWriteNode::name_loc.
Definition: ast.h:4852
struct pm_node * value
InstanceVariableAndWriteNode::value.
Definition: ast.h:4862
pm_constant_id_t name
InstanceVariableAndWriteNode::name.
Definition: ast.h:4847
InstanceVariableOperatorWriteNode.
Definition: ast.h:4877
struct pm_node * value
InstanceVariableOperatorWriteNode::value.
Definition: ast.h:4900
pm_constant_id_t binary_operator
InstanceVariableOperatorWriteNode::binary_operator.
Definition: ast.h:4905
pm_location_t binary_operator_loc
InstanceVariableOperatorWriteNode::binary_operator_loc.
Definition: ast.h:4895
pm_constant_id_t name
InstanceVariableOperatorWriteNode::name.
Definition: ast.h:4885
pm_location_t name_loc
InstanceVariableOperatorWriteNode::name_loc.
Definition: ast.h:4890
InstanceVariableOrWriteNode.
Definition: ast.h:4920
pm_location_t operator_loc
InstanceVariableOrWriteNode::operator_loc.
Definition: ast.h:4938
struct pm_node * value
InstanceVariableOrWriteNode::value.
Definition: ast.h:4943
pm_location_t name_loc
InstanceVariableOrWriteNode::name_loc.
Definition: ast.h:4933
pm_constant_id_t name
InstanceVariableOrWriteNode::name.
Definition: ast.h:4928
InstanceVariableReadNode.
Definition: ast.h:4958
pm_constant_id_t name
InstanceVariableReadNode::name.
Definition: ast.h:4972
InstanceVariableTargetNode.
Definition: ast.h:4987
pm_constant_id_t name
InstanceVariableTargetNode::name.
Definition: ast.h:4995
InstanceVariableWriteNode.
Definition: ast.h:5010
pm_location_t operator_loc
InstanceVariableWriteNode::operator_loc.
Definition: ast.h:5057
pm_constant_id_t name
InstanceVariableWriteNode::name.
Definition: ast.h:5024
struct pm_node * value
InstanceVariableWriteNode::value.
Definition: ast.h:5047
pm_location_t name_loc
InstanceVariableWriteNode::name_loc.
Definition: ast.h:5034
IntegerNode.
Definition: ast.h:5078
pm_integer_t value
IntegerNode::value.
Definition: ast.h:5088
pm_node_t base
The embedded base node.
Definition: ast.h:5080
A structure represents an arbitrary-sized integer.
Definition: pm_integer.h:20
InterpolatedMatchLastLineNode.
Definition: ast.h:5116
pm_node_t base
The embedded base node.
Definition: ast.h:5118
pm_location_t closing_loc
InterpolatedMatchLastLineNode::closing_loc.
Definition: ast.h:5134
struct pm_node_list parts
InterpolatedMatchLastLineNode::parts.
Definition: ast.h:5129
pm_location_t opening_loc
InterpolatedMatchLastLineNode::opening_loc.
Definition: ast.h:5124
InterpolatedRegularExpressionNode.
Definition: ast.h:5162
pm_location_t opening_loc
InterpolatedRegularExpressionNode::opening_loc.
Definition: ast.h:5170
struct pm_node_list parts
InterpolatedRegularExpressionNode::parts.
Definition: ast.h:5175
pm_node_t base
The embedded base node.
Definition: ast.h:5164
pm_location_t closing_loc
InterpolatedRegularExpressionNode::closing_loc.
Definition: ast.h:5180
InterpolatedStringNode.
Definition: ast.h:5199
pm_node_t base
The embedded base node.
Definition: ast.h:5201
pm_location_t closing_loc
InterpolatedStringNode::closing_loc.
Definition: ast.h:5217
pm_location_t opening_loc
InterpolatedStringNode::opening_loc.
Definition: ast.h:5207
struct pm_node_list parts
InterpolatedStringNode::parts.
Definition: ast.h:5212
InterpolatedSymbolNode.
Definition: ast.h:5232
struct pm_node_list parts
InterpolatedSymbolNode::parts.
Definition: ast.h:5245
pm_location_t closing_loc
InterpolatedSymbolNode::closing_loc.
Definition: ast.h:5250
pm_location_t opening_loc
InterpolatedSymbolNode::opening_loc.
Definition: ast.h:5240
InterpolatedXStringNode.
Definition: ast.h:5265
pm_location_t opening_loc
InterpolatedXStringNode::opening_loc.
Definition: ast.h:5273
pm_location_t closing_loc
InterpolatedXStringNode::closing_loc.
Definition: ast.h:5283
struct pm_node_list parts
InterpolatedXStringNode::parts.
Definition: ast.h:5278
KeywordHashNode.
Definition: ast.h:5337
pm_node_t base
The embedded base node.
Definition: ast.h:5339
struct pm_node_list elements
KeywordHashNode::elements.
Definition: ast.h:5345
KeywordRestParameterNode.
Definition: ast.h:5364
pm_node_t base
The embedded base node.
Definition: ast.h:5366
pm_constant_id_t name
KeywordRestParameterNode::name.
Definition: ast.h:5372
pm_location_t operator_loc
KeywordRestParameterNode::operator_loc.
Definition: ast.h:5382
pm_location_t name_loc
KeywordRestParameterNode::name_loc.
Definition: ast.h:5377
LambdaNode.
Definition: ast.h:5397
pm_location_t closing_loc
LambdaNode::closing_loc.
Definition: ast.h:5420
struct pm_node * body
LambdaNode::body.
Definition: ast.h:5430
pm_location_t opening_loc
LambdaNode::opening_loc.
Definition: ast.h:5415
struct pm_node * parameters
LambdaNode::parameters.
Definition: ast.h:5425
pm_location_t operator_loc
LambdaNode::operator_loc.
Definition: ast.h:5410
pm_constant_id_list_t locals
LambdaNode::locals.
Definition: ast.h:5405
A line and column in a string.
uint32_t column
The column number.
int32_t line
The line number.
LocalVariableAndWriteNode.
Definition: ast.h:5445
pm_constant_id_t name
LocalVariableAndWriteNode::name.
Definition: ast.h:5468
uint32_t depth
LocalVariableAndWriteNode::depth.
Definition: ast.h:5473
pm_location_t operator_loc
LocalVariableAndWriteNode::operator_loc.
Definition: ast.h:5458
struct pm_node * value
LocalVariableAndWriteNode::value.
Definition: ast.h:5463
pm_location_t name_loc
LocalVariableAndWriteNode::name_loc.
Definition: ast.h:5453
LocalVariableOperatorWriteNode.
Definition: ast.h:5488
uint32_t depth
LocalVariableOperatorWriteNode::depth.
Definition: ast.h:5521
pm_constant_id_t binary_operator
LocalVariableOperatorWriteNode::binary_operator.
Definition: ast.h:5516
struct pm_node * value
LocalVariableOperatorWriteNode::value.
Definition: ast.h:5506
pm_location_t name_loc
LocalVariableOperatorWriteNode::name_loc.
Definition: ast.h:5496
pm_location_t binary_operator_loc
LocalVariableOperatorWriteNode::binary_operator_loc.
Definition: ast.h:5501
pm_constant_id_t name
LocalVariableOperatorWriteNode::name.
Definition: ast.h:5511
LocalVariableOrWriteNode.
Definition: ast.h:5536
uint32_t depth
LocalVariableOrWriteNode::depth.
Definition: ast.h:5564
pm_location_t operator_loc
LocalVariableOrWriteNode::operator_loc.
Definition: ast.h:5549
struct pm_node * value
LocalVariableOrWriteNode::value.
Definition: ast.h:5554
pm_constant_id_t name
LocalVariableOrWriteNode::name.
Definition: ast.h:5559
pm_location_t name_loc
LocalVariableOrWriteNode::name_loc.
Definition: ast.h:5544
LocalVariableReadNode.
Definition: ast.h:5579
uint32_t depth
LocalVariableReadNode::depth.
Definition: ast.h:5610
pm_constant_id_t name
LocalVariableReadNode::name.
Definition: ast.h:5597
LocalVariableTargetNode.
Definition: ast.h:5625
uint32_t depth
LocalVariableTargetNode::depth.
Definition: ast.h:5638
pm_constant_id_t name
LocalVariableTargetNode::name.
Definition: ast.h:5633
LocalVariableWriteNode.
Definition: ast.h:5653
pm_location_t operator_loc
LocalVariableWriteNode::operator_loc.
Definition: ast.h:5717
pm_location_t name_loc
LocalVariableWriteNode::name_loc.
Definition: ast.h:5690
struct pm_node * value
LocalVariableWriteNode::value.
Definition: ast.h:5707
uint32_t depth
LocalVariableWriteNode::depth.
Definition: ast.h:5680
pm_constant_id_t name
LocalVariableWriteNode::name.
Definition: ast.h:5667
This represents a range of bytes in the source string to which a node or token corresponds.
Definition: ast.h:545
const uint8_t * start
A pointer to the start location of the range in the source.
Definition: ast.h:547
const uint8_t * end
A pointer to the end location of the range in the source.
Definition: ast.h:550
MatchLastLineNode.
Definition: ast.h:5745
pm_location_t content_loc
MatchLastLineNode::content_loc.
Definition: ast.h:5758
pm_location_t opening_loc
MatchLastLineNode::opening_loc.
Definition: ast.h:5753
pm_location_t closing_loc
MatchLastLineNode::closing_loc.
Definition: ast.h:5763
pm_string_t unescaped
MatchLastLineNode::unescaped.
Definition: ast.h:5768
pm_node_t base
The embedded base node.
Definition: ast.h:5747
MatchPredicateNode.
Definition: ast.h:5783
pm_location_t operator_loc
MatchPredicateNode::operator_loc.
Definition: ast.h:5801
struct pm_node * pattern
MatchPredicateNode::pattern.
Definition: ast.h:5796
struct pm_node * value
MatchPredicateNode::value.
Definition: ast.h:5791
MatchRequiredNode.
Definition: ast.h:5816
pm_location_t operator_loc
MatchRequiredNode::operator_loc.
Definition: ast.h:5834
struct pm_node * value
MatchRequiredNode::value.
Definition: ast.h:5824
struct pm_node * pattern
MatchRequiredNode::pattern.
Definition: ast.h:5829
MatchWriteNode.
Definition: ast.h:5849
struct pm_node_list targets
MatchWriteNode::targets.
Definition: ast.h:5862
struct pm_call_node * call
MatchWriteNode::call.
Definition: ast.h:5857
ModuleNode.
Definition: ast.h:5892
pm_location_t end_keyword_loc
ModuleNode::end_keyword_loc.
Definition: ast.h:5920
struct pm_node * constant_path
ModuleNode::constant_path.
Definition: ast.h:5910
struct pm_node * body
ModuleNode::body.
Definition: ast.h:5915
pm_constant_id_list_t locals
ModuleNode::locals.
Definition: ast.h:5900
pm_location_t module_keyword_loc
ModuleNode::module_keyword_loc.
Definition: ast.h:5905
pm_constant_id_t name
ModuleNode::name.
Definition: ast.h:5925
MultiTargetNode.
Definition: ast.h:5945
pm_location_t lparen_loc
MultiTargetNode::lparen_loc.
Definition: ast.h:6003
struct pm_node_list lefts
MultiTargetNode::lefts.
Definition: ast.h:5963
struct pm_node * rest
MultiTargetNode::rest.
Definition: ast.h:5983
pm_location_t rparen_loc
MultiTargetNode::rparen_loc.
Definition: ast.h:6013
struct pm_node_list rights
MultiTargetNode::rights.
Definition: ast.h:5993
MultiWriteNode.
Definition: ast.h:6028
pm_location_t rparen_loc
MultiWriteNode::rparen_loc.
Definition: ast.h:6096
struct pm_node * value
MultiWriteNode::value.
Definition: ast.h:6116
struct pm_node * rest
MultiWriteNode::rest.
Definition: ast.h:6066
struct pm_node_list rights
MultiWriteNode::rights.
Definition: ast.h:6076
pm_location_t operator_loc
MultiWriteNode::operator_loc.
Definition: ast.h:6106
pm_location_t lparen_loc
MultiWriteNode::lparen_loc.
Definition: ast.h:6086
struct pm_node_list lefts
MultiWriteNode::lefts.
Definition: ast.h:6046
NextNode.
Definition: ast.h:6131
struct pm_arguments_node * arguments
NextNode::arguments.
Definition: ast.h:6139
pm_location_t keyword_loc
NextNode::keyword_loc.
Definition: ast.h:6144
NoKeywordsParameterNode.
Definition: ast.h:6178
pm_location_t keyword_loc
NoKeywordsParameterNode::keyword_loc.
Definition: ast.h:6191
pm_location_t operator_loc
NoKeywordsParameterNode::operator_loc.
Definition: ast.h:6186
size_t size
The number of nodes in the list.
Definition: ast.h:560
struct pm_node ** nodes
The nodes in the list.
Definition: ast.h:566
This is the base structure that represents a node in the syntax tree.
Definition: ast.h:1069
pm_node_flags_t flags
This represents any flags on the node.
Definition: ast.h:1080
pm_location_t location
This is the location of the node in the source.
Definition: ast.h:1092
NumberedParametersNode.
Definition: ast.h:6206
uint8_t maximum
NumberedParametersNode::maximum.
Definition: ast.h:6214
NumberedReferenceReadNode.
Definition: ast.h:6229
uint32_t number
NumberedReferenceReadNode::number.
Definition: ast.h:6245
OptionalKeywordParameterNode.
Definition: ast.h:6264
pm_node_t base
The embedded base node.
Definition: ast.h:6266
pm_constant_id_t name
OptionalKeywordParameterNode::name.
Definition: ast.h:6272
struct pm_node * value
OptionalKeywordParameterNode::value.
Definition: ast.h:6282
pm_location_t name_loc
OptionalKeywordParameterNode::name_loc.
Definition: ast.h:6277
OptionalParameterNode.
Definition: ast.h:6301
pm_location_t name_loc
OptionalParameterNode::name_loc.
Definition: ast.h:6314
struct pm_node * value
OptionalParameterNode::value.
Definition: ast.h:6324
pm_constant_id_t name
OptionalParameterNode::name.
Definition: ast.h:6309
pm_node_t base
The embedded base node.
Definition: ast.h:6303
pm_location_t operator_loc
OptionalParameterNode::operator_loc.
Definition: ast.h:6319
OrNode.
Definition: ast.h:6339
struct pm_node * left
OrNode::left.
Definition: ast.h:6355
struct pm_node * right
OrNode::right.
Definition: ast.h:6368
pm_location_t operator_loc
OrNode::operator_loc.
Definition: ast.h:6378
ParametersNode.
Definition: ast.h:6394
struct pm_node * rest
ParametersNode::rest.
Definition: ast.h:6412
struct pm_node_list requireds
ParametersNode::requireds.
Definition: ast.h:6402
struct pm_block_parameter_node * block
ParametersNode::block.
Definition: ast.h:6432
struct pm_node_list optionals
ParametersNode::optionals.
Definition: ast.h:6407
struct pm_node_list posts
ParametersNode::posts.
Definition: ast.h:6417
struct pm_node * keyword_rest
ParametersNode::keyword_rest.
Definition: ast.h:6427
struct pm_node_list keywords
ParametersNode::keywords.
Definition: ast.h:6422
ParenthesesNode.
Definition: ast.h:6447
struct pm_node * body
ParenthesesNode::body.
Definition: ast.h:6455
pm_location_t closing_loc
ParenthesesNode::closing_loc.
Definition: ast.h:6465
pm_location_t opening_loc
ParenthesesNode::opening_loc.
Definition: ast.h:6460
This struct represents the overall parser.
Definition: parser.h:640
pm_constant_pool_t constant_pool
This constant pool keeps all of the constants defined throughout the file so that we can reference th...
Definition: parser.h:786
int32_t start_line
The line number at the start of the parse.
Definition: parser.h:809
pm_newline_list_t newline_list
This is the list of newline offsets in the source file.
Definition: parser.h:789
PinnedExpressionNode.
Definition: ast.h:6480
pm_location_t rparen_loc
PinnedExpressionNode::rparen_loc.
Definition: ast.h:6503
struct pm_node * expression
PinnedExpressionNode::expression.
Definition: ast.h:6488
pm_location_t lparen_loc
PinnedExpressionNode::lparen_loc.
Definition: ast.h:6498
pm_location_t operator_loc
PinnedExpressionNode::operator_loc.
Definition: ast.h:6493
PinnedVariableNode.
Definition: ast.h:6518
struct pm_node * variable
PinnedVariableNode::variable.
Definition: ast.h:6526
pm_location_t operator_loc
PinnedVariableNode::operator_loc.
Definition: ast.h:6531
PostExecutionNode.
Definition: ast.h:6546
pm_location_t closing_loc
PostExecutionNode::closing_loc.
Definition: ast.h:6569
struct pm_statements_node * statements
PostExecutionNode::statements.
Definition: ast.h:6554
pm_location_t opening_loc
PostExecutionNode::opening_loc.
Definition: ast.h:6564
pm_location_t keyword_loc
PostExecutionNode::keyword_loc.
Definition: ast.h:6559
PreExecutionNode.
Definition: ast.h:6584
struct pm_statements_node * statements
PreExecutionNode::statements.
Definition: ast.h:6592
pm_location_t closing_loc
PreExecutionNode::closing_loc.
Definition: ast.h:6607
pm_location_t opening_loc
PreExecutionNode::opening_loc.
Definition: ast.h:6602
pm_location_t keyword_loc
PreExecutionNode::keyword_loc.
Definition: ast.h:6597
ProgramNode.
Definition: ast.h:6619
struct pm_statements_node * statements
ProgramNode::statements.
Definition: ast.h:6632
pm_constant_id_list_t locals
ProgramNode::locals.
Definition: ast.h:6627
RangeNode.
Definition: ast.h:6653
struct pm_node * right
RangeNode::right.
Definition: ast.h:6683
pm_location_t operator_loc
RangeNode::operator_loc.
Definition: ast.h:6690
pm_node_t base
The embedded base node.
Definition: ast.h:6655
struct pm_node * left
RangeNode::left.
Definition: ast.h:6669
RationalNode.
Definition: ast.h:6711
pm_node_t base
The embedded base node.
Definition: ast.h:6713
pm_integer_t denominator
RationalNode::denominator.
Definition: ast.h:6732
pm_integer_t numerator
RationalNode::numerator.
Definition: ast.h:6723
RegularExpressionNode.
Definition: ast.h:6778
pm_location_t closing_loc
RegularExpressionNode::closing_loc.
Definition: ast.h:6796
pm_node_t base
The embedded base node.
Definition: ast.h:6780
pm_string_t unescaped
RegularExpressionNode::unescaped.
Definition: ast.h:6801
pm_location_t opening_loc
RegularExpressionNode::opening_loc.
Definition: ast.h:6786
pm_location_t content_loc
RegularExpressionNode::content_loc.
Definition: ast.h:6791
RequiredKeywordParameterNode.
Definition: ast.h:6820
pm_location_t name_loc
RequiredKeywordParameterNode::name_loc.
Definition: ast.h:6833
pm_node_t base
The embedded base node.
Definition: ast.h:6822
pm_constant_id_t name
RequiredKeywordParameterNode::name.
Definition: ast.h:6828
RequiredParameterNode.
Definition: ast.h:6852
pm_constant_id_t name
RequiredParameterNode::name.
Definition: ast.h:6860
pm_node_t base
The embedded base node.
Definition: ast.h:6854
RescueModifierNode.
Definition: ast.h:6875
struct pm_node * rescue_expression
RescueModifierNode::rescue_expression.
Definition: ast.h:6893
pm_location_t keyword_loc
RescueModifierNode::keyword_loc.
Definition: ast.h:6888
struct pm_node * expression
RescueModifierNode::expression.
Definition: ast.h:6883
RescueNode.
Definition: ast.h:6913
pm_location_t keyword_loc
RescueNode::keyword_loc.
Definition: ast.h:6921
struct pm_rescue_node * subsequent
RescueNode::subsequent.
Definition: ast.h:6946
pm_location_t operator_loc
RescueNode::operator_loc.
Definition: ast.h:6931
struct pm_node * reference
RescueNode::reference.
Definition: ast.h:6936
struct pm_node_list exceptions
RescueNode::exceptions.
Definition: ast.h:6926
struct pm_statements_node * statements
RescueNode::statements.
Definition: ast.h:6941
RestParameterNode.
Definition: ast.h:6965
pm_constant_id_t name
RestParameterNode::name.
Definition: ast.h:6973
pm_location_t name_loc
RestParameterNode::name_loc.
Definition: ast.h:6978
pm_node_t base
The embedded base node.
Definition: ast.h:6967
pm_location_t operator_loc
RestParameterNode::operator_loc.
Definition: ast.h:6983
ReturnNode.
Definition: ast.h:7016
pm_location_t keyword_loc
ReturnNode::keyword_loc.
Definition: ast.h:7024
struct pm_arguments_node * arguments
ReturnNode::arguments.
Definition: ast.h:7029
ShareableConstantNode.
Definition: ast.h:7068
struct pm_node * write
ShareableConstantNode::write.
Definition: ast.h:7078
pm_node_t base
The embedded base node.
Definition: ast.h:7070
SingletonClassNode.
Definition: ast.h:7093
pm_constant_id_list_t locals
SingletonClassNode::locals.
Definition: ast.h:7101
pm_location_t operator_loc
SingletonClassNode::operator_loc.
Definition: ast.h:7111
struct pm_node * expression
SingletonClassNode::expression.
Definition: ast.h:7116
pm_location_t end_keyword_loc
SingletonClassNode::end_keyword_loc.
Definition: ast.h:7126
pm_location_t class_keyword_loc
SingletonClassNode::class_keyword_loc.
Definition: ast.h:7106
struct pm_node * body
SingletonClassNode::body.
Definition: ast.h:7121
SourceFileNode.
Definition: ast.h:7165
pm_string_t filepath
SourceFileNode::filepath.
Definition: ast.h:7175
pm_node_t base
The embedded base node.
Definition: ast.h:7167
SplatNode.
Definition: ast.h:7208
struct pm_node * expression
SplatNode::expression.
Definition: ast.h:7221
pm_location_t operator_loc
SplatNode::operator_loc.
Definition: ast.h:7216
StatementsNode.
Definition: ast.h:7236
struct pm_node_list body
StatementsNode::body.
Definition: ast.h:7244
StringNode.
Definition: ast.h:7271
pm_node_t base
The embedded base node.
Definition: ast.h:7273
pm_string_t unescaped
StringNode::unescaped.
Definition: ast.h:7294
pm_location_t content_loc
StringNode::content_loc.
Definition: ast.h:7284
pm_location_t closing_loc
StringNode::closing_loc.
Definition: ast.h:7289
pm_location_t opening_loc
StringNode::opening_loc.
Definition: ast.h:7279
SuperNode.
Definition: ast.h:7312
struct pm_arguments_node * arguments
SuperNode::arguments.
Definition: ast.h:7330
pm_location_t lparen_loc
SuperNode::lparen_loc.
Definition: ast.h:7325
pm_location_t keyword_loc
SuperNode::keyword_loc.
Definition: ast.h:7320
pm_location_t rparen_loc
SuperNode::rparen_loc.
Definition: ast.h:7335
struct pm_node * block
SuperNode::block.
Definition: ast.h:7340
SymbolNode.
Definition: ast.h:7363
pm_location_t opening_loc
SymbolNode::opening_loc.
Definition: ast.h:7371
pm_location_t value_loc
SymbolNode::value_loc.
Definition: ast.h:7376
pm_location_t closing_loc
SymbolNode::closing_loc.
Definition: ast.h:7381
pm_string_t unescaped
SymbolNode::unescaped.
Definition: ast.h:7386
pm_node_t base
The embedded base node.
Definition: ast.h:7365
UndefNode.
Definition: ast.h:7419
pm_location_t keyword_loc
UndefNode::keyword_loc.
Definition: ast.h:7432
struct pm_node_list names
UndefNode::names.
Definition: ast.h:7427
UnlessNode.
Definition: ast.h:7450
pm_location_t keyword_loc
UnlessNode::keyword_loc.
Definition: ast.h:7466
pm_location_t then_keyword_loc
UnlessNode::then_keyword_loc.
Definition: ast.h:7489
pm_location_t end_keyword_loc
UnlessNode::end_keyword_loc.
Definition: ast.h:7520
struct pm_statements_node * statements
UnlessNode::statements.
Definition: ast.h:7500
struct pm_node * predicate
UnlessNode::predicate.
Definition: ast.h:7479
struct pm_else_node * else_clause
UnlessNode::else_clause.
Definition: ast.h:7510
UntilNode.
Definition: ast.h:7541
struct pm_statements_node * statements
UntilNode::statements.
Definition: ast.h:7564
pm_location_t closing_loc
UntilNode::closing_loc.
Definition: ast.h:7554
struct pm_node * predicate
UntilNode::predicate.
Definition: ast.h:7559
pm_location_t keyword_loc
UntilNode::keyword_loc.
Definition: ast.h:7549
pm_node_t base
The embedded base node.
Definition: ast.h:7543
WhenNode.
Definition: ast.h:7581
struct pm_statements_node * statements
WhenNode::statements.
Definition: ast.h:7604
pm_location_t then_keyword_loc
WhenNode::then_keyword_loc.
Definition: ast.h:7599
pm_location_t keyword_loc
WhenNode::keyword_loc.
Definition: ast.h:7589
struct pm_node_list conditions
WhenNode::conditions.
Definition: ast.h:7594
WhileNode.
Definition: ast.h:7625
pm_location_t closing_loc
WhileNode::closing_loc.
Definition: ast.h:7638
pm_location_t keyword_loc
WhileNode::keyword_loc.
Definition: ast.h:7633
struct pm_statements_node * statements
WhileNode::statements.
Definition: ast.h:7648
pm_node_t base
The embedded base node.
Definition: ast.h:7627
struct pm_node * predicate
WhileNode::predicate.
Definition: ast.h:7643
XStringNode.
Definition: ast.h:7667
pm_location_t closing_loc
XStringNode::closing_loc.
Definition: ast.h:7685
pm_location_t opening_loc
XStringNode::opening_loc.
Definition: ast.h:7675
pm_location_t content_loc
XStringNode::content_loc.
Definition: ast.h:7680
pm_string_t unescaped
XStringNode::unescaped.
Definition: ast.h:7690
pm_node_t base
The embedded base node.
Definition: ast.h:7669
YieldNode.
Definition: ast.h:7705
pm_location_t keyword_loc
YieldNode::keyword_loc.
Definition: ast.h:7713
pm_location_t lparen_loc
YieldNode::lparen_loc.
Definition: ast.h:7718
pm_location_t rparen_loc
YieldNode::rparen_loc.
Definition: ast.h:7728
struct pm_arguments_node * arguments
YieldNode::arguments.
Definition: ast.h:7723