Ruby: prism/prettyprint.c Source File

Ruby 3.3.5p100 (2024-09-03 revision ef084cc8f4958c1b6e4ead99136631bef6d8ddba)

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