Coverage Report

Created: 2026-11-10 14:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
src/json.c
Line
Count
Source
1
/*----------------------------------------------------------------------------*/
2
/* This file is generated by the templates/template.rb script and should not  */
3
/* be modified manually. See                                                  */
4
/* templates/src/json.c.erb                                                   */
5
/* if you are looking to modify the                                           */
6
/* template                                                                   */
7
/*----------------------------------------------------------------------------*/
8
9
#include "prism/json.h"
10
11
// Ensure this translation unit is never empty, even when JSON is excluded.
12
typedef int pm_json_unused_t;
13
14
#ifndef PRISM_EXCLUDE_JSON
15
16
#include "prism/internal/buffer.h"
17
#include "prism/internal/constant_pool.h"
18
#include "prism/internal/integer.h"
19
#include "prism/internal/parser.h"
20
21
#include <inttypes.h>
22
23
static void
24
379k
pm_dump_json_constant(pm_buffer_t *buffer, const pm_parser_t *parser, pm_constant_id_t constant_id) {
25
379k
    const pm_constant_t *constant = pm_constant_pool_id_to_constant(&parser->constant_pool, constant_id);
26
379k
    pm_buffer_append_byte(buffer, '"');
27
379k
    pm_buffer_append_source(buffer, constant->start, constant->length, PM_BUFFER_ESCAPING_JSON);
28
379k
    pm_buffer_append_byte(buffer, '"');
29
379k
}
30
31
static void
32
1.83M
pm_dump_json_location(pm_buffer_t *buffer, const pm_location_t *location) {
33
1.83M
    pm_buffer_append_format(buffer, "{\"start\":%" PRIu32 ",\"length\":%" PRIu32 "}", location->start, location->length);
34
1.83M
}
35
36
/**
37
 * Dump JSON to the given buffer.
38
 */
39
void
40
1.00M
pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *node) {
41
1.00M
    switch (PM_NODE_TYPE(node)) {
42
97
        case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
  Branch (42:9): [True: 97, False: 1.00M]
43
97
            pm_buffer_append_string(buffer, "{\"type\":\"AliasGlobalVariableNode\",\"location\":", 45);
44
45
97
            const pm_alias_global_variable_node_t *cast = (const pm_alias_global_variable_node_t *) node;
46
97
            pm_dump_json_location(buffer, &cast->base.location);
47
48
            // Dump the new_name field
49
97
            pm_buffer_append_byte(buffer, ',');
50
97
            pm_buffer_append_string(buffer, "\"new_name\":", 11);
51
97
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->new_name);
52
53
            // Dump the old_name field
54
97
            pm_buffer_append_byte(buffer, ',');
55
97
            pm_buffer_append_string(buffer, "\"old_name\":", 11);
56
97
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->old_name);
57
58
            // Dump the keyword_loc field
59
97
            pm_buffer_append_byte(buffer, ',');
60
97
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
61
97
            pm_dump_json_location(buffer, &cast->keyword_loc);
62
63
97
            pm_buffer_append_byte(buffer, '}');
64
97
            break;
65
0
        }
66
738
        case PM_ALIAS_METHOD_NODE: {
  Branch (66:9): [True: 738, False: 1.00M]
67
738
            pm_buffer_append_string(buffer, "{\"type\":\"AliasMethodNode\",\"location\":", 37);
68
69
738
            const pm_alias_method_node_t *cast = (const pm_alias_method_node_t *) node;
70
738
            pm_dump_json_location(buffer, &cast->base.location);
71
72
            // Dump the new_name field
73
738
            pm_buffer_append_byte(buffer, ',');
74
738
            pm_buffer_append_string(buffer, "\"new_name\":", 11);
75
738
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->new_name);
76
77
            // Dump the old_name field
78
738
            pm_buffer_append_byte(buffer, ',');
79
738
            pm_buffer_append_string(buffer, "\"old_name\":", 11);
80
738
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->old_name);
81
82
            // Dump the keyword_loc field
83
738
            pm_buffer_append_byte(buffer, ',');
84
738
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
85
738
            pm_dump_json_location(buffer, &cast->keyword_loc);
86
87
738
            pm_buffer_append_byte(buffer, '}');
88
738
            break;
89
0
        }
90
910
        case PM_ALTERNATION_PATTERN_NODE: {
  Branch (90:9): [True: 910, False: 1.00M]
91
910
            pm_buffer_append_string(buffer, "{\"type\":\"AlternationPatternNode\",\"location\":", 44);
92
93
910
            const pm_alternation_pattern_node_t *cast = (const pm_alternation_pattern_node_t *) node;
94
910
            pm_dump_json_location(buffer, &cast->base.location);
95
96
            // Dump the left field
97
910
            pm_buffer_append_byte(buffer, ',');
98
910
            pm_buffer_append_string(buffer, "\"left\":", 7);
99
910
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->left);
100
101
            // Dump the right field
102
910
            pm_buffer_append_byte(buffer, ',');
103
910
            pm_buffer_append_string(buffer, "\"right\":", 8);
104
910
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->right);
105
106
            // Dump the operator_loc field
107
910
            pm_buffer_append_byte(buffer, ',');
108
910
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
109
910
            pm_dump_json_location(buffer, &cast->operator_loc);
110
111
910
            pm_buffer_append_byte(buffer, '}');
112
910
            break;
113
0
        }
114
1.21k
        case PM_AND_NODE: {
  Branch (114:9): [True: 1.21k, False: 1.00M]
115
1.21k
            pm_buffer_append_string(buffer, "{\"type\":\"AndNode\",\"location\":", 29);
116
117
1.21k
            const pm_and_node_t *cast = (const pm_and_node_t *) node;
118
1.21k
            pm_dump_json_location(buffer, &cast->base.location);
119
120
            // Dump the left field
121
1.21k
            pm_buffer_append_byte(buffer, ',');
122
1.21k
            pm_buffer_append_string(buffer, "\"left\":", 7);
123
1.21k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->left);
124
125
            // Dump the right field
126
1.21k
            pm_buffer_append_byte(buffer, ',');
127
1.21k
            pm_buffer_append_string(buffer, "\"right\":", 8);
128
1.21k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->right);
129
130
            // Dump the operator_loc field
131
1.21k
            pm_buffer_append_byte(buffer, ',');
132
1.21k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
133
1.21k
            pm_dump_json_location(buffer, &cast->operator_loc);
134
135
1.21k
            pm_buffer_append_byte(buffer, '}');
136
1.21k
            break;
137
0
        }
138
68.0k
        case PM_ARGUMENTS_NODE: {
  Branch (138:9): [True: 68.0k, False: 938k]
139
68.0k
            pm_buffer_append_string(buffer, "{\"type\":\"ArgumentsNode\",\"location\":", 35);
140
141
68.0k
            const pm_arguments_node_t *cast = (const pm_arguments_node_t *) node;
142
68.0k
            pm_dump_json_location(buffer, &cast->base.location);
143
144
            // Dump the ArgumentsNodeFlags field
145
68.0k
            pm_buffer_append_byte(buffer, ',');
146
68.0k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
147
68.0k
            size_t flags = 0;
148
68.0k
            pm_buffer_append_byte(buffer, '[');
149
68.0k
            if (PM_NODE_FLAG_P(cast, PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING)) {
150
291
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (150:21): [True: 0, False: 291]
151
291
                pm_buffer_append_string(buffer, "\"CONTAINS_FORWARDING\"", 21);
152
291
                flags++;
153
291
            }
154
68.0k
            if (PM_NODE_FLAG_P(cast, PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS)) {
155
2.71k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (155:21): [True: 0, False: 2.71k]
156
2.71k
                pm_buffer_append_string(buffer, "\"CONTAINS_KEYWORDS\"", 19);
157
2.71k
                flags++;
158
2.71k
            }
159
68.0k
            if (PM_NODE_FLAG_P(cast, PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT)) {
160
602
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (160:21): [True: 602, False: 0]
161
602
                pm_buffer_append_string(buffer, "\"CONTAINS_KEYWORD_SPLAT\"", 24);
162
602
                flags++;
163
602
            }
164
68.0k
            if (PM_NODE_FLAG_P(cast, PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT)) {
165
2.66k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')150
;
  Branch (165:21): [True: 150, False: 2.51k]
166
2.66k
                pm_buffer_append_string(buffer, "\"CONTAINS_SPLAT\"", 16);
167
2.66k
                flags++;
168
2.66k
            }
169
68.0k
            if (PM_NODE_FLAG_P(cast, PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS)) {
170
12
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (170:21): [True: 12, False: 0]
171
12
                pm_buffer_append_string(buffer, "\"CONTAINS_MULTIPLE_SPLATS\"", 26);
172
12
                flags++;
173
12
            }
174
68.0k
            pm_buffer_append_byte(buffer, ']');
175
176
            // Dump the arguments field
177
68.0k
            pm_buffer_append_byte(buffer, ',');
178
68.0k
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
179
68.0k
            const pm_node_list_t *arguments = &cast->arguments;
180
68.0k
            pm_buffer_append_byte(buffer, '[');
181
182
145k
            for (size_t index = 0; index < arguments->size; 
index++77.3k
) {
  Branch (182:36): [True: 77.3k, False: 68.0k]
183
77.3k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')9.22k
;
  Branch (183:21): [True: 9.22k, False: 68.0k]
184
77.3k
                pm_dump_json(buffer, parser, arguments->nodes[index]);
185
77.3k
            }
186
68.0k
            pm_buffer_append_byte(buffer, ']');
187
188
68.0k
            pm_buffer_append_byte(buffer, '}');
189
68.0k
            break;
190
0
        }
191
41.9k
        case PM_ARRAY_NODE: {
  Branch (191:9): [True: 41.9k, False: 964k]
192
41.9k
            pm_buffer_append_string(buffer, "{\"type\":\"ArrayNode\",\"location\":", 31);
193
194
41.9k
            const pm_array_node_t *cast = (const pm_array_node_t *) node;
195
41.9k
            pm_dump_json_location(buffer, &cast->base.location);
196
197
            // Dump the ArrayNodeFlags field
198
41.9k
            pm_buffer_append_byte(buffer, ',');
199
41.9k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
200
41.9k
            size_t flags = 0;
201
41.9k
            pm_buffer_append_byte(buffer, '[');
202
41.9k
            if (PM_NODE_FLAG_P(cast, PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT)) {
203
704
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (203:21): [True: 0, False: 704]
204
704
                pm_buffer_append_string(buffer, "\"CONTAINS_SPLAT\"", 16);
205
704
                flags++;
206
704
            }
207
41.9k
            pm_buffer_append_byte(buffer, ']');
208
209
            // Dump the elements field
210
41.9k
            pm_buffer_append_byte(buffer, ',');
211
41.9k
            pm_buffer_append_string(buffer, "\"elements\":", 11);
212
41.9k
            const pm_node_list_t *elements = &cast->elements;
213
41.9k
            pm_buffer_append_byte(buffer, '[');
214
215
134k
            for (size_t index = 0; index < elements->size; 
index++92.2k
) {
  Branch (215:36): [True: 92.2k, False: 41.9k]
216
92.2k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')51.2k
;
  Branch (216:21): [True: 51.2k, False: 40.9k]
217
92.2k
                pm_dump_json(buffer, parser, elements->nodes[index]);
218
92.2k
            }
219
41.9k
            pm_buffer_append_byte(buffer, ']');
220
221
            // Dump the opening_loc field
222
41.9k
            pm_buffer_append_byte(buffer, ',');
223
41.9k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
224
41.9k
            if (cast->opening_loc.length != 0) {
  Branch (224:17): [True: 40.6k, False: 1.29k]
225
40.6k
                pm_dump_json_location(buffer, &cast->opening_loc);
226
40.6k
            } else {
227
1.29k
                pm_buffer_append_string(buffer, "null", 4);
228
1.29k
            }
229
230
            // Dump the closing_loc field
231
41.9k
            pm_buffer_append_byte(buffer, ',');
232
41.9k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
233
41.9k
            if (cast->closing_loc.length != 0) {
  Branch (233:17): [True: 11.6k, False: 30.3k]
234
11.6k
                pm_dump_json_location(buffer, &cast->closing_loc);
235
30.3k
            } else {
236
30.3k
                pm_buffer_append_string(buffer, "null", 4);
237
30.3k
            }
238
239
41.9k
            pm_buffer_append_byte(buffer, '}');
240
41.9k
            break;
241
0
        }
242
4.88k
        case PM_ARRAY_PATTERN_NODE: {
  Branch (242:9): [True: 4.88k, False: 1.00M]
243
4.88k
            pm_buffer_append_string(buffer, "{\"type\":\"ArrayPatternNode\",\"location\":", 38);
244
245
4.88k
            const pm_array_pattern_node_t *cast = (const pm_array_pattern_node_t *) node;
246
4.88k
            pm_dump_json_location(buffer, &cast->base.location);
247
248
            // Dump the constant field
249
4.88k
            pm_buffer_append_byte(buffer, ',');
250
4.88k
            pm_buffer_append_string(buffer, "\"constant\":", 11);
251
4.88k
            if (cast->constant != NULL) {
  Branch (251:17): [True: 582, False: 4.29k]
252
582
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->constant);
253
4.29k
            } else {
254
4.29k
                pm_buffer_append_string(buffer, "null", 4);
255
4.29k
            }
256
257
            // Dump the requireds field
258
4.88k
            pm_buffer_append_byte(buffer, ',');
259
4.88k
            pm_buffer_append_string(buffer, "\"requireds\":", 12);
260
4.88k
            const pm_node_list_t *requireds = &cast->requireds;
261
4.88k
            pm_buffer_append_byte(buffer, '[');
262
263
12.8k
            for (size_t index = 0; index < requireds->size; 
index++7.94k
) {
  Branch (263:36): [True: 7.94k, False: 4.88k]
264
7.94k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')3.25k
;
  Branch (264:21): [True: 3.25k, False: 4.68k]
265
7.94k
                pm_dump_json(buffer, parser, requireds->nodes[index]);
266
7.94k
            }
267
4.88k
            pm_buffer_append_byte(buffer, ']');
268
269
            // Dump the rest field
270
4.88k
            pm_buffer_append_byte(buffer, ',');
271
4.88k
            pm_buffer_append_string(buffer, "\"rest\":", 7);
272
4.88k
            if (cast->rest != NULL) {
  Branch (272:17): [True: 1.47k, False: 3.40k]
273
1.47k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->rest);
274
3.40k
            } else {
275
3.40k
                pm_buffer_append_string(buffer, "null", 4);
276
3.40k
            }
277
278
            // Dump the posts field
279
4.88k
            pm_buffer_append_byte(buffer, ',');
280
4.88k
            pm_buffer_append_string(buffer, "\"posts\":", 8);
281
4.88k
            const pm_node_list_t *posts = &cast->posts;
282
4.88k
            pm_buffer_append_byte(buffer, '[');
283
284
5.30k
            for (size_t index = 0; index < posts->size; 
index++427
) {
  Branch (284:36): [True: 427, False: 4.88k]
285
427
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')57
;
  Branch (285:21): [True: 57, False: 370]
286
427
                pm_dump_json(buffer, parser, posts->nodes[index]);
287
427
            }
288
4.88k
            pm_buffer_append_byte(buffer, ']');
289
290
            // Dump the opening_loc field
291
4.88k
            pm_buffer_append_byte(buffer, ',');
292
4.88k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
293
4.88k
            if (cast->opening_loc.length != 0) {
  Branch (293:17): [True: 4.28k, False: 593]
294
4.28k
                pm_dump_json_location(buffer, &cast->opening_loc);
295
4.28k
            } else {
296
593
                pm_buffer_append_string(buffer, "null", 4);
297
593
            }
298
299
            // Dump the closing_loc field
300
4.88k
            pm_buffer_append_byte(buffer, ',');
301
4.88k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
302
4.88k
            if (cast->closing_loc.length != 0) {
  Branch (302:17): [True: 1.58k, False: 3.29k]
303
1.58k
                pm_dump_json_location(buffer, &cast->closing_loc);
304
3.29k
            } else {
305
3.29k
                pm_buffer_append_string(buffer, "null", 4);
306
3.29k
            }
307
308
4.88k
            pm_buffer_append_byte(buffer, '}');
309
4.88k
            break;
310
0
        }
311
18.6k
        case PM_ASSOC_NODE: {
  Branch (311:9): [True: 18.6k, False: 987k]
312
18.6k
            pm_buffer_append_string(buffer, "{\"type\":\"AssocNode\",\"location\":", 31);
313
314
18.6k
            const pm_assoc_node_t *cast = (const pm_assoc_node_t *) node;
315
18.6k
            pm_dump_json_location(buffer, &cast->base.location);
316
317
            // Dump the key field
318
18.6k
            pm_buffer_append_byte(buffer, ',');
319
18.6k
            pm_buffer_append_string(buffer, "\"key\":", 6);
320
18.6k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->key);
321
322
            // Dump the value field
323
18.6k
            pm_buffer_append_byte(buffer, ',');
324
18.6k
            pm_buffer_append_string(buffer, "\"value\":", 8);
325
18.6k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
326
327
            // Dump the operator_loc field
328
18.6k
            pm_buffer_append_byte(buffer, ',');
329
18.6k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
330
18.6k
            if (cast->operator_loc.length != 0) {
  Branch (330:17): [True: 1.81k, False: 16.8k]
331
1.81k
                pm_dump_json_location(buffer, &cast->operator_loc);
332
16.8k
            } else {
333
16.8k
                pm_buffer_append_string(buffer, "null", 4);
334
16.8k
            }
335
336
18.6k
            pm_buffer_append_byte(buffer, '}');
337
18.6k
            break;
338
0
        }
339
2.87k
        case PM_ASSOC_SPLAT_NODE: {
  Branch (339:9): [True: 2.87k, False: 1.00M]
340
2.87k
            pm_buffer_append_string(buffer, "{\"type\":\"AssocSplatNode\",\"location\":", 36);
341
342
2.87k
            const pm_assoc_splat_node_t *cast = (const pm_assoc_splat_node_t *) node;
343
2.87k
            pm_dump_json_location(buffer, &cast->base.location);
344
345
            // Dump the value field
346
2.87k
            pm_buffer_append_byte(buffer, ',');
347
2.87k
            pm_buffer_append_string(buffer, "\"value\":", 8);
348
2.87k
            if (cast->value != NULL) {
  Branch (348:17): [True: 1.65k, False: 1.22k]
349
1.65k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
350
1.65k
            } else {
351
1.22k
                pm_buffer_append_string(buffer, "null", 4);
352
1.22k
            }
353
354
            // Dump the operator_loc field
355
2.87k
            pm_buffer_append_byte(buffer, ',');
356
2.87k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
357
2.87k
            pm_dump_json_location(buffer, &cast->operator_loc);
358
359
2.87k
            pm_buffer_append_byte(buffer, '}');
360
2.87k
            break;
361
0
        }
362
122
        case PM_BACK_REFERENCE_READ_NODE: {
  Branch (362:9): [True: 122, False: 1.00M]
363
122
            pm_buffer_append_string(buffer, "{\"type\":\"BackReferenceReadNode\",\"location\":", 43);
364
365
122
            const pm_back_reference_read_node_t *cast = (const pm_back_reference_read_node_t *) node;
366
122
            pm_dump_json_location(buffer, &cast->base.location);
367
368
            // Dump the name field
369
122
            pm_buffer_append_byte(buffer, ',');
370
122
            pm_buffer_append_string(buffer, "\"name\":", 7);
371
122
            pm_dump_json_constant(buffer, parser, cast->name);
372
373
122
            pm_buffer_append_byte(buffer, '}');
374
122
            break;
375
0
        }
376
2.59k
        case PM_BEGIN_NODE: {
  Branch (376:9): [True: 2.59k, False: 1.00M]
377
2.59k
            pm_buffer_append_string(buffer, "{\"type\":\"BeginNode\",\"location\":", 31);
378
379
2.59k
            const pm_begin_node_t *cast = (const pm_begin_node_t *) node;
380
2.59k
            pm_dump_json_location(buffer, &cast->base.location);
381
382
            // Dump the begin_keyword_loc field
383
2.59k
            pm_buffer_append_byte(buffer, ',');
384
2.59k
            pm_buffer_append_string(buffer, "\"begin_keyword_loc\":", 20);
385
2.59k
            if (cast->begin_keyword_loc.length != 0) {
  Branch (385:17): [True: 1.06k, False: 1.52k]
386
1.06k
                pm_dump_json_location(buffer, &cast->begin_keyword_loc);
387
1.52k
            } else {
388
1.52k
                pm_buffer_append_string(buffer, "null", 4);
389
1.52k
            }
390
391
            // Dump the statements field
392
2.59k
            pm_buffer_append_byte(buffer, ',');
393
2.59k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
394
2.59k
            if (cast->statements != NULL) {
  Branch (394:17): [True: 1.52k, False: 1.07k]
395
1.52k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
396
1.52k
            } else {
397
1.07k
                pm_buffer_append_string(buffer, "null", 4);
398
1.07k
            }
399
400
            // Dump the rescue_clause field
401
2.59k
            pm_buffer_append_byte(buffer, ',');
402
2.59k
            pm_buffer_append_string(buffer, "\"rescue_clause\":", 16);
403
2.59k
            if (cast->rescue_clause != NULL) {
  Branch (403:17): [True: 1.23k, False: 1.35k]
404
1.23k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->rescue_clause);
405
1.35k
            } else {
406
1.35k
                pm_buffer_append_string(buffer, "null", 4);
407
1.35k
            }
408
409
            // Dump the else_clause field
410
2.59k
            pm_buffer_append_byte(buffer, ',');
411
2.59k
            pm_buffer_append_string(buffer, "\"else_clause\":", 14);
412
2.59k
            if (cast->else_clause != NULL) {
  Branch (412:17): [True: 592, False: 1.99k]
413
592
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->else_clause);
414
1.99k
            } else {
415
1.99k
                pm_buffer_append_string(buffer, "null", 4);
416
1.99k
            }
417
418
            // Dump the ensure_clause field
419
2.59k
            pm_buffer_append_byte(buffer, ',');
420
2.59k
            pm_buffer_append_string(buffer, "\"ensure_clause\":", 16);
421
2.59k
            if (cast->ensure_clause != NULL) {
  Branch (421:17): [True: 913, False: 1.67k]
422
913
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->ensure_clause);
423
1.67k
            } else {
424
1.67k
                pm_buffer_append_string(buffer, "null", 4);
425
1.67k
            }
426
427
            // Dump the end_keyword_loc field
428
2.59k
            pm_buffer_append_byte(buffer, ',');
429
2.59k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
430
2.59k
            if (cast->end_keyword_loc.length != 0) {
  Branch (430:17): [True: 1.81k, False: 773]
431
1.81k
                pm_dump_json_location(buffer, &cast->end_keyword_loc);
432
1.81k
            } else {
433
773
                pm_buffer_append_string(buffer, "null", 4);
434
773
            }
435
436
2.59k
            pm_buffer_append_byte(buffer, '}');
437
2.59k
            break;
438
0
        }
439
1.41k
        case PM_BLOCK_ARGUMENT_NODE: {
  Branch (439:9): [True: 1.41k, False: 1.00M]
440
1.41k
            pm_buffer_append_string(buffer, "{\"type\":\"BlockArgumentNode\",\"location\":", 39);
441
442
1.41k
            const pm_block_argument_node_t *cast = (const pm_block_argument_node_t *) node;
443
1.41k
            pm_dump_json_location(buffer, &cast->base.location);
444
445
            // Dump the expression field
446
1.41k
            pm_buffer_append_byte(buffer, ',');
447
1.41k
            pm_buffer_append_string(buffer, "\"expression\":", 13);
448
1.41k
            if (cast->expression != NULL) {
  Branch (448:17): [True: 1.37k, False: 35]
449
1.37k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->expression);
450
1.37k
            } else {
451
35
                pm_buffer_append_string(buffer, "null", 4);
452
35
            }
453
454
            // Dump the operator_loc field
455
1.41k
            pm_buffer_append_byte(buffer, ',');
456
1.41k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
457
1.41k
            pm_dump_json_location(buffer, &cast->operator_loc);
458
459
1.41k
            pm_buffer_append_byte(buffer, '}');
460
1.41k
            break;
461
0
        }
462
626
        case PM_BLOCK_LOCAL_VARIABLE_NODE: {
  Branch (462:9): [True: 626, False: 1.00M]
463
626
            pm_buffer_append_string(buffer, "{\"type\":\"BlockLocalVariableNode\",\"location\":", 44);
464
465
626
            const pm_block_local_variable_node_t *cast = (const pm_block_local_variable_node_t *) node;
466
626
            pm_dump_json_location(buffer, &cast->base.location);
467
468
            // Dump the ParameterFlags field
469
626
            pm_buffer_append_byte(buffer, ',');
470
626
            pm_buffer_append_string(buffer, "\"flags\":", 8);
471
626
            size_t flags = 0;
472
626
            pm_buffer_append_byte(buffer, '[');
473
626
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
474
266
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (474:21): [True: 0, False: 266]
475
266
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
476
266
                flags++;
477
266
            }
478
626
            pm_buffer_append_byte(buffer, ']');
479
480
            // Dump the name field
481
626
            pm_buffer_append_byte(buffer, ',');
482
626
            pm_buffer_append_string(buffer, "\"name\":", 7);
483
626
            pm_dump_json_constant(buffer, parser, cast->name);
484
485
626
            pm_buffer_append_byte(buffer, '}');
486
626
            break;
487
0
        }
488
7.49k
        case PM_BLOCK_NODE: {
  Branch (488:9): [True: 7.49k, False: 998k]
489
7.49k
            pm_buffer_append_string(buffer, "{\"type\":\"BlockNode\",\"location\":", 31);
490
491
7.49k
            const pm_block_node_t *cast = (const pm_block_node_t *) node;
492
7.49k
            pm_dump_json_location(buffer, &cast->base.location);
493
494
            // Dump the locals field
495
7.49k
            pm_buffer_append_byte(buffer, ',');
496
7.49k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
497
7.49k
            const pm_constant_id_list_t *locals = &cast->locals;
498
7.49k
            pm_buffer_append_byte(buffer, '[');
499
500
10.6k
            for (size_t index = 0; index < locals->size; 
index++3.16k
) {
  Branch (500:36): [True: 3.16k, False: 7.49k]
501
3.16k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')1.59k
;
  Branch (501:21): [True: 1.59k, False: 1.57k]
502
3.16k
                pm_dump_json_constant(buffer, parser, locals->ids[index]);
503
3.16k
            }
504
7.49k
            pm_buffer_append_byte(buffer, ']');
505
506
            // Dump the parameters field
507
7.49k
            pm_buffer_append_byte(buffer, ',');
508
7.49k
            pm_buffer_append_string(buffer, "\"parameters\":", 13);
509
7.49k
            if (cast->parameters != NULL) {
  Branch (509:17): [True: 1.43k, False: 6.05k]
510
1.43k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->parameters);
511
6.05k
            } else {
512
6.05k
                pm_buffer_append_string(buffer, "null", 4);
513
6.05k
            }
514
515
            // Dump the body field
516
7.49k
            pm_buffer_append_byte(buffer, ',');
517
7.49k
            pm_buffer_append_string(buffer, "\"body\":", 7);
518
7.49k
            if (cast->body != NULL) {
  Branch (518:17): [True: 4.71k, False: 2.77k]
519
4.71k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->body);
520
4.71k
            } else {
521
2.77k
                pm_buffer_append_string(buffer, "null", 4);
522
2.77k
            }
523
524
            // Dump the opening_loc field
525
7.49k
            pm_buffer_append_byte(buffer, ',');
526
7.49k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
527
7.49k
            pm_dump_json_location(buffer, &cast->opening_loc);
528
529
            // Dump the closing_loc field
530
7.49k
            pm_buffer_append_byte(buffer, ',');
531
7.49k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
532
7.49k
            pm_dump_json_location(buffer, &cast->closing_loc);
533
534
7.49k
            pm_buffer_append_byte(buffer, '}');
535
7.49k
            break;
536
0
        }
537
5.62k
        case PM_BLOCK_PARAMETER_NODE: {
  Branch (537:9): [True: 5.62k, False: 1.00M]
538
5.62k
            pm_buffer_append_string(buffer, "{\"type\":\"BlockParameterNode\",\"location\":", 40);
539
540
5.62k
            const pm_block_parameter_node_t *cast = (const pm_block_parameter_node_t *) node;
541
5.62k
            pm_dump_json_location(buffer, &cast->base.location);
542
543
            // Dump the ParameterFlags field
544
5.62k
            pm_buffer_append_byte(buffer, ',');
545
5.62k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
546
5.62k
            size_t flags = 0;
547
5.62k
            pm_buffer_append_byte(buffer, '[');
548
5.62k
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
549
55
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (549:21): [True: 0, False: 55]
550
55
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
551
55
                flags++;
552
55
            }
553
5.62k
            pm_buffer_append_byte(buffer, ']');
554
555
            // Dump the name field
556
5.62k
            pm_buffer_append_byte(buffer, ',');
557
5.62k
            pm_buffer_append_string(buffer, "\"name\":", 7);
558
5.62k
            if (cast->name != PM_CONSTANT_ID_UNSET) {
  Branch (558:17): [True: 5.48k, False: 144]
559
5.48k
                pm_dump_json_constant(buffer, parser, cast->name);
560
5.48k
            } else {
561
144
                pm_buffer_append_string(buffer, "null", 4);
562
144
            }
563
564
            // Dump the name_loc field
565
5.62k
            pm_buffer_append_byte(buffer, ',');
566
5.62k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
567
5.62k
            if (cast->name_loc.length != 0) {
  Branch (567:17): [True: 5.48k, False: 144]
568
5.48k
                pm_dump_json_location(buffer, &cast->name_loc);
569
5.48k
            } else {
570
144
                pm_buffer_append_string(buffer, "null", 4);
571
144
            }
572
573
            // Dump the operator_loc field
574
5.62k
            pm_buffer_append_byte(buffer, ',');
575
5.62k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
576
5.62k
            pm_dump_json_location(buffer, &cast->operator_loc);
577
578
5.62k
            pm_buffer_append_byte(buffer, '}');
579
5.62k
            break;
580
0
        }
581
2.48k
        case PM_BLOCK_PARAMETERS_NODE: {
  Branch (581:9): [True: 2.48k, False: 1.00M]
582
2.48k
            pm_buffer_append_string(buffer, "{\"type\":\"BlockParametersNode\",\"location\":", 41);
583
584
2.48k
            const pm_block_parameters_node_t *cast = (const pm_block_parameters_node_t *) node;
585
2.48k
            pm_dump_json_location(buffer, &cast->base.location);
586
587
            // Dump the parameters field
588
2.48k
            pm_buffer_append_byte(buffer, ',');
589
2.48k
            pm_buffer_append_string(buffer, "\"parameters\":", 13);
590
2.48k
            if (cast->parameters != NULL) {
  Branch (590:17): [True: 2.35k, False: 130]
591
2.35k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->parameters);
592
2.35k
            } else {
593
130
                pm_buffer_append_string(buffer, "null", 4);
594
130
            }
595
596
            // Dump the locals field
597
2.48k
            pm_buffer_append_byte(buffer, ',');
598
2.48k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
599
2.48k
            const pm_node_list_t *locals = &cast->locals;
600
2.48k
            pm_buffer_append_byte(buffer, '[');
601
602
3.10k
            for (size_t index = 0; index < locals->size; 
index++626
) {
  Branch (602:36): [True: 626, False: 2.48k]
603
626
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')465
;
  Branch (603:21): [True: 465, False: 161]
604
626
                pm_dump_json(buffer, parser, locals->nodes[index]);
605
626
            }
606
2.48k
            pm_buffer_append_byte(buffer, ']');
607
608
            // Dump the opening_loc field
609
2.48k
            pm_buffer_append_byte(buffer, ',');
610
2.48k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
611
2.48k
            if (cast->opening_loc.length != 0) {
  Branch (611:17): [True: 1.97k, False: 506]
612
1.97k
                pm_dump_json_location(buffer, &cast->opening_loc);
613
1.97k
            } else {
614
506
                pm_buffer_append_string(buffer, "null", 4);
615
506
            }
616
617
            // Dump the closing_loc field
618
2.48k
            pm_buffer_append_byte(buffer, ',');
619
2.48k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
620
2.48k
            if (cast->closing_loc.length != 0) {
  Branch (620:17): [True: 1.58k, False: 894]
621
1.58k
                pm_dump_json_location(buffer, &cast->closing_loc);
622
1.58k
            } else {
623
894
                pm_buffer_append_string(buffer, "null", 4);
624
894
            }
625
626
2.48k
            pm_buffer_append_byte(buffer, '}');
627
2.48k
            break;
628
0
        }
629
2.60k
        case PM_BREAK_NODE: {
  Branch (629:9): [True: 2.60k, False: 1.00M]
630
2.60k
            pm_buffer_append_string(buffer, "{\"type\":\"BreakNode\",\"location\":", 31);
631
632
2.60k
            const pm_break_node_t *cast = (const pm_break_node_t *) node;
633
2.60k
            pm_dump_json_location(buffer, &cast->base.location);
634
635
            // Dump the arguments field
636
2.60k
            pm_buffer_append_byte(buffer, ',');
637
2.60k
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
638
2.60k
            if (cast->arguments != NULL) {
  Branch (638:17): [True: 1.80k, False: 799]
639
1.80k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
640
1.80k
            } else {
641
799
                pm_buffer_append_string(buffer, "null", 4);
642
799
            }
643
644
            // Dump the keyword_loc field
645
2.60k
            pm_buffer_append_byte(buffer, ',');
646
2.60k
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
647
2.60k
            pm_dump_json_location(buffer, &cast->keyword_loc);
648
649
2.60k
            pm_buffer_append_byte(buffer, '}');
650
2.60k
            break;
651
0
        }
652
157
        case PM_CALL_AND_WRITE_NODE: {
  Branch (652:9): [True: 157, False: 1.00M]
653
157
            pm_buffer_append_string(buffer, "{\"type\":\"CallAndWriteNode\",\"location\":", 38);
654
655
157
            const pm_call_and_write_node_t *cast = (const pm_call_and_write_node_t *) node;
656
157
            pm_dump_json_location(buffer, &cast->base.location);
657
658
            // Dump the CallNodeFlags field
659
157
            pm_buffer_append_byte(buffer, ',');
660
157
            pm_buffer_append_string(buffer, "\"flags\":", 8);
661
157
            size_t flags = 0;
662
157
            pm_buffer_append_byte(buffer, '[');
663
157
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
664
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (664:21): [True: 0, False: 0]
665
0
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
666
0
                flags++;
667
0
            }
668
157
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
669
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (669:21): [True: 0, False: 0]
670
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
671
0
                flags++;
672
0
            }
673
157
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
674
3
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (674:21): [True: 0, False: 3]
675
3
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
676
3
                flags++;
677
3
            }
678
157
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
679
27
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (679:21): [True: 0, False: 27]
680
27
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
681
27
                flags++;
682
27
            }
683
157
            pm_buffer_append_byte(buffer, ']');
684
685
            // Dump the receiver field
686
157
            pm_buffer_append_byte(buffer, ',');
687
157
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
688
157
            if (cast->receiver != NULL) {
  Branch (688:17): [True: 130, False: 27]
689
130
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
690
130
            } else {
691
27
                pm_buffer_append_string(buffer, "null", 4);
692
27
            }
693
694
            // Dump the call_operator_loc field
695
157
            pm_buffer_append_byte(buffer, ',');
696
157
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
697
157
            if (cast->call_operator_loc.length != 0) {
  Branch (697:17): [True: 125, False: 32]
698
125
                pm_dump_json_location(buffer, &cast->call_operator_loc);
699
125
            } else {
700
32
                pm_buffer_append_string(buffer, "null", 4);
701
32
            }
702
703
            // Dump the message_loc field
704
157
            pm_buffer_append_byte(buffer, ',');
705
157
            pm_buffer_append_string(buffer, "\"message_loc\":", 14);
706
157
            if (cast->message_loc.length != 0) {
  Branch (706:17): [True: 149, False: 8]
707
149
                pm_dump_json_location(buffer, &cast->message_loc);
708
149
            } else {
709
8
                pm_buffer_append_string(buffer, "null", 4);
710
8
            }
711
712
            // Dump the read_name field
713
157
            pm_buffer_append_byte(buffer, ',');
714
157
            pm_buffer_append_string(buffer, "\"read_name\":", 12);
715
157
            pm_dump_json_constant(buffer, parser, cast->read_name);
716
717
            // Dump the write_name field
718
157
            pm_buffer_append_byte(buffer, ',');
719
157
            pm_buffer_append_string(buffer, "\"write_name\":", 13);
720
157
            pm_dump_json_constant(buffer, parser, cast->write_name);
721
722
            // Dump the operator_loc field
723
157
            pm_buffer_append_byte(buffer, ',');
724
157
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
725
157
            pm_dump_json_location(buffer, &cast->operator_loc);
726
727
            // Dump the value field
728
157
            pm_buffer_append_byte(buffer, ',');
729
157
            pm_buffer_append_string(buffer, "\"value\":", 8);
730
157
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
731
732
157
            pm_buffer_append_byte(buffer, '}');
733
157
            break;
734
0
        }
735
154k
        case PM_CALL_NODE: {
  Branch (735:9): [True: 154k, False: 851k]
736
154k
            pm_buffer_append_string(buffer, "{\"type\":\"CallNode\",\"location\":", 30);
737
738
154k
            const pm_call_node_t *cast = (const pm_call_node_t *) node;
739
154k
            pm_dump_json_location(buffer, &cast->base.location);
740
741
            // Dump the CallNodeFlags field
742
154k
            pm_buffer_append_byte(buffer, ',');
743
154k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
744
154k
            size_t flags = 0;
745
154k
            pm_buffer_append_byte(buffer, '[');
746
154k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
747
332
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (747:21): [True: 0, False: 332]
748
332
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
749
332
                flags++;
750
332
            }
751
154k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
752
66.9k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (752:21): [True: 0, False: 66.9k]
753
66.9k
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
754
66.9k
                flags++;
755
66.9k
            }
756
154k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
757
2.20k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (757:21): [True: 0, False: 2.20k]
758
2.20k
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
759
2.20k
                flags++;
760
2.20k
            }
761
154k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
762
104k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')66.9k
;
  Branch (762:21): [True: 66.9k, False: 37.4k]
763
104k
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
764
104k
                flags++;
765
104k
            }
766
154k
            pm_buffer_append_byte(buffer, ']');
767
768
            // Dump the receiver field
769
154k
            pm_buffer_append_byte(buffer, ',');
770
154k
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
771
154k
            if (cast->receiver != NULL) {
  Branch (771:17): [True: 50.3k, False: 104k]
772
50.3k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
773
104k
            } else {
774
104k
                pm_buffer_append_string(buffer, "null", 4);
775
104k
            }
776
777
            // Dump the call_operator_loc field
778
154k
            pm_buffer_append_byte(buffer, ',');
779
154k
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
780
154k
            if (cast->call_operator_loc.length != 0) {
  Branch (780:17): [True: 13.3k, False: 141k]
781
13.3k
                pm_dump_json_location(buffer, &cast->call_operator_loc);
782
141k
            } else {
783
141k
                pm_buffer_append_string(buffer, "null", 4);
784
141k
            }
785
786
            // Dump the name field
787
154k
            pm_buffer_append_byte(buffer, ',');
788
154k
            pm_buffer_append_string(buffer, "\"name\":", 7);
789
154k
            pm_dump_json_constant(buffer, parser, cast->name);
790
791
            // Dump the message_loc field
792
154k
            pm_buffer_append_byte(buffer, ',');
793
154k
            pm_buffer_append_string(buffer, "\"message_loc\":", 14);
794
154k
            if (cast->message_loc.length != 0) {
  Branch (794:17): [True: 149k, False: 5.60k]
795
149k
                pm_dump_json_location(buffer, &cast->message_loc);
796
149k
            } else {
797
5.60k
                pm_buffer_append_string(buffer, "null", 4);
798
5.60k
            }
799
800
            // Dump the opening_loc field
801
154k
            pm_buffer_append_byte(buffer, ',');
802
154k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
803
154k
            if (cast->opening_loc.length != 0) {
  Branch (803:17): [True: 12.5k, False: 142k]
804
12.5k
                pm_dump_json_location(buffer, &cast->opening_loc);
805
142k
            } else {
806
142k
                pm_buffer_append_string(buffer, "null", 4);
807
142k
            }
808
809
            // Dump the arguments field
810
154k
            pm_buffer_append_byte(buffer, ',');
811
154k
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
812
154k
            if (cast->arguments != NULL) {
  Branch (812:17): [True: 63.2k, False: 91.3k]
813
63.2k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
814
91.3k
            } else {
815
91.3k
                pm_buffer_append_string(buffer, "null", 4);
816
91.3k
            }
817
818
            // Dump the closing_loc field
819
154k
            pm_buffer_append_byte(buffer, ',');
820
154k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
821
154k
            if (cast->closing_loc.length != 0) {
  Branch (821:17): [True: 7.56k, False: 147k]
822
7.56k
                pm_dump_json_location(buffer, &cast->closing_loc);
823
147k
            } else {
824
147k
                pm_buffer_append_string(buffer, "null", 4);
825
147k
            }
826
827
            // Dump the equal_loc field
828
154k
            pm_buffer_append_byte(buffer, ',');
829
154k
            pm_buffer_append_string(buffer, "\"equal_loc\":", 12);
830
154k
            if (cast->equal_loc.length != 0) {
  Branch (830:17): [True: 2.20k, False: 152k]
831
2.20k
                pm_dump_json_location(buffer, &cast->equal_loc);
832
152k
            } else {
833
152k
                pm_buffer_append_string(buffer, "null", 4);
834
152k
            }
835
836
            // Dump the block field
837
154k
            pm_buffer_append_byte(buffer, ',');
838
154k
            pm_buffer_append_string(buffer, "\"block\":", 8);
839
154k
            if (cast->block != NULL) {
  Branch (839:17): [True: 8.73k, False: 145k]
840
8.73k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
841
145k
            } else {
842
145k
                pm_buffer_append_string(buffer, "null", 4);
843
145k
            }
844
845
154k
            pm_buffer_append_byte(buffer, '}');
846
154k
            break;
847
0
        }
848
474
        case PM_CALL_OPERATOR_WRITE_NODE: {
  Branch (848:9): [True: 474, False: 1.00M]
849
474
            pm_buffer_append_string(buffer, "{\"type\":\"CallOperatorWriteNode\",\"location\":", 43);
850
851
474
            const pm_call_operator_write_node_t *cast = (const pm_call_operator_write_node_t *) node;
852
474
            pm_dump_json_location(buffer, &cast->base.location);
853
854
            // Dump the CallNodeFlags field
855
474
            pm_buffer_append_byte(buffer, ',');
856
474
            pm_buffer_append_string(buffer, "\"flags\":", 8);
857
474
            size_t flags = 0;
858
474
            pm_buffer_append_byte(buffer, '[');
859
474
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
860
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (860:21): [True: 0, False: 0]
861
0
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
862
0
                flags++;
863
0
            }
864
474
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
865
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (865:21): [True: 0, False: 0]
866
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
867
0
                flags++;
868
0
            }
869
474
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
870
3
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (870:21): [True: 0, False: 3]
871
3
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
872
3
                flags++;
873
3
            }
874
474
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
875
21
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (875:21): [True: 0, False: 21]
876
21
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
877
21
                flags++;
878
21
            }
879
474
            pm_buffer_append_byte(buffer, ']');
880
881
            // Dump the receiver field
882
474
            pm_buffer_append_byte(buffer, ',');
883
474
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
884
474
            if (cast->receiver != NULL) {
  Branch (884:17): [True: 453, False: 21]
885
453
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
886
453
            } else {
887
21
                pm_buffer_append_string(buffer, "null", 4);
888
21
            }
889
890
            // Dump the call_operator_loc field
891
474
            pm_buffer_append_byte(buffer, ',');
892
474
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
893
474
            if (cast->call_operator_loc.length != 0) {
  Branch (893:17): [True: 315, False: 159]
894
315
                pm_dump_json_location(buffer, &cast->call_operator_loc);
895
315
            } else {
896
159
                pm_buffer_append_string(buffer, "null", 4);
897
159
            }
898
899
            // Dump the message_loc field
900
474
            pm_buffer_append_byte(buffer, ',');
901
474
            pm_buffer_append_string(buffer, "\"message_loc\":", 14);
902
474
            if (cast->message_loc.length != 0) {
  Branch (902:17): [True: 469, False: 5]
903
469
                pm_dump_json_location(buffer, &cast->message_loc);
904
469
            } else {
905
5
                pm_buffer_append_string(buffer, "null", 4);
906
5
            }
907
908
            // Dump the read_name field
909
474
            pm_buffer_append_byte(buffer, ',');
910
474
            pm_buffer_append_string(buffer, "\"read_name\":", 12);
911
474
            pm_dump_json_constant(buffer, parser, cast->read_name);
912
913
            // Dump the write_name field
914
474
            pm_buffer_append_byte(buffer, ',');
915
474
            pm_buffer_append_string(buffer, "\"write_name\":", 13);
916
474
            pm_dump_json_constant(buffer, parser, cast->write_name);
917
918
            // Dump the binary_operator field
919
474
            pm_buffer_append_byte(buffer, ',');
920
474
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
921
474
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
922
923
            // Dump the binary_operator_loc field
924
474
            pm_buffer_append_byte(buffer, ',');
925
474
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
926
474
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
927
928
            // Dump the value field
929
474
            pm_buffer_append_byte(buffer, ',');
930
474
            pm_buffer_append_string(buffer, "\"value\":", 8);
931
474
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
932
933
474
            pm_buffer_append_byte(buffer, '}');
934
474
            break;
935
0
        }
936
303
        case PM_CALL_OR_WRITE_NODE: {
  Branch (936:9): [True: 303, False: 1.00M]
937
303
            pm_buffer_append_string(buffer, "{\"type\":\"CallOrWriteNode\",\"location\":", 37);
938
939
303
            const pm_call_or_write_node_t *cast = (const pm_call_or_write_node_t *) node;
940
303
            pm_dump_json_location(buffer, &cast->base.location);
941
942
            // Dump the CallNodeFlags field
943
303
            pm_buffer_append_byte(buffer, ',');
944
303
            pm_buffer_append_string(buffer, "\"flags\":", 8);
945
303
            size_t flags = 0;
946
303
            pm_buffer_append_byte(buffer, '[');
947
303
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
948
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (948:21): [True: 0, False: 0]
949
0
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
950
0
                flags++;
951
0
            }
952
303
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
953
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (953:21): [True: 0, False: 0]
954
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
955
0
                flags++;
956
0
            }
957
303
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
958
4
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (958:21): [True: 0, False: 4]
959
4
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
960
4
                flags++;
961
4
            }
962
303
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
963
7
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (963:21): [True: 0, False: 7]
964
7
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
965
7
                flags++;
966
7
            }
967
303
            pm_buffer_append_byte(buffer, ']');
968
969
            // Dump the receiver field
970
303
            pm_buffer_append_byte(buffer, ',');
971
303
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
972
303
            if (cast->receiver != NULL) {
  Branch (972:17): [True: 296, False: 7]
973
296
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
974
296
            } else {
975
7
                pm_buffer_append_string(buffer, "null", 4);
976
7
            }
977
978
            // Dump the call_operator_loc field
979
303
            pm_buffer_append_byte(buffer, ',');
980
303
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
981
303
            if (cast->call_operator_loc.length != 0) {
  Branch (981:17): [True: 78, False: 225]
982
78
                pm_dump_json_location(buffer, &cast->call_operator_loc);
983
225
            } else {
984
225
                pm_buffer_append_string(buffer, "null", 4);
985
225
            }
986
987
            // Dump the message_loc field
988
303
            pm_buffer_append_byte(buffer, ',');
989
303
            pm_buffer_append_string(buffer, "\"message_loc\":", 14);
990
303
            if (cast->message_loc.length != 0) {
  Branch (990:17): [True: 295, False: 8]
991
295
                pm_dump_json_location(buffer, &cast->message_loc);
992
295
            } else {
993
8
                pm_buffer_append_string(buffer, "null", 4);
994
8
            }
995
996
            // Dump the read_name field
997
303
            pm_buffer_append_byte(buffer, ',');
998
303
            pm_buffer_append_string(buffer, "\"read_name\":", 12);
999
303
            pm_dump_json_constant(buffer, parser, cast->read_name);
1000
1001
            // Dump the write_name field
1002
303
            pm_buffer_append_byte(buffer, ',');
1003
303
            pm_buffer_append_string(buffer, "\"write_name\":", 13);
1004
303
            pm_dump_json_constant(buffer, parser, cast->write_name);
1005
1006
            // Dump the operator_loc field
1007
303
            pm_buffer_append_byte(buffer, ',');
1008
303
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1009
303
            pm_dump_json_location(buffer, &cast->operator_loc);
1010
1011
            // Dump the value field
1012
303
            pm_buffer_append_byte(buffer, ',');
1013
303
            pm_buffer_append_string(buffer, "\"value\":", 8);
1014
303
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1015
1016
303
            pm_buffer_append_byte(buffer, '}');
1017
303
            break;
1018
0
        }
1019
1.01k
        case PM_CALL_TARGET_NODE: {
  Branch (1019:9): [True: 1.01k, False: 1.00M]
1020
1.01k
            pm_buffer_append_string(buffer, "{\"type\":\"CallTargetNode\",\"location\":", 36);
1021
1022
1.01k
            const pm_call_target_node_t *cast = (const pm_call_target_node_t *) node;
1023
1.01k
            pm_dump_json_location(buffer, &cast->base.location);
1024
1025
            // Dump the CallNodeFlags field
1026
1.01k
            pm_buffer_append_byte(buffer, ',');
1027
1.01k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
1028
1.01k
            size_t flags = 0;
1029
1.01k
            pm_buffer_append_byte(buffer, '[');
1030
1.01k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
1031
4
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (1031:21): [True: 0, False: 4]
1032
4
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
1033
4
                flags++;
1034
4
            }
1035
1.01k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
1036
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (1036:21): [True: 0, False: 0]
1037
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
1038
0
                flags++;
1039
0
            }
1040
1.01k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
1041
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (1041:21): [True: 0, False: 0]
1042
0
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
1043
0
                flags++;
1044
0
            }
1045
1.01k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
1046
42
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (1046:21): [True: 0, False: 42]
1047
42
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
1048
42
                flags++;
1049
42
            }
1050
1.01k
            pm_buffer_append_byte(buffer, ']');
1051
1052
            // Dump the receiver field
1053
1.01k
            pm_buffer_append_byte(buffer, ',');
1054
1.01k
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
1055
1.01k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
1056
1057
            // Dump the call_operator_loc field
1058
1.01k
            pm_buffer_append_byte(buffer, ',');
1059
1.01k
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
1060
1.01k
            pm_dump_json_location(buffer, &cast->call_operator_loc);
1061
1062
            // Dump the name field
1063
1.01k
            pm_buffer_append_byte(buffer, ',');
1064
1.01k
            pm_buffer_append_string(buffer, "\"name\":", 7);
1065
1.01k
            pm_dump_json_constant(buffer, parser, cast->name);
1066
1067
            // Dump the message_loc field
1068
1.01k
            pm_buffer_append_byte(buffer, ',');
1069
1.01k
            pm_buffer_append_string(buffer, "\"message_loc\":", 14);
1070
1.01k
            pm_dump_json_location(buffer, &cast->message_loc);
1071
1072
1.01k
            pm_buffer_append_byte(buffer, '}');
1073
1.01k
            break;
1074
0
        }
1075
464
        case PM_CAPTURE_PATTERN_NODE: {
  Branch (1075:9): [True: 464, False: 1.00M]
1076
464
            pm_buffer_append_string(buffer, "{\"type\":\"CapturePatternNode\",\"location\":", 40);
1077
1078
464
            const pm_capture_pattern_node_t *cast = (const pm_capture_pattern_node_t *) node;
1079
464
            pm_dump_json_location(buffer, &cast->base.location);
1080
1081
            // Dump the value field
1082
464
            pm_buffer_append_byte(buffer, ',');
1083
464
            pm_buffer_append_string(buffer, "\"value\":", 8);
1084
464
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1085
1086
            // Dump the target field
1087
464
            pm_buffer_append_byte(buffer, ',');
1088
464
            pm_buffer_append_string(buffer, "\"target\":", 9);
1089
464
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->target);
1090
1091
            // Dump the operator_loc field
1092
464
            pm_buffer_append_byte(buffer, ',');
1093
464
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1094
464
            pm_dump_json_location(buffer, &cast->operator_loc);
1095
1096
464
            pm_buffer_append_byte(buffer, '}');
1097
464
            break;
1098
0
        }
1099
4.10k
        case PM_CASE_MATCH_NODE: {
  Branch (1099:9): [True: 4.10k, False: 1.00M]
1100
4.10k
            pm_buffer_append_string(buffer, "{\"type\":\"CaseMatchNode\",\"location\":", 35);
1101
1102
4.10k
            const pm_case_match_node_t *cast = (const pm_case_match_node_t *) node;
1103
4.10k
            pm_dump_json_location(buffer, &cast->base.location);
1104
1105
            // Dump the predicate field
1106
4.10k
            pm_buffer_append_byte(buffer, ',');
1107
4.10k
            pm_buffer_append_string(buffer, "\"predicate\":", 12);
1108
4.10k
            if (cast->predicate != NULL) {
  Branch (1108:17): [True: 4.02k, False: 85]
1109
4.02k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->predicate);
1110
4.02k
            } else {
1111
85
                pm_buffer_append_string(buffer, "null", 4);
1112
85
            }
1113
1114
            // Dump the conditions field
1115
4.10k
            pm_buffer_append_byte(buffer, ',');
1116
4.10k
            pm_buffer_append_string(buffer, "\"conditions\":", 13);
1117
4.10k
            const pm_node_list_t *conditions = &cast->conditions;
1118
4.10k
            pm_buffer_append_byte(buffer, '[');
1119
1120
10.5k
            for (size_t index = 0; index < conditions->size; 
index++6.47k
) {
  Branch (1120:36): [True: 6.47k, False: 4.10k]
1121
6.47k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')2.97k
;
  Branch (1121:21): [True: 2.97k, False: 3.49k]
1122
6.47k
                pm_dump_json(buffer, parser, conditions->nodes[index]);
1123
6.47k
            }
1124
4.10k
            pm_buffer_append_byte(buffer, ']');
1125
1126
            // Dump the else_clause field
1127
4.10k
            pm_buffer_append_byte(buffer, ',');
1128
4.10k
            pm_buffer_append_string(buffer, "\"else_clause\":", 14);
1129
4.10k
            if (cast->else_clause != NULL) {
  Branch (1129:17): [True: 384, False: 3.72k]
1130
384
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->else_clause);
1131
3.72k
            } else {
1132
3.72k
                pm_buffer_append_string(buffer, "null", 4);
1133
3.72k
            }
1134
1135
            // Dump the case_keyword_loc field
1136
4.10k
            pm_buffer_append_byte(buffer, ',');
1137
4.10k
            pm_buffer_append_string(buffer, "\"case_keyword_loc\":", 19);
1138
4.10k
            pm_dump_json_location(buffer, &cast->case_keyword_loc);
1139
1140
            // Dump the end_keyword_loc field
1141
4.10k
            pm_buffer_append_byte(buffer, ',');
1142
4.10k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
1143
4.10k
            pm_dump_json_location(buffer, &cast->end_keyword_loc);
1144
1145
4.10k
            pm_buffer_append_byte(buffer, '}');
1146
4.10k
            break;
1147
0
        }
1148
568
        case PM_CASE_NODE: {
  Branch (1148:9): [True: 568, False: 1.00M]
1149
568
            pm_buffer_append_string(buffer, "{\"type\":\"CaseNode\",\"location\":", 30);
1150
1151
568
            const pm_case_node_t *cast = (const pm_case_node_t *) node;
1152
568
            pm_dump_json_location(buffer, &cast->base.location);
1153
1154
            // Dump the predicate field
1155
568
            pm_buffer_append_byte(buffer, ',');
1156
568
            pm_buffer_append_string(buffer, "\"predicate\":", 12);
1157
568
            if (cast->predicate != NULL) {
  Branch (1157:17): [True: 318, False: 250]
1158
318
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->predicate);
1159
318
            } else {
1160
250
                pm_buffer_append_string(buffer, "null", 4);
1161
250
            }
1162
1163
            // Dump the conditions field
1164
568
            pm_buffer_append_byte(buffer, ',');
1165
568
            pm_buffer_append_string(buffer, "\"conditions\":", 13);
1166
568
            const pm_node_list_t *conditions = &cast->conditions;
1167
568
            pm_buffer_append_byte(buffer, '[');
1168
1169
1.18k
            for (size_t index = 0; index < conditions->size; 
index++616
) {
  Branch (1169:36): [True: 616, False: 568]
1170
616
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')93
;
  Branch (1170:21): [True: 93, False: 523]
1171
616
                pm_dump_json(buffer, parser, conditions->nodes[index]);
1172
616
            }
1173
568
            pm_buffer_append_byte(buffer, ']');
1174
1175
            // Dump the else_clause field
1176
568
            pm_buffer_append_byte(buffer, ',');
1177
568
            pm_buffer_append_string(buffer, "\"else_clause\":", 14);
1178
568
            if (cast->else_clause != NULL) {
  Branch (1178:17): [True: 167, False: 401]
1179
167
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->else_clause);
1180
401
            } else {
1181
401
                pm_buffer_append_string(buffer, "null", 4);
1182
401
            }
1183
1184
            // Dump the case_keyword_loc field
1185
568
            pm_buffer_append_byte(buffer, ',');
1186
568
            pm_buffer_append_string(buffer, "\"case_keyword_loc\":", 19);
1187
568
            pm_dump_json_location(buffer, &cast->case_keyword_loc);
1188
1189
            // Dump the end_keyword_loc field
1190
568
            pm_buffer_append_byte(buffer, ',');
1191
568
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
1192
568
            pm_dump_json_location(buffer, &cast->end_keyword_loc);
1193
1194
568
            pm_buffer_append_byte(buffer, '}');
1195
568
            break;
1196
0
        }
1197
1.62k
        case PM_CLASS_NODE: {
  Branch (1197:9): [True: 1.62k, False: 1.00M]
1198
1.62k
            pm_buffer_append_string(buffer, "{\"type\":\"ClassNode\",\"location\":", 31);
1199
1200
1.62k
            const pm_class_node_t *cast = (const pm_class_node_t *) node;
1201
1.62k
            pm_dump_json_location(buffer, &cast->base.location);
1202
1203
            // Dump the locals field
1204
1.62k
            pm_buffer_append_byte(buffer, ',');
1205
1.62k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
1206
1.62k
            const pm_constant_id_list_t *locals = &cast->locals;
1207
1.62k
            pm_buffer_append_byte(buffer, '[');
1208
1209
2.01k
            for (size_t index = 0; index < locals->size; 
index++385
) {
  Branch (1209:36): [True: 385, False: 1.62k]
1210
385
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')229
;
  Branch (1210:21): [True: 229, False: 156]
1211
385
                pm_dump_json_constant(buffer, parser, locals->ids[index]);
1212
385
            }
1213
1.62k
            pm_buffer_append_byte(buffer, ']');
1214
1215
            // Dump the class_keyword_loc field
1216
1.62k
            pm_buffer_append_byte(buffer, ',');
1217
1.62k
            pm_buffer_append_string(buffer, "\"class_keyword_loc\":", 20);
1218
1.62k
            pm_dump_json_location(buffer, &cast->class_keyword_loc);
1219
1220
            // Dump the constant_path field
1221
1.62k
            pm_buffer_append_byte(buffer, ',');
1222
1.62k
            pm_buffer_append_string(buffer, "\"constant_path\":", 16);
1223
1.62k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->constant_path);
1224
1225
            // Dump the inheritance_operator_loc field
1226
1.62k
            pm_buffer_append_byte(buffer, ',');
1227
1.62k
            pm_buffer_append_string(buffer, "\"inheritance_operator_loc\":", 27);
1228
1.62k
            if (cast->inheritance_operator_loc.length != 0) {
  Branch (1228:17): [True: 464, False: 1.16k]
1229
464
                pm_dump_json_location(buffer, &cast->inheritance_operator_loc);
1230
1.16k
            } else {
1231
1.16k
                pm_buffer_append_string(buffer, "null", 4);
1232
1.16k
            }
1233
1234
            // Dump the superclass field
1235
1.62k
            pm_buffer_append_byte(buffer, ',');
1236
1.62k
            pm_buffer_append_string(buffer, "\"superclass\":", 13);
1237
1.62k
            if (cast->superclass != NULL) {
  Branch (1237:17): [True: 464, False: 1.16k]
1238
464
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->superclass);
1239
1.16k
            } else {
1240
1.16k
                pm_buffer_append_string(buffer, "null", 4);
1241
1.16k
            }
1242
1243
            // Dump the body field
1244
1.62k
            pm_buffer_append_byte(buffer, ',');
1245
1.62k
            pm_buffer_append_string(buffer, "\"body\":", 7);
1246
1.62k
            if (cast->body != NULL) {
  Branch (1246:17): [True: 1.54k, False: 85]
1247
1.54k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->body);
1248
1.54k
            } else {
1249
85
                pm_buffer_append_string(buffer, "null", 4);
1250
85
            }
1251
1252
            // Dump the end_keyword_loc field
1253
1.62k
            pm_buffer_append_byte(buffer, ',');
1254
1.62k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
1255
1.62k
            pm_dump_json_location(buffer, &cast->end_keyword_loc);
1256
1257
            // Dump the name field
1258
1.62k
            pm_buffer_append_byte(buffer, ',');
1259
1.62k
            pm_buffer_append_string(buffer, "\"name\":", 7);
1260
1.62k
            pm_dump_json_constant(buffer, parser, cast->name);
1261
1262
1.62k
            pm_buffer_append_byte(buffer, '}');
1263
1.62k
            break;
1264
0
        }
1265
11
        case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
  Branch (1265:9): [True: 11, False: 1.00M]
1266
11
            pm_buffer_append_string(buffer, "{\"type\":\"ClassVariableAndWriteNode\",\"location\":", 47);
1267
1268
11
            const pm_class_variable_and_write_node_t *cast = (const pm_class_variable_and_write_node_t *) node;
1269
11
            pm_dump_json_location(buffer, &cast->base.location);
1270
1271
            // Dump the name field
1272
11
            pm_buffer_append_byte(buffer, ',');
1273
11
            pm_buffer_append_string(buffer, "\"name\":", 7);
1274
11
            pm_dump_json_constant(buffer, parser, cast->name);
1275
1276
            // Dump the name_loc field
1277
11
            pm_buffer_append_byte(buffer, ',');
1278
11
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1279
11
            pm_dump_json_location(buffer, &cast->name_loc);
1280
1281
            // Dump the operator_loc field
1282
11
            pm_buffer_append_byte(buffer, ',');
1283
11
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1284
11
            pm_dump_json_location(buffer, &cast->operator_loc);
1285
1286
            // Dump the value field
1287
11
            pm_buffer_append_byte(buffer, ',');
1288
11
            pm_buffer_append_string(buffer, "\"value\":", 8);
1289
11
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1290
1291
11
            pm_buffer_append_byte(buffer, '}');
1292
11
            break;
1293
0
        }
1294
4
        case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
  Branch (1294:9): [True: 4, False: 1.00M]
1295
4
            pm_buffer_append_string(buffer, "{\"type\":\"ClassVariableOperatorWriteNode\",\"location\":", 52);
1296
1297
4
            const pm_class_variable_operator_write_node_t *cast = (const pm_class_variable_operator_write_node_t *) node;
1298
4
            pm_dump_json_location(buffer, &cast->base.location);
1299
1300
            // Dump the name field
1301
4
            pm_buffer_append_byte(buffer, ',');
1302
4
            pm_buffer_append_string(buffer, "\"name\":", 7);
1303
4
            pm_dump_json_constant(buffer, parser, cast->name);
1304
1305
            // Dump the name_loc field
1306
4
            pm_buffer_append_byte(buffer, ',');
1307
4
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1308
4
            pm_dump_json_location(buffer, &cast->name_loc);
1309
1310
            // Dump the binary_operator_loc field
1311
4
            pm_buffer_append_byte(buffer, ',');
1312
4
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
1313
4
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
1314
1315
            // Dump the value field
1316
4
            pm_buffer_append_byte(buffer, ',');
1317
4
            pm_buffer_append_string(buffer, "\"value\":", 8);
1318
4
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1319
1320
            // Dump the binary_operator field
1321
4
            pm_buffer_append_byte(buffer, ',');
1322
4
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
1323
4
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
1324
1325
4
            pm_buffer_append_byte(buffer, '}');
1326
4
            break;
1327
0
        }
1328
7
        case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
  Branch (1328:9): [True: 7, False: 1.00M]
1329
7
            pm_buffer_append_string(buffer, "{\"type\":\"ClassVariableOrWriteNode\",\"location\":", 46);
1330
1331
7
            const pm_class_variable_or_write_node_t *cast = (const pm_class_variable_or_write_node_t *) node;
1332
7
            pm_dump_json_location(buffer, &cast->base.location);
1333
1334
            // Dump the name field
1335
7
            pm_buffer_append_byte(buffer, ',');
1336
7
            pm_buffer_append_string(buffer, "\"name\":", 7);
1337
7
            pm_dump_json_constant(buffer, parser, cast->name);
1338
1339
            // Dump the name_loc field
1340
7
            pm_buffer_append_byte(buffer, ',');
1341
7
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1342
7
            pm_dump_json_location(buffer, &cast->name_loc);
1343
1344
            // Dump the operator_loc field
1345
7
            pm_buffer_append_byte(buffer, ',');
1346
7
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1347
7
            pm_dump_json_location(buffer, &cast->operator_loc);
1348
1349
            // Dump the value field
1350
7
            pm_buffer_append_byte(buffer, ',');
1351
7
            pm_buffer_append_string(buffer, "\"value\":", 8);
1352
7
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1353
1354
7
            pm_buffer_append_byte(buffer, '}');
1355
7
            break;
1356
0
        }
1357
1.03k
        case PM_CLASS_VARIABLE_READ_NODE: {
  Branch (1357:9): [True: 1.03k, False: 1.00M]
1358
1.03k
            pm_buffer_append_string(buffer, "{\"type\":\"ClassVariableReadNode\",\"location\":", 43);
1359
1360
1.03k
            const pm_class_variable_read_node_t *cast = (const pm_class_variable_read_node_t *) node;
1361
1.03k
            pm_dump_json_location(buffer, &cast->base.location);
1362
1363
            // Dump the name field
1364
1.03k
            pm_buffer_append_byte(buffer, ',');
1365
1.03k
            pm_buffer_append_string(buffer, "\"name\":", 7);
1366
1.03k
            pm_dump_json_constant(buffer, parser, cast->name);
1367
1368
1.03k
            pm_buffer_append_byte(buffer, '}');
1369
1.03k
            break;
1370
0
        }
1371
466
        case PM_CLASS_VARIABLE_TARGET_NODE: {
  Branch (1371:9): [True: 466, False: 1.00M]
1372
466
            pm_buffer_append_string(buffer, "{\"type\":\"ClassVariableTargetNode\",\"location\":", 45);
1373
1374
466
            const pm_class_variable_target_node_t *cast = (const pm_class_variable_target_node_t *) node;
1375
466
            pm_dump_json_location(buffer, &cast->base.location);
1376
1377
            // Dump the name field
1378
466
            pm_buffer_append_byte(buffer, ',');
1379
466
            pm_buffer_append_string(buffer, "\"name\":", 7);
1380
466
            pm_dump_json_constant(buffer, parser, cast->name);
1381
1382
466
            pm_buffer_append_byte(buffer, '}');
1383
466
            break;
1384
0
        }
1385
200
        case PM_CLASS_VARIABLE_WRITE_NODE: {
  Branch (1385:9): [True: 200, False: 1.00M]
1386
200
            pm_buffer_append_string(buffer, "{\"type\":\"ClassVariableWriteNode\",\"location\":", 44);
1387
1388
200
            const pm_class_variable_write_node_t *cast = (const pm_class_variable_write_node_t *) node;
1389
200
            pm_dump_json_location(buffer, &cast->base.location);
1390
1391
            // Dump the name field
1392
200
            pm_buffer_append_byte(buffer, ',');
1393
200
            pm_buffer_append_string(buffer, "\"name\":", 7);
1394
200
            pm_dump_json_constant(buffer, parser, cast->name);
1395
1396
            // Dump the name_loc field
1397
200
            pm_buffer_append_byte(buffer, ',');
1398
200
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1399
200
            pm_dump_json_location(buffer, &cast->name_loc);
1400
1401
            // Dump the value field
1402
200
            pm_buffer_append_byte(buffer, ',');
1403
200
            pm_buffer_append_string(buffer, "\"value\":", 8);
1404
200
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1405
1406
            // Dump the operator_loc field
1407
200
            pm_buffer_append_byte(buffer, ',');
1408
200
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1409
200
            pm_dump_json_location(buffer, &cast->operator_loc);
1410
1411
200
            pm_buffer_append_byte(buffer, '}');
1412
200
            break;
1413
0
        }
1414
113
        case PM_CONSTANT_AND_WRITE_NODE: {
  Branch (1414:9): [True: 113, False: 1.00M]
1415
113
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantAndWriteNode\",\"location\":", 42);
1416
1417
113
            const pm_constant_and_write_node_t *cast = (const pm_constant_and_write_node_t *) node;
1418
113
            pm_dump_json_location(buffer, &cast->base.location);
1419
1420
            // Dump the name field
1421
113
            pm_buffer_append_byte(buffer, ',');
1422
113
            pm_buffer_append_string(buffer, "\"name\":", 7);
1423
113
            pm_dump_json_constant(buffer, parser, cast->name);
1424
1425
            // Dump the name_loc field
1426
113
            pm_buffer_append_byte(buffer, ',');
1427
113
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1428
113
            pm_dump_json_location(buffer, &cast->name_loc);
1429
1430
            // Dump the operator_loc field
1431
113
            pm_buffer_append_byte(buffer, ',');
1432
113
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1433
113
            pm_dump_json_location(buffer, &cast->operator_loc);
1434
1435
            // Dump the value field
1436
113
            pm_buffer_append_byte(buffer, ',');
1437
113
            pm_buffer_append_string(buffer, "\"value\":", 8);
1438
113
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1439
1440
113
            pm_buffer_append_byte(buffer, '}');
1441
113
            break;
1442
0
        }
1443
216
        case PM_CONSTANT_OPERATOR_WRITE_NODE: {
  Branch (1443:9): [True: 216, False: 1.00M]
1444
216
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantOperatorWriteNode\",\"location\":", 47);
1445
1446
216
            const pm_constant_operator_write_node_t *cast = (const pm_constant_operator_write_node_t *) node;
1447
216
            pm_dump_json_location(buffer, &cast->base.location);
1448
1449
            // Dump the name field
1450
216
            pm_buffer_append_byte(buffer, ',');
1451
216
            pm_buffer_append_string(buffer, "\"name\":", 7);
1452
216
            pm_dump_json_constant(buffer, parser, cast->name);
1453
1454
            // Dump the name_loc field
1455
216
            pm_buffer_append_byte(buffer, ',');
1456
216
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1457
216
            pm_dump_json_location(buffer, &cast->name_loc);
1458
1459
            // Dump the binary_operator_loc field
1460
216
            pm_buffer_append_byte(buffer, ',');
1461
216
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
1462
216
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
1463
1464
            // Dump the value field
1465
216
            pm_buffer_append_byte(buffer, ',');
1466
216
            pm_buffer_append_string(buffer, "\"value\":", 8);
1467
216
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1468
1469
            // Dump the binary_operator field
1470
216
            pm_buffer_append_byte(buffer, ',');
1471
216
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
1472
216
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
1473
1474
216
            pm_buffer_append_byte(buffer, '}');
1475
216
            break;
1476
0
        }
1477
301
        case PM_CONSTANT_OR_WRITE_NODE: {
  Branch (1477:9): [True: 301, False: 1.00M]
1478
301
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantOrWriteNode\",\"location\":", 41);
1479
1480
301
            const pm_constant_or_write_node_t *cast = (const pm_constant_or_write_node_t *) node;
1481
301
            pm_dump_json_location(buffer, &cast->base.location);
1482
1483
            // Dump the name field
1484
301
            pm_buffer_append_byte(buffer, ',');
1485
301
            pm_buffer_append_string(buffer, "\"name\":", 7);
1486
301
            pm_dump_json_constant(buffer, parser, cast->name);
1487
1488
            // Dump the name_loc field
1489
301
            pm_buffer_append_byte(buffer, ',');
1490
301
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1491
301
            pm_dump_json_location(buffer, &cast->name_loc);
1492
1493
            // Dump the operator_loc field
1494
301
            pm_buffer_append_byte(buffer, ',');
1495
301
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1496
301
            pm_dump_json_location(buffer, &cast->operator_loc);
1497
1498
            // Dump the value field
1499
301
            pm_buffer_append_byte(buffer, ',');
1500
301
            pm_buffer_append_string(buffer, "\"value\":", 8);
1501
301
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1502
1503
301
            pm_buffer_append_byte(buffer, '}');
1504
301
            break;
1505
0
        }
1506
9
        case PM_CONSTANT_PATH_AND_WRITE_NODE: {
  Branch (1506:9): [True: 9, False: 1.00M]
1507
9
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantPathAndWriteNode\",\"location\":", 46);
1508
1509
9
            const pm_constant_path_and_write_node_t *cast = (const pm_constant_path_and_write_node_t *) node;
1510
9
            pm_dump_json_location(buffer, &cast->base.location);
1511
1512
            // Dump the target field
1513
9
            pm_buffer_append_byte(buffer, ',');
1514
9
            pm_buffer_append_string(buffer, "\"target\":", 9);
1515
9
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->target);
1516
1517
            // Dump the operator_loc field
1518
9
            pm_buffer_append_byte(buffer, ',');
1519
9
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1520
9
            pm_dump_json_location(buffer, &cast->operator_loc);
1521
1522
            // Dump the value field
1523
9
            pm_buffer_append_byte(buffer, ',');
1524
9
            pm_buffer_append_string(buffer, "\"value\":", 8);
1525
9
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1526
1527
9
            pm_buffer_append_byte(buffer, '}');
1528
9
            break;
1529
0
        }
1530
4.68k
        case PM_CONSTANT_PATH_NODE: {
  Branch (1530:9): [True: 4.68k, False: 1.00M]
1531
4.68k
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantPathNode\",\"location\":", 38);
1532
1533
4.68k
            const pm_constant_path_node_t *cast = (const pm_constant_path_node_t *) node;
1534
4.68k
            pm_dump_json_location(buffer, &cast->base.location);
1535
1536
            // Dump the parent field
1537
4.68k
            pm_buffer_append_byte(buffer, ',');
1538
4.68k
            pm_buffer_append_string(buffer, "\"parent\":", 9);
1539
4.68k
            if (cast->parent != NULL) {
  Branch (1539:17): [True: 3.13k, False: 1.55k]
1540
3.13k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->parent);
1541
3.13k
            } else {
1542
1.55k
                pm_buffer_append_string(buffer, "null", 4);
1543
1.55k
            }
1544
1545
            // Dump the name field
1546
4.68k
            pm_buffer_append_byte(buffer, ',');
1547
4.68k
            pm_buffer_append_string(buffer, "\"name\":", 7);
1548
4.68k
            if (cast->name != PM_CONSTANT_ID_UNSET) {
  Branch (1548:17): [True: 3.68k, False: 995]
1549
3.68k
                pm_dump_json_constant(buffer, parser, cast->name);
1550
3.68k
            } else {
1551
995
                pm_buffer_append_string(buffer, "null", 4);
1552
995
            }
1553
1554
            // Dump the delimiter_loc field
1555
4.68k
            pm_buffer_append_byte(buffer, ',');
1556
4.68k
            pm_buffer_append_string(buffer, "\"delimiter_loc\":", 16);
1557
4.68k
            pm_dump_json_location(buffer, &cast->delimiter_loc);
1558
1559
            // Dump the name_loc field
1560
4.68k
            pm_buffer_append_byte(buffer, ',');
1561
4.68k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1562
4.68k
            pm_dump_json_location(buffer, &cast->name_loc);
1563
1564
4.68k
            pm_buffer_append_byte(buffer, '}');
1565
4.68k
            break;
1566
0
        }
1567
4
        case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
  Branch (1567:9): [True: 4, False: 1.00M]
1568
4
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantPathOperatorWriteNode\",\"location\":", 51);
1569
1570
4
            const pm_constant_path_operator_write_node_t *cast = (const pm_constant_path_operator_write_node_t *) node;
1571
4
            pm_dump_json_location(buffer, &cast->base.location);
1572
1573
            // Dump the target field
1574
4
            pm_buffer_append_byte(buffer, ',');
1575
4
            pm_buffer_append_string(buffer, "\"target\":", 9);
1576
4
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->target);
1577
1578
            // Dump the binary_operator_loc field
1579
4
            pm_buffer_append_byte(buffer, ',');
1580
4
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
1581
4
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
1582
1583
            // Dump the value field
1584
4
            pm_buffer_append_byte(buffer, ',');
1585
4
            pm_buffer_append_string(buffer, "\"value\":", 8);
1586
4
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1587
1588
            // Dump the binary_operator field
1589
4
            pm_buffer_append_byte(buffer, ',');
1590
4
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
1591
4
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
1592
1593
4
            pm_buffer_append_byte(buffer, '}');
1594
4
            break;
1595
0
        }
1596
50
        case PM_CONSTANT_PATH_OR_WRITE_NODE: {
  Branch (1596:9): [True: 50, False: 1.00M]
1597
50
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantPathOrWriteNode\",\"location\":", 45);
1598
1599
50
            const pm_constant_path_or_write_node_t *cast = (const pm_constant_path_or_write_node_t *) node;
1600
50
            pm_dump_json_location(buffer, &cast->base.location);
1601
1602
            // Dump the target field
1603
50
            pm_buffer_append_byte(buffer, ',');
1604
50
            pm_buffer_append_string(buffer, "\"target\":", 9);
1605
50
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->target);
1606
1607
            // Dump the operator_loc field
1608
50
            pm_buffer_append_byte(buffer, ',');
1609
50
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1610
50
            pm_dump_json_location(buffer, &cast->operator_loc);
1611
1612
            // Dump the value field
1613
50
            pm_buffer_append_byte(buffer, ',');
1614
50
            pm_buffer_append_string(buffer, "\"value\":", 8);
1615
50
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1616
1617
50
            pm_buffer_append_byte(buffer, '}');
1618
50
            break;
1619
0
        }
1620
116
        case PM_CONSTANT_PATH_TARGET_NODE: {
  Branch (1620:9): [True: 116, False: 1.00M]
1621
116
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantPathTargetNode\",\"location\":", 44);
1622
1623
116
            const pm_constant_path_target_node_t *cast = (const pm_constant_path_target_node_t *) node;
1624
116
            pm_dump_json_location(buffer, &cast->base.location);
1625
1626
            // Dump the parent field
1627
116
            pm_buffer_append_byte(buffer, ',');
1628
116
            pm_buffer_append_string(buffer, "\"parent\":", 9);
1629
116
            if (cast->parent != NULL) {
  Branch (1629:17): [True: 46, False: 70]
1630
46
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->parent);
1631
70
            } else {
1632
70
                pm_buffer_append_string(buffer, "null", 4);
1633
70
            }
1634
1635
            // Dump the name field
1636
116
            pm_buffer_append_byte(buffer, ',');
1637
116
            pm_buffer_append_string(buffer, "\"name\":", 7);
1638
116
            if (cast->name != PM_CONSTANT_ID_UNSET) {
  Branch (1638:17): [True: 91, False: 25]
1639
91
                pm_dump_json_constant(buffer, parser, cast->name);
1640
91
            } else {
1641
25
                pm_buffer_append_string(buffer, "null", 4);
1642
25
            }
1643
1644
            // Dump the delimiter_loc field
1645
116
            pm_buffer_append_byte(buffer, ',');
1646
116
            pm_buffer_append_string(buffer, "\"delimiter_loc\":", 16);
1647
116
            pm_dump_json_location(buffer, &cast->delimiter_loc);
1648
1649
            // Dump the name_loc field
1650
116
            pm_buffer_append_byte(buffer, ',');
1651
116
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1652
116
            pm_dump_json_location(buffer, &cast->name_loc);
1653
1654
116
            pm_buffer_append_byte(buffer, '}');
1655
116
            break;
1656
0
        }
1657
794
        case PM_CONSTANT_PATH_WRITE_NODE: {
  Branch (1657:9): [True: 794, False: 1.00M]
1658
794
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantPathWriteNode\",\"location\":", 43);
1659
1660
794
            const pm_constant_path_write_node_t *cast = (const pm_constant_path_write_node_t *) node;
1661
794
            pm_dump_json_location(buffer, &cast->base.location);
1662
1663
            // Dump the target field
1664
794
            pm_buffer_append_byte(buffer, ',');
1665
794
            pm_buffer_append_string(buffer, "\"target\":", 9);
1666
794
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->target);
1667
1668
            // Dump the operator_loc field
1669
794
            pm_buffer_append_byte(buffer, ',');
1670
794
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1671
794
            pm_dump_json_location(buffer, &cast->operator_loc);
1672
1673
            // Dump the value field
1674
794
            pm_buffer_append_byte(buffer, ',');
1675
794
            pm_buffer_append_string(buffer, "\"value\":", 8);
1676
794
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1677
1678
794
            pm_buffer_append_byte(buffer, '}');
1679
794
            break;
1680
0
        }
1681
21.0k
        case PM_CONSTANT_READ_NODE: {
  Branch (1681:9): [True: 21.0k, False: 985k]
1682
21.0k
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantReadNode\",\"location\":", 38);
1683
1684
21.0k
            const pm_constant_read_node_t *cast = (const pm_constant_read_node_t *) node;
1685
21.0k
            pm_dump_json_location(buffer, &cast->base.location);
1686
1687
            // Dump the name field
1688
21.0k
            pm_buffer_append_byte(buffer, ',');
1689
21.0k
            pm_buffer_append_string(buffer, "\"name\":", 7);
1690
21.0k
            pm_dump_json_constant(buffer, parser, cast->name);
1691
1692
21.0k
            pm_buffer_append_byte(buffer, '}');
1693
21.0k
            break;
1694
0
        }
1695
558
        case PM_CONSTANT_TARGET_NODE: {
  Branch (1695:9): [True: 558, False: 1.00M]
1696
558
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantTargetNode\",\"location\":", 40);
1697
1698
558
            const pm_constant_target_node_t *cast = (const pm_constant_target_node_t *) node;
1699
558
            pm_dump_json_location(buffer, &cast->base.location);
1700
1701
            // Dump the name field
1702
558
            pm_buffer_append_byte(buffer, ',');
1703
558
            pm_buffer_append_string(buffer, "\"name\":", 7);
1704
558
            pm_dump_json_constant(buffer, parser, cast->name);
1705
1706
558
            pm_buffer_append_byte(buffer, '}');
1707
558
            break;
1708
0
        }
1709
1.00k
        case PM_CONSTANT_WRITE_NODE: {
  Branch (1709:9): [True: 1.00k, False: 1.00M]
1710
1.00k
            pm_buffer_append_string(buffer, "{\"type\":\"ConstantWriteNode\",\"location\":", 39);
1711
1712
1.00k
            const pm_constant_write_node_t *cast = (const pm_constant_write_node_t *) node;
1713
1.00k
            pm_dump_json_location(buffer, &cast->base.location);
1714
1715
            // Dump the name field
1716
1.00k
            pm_buffer_append_byte(buffer, ',');
1717
1.00k
            pm_buffer_append_string(buffer, "\"name\":", 7);
1718
1.00k
            pm_dump_json_constant(buffer, parser, cast->name);
1719
1720
            // Dump the name_loc field
1721
1.00k
            pm_buffer_append_byte(buffer, ',');
1722
1.00k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1723
1.00k
            pm_dump_json_location(buffer, &cast->name_loc);
1724
1725
            // Dump the value field
1726
1.00k
            pm_buffer_append_byte(buffer, ',');
1727
1.00k
            pm_buffer_append_string(buffer, "\"value\":", 8);
1728
1.00k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1729
1730
            // Dump the operator_loc field
1731
1.00k
            pm_buffer_append_byte(buffer, ',');
1732
1.00k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1733
1.00k
            pm_dump_json_location(buffer, &cast->operator_loc);
1734
1735
1.00k
            pm_buffer_append_byte(buffer, '}');
1736
1.00k
            break;
1737
0
        }
1738
22.2k
        case PM_DEF_NODE: {
  Branch (1738:9): [True: 22.2k, False: 983k]
1739
22.2k
            pm_buffer_append_string(buffer, "{\"type\":\"DefNode\",\"location\":", 29);
1740
1741
22.2k
            const pm_def_node_t *cast = (const pm_def_node_t *) node;
1742
22.2k
            pm_dump_json_location(buffer, &cast->base.location);
1743
1744
            // Dump the name field
1745
22.2k
            pm_buffer_append_byte(buffer, ',');
1746
22.2k
            pm_buffer_append_string(buffer, "\"name\":", 7);
1747
22.2k
            pm_dump_json_constant(buffer, parser, cast->name);
1748
1749
            // Dump the name_loc field
1750
22.2k
            pm_buffer_append_byte(buffer, ',');
1751
22.2k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
1752
22.2k
            pm_dump_json_location(buffer, &cast->name_loc);
1753
1754
            // Dump the receiver field
1755
22.2k
            pm_buffer_append_byte(buffer, ',');
1756
22.2k
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
1757
22.2k
            if (cast->receiver != NULL) {
  Branch (1757:17): [True: 1.94k, False: 20.3k]
1758
1.94k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
1759
20.3k
            } else {
1760
20.3k
                pm_buffer_append_string(buffer, "null", 4);
1761
20.3k
            }
1762
1763
            // Dump the parameters field
1764
22.2k
            pm_buffer_append_byte(buffer, ',');
1765
22.2k
            pm_buffer_append_string(buffer, "\"parameters\":", 13);
1766
22.2k
            if (cast->parameters != NULL) {
  Branch (1766:17): [True: 16.4k, False: 5.80k]
1767
16.4k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->parameters);
1768
16.4k
            } else {
1769
5.80k
                pm_buffer_append_string(buffer, "null", 4);
1770
5.80k
            }
1771
1772
            // Dump the body field
1773
22.2k
            pm_buffer_append_byte(buffer, ',');
1774
22.2k
            pm_buffer_append_string(buffer, "\"body\":", 7);
1775
22.2k
            if (cast->body != NULL) {
  Branch (1775:17): [True: 7.81k, False: 14.4k]
1776
7.81k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->body);
1777
14.4k
            } else {
1778
14.4k
                pm_buffer_append_string(buffer, "null", 4);
1779
14.4k
            }
1780
1781
            // Dump the locals field
1782
22.2k
            pm_buffer_append_byte(buffer, ',');
1783
22.2k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
1784
22.2k
            const pm_constant_id_list_t *locals = &cast->locals;
1785
22.2k
            pm_buffer_append_byte(buffer, '[');
1786
1787
54.4k
            for (size_t index = 0; index < locals->size; 
index++32.1k
) {
  Branch (1787:36): [True: 32.1k, False: 22.2k]
1788
32.1k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')17.3k
;
  Branch (1788:21): [True: 17.3k, False: 14.7k]
1789
32.1k
                pm_dump_json_constant(buffer, parser, locals->ids[index]);
1790
32.1k
            }
1791
22.2k
            pm_buffer_append_byte(buffer, ']');
1792
1793
            // Dump the def_keyword_loc field
1794
22.2k
            pm_buffer_append_byte(buffer, ',');
1795
22.2k
            pm_buffer_append_string(buffer, "\"def_keyword_loc\":", 18);
1796
22.2k
            pm_dump_json_location(buffer, &cast->def_keyword_loc);
1797
1798
            // Dump the operator_loc field
1799
22.2k
            pm_buffer_append_byte(buffer, ',');
1800
22.2k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1801
22.2k
            if (cast->operator_loc.length != 0) {
  Branch (1801:17): [True: 1.78k, False: 20.4k]
1802
1.78k
                pm_dump_json_location(buffer, &cast->operator_loc);
1803
20.4k
            } else {
1804
20.4k
                pm_buffer_append_string(buffer, "null", 4);
1805
20.4k
            }
1806
1807
            // Dump the lparen_loc field
1808
22.2k
            pm_buffer_append_byte(buffer, ',');
1809
22.2k
            pm_buffer_append_string(buffer, "\"lparen_loc\":", 13);
1810
22.2k
            if (cast->lparen_loc.length != 0) {
  Branch (1810:17): [True: 9.25k, False: 13.0k]
1811
9.25k
                pm_dump_json_location(buffer, &cast->lparen_loc);
1812
13.0k
            } else {
1813
13.0k
                pm_buffer_append_string(buffer, "null", 4);
1814
13.0k
            }
1815
1816
            // Dump the rparen_loc field
1817
22.2k
            pm_buffer_append_byte(buffer, ',');
1818
22.2k
            pm_buffer_append_string(buffer, "\"rparen_loc\":", 13);
1819
22.2k
            if (cast->rparen_loc.length != 0) {
  Branch (1819:17): [True: 7.49k, False: 14.7k]
1820
7.49k
                pm_dump_json_location(buffer, &cast->rparen_loc);
1821
14.7k
            } else {
1822
14.7k
                pm_buffer_append_string(buffer, "null", 4);
1823
14.7k
            }
1824
1825
            // Dump the equal_loc field
1826
22.2k
            pm_buffer_append_byte(buffer, ',');
1827
22.2k
            pm_buffer_append_string(buffer, "\"equal_loc\":", 12);
1828
22.2k
            if (cast->equal_loc.length != 0) {
  Branch (1828:17): [True: 608, False: 21.6k]
1829
608
                pm_dump_json_location(buffer, &cast->equal_loc);
1830
21.6k
            } else {
1831
21.6k
                pm_buffer_append_string(buffer, "null", 4);
1832
21.6k
            }
1833
1834
            // Dump the end_keyword_loc field
1835
22.2k
            pm_buffer_append_byte(buffer, ',');
1836
22.2k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
1837
22.2k
            if (cast->end_keyword_loc.length != 0) {
  Branch (1837:17): [True: 19.3k, False: 2.90k]
1838
19.3k
                pm_dump_json_location(buffer, &cast->end_keyword_loc);
1839
19.3k
            } else {
1840
2.90k
                pm_buffer_append_string(buffer, "null", 4);
1841
2.90k
            }
1842
1843
22.2k
            pm_buffer_append_byte(buffer, '}');
1844
22.2k
            break;
1845
0
        }
1846
166
        case PM_DEFINED_NODE: {
  Branch (1846:9): [True: 166, False: 1.00M]
1847
166
            pm_buffer_append_string(buffer, "{\"type\":\"DefinedNode\",\"location\":", 33);
1848
1849
166
            const pm_defined_node_t *cast = (const pm_defined_node_t *) node;
1850
166
            pm_dump_json_location(buffer, &cast->base.location);
1851
1852
            // Dump the lparen_loc field
1853
166
            pm_buffer_append_byte(buffer, ',');
1854
166
            pm_buffer_append_string(buffer, "\"lparen_loc\":", 13);
1855
166
            if (cast->lparen_loc.length != 0) {
  Branch (1855:17): [True: 83, False: 83]
1856
83
                pm_dump_json_location(buffer, &cast->lparen_loc);
1857
83
            } else {
1858
83
                pm_buffer_append_string(buffer, "null", 4);
1859
83
            }
1860
1861
            // Dump the value field
1862
166
            pm_buffer_append_byte(buffer, ',');
1863
166
            pm_buffer_append_string(buffer, "\"value\":", 8);
1864
166
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
1865
1866
            // Dump the rparen_loc field
1867
166
            pm_buffer_append_byte(buffer, ',');
1868
166
            pm_buffer_append_string(buffer, "\"rparen_loc\":", 13);
1869
166
            if (cast->rparen_loc.length != 0) {
  Branch (1869:17): [True: 50, False: 116]
1870
50
                pm_dump_json_location(buffer, &cast->rparen_loc);
1871
116
            } else {
1872
116
                pm_buffer_append_string(buffer, "null", 4);
1873
116
            }
1874
1875
            // Dump the keyword_loc field
1876
166
            pm_buffer_append_byte(buffer, ',');
1877
166
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
1878
166
            pm_dump_json_location(buffer, &cast->keyword_loc);
1879
1880
166
            pm_buffer_append_byte(buffer, '}');
1881
166
            break;
1882
0
        }
1883
2.58k
        case PM_ELSE_NODE: {
  Branch (1883:9): [True: 2.58k, False: 1.00M]
1884
2.58k
            pm_buffer_append_string(buffer, "{\"type\":\"ElseNode\",\"location\":", 30);
1885
1886
2.58k
            const pm_else_node_t *cast = (const pm_else_node_t *) node;
1887
2.58k
            pm_dump_json_location(buffer, &cast->base.location);
1888
1889
            // Dump the else_keyword_loc field
1890
2.58k
            pm_buffer_append_byte(buffer, ',');
1891
2.58k
            pm_buffer_append_string(buffer, "\"else_keyword_loc\":", 19);
1892
2.58k
            pm_dump_json_location(buffer, &cast->else_keyword_loc);
1893
1894
            // Dump the statements field
1895
2.58k
            pm_buffer_append_byte(buffer, ',');
1896
2.58k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
1897
2.58k
            if (cast->statements != NULL) {
  Branch (1897:17): [True: 2.18k, False: 404]
1898
2.18k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
1899
2.18k
            } else {
1900
404
                pm_buffer_append_string(buffer, "null", 4);
1901
404
            }
1902
1903
            // Dump the end_keyword_loc field
1904
2.58k
            pm_buffer_append_byte(buffer, ',');
1905
2.58k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
1906
2.58k
            if (cast->end_keyword_loc.length != 0) {
  Branch (1906:17): [True: 1.18k, False: 1.40k]
1907
1.18k
                pm_dump_json_location(buffer, &cast->end_keyword_loc);
1908
1.40k
            } else {
1909
1.40k
                pm_buffer_append_string(buffer, "null", 4);
1910
1.40k
            }
1911
1912
2.58k
            pm_buffer_append_byte(buffer, '}');
1913
2.58k
            break;
1914
0
        }
1915
7.29k
        case PM_EMBEDDED_STATEMENTS_NODE: {
  Branch (1915:9): [True: 7.29k, False: 998k]
1916
7.29k
            pm_buffer_append_string(buffer, "{\"type\":\"EmbeddedStatementsNode\",\"location\":", 44);
1917
1918
7.29k
            const pm_embedded_statements_node_t *cast = (const pm_embedded_statements_node_t *) node;
1919
7.29k
            pm_dump_json_location(buffer, &cast->base.location);
1920
1921
            // Dump the opening_loc field
1922
7.29k
            pm_buffer_append_byte(buffer, ',');
1923
7.29k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
1924
7.29k
            pm_dump_json_location(buffer, &cast->opening_loc);
1925
1926
            // Dump the statements field
1927
7.29k
            pm_buffer_append_byte(buffer, ',');
1928
7.29k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
1929
7.29k
            if (cast->statements != NULL) {
  Branch (1929:17): [True: 4.86k, False: 2.43k]
1930
4.86k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
1931
4.86k
            } else {
1932
2.43k
                pm_buffer_append_string(buffer, "null", 4);
1933
2.43k
            }
1934
1935
            // Dump the closing_loc field
1936
7.29k
            pm_buffer_append_byte(buffer, ',');
1937
7.29k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
1938
7.29k
            pm_dump_json_location(buffer, &cast->closing_loc);
1939
1940
7.29k
            pm_buffer_append_byte(buffer, '}');
1941
7.29k
            break;
1942
0
        }
1943
950
        case PM_EMBEDDED_VARIABLE_NODE: {
  Branch (1943:9): [True: 950, False: 1.00M]
1944
950
            pm_buffer_append_string(buffer, "{\"type\":\"EmbeddedVariableNode\",\"location\":", 42);
1945
1946
950
            const pm_embedded_variable_node_t *cast = (const pm_embedded_variable_node_t *) node;
1947
950
            pm_dump_json_location(buffer, &cast->base.location);
1948
1949
            // Dump the operator_loc field
1950
950
            pm_buffer_append_byte(buffer, ',');
1951
950
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
1952
950
            pm_dump_json_location(buffer, &cast->operator_loc);
1953
1954
            // Dump the variable field
1955
950
            pm_buffer_append_byte(buffer, ',');
1956
950
            pm_buffer_append_string(buffer, "\"variable\":", 11);
1957
950
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->variable);
1958
1959
950
            pm_buffer_append_byte(buffer, '}');
1960
950
            break;
1961
0
        }
1962
913
        case PM_ENSURE_NODE: {
  Branch (1962:9): [True: 913, False: 1.00M]
1963
913
            pm_buffer_append_string(buffer, "{\"type\":\"EnsureNode\",\"location\":", 32);
1964
1965
913
            const pm_ensure_node_t *cast = (const pm_ensure_node_t *) node;
1966
913
            pm_dump_json_location(buffer, &cast->base.location);
1967
1968
            // Dump the ensure_keyword_loc field
1969
913
            pm_buffer_append_byte(buffer, ',');
1970
913
            pm_buffer_append_string(buffer, "\"ensure_keyword_loc\":", 21);
1971
913
            pm_dump_json_location(buffer, &cast->ensure_keyword_loc);
1972
1973
            // Dump the statements field
1974
913
            pm_buffer_append_byte(buffer, ',');
1975
913
            pm_buffer_append_string(buffer, "\"statements\":", 13);
1976
913
            if (cast->statements != NULL) {
  Branch (1976:17): [True: 456, False: 457]
1977
456
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
1978
457
            } else {
1979
457
                pm_buffer_append_string(buffer, "null", 4);
1980
457
            }
1981
1982
            // Dump the end_keyword_loc field
1983
913
            pm_buffer_append_byte(buffer, ',');
1984
913
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
1985
913
            pm_dump_json_location(buffer, &cast->end_keyword_loc);
1986
1987
913
            pm_buffer_append_byte(buffer, '}');
1988
913
            break;
1989
0
        }
1990
111k
        case PM_ERROR_RECOVERY_NODE: {
  Branch (1990:9): [True: 111k, False: 894k]
1991
111k
            pm_buffer_append_string(buffer, "{\"type\":\"ErrorRecoveryNode\",\"location\":", 39);
1992
1993
111k
            const pm_error_recovery_node_t *cast = (const pm_error_recovery_node_t *) node;
1994
111k
            pm_dump_json_location(buffer, &cast->base.location);
1995
1996
            // Dump the unexpected field
1997
111k
            pm_buffer_append_byte(buffer, ',');
1998
111k
            pm_buffer_append_string(buffer, "\"unexpected\":", 13);
1999
111k
            if (cast->unexpected != NULL) {
  Branch (1999:17): [True: 594, False: 110k]
2000
594
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->unexpected);
2001
110k
            } else {
2002
110k
                pm_buffer_append_string(buffer, "null", 4);
2003
110k
            }
2004
2005
111k
            pm_buffer_append_byte(buffer, '}');
2006
111k
            break;
2007
0
        }
2008
1.04k
        case PM_FALSE_NODE: {
  Branch (2008:9): [True: 1.04k, False: 1.00M]
2009
1.04k
            pm_buffer_append_string(buffer, "{\"type\":\"FalseNode\",\"location\":", 31);
2010
2011
1.04k
            const pm_false_node_t *cast = (const pm_false_node_t *) node;
2012
1.04k
            pm_dump_json_location(buffer, &cast->base.location);
2013
2014
1.04k
            pm_buffer_append_byte(buffer, '}');
2015
1.04k
            break;
2016
0
        }
2017
58
        case PM_FIND_PATTERN_NODE: {
  Branch (2017:9): [True: 58, False: 1.00M]
2018
58
            pm_buffer_append_string(buffer, "{\"type\":\"FindPatternNode\",\"location\":", 37);
2019
2020
58
            const pm_find_pattern_node_t *cast = (const pm_find_pattern_node_t *) node;
2021
58
            pm_dump_json_location(buffer, &cast->base.location);
2022
2023
            // Dump the constant field
2024
58
            pm_buffer_append_byte(buffer, ',');
2025
58
            pm_buffer_append_string(buffer, "\"constant\":", 11);
2026
58
            if (cast->constant != NULL) {
  Branch (2026:17): [True: 33, False: 25]
2027
33
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->constant);
2028
33
            } else {
2029
25
                pm_buffer_append_string(buffer, "null", 4);
2030
25
            }
2031
2032
            // Dump the left field
2033
58
            pm_buffer_append_byte(buffer, ',');
2034
58
            pm_buffer_append_string(buffer, "\"left\":", 7);
2035
58
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->left);
2036
2037
            // Dump the requireds field
2038
58
            pm_buffer_append_byte(buffer, ',');
2039
58
            pm_buffer_append_string(buffer, "\"requireds\":", 12);
2040
58
            const pm_node_list_t *requireds = &cast->requireds;
2041
58
            pm_buffer_append_byte(buffer, '[');
2042
2043
124
            for (size_t index = 0; index < requireds->size; 
index++66
) {
  Branch (2043:36): [True: 66, False: 58]
2044
66
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')10
;
  Branch (2044:21): [True: 10, False: 56]
2045
66
                pm_dump_json(buffer, parser, requireds->nodes[index]);
2046
66
            }
2047
58
            pm_buffer_append_byte(buffer, ']');
2048
2049
            // Dump the right field
2050
58
            pm_buffer_append_byte(buffer, ',');
2051
58
            pm_buffer_append_string(buffer, "\"right\":", 8);
2052
58
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->right);
2053
2054
            // Dump the opening_loc field
2055
58
            pm_buffer_append_byte(buffer, ',');
2056
58
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
2057
58
            if (cast->opening_loc.length != 0) {
  Branch (2057:17): [True: 50, False: 8]
2058
50
                pm_dump_json_location(buffer, &cast->opening_loc);
2059
50
            } else {
2060
8
                pm_buffer_append_string(buffer, "null", 4);
2061
8
            }
2062
2063
            // Dump the closing_loc field
2064
58
            pm_buffer_append_byte(buffer, ',');
2065
58
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
2066
58
            if (cast->closing_loc.length != 0) {
  Branch (2066:17): [True: 46, False: 12]
2067
46
                pm_dump_json_location(buffer, &cast->closing_loc);
2068
46
            } else {
2069
12
                pm_buffer_append_string(buffer, "null", 4);
2070
12
            }
2071
2072
58
            pm_buffer_append_byte(buffer, '}');
2073
58
            break;
2074
0
        }
2075
301
        case PM_FLIP_FLOP_NODE: {
  Branch (2075:9): [True: 301, False: 1.00M]
2076
301
            pm_buffer_append_string(buffer, "{\"type\":\"FlipFlopNode\",\"location\":", 34);
2077
2078
301
            const pm_flip_flop_node_t *cast = (const pm_flip_flop_node_t *) node;
2079
301
            pm_dump_json_location(buffer, &cast->base.location);
2080
2081
            // Dump the RangeFlags field
2082
301
            pm_buffer_append_byte(buffer, ',');
2083
301
            pm_buffer_append_string(buffer, "\"flags\":", 8);
2084
301
            size_t flags = 0;
2085
301
            pm_buffer_append_byte(buffer, '[');
2086
301
            if (PM_NODE_FLAG_P(cast, PM_RANGE_FLAGS_EXCLUDE_END)) {
2087
127
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (2087:21): [True: 0, False: 127]
2088
127
                pm_buffer_append_string(buffer, "\"EXCLUDE_END\"", 13);
2089
127
                flags++;
2090
127
            }
2091
301
            pm_buffer_append_byte(buffer, ']');
2092
2093
            // Dump the left field
2094
301
            pm_buffer_append_byte(buffer, ',');
2095
301
            pm_buffer_append_string(buffer, "\"left\":", 7);
2096
301
            if (cast->left != NULL) {
  Branch (2096:17): [True: 147, False: 154]
2097
147
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->left);
2098
154
            } else {
2099
154
                pm_buffer_append_string(buffer, "null", 4);
2100
154
            }
2101
2102
            // Dump the right field
2103
301
            pm_buffer_append_byte(buffer, ',');
2104
301
            pm_buffer_append_string(buffer, "\"right\":", 8);
2105
301
            if (cast->right != NULL) {
  Branch (2105:17): [True: 264, False: 37]
2106
264
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->right);
2107
264
            } else {
2108
37
                pm_buffer_append_string(buffer, "null", 4);
2109
37
            }
2110
2111
            // Dump the operator_loc field
2112
301
            pm_buffer_append_byte(buffer, ',');
2113
301
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
2114
301
            pm_dump_json_location(buffer, &cast->operator_loc);
2115
2116
301
            pm_buffer_append_byte(buffer, '}');
2117
301
            break;
2118
0
        }
2119
2.59k
        case PM_FLOAT_NODE: {
  Branch (2119:9): [True: 2.59k, False: 1.00M]
2120
2.59k
            pm_buffer_append_string(buffer, "{\"type\":\"FloatNode\",\"location\":", 31);
2121
2122
2.59k
            const pm_float_node_t *cast = (const pm_float_node_t *) node;
2123
2.59k
            pm_dump_json_location(buffer, &cast->base.location);
2124
2125
            // Dump the value field
2126
2.59k
            pm_buffer_append_byte(buffer, ',');
2127
2.59k
            pm_buffer_append_string(buffer, "\"value\":", 8);
2128
2.59k
            pm_buffer_append_format(buffer, "%f", cast->value);
2129
2130
2.59k
            pm_buffer_append_byte(buffer, '}');
2131
2.59k
            break;
2132
0
        }
2133
186
        case PM_FOR_NODE: {
  Branch (2133:9): [True: 186, False: 1.00M]
2134
186
            pm_buffer_append_string(buffer, "{\"type\":\"ForNode\",\"location\":", 29);
2135
2136
186
            const pm_for_node_t *cast = (const pm_for_node_t *) node;
2137
186
            pm_dump_json_location(buffer, &cast->base.location);
2138
2139
            // Dump the index field
2140
186
            pm_buffer_append_byte(buffer, ',');
2141
186
            pm_buffer_append_string(buffer, "\"index\":", 8);
2142
186
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->index);
2143
2144
            // Dump the collection field
2145
186
            pm_buffer_append_byte(buffer, ',');
2146
186
            pm_buffer_append_string(buffer, "\"collection\":", 13);
2147
186
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->collection);
2148
2149
            // Dump the statements field
2150
186
            pm_buffer_append_byte(buffer, ',');
2151
186
            pm_buffer_append_string(buffer, "\"statements\":", 13);
2152
186
            if (cast->statements != NULL) {
  Branch (2152:17): [True: 178, False: 8]
2153
178
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
2154
178
            } else {
2155
8
                pm_buffer_append_string(buffer, "null", 4);
2156
8
            }
2157
2158
            // Dump the for_keyword_loc field
2159
186
            pm_buffer_append_byte(buffer, ',');
2160
186
            pm_buffer_append_string(buffer, "\"for_keyword_loc\":", 18);
2161
186
            pm_dump_json_location(buffer, &cast->for_keyword_loc);
2162
2163
            // Dump the in_keyword_loc field
2164
186
            pm_buffer_append_byte(buffer, ',');
2165
186
            pm_buffer_append_string(buffer, "\"in_keyword_loc\":", 17);
2166
186
            pm_dump_json_location(buffer, &cast->in_keyword_loc);
2167
2168
            // Dump the do_keyword_loc field
2169
186
            pm_buffer_append_byte(buffer, ',');
2170
186
            pm_buffer_append_string(buffer, "\"do_keyword_loc\":", 17);
2171
186
            if (cast->do_keyword_loc.length != 0) {
  Branch (2171:17): [True: 76, False: 110]
2172
76
                pm_dump_json_location(buffer, &cast->do_keyword_loc);
2173
110
            } else {
2174
110
                pm_buffer_append_string(buffer, "null", 4);
2175
110
            }
2176
2177
            // Dump the end_keyword_loc field
2178
186
            pm_buffer_append_byte(buffer, ',');
2179
186
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
2180
186
            pm_dump_json_location(buffer, &cast->end_keyword_loc);
2181
2182
186
            pm_buffer_append_byte(buffer, '}');
2183
186
            break;
2184
0
        }
2185
291
        case PM_FORWARDING_ARGUMENTS_NODE: {
  Branch (2185:9): [True: 291, False: 1.00M]
2186
291
            pm_buffer_append_string(buffer, "{\"type\":\"ForwardingArgumentsNode\",\"location\":", 45);
2187
2188
291
            const pm_forwarding_arguments_node_t *cast = (const pm_forwarding_arguments_node_t *) node;
2189
291
            pm_dump_json_location(buffer, &cast->base.location);
2190
2191
291
            pm_buffer_append_byte(buffer, '}');
2192
291
            break;
2193
0
        }
2194
373
        case PM_FORWARDING_PARAMETER_NODE: {
  Branch (2194:9): [True: 373, False: 1.00M]
2195
373
            pm_buffer_append_string(buffer, "{\"type\":\"ForwardingParameterNode\",\"location\":", 45);
2196
2197
373
            const pm_forwarding_parameter_node_t *cast = (const pm_forwarding_parameter_node_t *) node;
2198
373
            pm_dump_json_location(buffer, &cast->base.location);
2199
2200
373
            pm_buffer_append_byte(buffer, '}');
2201
373
            break;
2202
0
        }
2203
71
        case PM_FORWARDING_SUPER_NODE: {
  Branch (2203:9): [True: 71, False: 1.00M]
2204
71
            pm_buffer_append_string(buffer, "{\"type\":\"ForwardingSuperNode\",\"location\":", 41);
2205
2206
71
            const pm_forwarding_super_node_t *cast = (const pm_forwarding_super_node_t *) node;
2207
71
            pm_dump_json_location(buffer, &cast->base.location);
2208
2209
            // Dump the keyword_loc field
2210
71
            pm_buffer_append_byte(buffer, ',');
2211
71
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
2212
71
            pm_dump_json_location(buffer, &cast->keyword_loc);
2213
2214
            // Dump the block field
2215
71
            pm_buffer_append_byte(buffer, ',');
2216
71
            pm_buffer_append_string(buffer, "\"block\":", 8);
2217
71
            if (cast->block != NULL) {
  Branch (2217:17): [True: 19, False: 52]
2218
19
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
2219
52
            } else {
2220
52
                pm_buffer_append_string(buffer, "null", 4);
2221
52
            }
2222
2223
71
            pm_buffer_append_byte(buffer, '}');
2224
71
            break;
2225
0
        }
2226
27
        case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
  Branch (2226:9): [True: 27, False: 1.00M]
2227
27
            pm_buffer_append_string(buffer, "{\"type\":\"GlobalVariableAndWriteNode\",\"location\":", 48);
2228
2229
27
            const pm_global_variable_and_write_node_t *cast = (const pm_global_variable_and_write_node_t *) node;
2230
27
            pm_dump_json_location(buffer, &cast->base.location);
2231
2232
            // Dump the name field
2233
27
            pm_buffer_append_byte(buffer, ',');
2234
27
            pm_buffer_append_string(buffer, "\"name\":", 7);
2235
27
            pm_dump_json_constant(buffer, parser, cast->name);
2236
2237
            // Dump the name_loc field
2238
27
            pm_buffer_append_byte(buffer, ',');
2239
27
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
2240
27
            pm_dump_json_location(buffer, &cast->name_loc);
2241
2242
            // Dump the operator_loc field
2243
27
            pm_buffer_append_byte(buffer, ',');
2244
27
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
2245
27
            pm_dump_json_location(buffer, &cast->operator_loc);
2246
2247
            // Dump the value field
2248
27
            pm_buffer_append_byte(buffer, ',');
2249
27
            pm_buffer_append_string(buffer, "\"value\":", 8);
2250
27
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2251
2252
27
            pm_buffer_append_byte(buffer, '}');
2253
27
            break;
2254
0
        }
2255
21
        case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
  Branch (2255:9): [True: 21, False: 1.00M]
2256
21
            pm_buffer_append_string(buffer, "{\"type\":\"GlobalVariableOperatorWriteNode\",\"location\":", 53);
2257
2258
21
            const pm_global_variable_operator_write_node_t *cast = (const pm_global_variable_operator_write_node_t *) node;
2259
21
            pm_dump_json_location(buffer, &cast->base.location);
2260
2261
            // Dump the name field
2262
21
            pm_buffer_append_byte(buffer, ',');
2263
21
            pm_buffer_append_string(buffer, "\"name\":", 7);
2264
21
            pm_dump_json_constant(buffer, parser, cast->name);
2265
2266
            // Dump the name_loc field
2267
21
            pm_buffer_append_byte(buffer, ',');
2268
21
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
2269
21
            pm_dump_json_location(buffer, &cast->name_loc);
2270
2271
            // Dump the binary_operator_loc field
2272
21
            pm_buffer_append_byte(buffer, ',');
2273
21
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
2274
21
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
2275
2276
            // Dump the value field
2277
21
            pm_buffer_append_byte(buffer, ',');
2278
21
            pm_buffer_append_string(buffer, "\"value\":", 8);
2279
21
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2280
2281
            // Dump the binary_operator field
2282
21
            pm_buffer_append_byte(buffer, ',');
2283
21
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
2284
21
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
2285
2286
21
            pm_buffer_append_byte(buffer, '}');
2287
21
            break;
2288
0
        }
2289
13
        case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
  Branch (2289:9): [True: 13, False: 1.00M]
2290
13
            pm_buffer_append_string(buffer, "{\"type\":\"GlobalVariableOrWriteNode\",\"location\":", 47);
2291
2292
13
            const pm_global_variable_or_write_node_t *cast = (const pm_global_variable_or_write_node_t *) node;
2293
13
            pm_dump_json_location(buffer, &cast->base.location);
2294
2295
            // Dump the name field
2296
13
            pm_buffer_append_byte(buffer, ',');
2297
13
            pm_buffer_append_string(buffer, "\"name\":", 7);
2298
13
            pm_dump_json_constant(buffer, parser, cast->name);
2299
2300
            // Dump the name_loc field
2301
13
            pm_buffer_append_byte(buffer, ',');
2302
13
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
2303
13
            pm_dump_json_location(buffer, &cast->name_loc);
2304
2305
            // Dump the operator_loc field
2306
13
            pm_buffer_append_byte(buffer, ',');
2307
13
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
2308
13
            pm_dump_json_location(buffer, &cast->operator_loc);
2309
2310
            // Dump the value field
2311
13
            pm_buffer_append_byte(buffer, ',');
2312
13
            pm_buffer_append_string(buffer, "\"value\":", 8);
2313
13
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2314
2315
13
            pm_buffer_append_byte(buffer, '}');
2316
13
            break;
2317
0
        }
2318
7.49k
        case PM_GLOBAL_VARIABLE_READ_NODE: {
  Branch (2318:9): [True: 7.49k, False: 998k]
2319
7.49k
            pm_buffer_append_string(buffer, "{\"type\":\"GlobalVariableReadNode\",\"location\":", 44);
2320
2321
7.49k
            const pm_global_variable_read_node_t *cast = (const pm_global_variable_read_node_t *) node;
2322
7.49k
            pm_dump_json_location(buffer, &cast->base.location);
2323
2324
            // Dump the name field
2325
7.49k
            pm_buffer_append_byte(buffer, ',');
2326
7.49k
            pm_buffer_append_string(buffer, "\"name\":", 7);
2327
7.49k
            pm_dump_json_constant(buffer, parser, cast->name);
2328
2329
7.49k
            pm_buffer_append_byte(buffer, '}');
2330
7.49k
            break;
2331
0
        }
2332
825
        case PM_GLOBAL_VARIABLE_TARGET_NODE: {
  Branch (2332:9): [True: 825, False: 1.00M]
2333
825
            pm_buffer_append_string(buffer, "{\"type\":\"GlobalVariableTargetNode\",\"location\":", 46);
2334
2335
825
            const pm_global_variable_target_node_t *cast = (const pm_global_variable_target_node_t *) node;
2336
825
            pm_dump_json_location(buffer, &cast->base.location);
2337
2338
            // Dump the name field
2339
825
            pm_buffer_append_byte(buffer, ',');
2340
825
            pm_buffer_append_string(buffer, "\"name\":", 7);
2341
825
            pm_dump_json_constant(buffer, parser, cast->name);
2342
2343
825
            pm_buffer_append_byte(buffer, '}');
2344
825
            break;
2345
0
        }
2346
1.43k
        case PM_GLOBAL_VARIABLE_WRITE_NODE: {
  Branch (2346:9): [True: 1.43k, False: 1.00M]
2347
1.43k
            pm_buffer_append_string(buffer, "{\"type\":\"GlobalVariableWriteNode\",\"location\":", 45);
2348
2349
1.43k
            const pm_global_variable_write_node_t *cast = (const pm_global_variable_write_node_t *) node;
2350
1.43k
            pm_dump_json_location(buffer, &cast->base.location);
2351
2352
            // Dump the name field
2353
1.43k
            pm_buffer_append_byte(buffer, ',');
2354
1.43k
            pm_buffer_append_string(buffer, "\"name\":", 7);
2355
1.43k
            pm_dump_json_constant(buffer, parser, cast->name);
2356
2357
            // Dump the name_loc field
2358
1.43k
            pm_buffer_append_byte(buffer, ',');
2359
1.43k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
2360
1.43k
            pm_dump_json_location(buffer, &cast->name_loc);
2361
2362
            // Dump the value field
2363
1.43k
            pm_buffer_append_byte(buffer, ',');
2364
1.43k
            pm_buffer_append_string(buffer, "\"value\":", 8);
2365
1.43k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2366
2367
            // Dump the operator_loc field
2368
1.43k
            pm_buffer_append_byte(buffer, ',');
2369
1.43k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
2370
1.43k
            pm_dump_json_location(buffer, &cast->operator_loc);
2371
2372
1.43k
            pm_buffer_append_byte(buffer, '}');
2373
1.43k
            break;
2374
0
        }
2375
9.48k
        case PM_HASH_NODE: {
  Branch (2375:9): [True: 9.48k, False: 996k]
2376
9.48k
            pm_buffer_append_string(buffer, "{\"type\":\"HashNode\",\"location\":", 30);
2377
2378
9.48k
            const pm_hash_node_t *cast = (const pm_hash_node_t *) node;
2379
9.48k
            pm_dump_json_location(buffer, &cast->base.location);
2380
2381
            // Dump the opening_loc field
2382
9.48k
            pm_buffer_append_byte(buffer, ',');
2383
9.48k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
2384
9.48k
            pm_dump_json_location(buffer, &cast->opening_loc);
2385
2386
            // Dump the elements field
2387
9.48k
            pm_buffer_append_byte(buffer, ',');
2388
9.48k
            pm_buffer_append_string(buffer, "\"elements\":", 11);
2389
9.48k
            const pm_node_list_t *elements = &cast->elements;
2390
9.48k
            pm_buffer_append_byte(buffer, '[');
2391
2392
19.8k
            for (size_t index = 0; index < elements->size; 
index++10.3k
) {
  Branch (2392:36): [True: 10.3k, False: 9.48k]
2393
10.3k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')1.50k
;
  Branch (2393:21): [True: 1.50k, False: 8.84k]
2394
10.3k
                pm_dump_json(buffer, parser, elements->nodes[index]);
2395
10.3k
            }
2396
9.48k
            pm_buffer_append_byte(buffer, ']');
2397
2398
            // Dump the closing_loc field
2399
9.48k
            pm_buffer_append_byte(buffer, ',');
2400
9.48k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
2401
9.48k
            pm_dump_json_location(buffer, &cast->closing_loc);
2402
2403
9.48k
            pm_buffer_append_byte(buffer, '}');
2404
9.48k
            break;
2405
0
        }
2406
2.88k
        case PM_HASH_PATTERN_NODE: {
  Branch (2406:9): [True: 2.88k, False: 1.00M]
2407
2.88k
            pm_buffer_append_string(buffer, "{\"type\":\"HashPatternNode\",\"location\":", 37);
2408
2409
2.88k
            const pm_hash_pattern_node_t *cast = (const pm_hash_pattern_node_t *) node;
2410
2.88k
            pm_dump_json_location(buffer, &cast->base.location);
2411
2412
            // Dump the constant field
2413
2.88k
            pm_buffer_append_byte(buffer, ',');
2414
2.88k
            pm_buffer_append_string(buffer, "\"constant\":", 11);
2415
2.88k
            if (cast->constant != NULL) {
  Branch (2415:17): [True: 233, False: 2.65k]
2416
233
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->constant);
2417
2.65k
            } else {
2418
2.65k
                pm_buffer_append_string(buffer, "null", 4);
2419
2.65k
            }
2420
2421
            // Dump the elements field
2422
2.88k
            pm_buffer_append_byte(buffer, ',');
2423
2.88k
            pm_buffer_append_string(buffer, "\"elements\":", 11);
2424
2.88k
            const pm_node_list_t *elements = &cast->elements;
2425
2.88k
            pm_buffer_append_byte(buffer, '[');
2426
2427
7.30k
            for (size_t index = 0; index < elements->size; 
index++4.42k
) {
  Branch (2427:36): [True: 4.42k, False: 2.88k]
2428
4.42k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')2.46k
;
  Branch (2428:21): [True: 2.46k, False: 1.95k]
2429
4.42k
                pm_dump_json(buffer, parser, elements->nodes[index]);
2430
4.42k
            }
2431
2.88k
            pm_buffer_append_byte(buffer, ']');
2432
2433
            // Dump the rest field
2434
2.88k
            pm_buffer_append_byte(buffer, ',');
2435
2.88k
            pm_buffer_append_string(buffer, "\"rest\":", 7);
2436
2.88k
            if (cast->rest != NULL) {
  Branch (2436:17): [True: 582, False: 2.30k]
2437
582
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->rest);
2438
2.30k
            } else {
2439
2.30k
                pm_buffer_append_string(buffer, "null", 4);
2440
2.30k
            }
2441
2442
            // Dump the opening_loc field
2443
2.88k
            pm_buffer_append_byte(buffer, ',');
2444
2.88k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
2445
2.88k
            if (cast->opening_loc.length != 0) {
  Branch (2445:17): [True: 1.99k, False: 892]
2446
1.99k
                pm_dump_json_location(buffer, &cast->opening_loc);
2447
1.99k
            } else {
2448
892
                pm_buffer_append_string(buffer, "null", 4);
2449
892
            }
2450
2451
            // Dump the closing_loc field
2452
2.88k
            pm_buffer_append_byte(buffer, ',');
2453
2.88k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
2454
2.88k
            if (cast->closing_loc.length != 0) {
  Branch (2454:17): [True: 1.67k, False: 1.21k]
2455
1.67k
                pm_dump_json_location(buffer, &cast->closing_loc);
2456
1.67k
            } else {
2457
1.21k
                pm_buffer_append_string(buffer, "null", 4);
2458
1.21k
            }
2459
2460
2.88k
            pm_buffer_append_byte(buffer, '}');
2461
2.88k
            break;
2462
0
        }
2463
3.02k
        case PM_IF_NODE: {
  Branch (2463:9): [True: 3.02k, False: 1.00M]
2464
3.02k
            pm_buffer_append_string(buffer, "{\"type\":\"IfNode\",\"location\":", 28);
2465
2466
3.02k
            const pm_if_node_t *cast = (const pm_if_node_t *) node;
2467
3.02k
            pm_dump_json_location(buffer, &cast->base.location);
2468
2469
            // Dump the if_keyword_loc field
2470
3.02k
            pm_buffer_append_byte(buffer, ',');
2471
3.02k
            pm_buffer_append_string(buffer, "\"if_keyword_loc\":", 17);
2472
3.02k
            if (cast->if_keyword_loc.length != 0) {
  Branch (2472:17): [True: 1.77k, False: 1.24k]
2473
1.77k
                pm_dump_json_location(buffer, &cast->if_keyword_loc);
2474
1.77k
            } else {
2475
1.24k
                pm_buffer_append_string(buffer, "null", 4);
2476
1.24k
            }
2477
2478
            // Dump the predicate field
2479
3.02k
            pm_buffer_append_byte(buffer, ',');
2480
3.02k
            pm_buffer_append_string(buffer, "\"predicate\":", 12);
2481
3.02k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->predicate);
2482
2483
            // Dump the then_keyword_loc field
2484
3.02k
            pm_buffer_append_byte(buffer, ',');
2485
3.02k
            pm_buffer_append_string(buffer, "\"then_keyword_loc\":", 19);
2486
3.02k
            if (cast->then_keyword_loc.length != 0) {
  Branch (2486:17): [True: 1.49k, False: 1.52k]
2487
1.49k
                pm_dump_json_location(buffer, &cast->then_keyword_loc);
2488
1.52k
            } else {
2489
1.52k
                pm_buffer_append_string(buffer, "null", 4);
2490
1.52k
            }
2491
2492
            // Dump the statements field
2493
3.02k
            pm_buffer_append_byte(buffer, ',');
2494
3.02k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
2495
3.02k
            if (cast->statements != NULL) {
  Branch (2495:17): [True: 2.84k, False: 173]
2496
2.84k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
2497
2.84k
            } else {
2498
173
                pm_buffer_append_string(buffer, "null", 4);
2499
173
            }
2500
2501
            // Dump the subsequent field
2502
3.02k
            pm_buffer_append_byte(buffer, ',');
2503
3.02k
            pm_buffer_append_string(buffer, "\"subsequent\":", 13);
2504
3.02k
            if (cast->subsequent != NULL) {
  Branch (2504:17): [True: 1.60k, False: 1.41k]
2505
1.60k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->subsequent);
2506
1.60k
            } else {
2507
1.41k
                pm_buffer_append_string(buffer, "null", 4);
2508
1.41k
            }
2509
2510
            // Dump the end_keyword_loc field
2511
3.02k
            pm_buffer_append_byte(buffer, ',');
2512
3.02k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
2513
3.02k
            if (cast->end_keyword_loc.length != 0) {
  Branch (2513:17): [True: 708, False: 2.31k]
2514
708
                pm_dump_json_location(buffer, &cast->end_keyword_loc);
2515
2.31k
            } else {
2516
2.31k
                pm_buffer_append_string(buffer, "null", 4);
2517
2.31k
            }
2518
2519
3.02k
            pm_buffer_append_byte(buffer, '}');
2520
3.02k
            break;
2521
0
        }
2522
1.93k
        case PM_IMAGINARY_NODE: {
  Branch (2522:9): [True: 1.93k, False: 1.00M]
2523
1.93k
            pm_buffer_append_string(buffer, "{\"type\":\"ImaginaryNode\",\"location\":", 35);
2524
2525
1.93k
            const pm_imaginary_node_t *cast = (const pm_imaginary_node_t *) node;
2526
1.93k
            pm_dump_json_location(buffer, &cast->base.location);
2527
2528
            // Dump the numeric field
2529
1.93k
            pm_buffer_append_byte(buffer, ',');
2530
1.93k
            pm_buffer_append_string(buffer, "\"numeric\":", 10);
2531
1.93k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->numeric);
2532
2533
1.93k
            pm_buffer_append_byte(buffer, '}');
2534
1.93k
            break;
2535
0
        }
2536
3.88k
        case PM_IMPLICIT_NODE: {
  Branch (2536:9): [True: 3.88k, False: 1.00M]
2537
3.88k
            pm_buffer_append_string(buffer, "{\"type\":\"ImplicitNode\",\"location\":", 34);
2538
2539
3.88k
            const pm_implicit_node_t *cast = (const pm_implicit_node_t *) node;
2540
3.88k
            pm_dump_json_location(buffer, &cast->base.location);
2541
2542
            // Dump the value field
2543
3.88k
            pm_buffer_append_byte(buffer, ',');
2544
3.88k
            pm_buffer_append_string(buffer, "\"value\":", 8);
2545
3.88k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2546
2547
3.88k
            pm_buffer_append_byte(buffer, '}');
2548
3.88k
            break;
2549
0
        }
2550
2.18k
        case PM_IMPLICIT_REST_NODE: {
  Branch (2550:9): [True: 2.18k, False: 1.00M]
2551
2.18k
            pm_buffer_append_string(buffer, "{\"type\":\"ImplicitRestNode\",\"location\":", 38);
2552
2553
2.18k
            const pm_implicit_rest_node_t *cast = (const pm_implicit_rest_node_t *) node;
2554
2.18k
            pm_dump_json_location(buffer, &cast->base.location);
2555
2556
2.18k
            pm_buffer_append_byte(buffer, '}');
2557
2.18k
            break;
2558
0
        }
2559
6.47k
        case PM_IN_NODE: {
  Branch (2559:9): [True: 6.47k, False: 999k]
2560
6.47k
            pm_buffer_append_string(buffer, "{\"type\":\"InNode\",\"location\":", 28);
2561
2562
6.47k
            const pm_in_node_t *cast = (const pm_in_node_t *) node;
2563
6.47k
            pm_dump_json_location(buffer, &cast->base.location);
2564
2565
            // Dump the pattern field
2566
6.47k
            pm_buffer_append_byte(buffer, ',');
2567
6.47k
            pm_buffer_append_string(buffer, "\"pattern\":", 10);
2568
6.47k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->pattern);
2569
2570
            // Dump the statements field
2571
6.47k
            pm_buffer_append_byte(buffer, ',');
2572
6.47k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
2573
6.47k
            if (cast->statements != NULL) {
  Branch (2573:17): [True: 4.36k, False: 2.10k]
2574
4.36k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
2575
4.36k
            } else {
2576
2.10k
                pm_buffer_append_string(buffer, "null", 4);
2577
2.10k
            }
2578
2579
            // Dump the in_keyword_loc field
2580
6.47k
            pm_buffer_append_byte(buffer, ',');
2581
6.47k
            pm_buffer_append_string(buffer, "\"in_keyword_loc\":", 17);
2582
6.47k
            pm_dump_json_location(buffer, &cast->in_keyword_loc);
2583
2584
            // Dump the then_keyword_loc field
2585
6.47k
            pm_buffer_append_byte(buffer, ',');
2586
6.47k
            pm_buffer_append_string(buffer, "\"then_keyword_loc\":", 19);
2587
6.47k
            if (cast->then_keyword_loc.length != 0) {
  Branch (2587:17): [True: 2.71k, False: 3.76k]
2588
2.71k
                pm_dump_json_location(buffer, &cast->then_keyword_loc);
2589
3.76k
            } else {
2590
3.76k
                pm_buffer_append_string(buffer, "null", 4);
2591
3.76k
            }
2592
2593
6.47k
            pm_buffer_append_byte(buffer, '}');
2594
6.47k
            break;
2595
0
        }
2596
406
        case PM_INDEX_AND_WRITE_NODE: {
  Branch (2596:9): [True: 406, False: 1.00M]
2597
406
            pm_buffer_append_string(buffer, "{\"type\":\"IndexAndWriteNode\",\"location\":", 39);
2598
2599
406
            const pm_index_and_write_node_t *cast = (const pm_index_and_write_node_t *) node;
2600
406
            pm_dump_json_location(buffer, &cast->base.location);
2601
2602
            // Dump the CallNodeFlags field
2603
406
            pm_buffer_append_byte(buffer, ',');
2604
406
            pm_buffer_append_string(buffer, "\"flags\":", 8);
2605
406
            size_t flags = 0;
2606
406
            pm_buffer_append_byte(buffer, '[');
2607
406
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
2608
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2608:21): [True: 0, False: 0]
2609
0
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
2610
0
                flags++;
2611
0
            }
2612
406
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
2613
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2613:21): [True: 0, False: 0]
2614
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
2615
0
                flags++;
2616
0
            }
2617
406
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
2618
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2618:21): [True: 0, False: 0]
2619
0
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
2620
0
                flags++;
2621
0
            }
2622
406
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
2623
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2623:21): [True: 0, False: 0]
2624
0
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
2625
0
                flags++;
2626
0
            }
2627
406
            pm_buffer_append_byte(buffer, ']');
2628
2629
            // Dump the receiver field
2630
406
            pm_buffer_append_byte(buffer, ',');
2631
406
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
2632
406
            if (cast->receiver != NULL) {
  Branch (2632:17): [True: 406, False: 0]
2633
406
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
2634
406
            } else {
2635
0
                pm_buffer_append_string(buffer, "null", 4);
2636
0
            }
2637
2638
            // Dump the call_operator_loc field
2639
406
            pm_buffer_append_byte(buffer, ',');
2640
406
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
2641
406
            if (cast->call_operator_loc.length != 0) {
  Branch (2641:17): [True: 0, False: 406]
2642
0
                pm_dump_json_location(buffer, &cast->call_operator_loc);
2643
406
            } else {
2644
406
                pm_buffer_append_string(buffer, "null", 4);
2645
406
            }
2646
2647
            // Dump the opening_loc field
2648
406
            pm_buffer_append_byte(buffer, ',');
2649
406
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
2650
406
            pm_dump_json_location(buffer, &cast->opening_loc);
2651
2652
            // Dump the arguments field
2653
406
            pm_buffer_append_byte(buffer, ',');
2654
406
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
2655
406
            if (cast->arguments != NULL) {
  Branch (2655:17): [True: 248, False: 158]
2656
248
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
2657
248
            } else {
2658
158
                pm_buffer_append_string(buffer, "null", 4);
2659
158
            }
2660
2661
            // Dump the closing_loc field
2662
406
            pm_buffer_append_byte(buffer, ',');
2663
406
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
2664
406
            pm_dump_json_location(buffer, &cast->closing_loc);
2665
2666
            // Dump the block field
2667
406
            pm_buffer_append_byte(buffer, ',');
2668
406
            pm_buffer_append_string(buffer, "\"block\":", 8);
2669
406
            if (cast->block != NULL) {
  Branch (2669:17): [True: 6, False: 400]
2670
6
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
2671
400
            } else {
2672
400
                pm_buffer_append_string(buffer, "null", 4);
2673
400
            }
2674
2675
            // Dump the operator_loc field
2676
406
            pm_buffer_append_byte(buffer, ',');
2677
406
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
2678
406
            pm_dump_json_location(buffer, &cast->operator_loc);
2679
2680
            // Dump the value field
2681
406
            pm_buffer_append_byte(buffer, ',');
2682
406
            pm_buffer_append_string(buffer, "\"value\":", 8);
2683
406
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2684
2685
406
            pm_buffer_append_byte(buffer, '}');
2686
406
            break;
2687
0
        }
2688
559
        case PM_INDEX_OPERATOR_WRITE_NODE: {
  Branch (2688:9): [True: 559, False: 1.00M]
2689
559
            pm_buffer_append_string(buffer, "{\"type\":\"IndexOperatorWriteNode\",\"location\":", 44);
2690
2691
559
            const pm_index_operator_write_node_t *cast = (const pm_index_operator_write_node_t *) node;
2692
559
            pm_dump_json_location(buffer, &cast->base.location);
2693
2694
            // Dump the CallNodeFlags field
2695
559
            pm_buffer_append_byte(buffer, ',');
2696
559
            pm_buffer_append_string(buffer, "\"flags\":", 8);
2697
559
            size_t flags = 0;
2698
559
            pm_buffer_append_byte(buffer, '[');
2699
559
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
2700
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2700:21): [True: 0, False: 0]
2701
0
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
2702
0
                flags++;
2703
0
            }
2704
559
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
2705
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2705:21): [True: 0, False: 0]
2706
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
2707
0
                flags++;
2708
0
            }
2709
559
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
2710
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2710:21): [True: 0, False: 0]
2711
0
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
2712
0
                flags++;
2713
0
            }
2714
559
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
2715
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2715:21): [True: 0, False: 0]
2716
0
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
2717
0
                flags++;
2718
0
            }
2719
559
            pm_buffer_append_byte(buffer, ']');
2720
2721
            // Dump the receiver field
2722
559
            pm_buffer_append_byte(buffer, ',');
2723
559
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
2724
559
            if (cast->receiver != NULL) {
  Branch (2724:17): [True: 559, False: 0]
2725
559
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
2726
559
            } else {
2727
0
                pm_buffer_append_string(buffer, "null", 4);
2728
0
            }
2729
2730
            // Dump the call_operator_loc field
2731
559
            pm_buffer_append_byte(buffer, ',');
2732
559
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
2733
559
            if (cast->call_operator_loc.length != 0) {
  Branch (2733:17): [True: 0, False: 559]
2734
0
                pm_dump_json_location(buffer, &cast->call_operator_loc);
2735
559
            } else {
2736
559
                pm_buffer_append_string(buffer, "null", 4);
2737
559
            }
2738
2739
            // Dump the opening_loc field
2740
559
            pm_buffer_append_byte(buffer, ',');
2741
559
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
2742
559
            pm_dump_json_location(buffer, &cast->opening_loc);
2743
2744
            // Dump the arguments field
2745
559
            pm_buffer_append_byte(buffer, ',');
2746
559
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
2747
559
            if (cast->arguments != NULL) {
  Branch (2747:17): [True: 403, False: 156]
2748
403
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
2749
403
            } else {
2750
156
                pm_buffer_append_string(buffer, "null", 4);
2751
156
            }
2752
2753
            // Dump the closing_loc field
2754
559
            pm_buffer_append_byte(buffer, ',');
2755
559
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
2756
559
            pm_dump_json_location(buffer, &cast->closing_loc);
2757
2758
            // Dump the block field
2759
559
            pm_buffer_append_byte(buffer, ',');
2760
559
            pm_buffer_append_string(buffer, "\"block\":", 8);
2761
559
            if (cast->block != NULL) {
  Branch (2761:17): [True: 5, False: 554]
2762
5
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
2763
554
            } else {
2764
554
                pm_buffer_append_string(buffer, "null", 4);
2765
554
            }
2766
2767
            // Dump the binary_operator field
2768
559
            pm_buffer_append_byte(buffer, ',');
2769
559
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
2770
559
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
2771
2772
            // Dump the binary_operator_loc field
2773
559
            pm_buffer_append_byte(buffer, ',');
2774
559
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
2775
559
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
2776
2777
            // Dump the value field
2778
559
            pm_buffer_append_byte(buffer, ',');
2779
559
            pm_buffer_append_string(buffer, "\"value\":", 8);
2780
559
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2781
2782
559
            pm_buffer_append_byte(buffer, '}');
2783
559
            break;
2784
0
        }
2785
583
        case PM_INDEX_OR_WRITE_NODE: {
  Branch (2785:9): [True: 583, False: 1.00M]
2786
583
            pm_buffer_append_string(buffer, "{\"type\":\"IndexOrWriteNode\",\"location\":", 38);
2787
2788
583
            const pm_index_or_write_node_t *cast = (const pm_index_or_write_node_t *) node;
2789
583
            pm_dump_json_location(buffer, &cast->base.location);
2790
2791
            // Dump the CallNodeFlags field
2792
583
            pm_buffer_append_byte(buffer, ',');
2793
583
            pm_buffer_append_string(buffer, "\"flags\":", 8);
2794
583
            size_t flags = 0;
2795
583
            pm_buffer_append_byte(buffer, '[');
2796
583
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
2797
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2797:21): [True: 0, False: 0]
2798
0
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
2799
0
                flags++;
2800
0
            }
2801
583
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
2802
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2802:21): [True: 0, False: 0]
2803
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
2804
0
                flags++;
2805
0
            }
2806
583
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
2807
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2807:21): [True: 0, False: 0]
2808
0
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
2809
0
                flags++;
2810
0
            }
2811
583
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
2812
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2812:21): [True: 0, False: 0]
2813
0
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
2814
0
                flags++;
2815
0
            }
2816
583
            pm_buffer_append_byte(buffer, ']');
2817
2818
            // Dump the receiver field
2819
583
            pm_buffer_append_byte(buffer, ',');
2820
583
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
2821
583
            if (cast->receiver != NULL) {
  Branch (2821:17): [True: 583, False: 0]
2822
583
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
2823
583
            } else {
2824
0
                pm_buffer_append_string(buffer, "null", 4);
2825
0
            }
2826
2827
            // Dump the call_operator_loc field
2828
583
            pm_buffer_append_byte(buffer, ',');
2829
583
            pm_buffer_append_string(buffer, "\"call_operator_loc\":", 20);
2830
583
            if (cast->call_operator_loc.length != 0) {
  Branch (2830:17): [True: 0, False: 583]
2831
0
                pm_dump_json_location(buffer, &cast->call_operator_loc);
2832
583
            } else {
2833
583
                pm_buffer_append_string(buffer, "null", 4);
2834
583
            }
2835
2836
            // Dump the opening_loc field
2837
583
            pm_buffer_append_byte(buffer, ',');
2838
583
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
2839
583
            pm_dump_json_location(buffer, &cast->opening_loc);
2840
2841
            // Dump the arguments field
2842
583
            pm_buffer_append_byte(buffer, ',');
2843
583
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
2844
583
            if (cast->arguments != NULL) {
  Branch (2844:17): [True: 422, False: 161]
2845
422
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
2846
422
            } else {
2847
161
                pm_buffer_append_string(buffer, "null", 4);
2848
161
            }
2849
2850
            // Dump the closing_loc field
2851
583
            pm_buffer_append_byte(buffer, ',');
2852
583
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
2853
583
            pm_dump_json_location(buffer, &cast->closing_loc);
2854
2855
            // Dump the block field
2856
583
            pm_buffer_append_byte(buffer, ',');
2857
583
            pm_buffer_append_string(buffer, "\"block\":", 8);
2858
583
            if (cast->block != NULL) {
  Branch (2858:17): [True: 4, False: 579]
2859
4
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
2860
579
            } else {
2861
579
                pm_buffer_append_string(buffer, "null", 4);
2862
579
            }
2863
2864
            // Dump the operator_loc field
2865
583
            pm_buffer_append_byte(buffer, ',');
2866
583
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
2867
583
            pm_dump_json_location(buffer, &cast->operator_loc);
2868
2869
            // Dump the value field
2870
583
            pm_buffer_append_byte(buffer, ',');
2871
583
            pm_buffer_append_string(buffer, "\"value\":", 8);
2872
583
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2873
2874
583
            pm_buffer_append_byte(buffer, '}');
2875
583
            break;
2876
0
        }
2877
1.40k
        case PM_INDEX_TARGET_NODE: {
  Branch (2877:9): [True: 1.40k, False: 1.00M]
2878
1.40k
            pm_buffer_append_string(buffer, "{\"type\":\"IndexTargetNode\",\"location\":", 37);
2879
2880
1.40k
            const pm_index_target_node_t *cast = (const pm_index_target_node_t *) node;
2881
1.40k
            pm_dump_json_location(buffer, &cast->base.location);
2882
2883
            // Dump the CallNodeFlags field
2884
1.40k
            pm_buffer_append_byte(buffer, ',');
2885
1.40k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
2886
1.40k
            size_t flags = 0;
2887
1.40k
            pm_buffer_append_byte(buffer, '[');
2888
1.40k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
2889
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2889:21): [True: 0, False: 0]
2890
0
                pm_buffer_append_string(buffer, "\"SAFE_NAVIGATION\"", 17);
2891
0
                flags++;
2892
0
            }
2893
1.40k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_VARIABLE_CALL)) {
2894
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2894:21): [True: 0, False: 0]
2895
0
                pm_buffer_append_string(buffer, "\"VARIABLE_CALL\"", 15);
2896
0
                flags++;
2897
0
            }
2898
1.40k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE)) {
2899
1.40k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (2899:21): [True: 0, False: 1.40k]
2900
1.40k
                pm_buffer_append_string(buffer, "\"ATTRIBUTE_WRITE\"", 17);
2901
1.40k
                flags++;
2902
1.40k
            }
2903
1.40k
            if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY)) {
2904
2
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (2904:21): [True: 2, False: 0]
2905
2
                pm_buffer_append_string(buffer, "\"IGNORE_VISIBILITY\"", 19);
2906
2
                flags++;
2907
2
            }
2908
1.40k
            pm_buffer_append_byte(buffer, ']');
2909
2910
            // Dump the receiver field
2911
1.40k
            pm_buffer_append_byte(buffer, ',');
2912
1.40k
            pm_buffer_append_string(buffer, "\"receiver\":", 11);
2913
1.40k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->receiver);
2914
2915
            // Dump the opening_loc field
2916
1.40k
            pm_buffer_append_byte(buffer, ',');
2917
1.40k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
2918
1.40k
            pm_dump_json_location(buffer, &cast->opening_loc);
2919
2920
            // Dump the arguments field
2921
1.40k
            pm_buffer_append_byte(buffer, ',');
2922
1.40k
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
2923
1.40k
            if (cast->arguments != NULL) {
  Branch (2923:17): [True: 1.39k, False: 12]
2924
1.39k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
2925
1.39k
            } else {
2926
12
                pm_buffer_append_string(buffer, "null", 4);
2927
12
            }
2928
2929
            // Dump the closing_loc field
2930
1.40k
            pm_buffer_append_byte(buffer, ',');
2931
1.40k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
2932
1.40k
            pm_dump_json_location(buffer, &cast->closing_loc);
2933
2934
            // Dump the block field
2935
1.40k
            pm_buffer_append_byte(buffer, ',');
2936
1.40k
            pm_buffer_append_string(buffer, "\"block\":", 8);
2937
1.40k
            if (cast->block != NULL) {
  Branch (2937:17): [True: 3, False: 1.40k]
2938
3
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
2939
1.40k
            } else {
2940
1.40k
                pm_buffer_append_string(buffer, "null", 4);
2941
1.40k
            }
2942
2943
1.40k
            pm_buffer_append_byte(buffer, '}');
2944
1.40k
            break;
2945
0
        }
2946
7
        case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
  Branch (2946:9): [True: 7, False: 1.00M]
2947
7
            pm_buffer_append_string(buffer, "{\"type\":\"InstanceVariableAndWriteNode\",\"location\":", 50);
2948
2949
7
            const pm_instance_variable_and_write_node_t *cast = (const pm_instance_variable_and_write_node_t *) node;
2950
7
            pm_dump_json_location(buffer, &cast->base.location);
2951
2952
            // Dump the name field
2953
7
            pm_buffer_append_byte(buffer, ',');
2954
7
            pm_buffer_append_string(buffer, "\"name\":", 7);
2955
7
            pm_dump_json_constant(buffer, parser, cast->name);
2956
2957
            // Dump the name_loc field
2958
7
            pm_buffer_append_byte(buffer, ',');
2959
7
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
2960
7
            pm_dump_json_location(buffer, &cast->name_loc);
2961
2962
            // Dump the operator_loc field
2963
7
            pm_buffer_append_byte(buffer, ',');
2964
7
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
2965
7
            pm_dump_json_location(buffer, &cast->operator_loc);
2966
2967
            // Dump the value field
2968
7
            pm_buffer_append_byte(buffer, ',');
2969
7
            pm_buffer_append_string(buffer, "\"value\":", 8);
2970
7
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
2971
2972
7
            pm_buffer_append_byte(buffer, '}');
2973
7
            break;
2974
0
        }
2975
9
        case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
  Branch (2975:9): [True: 9, False: 1.00M]
2976
9
            pm_buffer_append_string(buffer, "{\"type\":\"InstanceVariableOperatorWriteNode\",\"location\":", 55);
2977
2978
9
            const pm_instance_variable_operator_write_node_t *cast = (const pm_instance_variable_operator_write_node_t *) node;
2979
9
            pm_dump_json_location(buffer, &cast->base.location);
2980
2981
            // Dump the name field
2982
9
            pm_buffer_append_byte(buffer, ',');
2983
9
            pm_buffer_append_string(buffer, "\"name\":", 7);
2984
9
            pm_dump_json_constant(buffer, parser, cast->name);
2985
2986
            // Dump the name_loc field
2987
9
            pm_buffer_append_byte(buffer, ',');
2988
9
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
2989
9
            pm_dump_json_location(buffer, &cast->name_loc);
2990
2991
            // Dump the binary_operator_loc field
2992
9
            pm_buffer_append_byte(buffer, ',');
2993
9
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
2994
9
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
2995
2996
            // Dump the value field
2997
9
            pm_buffer_append_byte(buffer, ',');
2998
9
            pm_buffer_append_string(buffer, "\"value\":", 8);
2999
9
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3000
3001
            // Dump the binary_operator field
3002
9
            pm_buffer_append_byte(buffer, ',');
3003
9
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
3004
9
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
3005
3006
9
            pm_buffer_append_byte(buffer, '}');
3007
9
            break;
3008
0
        }
3009
310
        case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
  Branch (3009:9): [True: 310, False: 1.00M]
3010
310
            pm_buffer_append_string(buffer, "{\"type\":\"InstanceVariableOrWriteNode\",\"location\":", 49);
3011
3012
310
            const pm_instance_variable_or_write_node_t *cast = (const pm_instance_variable_or_write_node_t *) node;
3013
310
            pm_dump_json_location(buffer, &cast->base.location);
3014
3015
            // Dump the name field
3016
310
            pm_buffer_append_byte(buffer, ',');
3017
310
            pm_buffer_append_string(buffer, "\"name\":", 7);
3018
310
            pm_dump_json_constant(buffer, parser, cast->name);
3019
3020
            // Dump the name_loc field
3021
310
            pm_buffer_append_byte(buffer, ',');
3022
310
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
3023
310
            pm_dump_json_location(buffer, &cast->name_loc);
3024
3025
            // Dump the operator_loc field
3026
310
            pm_buffer_append_byte(buffer, ',');
3027
310
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3028
310
            pm_dump_json_location(buffer, &cast->operator_loc);
3029
3030
            // Dump the value field
3031
310
            pm_buffer_append_byte(buffer, ',');
3032
310
            pm_buffer_append_string(buffer, "\"value\":", 8);
3033
310
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3034
3035
310
            pm_buffer_append_byte(buffer, '}');
3036
310
            break;
3037
0
        }
3038
2.23k
        case PM_INSTANCE_VARIABLE_READ_NODE: {
  Branch (3038:9): [True: 2.23k, False: 1.00M]
3039
2.23k
            pm_buffer_append_string(buffer, "{\"type\":\"InstanceVariableReadNode\",\"location\":", 46);
3040
3041
2.23k
            const pm_instance_variable_read_node_t *cast = (const pm_instance_variable_read_node_t *) node;
3042
2.23k
            pm_dump_json_location(buffer, &cast->base.location);
3043
3044
            // Dump the name field
3045
2.23k
            pm_buffer_append_byte(buffer, ',');
3046
2.23k
            pm_buffer_append_string(buffer, "\"name\":", 7);
3047
2.23k
            pm_dump_json_constant(buffer, parser, cast->name);
3048
3049
2.23k
            pm_buffer_append_byte(buffer, '}');
3050
2.23k
            break;
3051
0
        }
3052
412
        case PM_INSTANCE_VARIABLE_TARGET_NODE: {
  Branch (3052:9): [True: 412, False: 1.00M]
3053
412
            pm_buffer_append_string(buffer, "{\"type\":\"InstanceVariableTargetNode\",\"location\":", 48);
3054
3055
412
            const pm_instance_variable_target_node_t *cast = (const pm_instance_variable_target_node_t *) node;
3056
412
            pm_dump_json_location(buffer, &cast->base.location);
3057
3058
            // Dump the name field
3059
412
            pm_buffer_append_byte(buffer, ',');
3060
412
            pm_buffer_append_string(buffer, "\"name\":", 7);
3061
412
            pm_dump_json_constant(buffer, parser, cast->name);
3062
3063
412
            pm_buffer_append_byte(buffer, '}');
3064
412
            break;
3065
0
        }
3066
224
        case PM_INSTANCE_VARIABLE_WRITE_NODE: {
  Branch (3066:9): [True: 224, False: 1.00M]
3067
224
            pm_buffer_append_string(buffer, "{\"type\":\"InstanceVariableWriteNode\",\"location\":", 47);
3068
3069
224
            const pm_instance_variable_write_node_t *cast = (const pm_instance_variable_write_node_t *) node;
3070
224
            pm_dump_json_location(buffer, &cast->base.location);
3071
3072
            // Dump the name field
3073
224
            pm_buffer_append_byte(buffer, ',');
3074
224
            pm_buffer_append_string(buffer, "\"name\":", 7);
3075
224
            pm_dump_json_constant(buffer, parser, cast->name);
3076
3077
            // Dump the name_loc field
3078
224
            pm_buffer_append_byte(buffer, ',');
3079
224
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
3080
224
            pm_dump_json_location(buffer, &cast->name_loc);
3081
3082
            // Dump the value field
3083
224
            pm_buffer_append_byte(buffer, ',');
3084
224
            pm_buffer_append_string(buffer, "\"value\":", 8);
3085
224
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3086
3087
            // Dump the operator_loc field
3088
224
            pm_buffer_append_byte(buffer, ',');
3089
224
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3090
224
            pm_dump_json_location(buffer, &cast->operator_loc);
3091
3092
224
            pm_buffer_append_byte(buffer, '}');
3093
224
            break;
3094
0
        }
3095
65.5k
        case PM_INTEGER_NODE: {
  Branch (3095:9): [True: 65.5k, False: 940k]
3096
65.5k
            pm_buffer_append_string(buffer, "{\"type\":\"IntegerNode\",\"location\":", 33);
3097
3098
65.5k
            const pm_integer_node_t *cast = (const pm_integer_node_t *) node;
3099
65.5k
            pm_dump_json_location(buffer, &cast->base.location);
3100
3101
            // Dump the IntegerBaseFlags field
3102
65.5k
            pm_buffer_append_byte(buffer, ',');
3103
65.5k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
3104
65.5k
            size_t flags = 0;
3105
65.5k
            pm_buffer_append_byte(buffer, '[');
3106
65.5k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_BINARY)) {
3107
347
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3107:21): [True: 0, False: 347]
3108
347
                pm_buffer_append_string(buffer, "\"BINARY\"", 8);
3109
347
                flags++;
3110
347
            }
3111
65.5k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_DECIMAL)) {
3112
63.5k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3112:21): [True: 0, False: 63.5k]
3113
63.5k
                pm_buffer_append_string(buffer, "\"DECIMAL\"", 9);
3114
63.5k
                flags++;
3115
63.5k
            }
3116
65.5k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_OCTAL)) {
3117
1.26k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3117:21): [True: 0, False: 1.26k]
3118
1.26k
                pm_buffer_append_string(buffer, "\"OCTAL\"", 7);
3119
1.26k
                flags++;
3120
1.26k
            }
3121
65.5k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_HEXADECIMAL)) {
3122
402
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3122:21): [True: 0, False: 402]
3123
402
                pm_buffer_append_string(buffer, "\"HEXADECIMAL\"", 13);
3124
402
                flags++;
3125
402
            }
3126
65.5k
            pm_buffer_append_byte(buffer, ']');
3127
3128
            // Dump the value field
3129
65.5k
            pm_buffer_append_byte(buffer, ',');
3130
65.5k
            pm_buffer_append_string(buffer, "\"value\":", 8);
3131
65.5k
            pm_integer_string(buffer, &cast->value);
3132
3133
65.5k
            pm_buffer_append_byte(buffer, '}');
3134
65.5k
            break;
3135
0
        }
3136
72
        case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
  Branch (3136:9): [True: 72, False: 1.00M]
3137
72
            pm_buffer_append_string(buffer, "{\"type\":\"InterpolatedMatchLastLineNode\",\"location\":", 51);
3138
3139
72
            const pm_interpolated_match_last_line_node_t *cast = (const pm_interpolated_match_last_line_node_t *) node;
3140
72
            pm_dump_json_location(buffer, &cast->base.location);
3141
3142
            // Dump the RegularExpressionFlags field
3143
72
            pm_buffer_append_byte(buffer, ',');
3144
72
            pm_buffer_append_string(buffer, "\"flags\":", 8);
3145
72
            size_t flags = 0;
3146
72
            pm_buffer_append_byte(buffer, '[');
3147
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
3148
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3148:21): [True: 0, False: 0]
3149
0
                pm_buffer_append_string(buffer, "\"IGNORE_CASE\"", 13);
3150
0
                flags++;
3151
0
            }
3152
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EXTENDED)) {
3153
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3153:21): [True: 0, False: 0]
3154
0
                pm_buffer_append_string(buffer, "\"EXTENDED\"", 10);
3155
0
                flags++;
3156
0
            }
3157
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE)) {
3158
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3158:21): [True: 0, False: 0]
3159
0
                pm_buffer_append_string(buffer, "\"MULTI_LINE\"", 12);
3160
0
                flags++;
3161
0
            }
3162
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ONCE)) {
3163
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3163:21): [True: 0, False: 0]
3164
0
                pm_buffer_append_string(buffer, "\"ONCE\"", 6);
3165
0
                flags++;
3166
0
            }
3167
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EUC_JP)) {
3168
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3168:21): [True: 0, False: 0]
3169
0
                pm_buffer_append_string(buffer, "\"EUC_JP\"", 8);
3170
0
                flags++;
3171
0
            }
3172
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT)) {
3173
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3173:21): [True: 0, False: 0]
3174
0
                pm_buffer_append_string(buffer, "\"ASCII_8BIT\"", 12);
3175
0
                flags++;
3176
0
            }
3177
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J)) {
3178
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3178:21): [True: 0, False: 0]
3179
0
                pm_buffer_append_string(buffer, "\"WINDOWS_31J\"", 13);
3180
0
                flags++;
3181
0
            }
3182
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_UTF_8)) {
3183
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3183:21): [True: 0, False: 0]
3184
0
                pm_buffer_append_string(buffer, "\"UTF_8\"", 7);
3185
0
                flags++;
3186
0
            }
3187
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING)) {
3188
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3188:21): [True: 0, False: 0]
3189
0
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
3190
0
                flags++;
3191
0
            }
3192
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING)) {
3193
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3193:21): [True: 0, False: 0]
3194
0
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
3195
0
                flags++;
3196
0
            }
3197
72
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING)) {
3198
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3198:21): [True: 0, False: 0]
3199
0
                pm_buffer_append_string(buffer, "\"FORCED_US_ASCII_ENCODING\"", 26);
3200
0
                flags++;
3201
0
            }
3202
72
            pm_buffer_append_byte(buffer, ']');
3203
3204
            // Dump the opening_loc field
3205
72
            pm_buffer_append_byte(buffer, ',');
3206
72
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
3207
72
            pm_dump_json_location(buffer, &cast->opening_loc);
3208
3209
            // Dump the parts field
3210
72
            pm_buffer_append_byte(buffer, ',');
3211
72
            pm_buffer_append_string(buffer, "\"parts\":", 8);
3212
72
            const pm_node_list_t *parts = &cast->parts;
3213
72
            pm_buffer_append_byte(buffer, '[');
3214
3215
266
            for (size_t index = 0; index < parts->size; 
index++194
) {
  Branch (3215:36): [True: 194, False: 72]
3216
194
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')123
;
  Branch (3216:21): [True: 123, False: 71]
3217
194
                pm_dump_json(buffer, parser, parts->nodes[index]);
3218
194
            }
3219
72
            pm_buffer_append_byte(buffer, ']');
3220
3221
            // Dump the closing_loc field
3222
72
            pm_buffer_append_byte(buffer, ',');
3223
72
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
3224
72
            pm_dump_json_location(buffer, &cast->closing_loc);
3225
3226
72
            pm_buffer_append_byte(buffer, '}');
3227
72
            break;
3228
0
        }
3229
1.77k
        case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
  Branch (3229:9): [True: 1.77k, False: 1.00M]
3230
1.77k
            pm_buffer_append_string(buffer, "{\"type\":\"InterpolatedRegularExpressionNode\",\"location\":", 55);
3231
3232
1.77k
            const pm_interpolated_regular_expression_node_t *cast = (const pm_interpolated_regular_expression_node_t *) node;
3233
1.77k
            pm_dump_json_location(buffer, &cast->base.location);
3234
3235
            // Dump the RegularExpressionFlags field
3236
1.77k
            pm_buffer_append_byte(buffer, ',');
3237
1.77k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
3238
1.77k
            size_t flags = 0;
3239
1.77k
            pm_buffer_append_byte(buffer, '[');
3240
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
3241
102
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3241:21): [True: 0, False: 102]
3242
102
                pm_buffer_append_string(buffer, "\"IGNORE_CASE\"", 13);
3243
102
                flags++;
3244
102
            }
3245
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EXTENDED)) {
3246
92
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3246:21): [True: 92, False: 0]
3247
92
                pm_buffer_append_string(buffer, "\"EXTENDED\"", 10);
3248
92
                flags++;
3249
92
            }
3250
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE)) {
3251
95
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')94
;
  Branch (3251:21): [True: 94, False: 1]
3252
95
                pm_buffer_append_string(buffer, "\"MULTI_LINE\"", 12);
3253
95
                flags++;
3254
95
            }
3255
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ONCE)) {
3256
105
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')3
;
  Branch (3256:21): [True: 3, False: 102]
3257
105
                pm_buffer_append_string(buffer, "\"ONCE\"", 6);
3258
105
                flags++;
3259
105
            }
3260
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EUC_JP)) {
3261
6
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')1
;
  Branch (3261:21): [True: 1, False: 5]
3262
6
                pm_buffer_append_string(buffer, "\"EUC_JP\"", 8);
3263
6
                flags++;
3264
6
            }
3265
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT)) {
3266
8
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')4
;
  Branch (3266:21): [True: 4, False: 4]
3267
8
                pm_buffer_append_string(buffer, "\"ASCII_8BIT\"", 12);
3268
8
                flags++;
3269
8
            }
3270
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J)) {
3271
2
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3271:21): [True: 2, False: 0]
3272
2
                pm_buffer_append_string(buffer, "\"WINDOWS_31J\"", 13);
3273
2
                flags++;
3274
2
            }
3275
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_UTF_8)) {
3276
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3276:21): [True: 0, False: 0]
3277
0
                pm_buffer_append_string(buffer, "\"UTF_8\"", 7);
3278
0
                flags++;
3279
0
            }
3280
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING)) {
3281
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3281:21): [True: 0, False: 0]
3282
0
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
3283
0
                flags++;
3284
0
            }
3285
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING)) {
3286
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3286:21): [True: 0, False: 0]
3287
0
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
3288
0
                flags++;
3289
0
            }
3290
1.77k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING)) {
3291
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3291:21): [True: 0, False: 0]
3292
0
                pm_buffer_append_string(buffer, "\"FORCED_US_ASCII_ENCODING\"", 26);
3293
0
                flags++;
3294
0
            }
3295
1.77k
            pm_buffer_append_byte(buffer, ']');
3296
3297
            // Dump the opening_loc field
3298
1.77k
            pm_buffer_append_byte(buffer, ',');
3299
1.77k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
3300
1.77k
            pm_dump_json_location(buffer, &cast->opening_loc);
3301
3302
            // Dump the parts field
3303
1.77k
            pm_buffer_append_byte(buffer, ',');
3304
1.77k
            pm_buffer_append_string(buffer, "\"parts\":", 8);
3305
1.77k
            const pm_node_list_t *parts = &cast->parts;
3306
1.77k
            pm_buffer_append_byte(buffer, '[');
3307
3308
5.31k
            for (size_t index = 0; index < parts->size; 
index++3.54k
) {
  Branch (3308:36): [True: 3.54k, False: 1.77k]
3309
3.54k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')1.78k
;
  Branch (3309:21): [True: 1.78k, False: 1.76k]
3310
3.54k
                pm_dump_json(buffer, parser, parts->nodes[index]);
3311
3.54k
            }
3312
1.77k
            pm_buffer_append_byte(buffer, ']');
3313
3314
            // Dump the closing_loc field
3315
1.77k
            pm_buffer_append_byte(buffer, ',');
3316
1.77k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
3317
1.77k
            pm_dump_json_location(buffer, &cast->closing_loc);
3318
3319
1.77k
            pm_buffer_append_byte(buffer, '}');
3320
1.77k
            break;
3321
0
        }
3322
4.54k
        case PM_INTERPOLATED_STRING_NODE: {
  Branch (3322:9): [True: 4.54k, False: 1.00M]
3323
4.54k
            pm_buffer_append_string(buffer, "{\"type\":\"InterpolatedStringNode\",\"location\":", 44);
3324
3325
4.54k
            const pm_interpolated_string_node_t *cast = (const pm_interpolated_string_node_t *) node;
3326
4.54k
            pm_dump_json_location(buffer, &cast->base.location);
3327
3328
            // Dump the InterpolatedStringNodeFlags field
3329
4.54k
            pm_buffer_append_byte(buffer, ',');
3330
4.54k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
3331
4.54k
            size_t flags = 0;
3332
4.54k
            pm_buffer_append_byte(buffer, '[');
3333
4.54k
            if (PM_NODE_FLAG_P(cast, PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN)) {
3334
60
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3334:21): [True: 0, False: 60]
3335
60
                pm_buffer_append_string(buffer, "\"FROZEN\"", 8);
3336
60
                flags++;
3337
60
            }
3338
4.54k
            if (PM_NODE_FLAG_P(cast, PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE)) {
3339
250
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3339:21): [True: 0, False: 250]
3340
250
                pm_buffer_append_string(buffer, "\"MUTABLE\"", 9);
3341
250
                flags++;
3342
250
            }
3343
4.54k
            pm_buffer_append_byte(buffer, ']');
3344
3345
            // Dump the opening_loc field
3346
4.54k
            pm_buffer_append_byte(buffer, ',');
3347
4.54k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
3348
4.54k
            if (cast->opening_loc.length != 0) {
  Branch (3348:17): [True: 3.35k, False: 1.19k]
3349
3.35k
                pm_dump_json_location(buffer, &cast->opening_loc);
3350
3.35k
            } else {
3351
1.19k
                pm_buffer_append_string(buffer, "null", 4);
3352
1.19k
            }
3353
3354
            // Dump the parts field
3355
4.54k
            pm_buffer_append_byte(buffer, ',');
3356
4.54k
            pm_buffer_append_string(buffer, "\"parts\":", 8);
3357
4.54k
            const pm_node_list_t *parts = &cast->parts;
3358
4.54k
            pm_buffer_append_byte(buffer, '[');
3359
3360
20.7k
            for (size_t index = 0; index < parts->size; 
index++16.1k
) {
  Branch (3360:36): [True: 16.1k, False: 4.54k]
3361
16.1k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')11.6k
;
  Branch (3361:21): [True: 11.6k, False: 4.54k]
3362
16.1k
                pm_dump_json(buffer, parser, parts->nodes[index]);
3363
16.1k
            }
3364
4.54k
            pm_buffer_append_byte(buffer, ']');
3365
3366
            // Dump the closing_loc field
3367
4.54k
            pm_buffer_append_byte(buffer, ',');
3368
4.54k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
3369
4.54k
            if (cast->closing_loc.length != 0) {
  Branch (3369:17): [True: 2.71k, False: 1.82k]
3370
2.71k
                pm_dump_json_location(buffer, &cast->closing_loc);
3371
2.71k
            } else {
3372
1.82k
                pm_buffer_append_string(buffer, "null", 4);
3373
1.82k
            }
3374
3375
4.54k
            pm_buffer_append_byte(buffer, '}');
3376
4.54k
            break;
3377
0
        }
3378
1.48k
        case PM_INTERPOLATED_SYMBOL_NODE: {
  Branch (3378:9): [True: 1.48k, False: 1.00M]
3379
1.48k
            pm_buffer_append_string(buffer, "{\"type\":\"InterpolatedSymbolNode\",\"location\":", 44);
3380
3381
1.48k
            const pm_interpolated_symbol_node_t *cast = (const pm_interpolated_symbol_node_t *) node;
3382
1.48k
            pm_dump_json_location(buffer, &cast->base.location);
3383
3384
            // Dump the opening_loc field
3385
1.48k
            pm_buffer_append_byte(buffer, ',');
3386
1.48k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
3387
1.48k
            if (cast->opening_loc.length != 0) {
  Branch (3387:17): [True: 638, False: 849]
3388
638
                pm_dump_json_location(buffer, &cast->opening_loc);
3389
849
            } else {
3390
849
                pm_buffer_append_string(buffer, "null", 4);
3391
849
            }
3392
3393
            // Dump the parts field
3394
1.48k
            pm_buffer_append_byte(buffer, ',');
3395
1.48k
            pm_buffer_append_string(buffer, "\"parts\":", 8);
3396
1.48k
            const pm_node_list_t *parts = &cast->parts;
3397
1.48k
            pm_buffer_append_byte(buffer, '[');
3398
3399
4.98k
            for (size_t index = 0; index < parts->size; 
index++3.49k
) {
  Branch (3399:36): [True: 3.49k, False: 1.48k]
3400
3.49k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')2.01k
;
  Branch (3400:21): [True: 2.01k, False: 1.48k]
3401
3.49k
                pm_dump_json(buffer, parser, parts->nodes[index]);
3402
3.49k
            }
3403
1.48k
            pm_buffer_append_byte(buffer, ']');
3404
3405
            // Dump the closing_loc field
3406
1.48k
            pm_buffer_append_byte(buffer, ',');
3407
1.48k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
3408
1.48k
            if (cast->closing_loc.length != 0) {
  Branch (3408:17): [True: 606, False: 881]
3409
606
                pm_dump_json_location(buffer, &cast->closing_loc);
3410
881
            } else {
3411
881
                pm_buffer_append_string(buffer, "null", 4);
3412
881
            }
3413
3414
1.48k
            pm_buffer_append_byte(buffer, '}');
3415
1.48k
            break;
3416
0
        }
3417
332
        case PM_INTERPOLATED_X_STRING_NODE: {
  Branch (3417:9): [True: 332, False: 1.00M]
3418
332
            pm_buffer_append_string(buffer, "{\"type\":\"InterpolatedXStringNode\",\"location\":", 45);
3419
3420
332
            const pm_interpolated_x_string_node_t *cast = (const pm_interpolated_x_string_node_t *) node;
3421
332
            pm_dump_json_location(buffer, &cast->base.location);
3422
3423
            // Dump the opening_loc field
3424
332
            pm_buffer_append_byte(buffer, ',');
3425
332
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
3426
332
            pm_dump_json_location(buffer, &cast->opening_loc);
3427
3428
            // Dump the parts field
3429
332
            pm_buffer_append_byte(buffer, ',');
3430
332
            pm_buffer_append_string(buffer, "\"parts\":", 8);
3431
332
            const pm_node_list_t *parts = &cast->parts;
3432
332
            pm_buffer_append_byte(buffer, '[');
3433
3434
1.53k
            for (size_t index = 0; index < parts->size; 
index++1.20k
) {
  Branch (3434:36): [True: 1.20k, False: 332]
3435
1.20k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')874
;
  Branch (3435:21): [True: 874, False: 326]
3436
1.20k
                pm_dump_json(buffer, parser, parts->nodes[index]);
3437
1.20k
            }
3438
332
            pm_buffer_append_byte(buffer, ']');
3439
3440
            // Dump the closing_loc field
3441
332
            pm_buffer_append_byte(buffer, ',');
3442
332
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
3443
332
            pm_dump_json_location(buffer, &cast->closing_loc);
3444
3445
332
            pm_buffer_append_byte(buffer, '}');
3446
332
            break;
3447
0
        }
3448
280
        case PM_IT_LOCAL_VARIABLE_READ_NODE: {
  Branch (3448:9): [True: 280, False: 1.00M]
3449
280
            pm_buffer_append_string(buffer, "{\"type\":\"ItLocalVariableReadNode\",\"location\":", 45);
3450
3451
280
            const pm_it_local_variable_read_node_t *cast = (const pm_it_local_variable_read_node_t *) node;
3452
280
            pm_dump_json_location(buffer, &cast->base.location);
3453
3454
280
            pm_buffer_append_byte(buffer, '}');
3455
280
            break;
3456
0
        }
3457
167
        case PM_IT_PARAMETERS_NODE: {
  Branch (3457:9): [True: 167, False: 1.00M]
3458
167
            pm_buffer_append_string(buffer, "{\"type\":\"ItParametersNode\",\"location\":", 38);
3459
3460
167
            const pm_it_parameters_node_t *cast = (const pm_it_parameters_node_t *) node;
3461
167
            pm_dump_json_location(buffer, &cast->base.location);
3462
3463
167
            pm_buffer_append_byte(buffer, '}');
3464
167
            break;
3465
0
        }
3466
4.72k
        case PM_KEYWORD_HASH_NODE: {
  Branch (3466:9): [True: 4.72k, False: 1.00M]
3467
4.72k
            pm_buffer_append_string(buffer, "{\"type\":\"KeywordHashNode\",\"location\":", 37);
3468
3469
4.72k
            const pm_keyword_hash_node_t *cast = (const pm_keyword_hash_node_t *) node;
3470
4.72k
            pm_dump_json_location(buffer, &cast->base.location);
3471
3472
            // Dump the KeywordHashNodeFlags field
3473
4.72k
            pm_buffer_append_byte(buffer, ',');
3474
4.72k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
3475
4.72k
            size_t flags = 0;
3476
4.72k
            pm_buffer_append_byte(buffer, '[');
3477
4.72k
            if (PM_NODE_FLAG_P(cast, PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS)) {
3478
2.06k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3478:21): [True: 0, False: 2.06k]
3479
2.06k
                pm_buffer_append_string(buffer, "\"SYMBOL_KEYS\"", 13);
3480
2.06k
                flags++;
3481
2.06k
            }
3482
4.72k
            pm_buffer_append_byte(buffer, ']');
3483
3484
            // Dump the elements field
3485
4.72k
            pm_buffer_append_byte(buffer, ',');
3486
4.72k
            pm_buffer_append_string(buffer, "\"elements\":", 11);
3487
4.72k
            const pm_node_list_t *elements = &cast->elements;
3488
4.72k
            pm_buffer_append_byte(buffer, '[');
3489
3490
11.0k
            for (size_t index = 0; index < elements->size; 
index++6.35k
) {
  Branch (3490:36): [True: 6.35k, False: 4.72k]
3491
6.35k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')1.62k
;
  Branch (3491:21): [True: 1.62k, False: 4.72k]
3492
6.35k
                pm_dump_json(buffer, parser, elements->nodes[index]);
3493
6.35k
            }
3494
4.72k
            pm_buffer_append_byte(buffer, ']');
3495
3496
4.72k
            pm_buffer_append_byte(buffer, '}');
3497
4.72k
            break;
3498
0
        }
3499
1.64k
        case PM_KEYWORD_REST_PARAMETER_NODE: {
  Branch (3499:9): [True: 1.64k, False: 1.00M]
3500
1.64k
            pm_buffer_append_string(buffer, "{\"type\":\"KeywordRestParameterNode\",\"location\":", 46);
3501
3502
1.64k
            const pm_keyword_rest_parameter_node_t *cast = (const pm_keyword_rest_parameter_node_t *) node;
3503
1.64k
            pm_dump_json_location(buffer, &cast->base.location);
3504
3505
            // Dump the ParameterFlags field
3506
1.64k
            pm_buffer_append_byte(buffer, ',');
3507
1.64k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
3508
1.64k
            size_t flags = 0;
3509
1.64k
            pm_buffer_append_byte(buffer, '[');
3510
1.64k
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
3511
66
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3511:21): [True: 0, False: 66]
3512
66
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
3513
66
                flags++;
3514
66
            }
3515
1.64k
            pm_buffer_append_byte(buffer, ']');
3516
3517
            // Dump the name field
3518
1.64k
            pm_buffer_append_byte(buffer, ',');
3519
1.64k
            pm_buffer_append_string(buffer, "\"name\":", 7);
3520
1.64k
            if (cast->name != PM_CONSTANT_ID_UNSET) {
  Branch (3520:17): [True: 999, False: 644]
3521
999
                pm_dump_json_constant(buffer, parser, cast->name);
3522
999
            } else {
3523
644
                pm_buffer_append_string(buffer, "null", 4);
3524
644
            }
3525
3526
            // Dump the name_loc field
3527
1.64k
            pm_buffer_append_byte(buffer, ',');
3528
1.64k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
3529
1.64k
            if (cast->name_loc.length != 0) {
  Branch (3529:17): [True: 999, False: 644]
3530
999
                pm_dump_json_location(buffer, &cast->name_loc);
3531
999
            } else {
3532
644
                pm_buffer_append_string(buffer, "null", 4);
3533
644
            }
3534
3535
            // Dump the operator_loc field
3536
1.64k
            pm_buffer_append_byte(buffer, ',');
3537
1.64k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3538
1.64k
            pm_dump_json_location(buffer, &cast->operator_loc);
3539
3540
1.64k
            pm_buffer_append_byte(buffer, '}');
3541
1.64k
            break;
3542
0
        }
3543
2.61k
        case PM_LAMBDA_NODE: {
  Branch (3543:9): [True: 2.61k, False: 1.00M]
3544
2.61k
            pm_buffer_append_string(buffer, "{\"type\":\"LambdaNode\",\"location\":", 32);
3545
3546
2.61k
            const pm_lambda_node_t *cast = (const pm_lambda_node_t *) node;
3547
2.61k
            pm_dump_json_location(buffer, &cast->base.location);
3548
3549
            // Dump the locals field
3550
2.61k
            pm_buffer_append_byte(buffer, ',');
3551
2.61k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
3552
2.61k
            const pm_constant_id_list_t *locals = &cast->locals;
3553
2.61k
            pm_buffer_append_byte(buffer, '[');
3554
3555
6.82k
            for (size_t index = 0; index < locals->size; 
index++4.21k
) {
  Branch (3555:36): [True: 4.21k, False: 2.61k]
3556
4.21k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')2.84k
;
  Branch (3556:21): [True: 2.84k, False: 1.37k]
3557
4.21k
                pm_dump_json_constant(buffer, parser, locals->ids[index]);
3558
4.21k
            }
3559
2.61k
            pm_buffer_append_byte(buffer, ']');
3560
3561
            // Dump the operator_loc field
3562
2.61k
            pm_buffer_append_byte(buffer, ',');
3563
2.61k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3564
2.61k
            pm_dump_json_location(buffer, &cast->operator_loc);
3565
3566
            // Dump the opening_loc field
3567
2.61k
            pm_buffer_append_byte(buffer, ',');
3568
2.61k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
3569
2.61k
            pm_dump_json_location(buffer, &cast->opening_loc);
3570
3571
            // Dump the closing_loc field
3572
2.61k
            pm_buffer_append_byte(buffer, ',');
3573
2.61k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
3574
2.61k
            pm_dump_json_location(buffer, &cast->closing_loc);
3575
3576
            // Dump the parameters field
3577
2.61k
            pm_buffer_append_byte(buffer, ',');
3578
2.61k
            pm_buffer_append_string(buffer, "\"parameters\":", 13);
3579
2.61k
            if (cast->parameters != NULL) {
  Branch (3579:17): [True: 1.29k, False: 1.31k]
3580
1.29k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->parameters);
3581
1.31k
            } else {
3582
1.31k
                pm_buffer_append_string(buffer, "null", 4);
3583
1.31k
            }
3584
3585
            // Dump the body field
3586
2.61k
            pm_buffer_append_byte(buffer, ',');
3587
2.61k
            pm_buffer_append_string(buffer, "\"body\":", 7);
3588
2.61k
            if (cast->body != NULL) {
  Branch (3588:17): [True: 2.48k, False: 130]
3589
2.48k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->body);
3590
2.48k
            } else {
3591
130
                pm_buffer_append_string(buffer, "null", 4);
3592
130
            }
3593
3594
2.61k
            pm_buffer_append_byte(buffer, '}');
3595
2.61k
            break;
3596
0
        }
3597
131
        case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
  Branch (3597:9): [True: 131, False: 1.00M]
3598
131
            pm_buffer_append_string(buffer, "{\"type\":\"LocalVariableAndWriteNode\",\"location\":", 47);
3599
3600
131
            const pm_local_variable_and_write_node_t *cast = (const pm_local_variable_and_write_node_t *) node;
3601
131
            pm_dump_json_location(buffer, &cast->base.location);
3602
3603
            // Dump the name_loc field
3604
131
            pm_buffer_append_byte(buffer, ',');
3605
131
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
3606
131
            pm_dump_json_location(buffer, &cast->name_loc);
3607
3608
            // Dump the operator_loc field
3609
131
            pm_buffer_append_byte(buffer, ',');
3610
131
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3611
131
            pm_dump_json_location(buffer, &cast->operator_loc);
3612
3613
            // Dump the value field
3614
131
            pm_buffer_append_byte(buffer, ',');
3615
131
            pm_buffer_append_string(buffer, "\"value\":", 8);
3616
131
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3617
3618
            // Dump the name field
3619
131
            pm_buffer_append_byte(buffer, ',');
3620
131
            pm_buffer_append_string(buffer, "\"name\":", 7);
3621
131
            pm_dump_json_constant(buffer, parser, cast->name);
3622
3623
            // Dump the depth field
3624
131
            pm_buffer_append_byte(buffer, ',');
3625
131
            pm_buffer_append_string(buffer, "\"depth\":", 8);
3626
131
            pm_buffer_append_format(buffer, "%" PRIu32, cast->depth);
3627
3628
131
            pm_buffer_append_byte(buffer, '}');
3629
131
            break;
3630
0
        }
3631
698
        case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
  Branch (3631:9): [True: 698, False: 1.00M]
3632
698
            pm_buffer_append_string(buffer, "{\"type\":\"LocalVariableOperatorWriteNode\",\"location\":", 52);
3633
3634
698
            const pm_local_variable_operator_write_node_t *cast = (const pm_local_variable_operator_write_node_t *) node;
3635
698
            pm_dump_json_location(buffer, &cast->base.location);
3636
3637
            // Dump the name_loc field
3638
698
            pm_buffer_append_byte(buffer, ',');
3639
698
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
3640
698
            pm_dump_json_location(buffer, &cast->name_loc);
3641
3642
            // Dump the binary_operator_loc field
3643
698
            pm_buffer_append_byte(buffer, ',');
3644
698
            pm_buffer_append_string(buffer, "\"binary_operator_loc\":", 22);
3645
698
            pm_dump_json_location(buffer, &cast->binary_operator_loc);
3646
3647
            // Dump the value field
3648
698
            pm_buffer_append_byte(buffer, ',');
3649
698
            pm_buffer_append_string(buffer, "\"value\":", 8);
3650
698
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3651
3652
            // Dump the name field
3653
698
            pm_buffer_append_byte(buffer, ',');
3654
698
            pm_buffer_append_string(buffer, "\"name\":", 7);
3655
698
            pm_dump_json_constant(buffer, parser, cast->name);
3656
3657
            // Dump the binary_operator field
3658
698
            pm_buffer_append_byte(buffer, ',');
3659
698
            pm_buffer_append_string(buffer, "\"binary_operator\":", 18);
3660
698
            pm_dump_json_constant(buffer, parser, cast->binary_operator);
3661
3662
            // Dump the depth field
3663
698
            pm_buffer_append_byte(buffer, ',');
3664
698
            pm_buffer_append_string(buffer, "\"depth\":", 8);
3665
698
            pm_buffer_append_format(buffer, "%" PRIu32, cast->depth);
3666
3667
698
            pm_buffer_append_byte(buffer, '}');
3668
698
            break;
3669
0
        }
3670
316
        case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
  Branch (3670:9): [True: 316, False: 1.00M]
3671
316
            pm_buffer_append_string(buffer, "{\"type\":\"LocalVariableOrWriteNode\",\"location\":", 46);
3672
3673
316
            const pm_local_variable_or_write_node_t *cast = (const pm_local_variable_or_write_node_t *) node;
3674
316
            pm_dump_json_location(buffer, &cast->base.location);
3675
3676
            // Dump the name_loc field
3677
316
            pm_buffer_append_byte(buffer, ',');
3678
316
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
3679
316
            pm_dump_json_location(buffer, &cast->name_loc);
3680
3681
            // Dump the operator_loc field
3682
316
            pm_buffer_append_byte(buffer, ',');
3683
316
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3684
316
            pm_dump_json_location(buffer, &cast->operator_loc);
3685
3686
            // Dump the value field
3687
316
            pm_buffer_append_byte(buffer, ',');
3688
316
            pm_buffer_append_string(buffer, "\"value\":", 8);
3689
316
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3690
3691
            // Dump the name field
3692
316
            pm_buffer_append_byte(buffer, ',');
3693
316
            pm_buffer_append_string(buffer, "\"name\":", 7);
3694
316
            pm_dump_json_constant(buffer, parser, cast->name);
3695
3696
            // Dump the depth field
3697
316
            pm_buffer_append_byte(buffer, ',');
3698
316
            pm_buffer_append_string(buffer, "\"depth\":", 8);
3699
316
            pm_buffer_append_format(buffer, "%" PRIu32, cast->depth);
3700
3701
316
            pm_buffer_append_byte(buffer, '}');
3702
316
            break;
3703
0
        }
3704
17.1k
        case PM_LOCAL_VARIABLE_READ_NODE: {
  Branch (3704:9): [True: 17.1k, False: 989k]
3705
17.1k
            pm_buffer_append_string(buffer, "{\"type\":\"LocalVariableReadNode\",\"location\":", 43);
3706
3707
17.1k
            const pm_local_variable_read_node_t *cast = (const pm_local_variable_read_node_t *) node;
3708
17.1k
            pm_dump_json_location(buffer, &cast->base.location);
3709
3710
            // Dump the name field
3711
17.1k
            pm_buffer_append_byte(buffer, ',');
3712
17.1k
            pm_buffer_append_string(buffer, "\"name\":", 7);
3713
17.1k
            pm_dump_json_constant(buffer, parser, cast->name);
3714
3715
            // Dump the depth field
3716
17.1k
            pm_buffer_append_byte(buffer, ',');
3717
17.1k
            pm_buffer_append_string(buffer, "\"depth\":", 8);
3718
17.1k
            pm_buffer_append_format(buffer, "%" PRIu32, cast->depth);
3719
3720
17.1k
            pm_buffer_append_byte(buffer, '}');
3721
17.1k
            break;
3722
0
        }
3723
24.4k
        case PM_LOCAL_VARIABLE_TARGET_NODE: {
  Branch (3723:9): [True: 24.4k, False: 981k]
3724
24.4k
            pm_buffer_append_string(buffer, "{\"type\":\"LocalVariableTargetNode\",\"location\":", 45);
3725
3726
24.4k
            const pm_local_variable_target_node_t *cast = (const pm_local_variable_target_node_t *) node;
3727
24.4k
            pm_dump_json_location(buffer, &cast->base.location);
3728
3729
            // Dump the name field
3730
24.4k
            pm_buffer_append_byte(buffer, ',');
3731
24.4k
            pm_buffer_append_string(buffer, "\"name\":", 7);
3732
24.4k
            pm_dump_json_constant(buffer, parser, cast->name);
3733
3734
            // Dump the depth field
3735
24.4k
            pm_buffer_append_byte(buffer, ',');
3736
24.4k
            pm_buffer_append_string(buffer, "\"depth\":", 8);
3737
24.4k
            pm_buffer_append_format(buffer, "%" PRIu32, cast->depth);
3738
3739
24.4k
            pm_buffer_append_byte(buffer, '}');
3740
24.4k
            break;
3741
0
        }
3742
9.68k
        case PM_LOCAL_VARIABLE_WRITE_NODE: {
  Branch (3742:9): [True: 9.68k, False: 996k]
3743
9.68k
            pm_buffer_append_string(buffer, "{\"type\":\"LocalVariableWriteNode\",\"location\":", 44);
3744
3745
9.68k
            const pm_local_variable_write_node_t *cast = (const pm_local_variable_write_node_t *) node;
3746
9.68k
            pm_dump_json_location(buffer, &cast->base.location);
3747
3748
            // Dump the name field
3749
9.68k
            pm_buffer_append_byte(buffer, ',');
3750
9.68k
            pm_buffer_append_string(buffer, "\"name\":", 7);
3751
9.68k
            pm_dump_json_constant(buffer, parser, cast->name);
3752
3753
            // Dump the depth field
3754
9.68k
            pm_buffer_append_byte(buffer, ',');
3755
9.68k
            pm_buffer_append_string(buffer, "\"depth\":", 8);
3756
9.68k
            pm_buffer_append_format(buffer, "%" PRIu32, cast->depth);
3757
3758
            // Dump the name_loc field
3759
9.68k
            pm_buffer_append_byte(buffer, ',');
3760
9.68k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
3761
9.68k
            pm_dump_json_location(buffer, &cast->name_loc);
3762
3763
            // Dump the value field
3764
9.68k
            pm_buffer_append_byte(buffer, ',');
3765
9.68k
            pm_buffer_append_string(buffer, "\"value\":", 8);
3766
9.68k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3767
3768
            // Dump the operator_loc field
3769
9.68k
            pm_buffer_append_byte(buffer, ',');
3770
9.68k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3771
9.68k
            pm_dump_json_location(buffer, &cast->operator_loc);
3772
3773
9.68k
            pm_buffer_append_byte(buffer, '}');
3774
9.68k
            break;
3775
0
        }
3776
11
        case PM_MATCH_LAST_LINE_NODE: {
  Branch (3776:9): [True: 11, False: 1.00M]
3777
11
            pm_buffer_append_string(buffer, "{\"type\":\"MatchLastLineNode\",\"location\":", 39);
3778
3779
11
            const pm_match_last_line_node_t *cast = (const pm_match_last_line_node_t *) node;
3780
11
            pm_dump_json_location(buffer, &cast->base.location);
3781
3782
            // Dump the RegularExpressionFlags field
3783
11
            pm_buffer_append_byte(buffer, ',');
3784
11
            pm_buffer_append_string(buffer, "\"flags\":", 8);
3785
11
            size_t flags = 0;
3786
11
            pm_buffer_append_byte(buffer, '[');
3787
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
3788
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3788:21): [True: 0, False: 0]
3789
0
                pm_buffer_append_string(buffer, "\"IGNORE_CASE\"", 13);
3790
0
                flags++;
3791
0
            }
3792
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EXTENDED)) {
3793
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3793:21): [True: 0, False: 0]
3794
0
                pm_buffer_append_string(buffer, "\"EXTENDED\"", 10);
3795
0
                flags++;
3796
0
            }
3797
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE)) {
3798
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3798:21): [True: 0, False: 0]
3799
0
                pm_buffer_append_string(buffer, "\"MULTI_LINE\"", 12);
3800
0
                flags++;
3801
0
            }
3802
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ONCE)) {
3803
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3803:21): [True: 0, False: 0]
3804
0
                pm_buffer_append_string(buffer, "\"ONCE\"", 6);
3805
0
                flags++;
3806
0
            }
3807
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EUC_JP)) {
3808
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3808:21): [True: 0, False: 0]
3809
0
                pm_buffer_append_string(buffer, "\"EUC_JP\"", 8);
3810
0
                flags++;
3811
0
            }
3812
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT)) {
3813
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3813:21): [True: 0, False: 0]
3814
0
                pm_buffer_append_string(buffer, "\"ASCII_8BIT\"", 12);
3815
0
                flags++;
3816
0
            }
3817
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J)) {
3818
1
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3818:21): [True: 0, False: 1]
3819
1
                pm_buffer_append_string(buffer, "\"WINDOWS_31J\"", 13);
3820
1
                flags++;
3821
1
            }
3822
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_UTF_8)) {
3823
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3823:21): [True: 0, False: 0]
3824
0
                pm_buffer_append_string(buffer, "\"UTF_8\"", 7);
3825
0
                flags++;
3826
0
            }
3827
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING)) {
3828
1
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3828:21): [True: 0, False: 1]
3829
1
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
3830
1
                flags++;
3831
1
            }
3832
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING)) {
3833
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (3833:21): [True: 0, False: 0]
3834
0
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
3835
0
                flags++;
3836
0
            }
3837
11
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING)) {
3838
8
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (3838:21): [True: 0, False: 8]
3839
8
                pm_buffer_append_string(buffer, "\"FORCED_US_ASCII_ENCODING\"", 26);
3840
8
                flags++;
3841
8
            }
3842
11
            pm_buffer_append_byte(buffer, ']');
3843
3844
            // Dump the opening_loc field
3845
11
            pm_buffer_append_byte(buffer, ',');
3846
11
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
3847
11
            pm_dump_json_location(buffer, &cast->opening_loc);
3848
3849
            // Dump the content_loc field
3850
11
            pm_buffer_append_byte(buffer, ',');
3851
11
            pm_buffer_append_string(buffer, "\"content_loc\":", 14);
3852
11
            pm_dump_json_location(buffer, &cast->content_loc);
3853
3854
            // Dump the closing_loc field
3855
11
            pm_buffer_append_byte(buffer, ',');
3856
11
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
3857
11
            pm_dump_json_location(buffer, &cast->closing_loc);
3858
3859
            // Dump the unescaped field
3860
11
            pm_buffer_append_byte(buffer, ',');
3861
11
            pm_buffer_append_string(buffer, "\"unescaped\":", 12);
3862
11
            const pm_string_t *unescaped = &cast->unescaped;
3863
11
            pm_buffer_append_byte(buffer, '"');
3864
11
            pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
3865
11
            pm_buffer_append_byte(buffer, '"');
3866
3867
11
            pm_buffer_append_byte(buffer, '}');
3868
11
            break;
3869
0
        }
3870
1.80k
        case PM_MATCH_PREDICATE_NODE: {
  Branch (3870:9): [True: 1.80k, False: 1.00M]
3871
1.80k
            pm_buffer_append_string(buffer, "{\"type\":\"MatchPredicateNode\",\"location\":", 40);
3872
3873
1.80k
            const pm_match_predicate_node_t *cast = (const pm_match_predicate_node_t *) node;
3874
1.80k
            pm_dump_json_location(buffer, &cast->base.location);
3875
3876
            // Dump the value field
3877
1.80k
            pm_buffer_append_byte(buffer, ',');
3878
1.80k
            pm_buffer_append_string(buffer, "\"value\":", 8);
3879
1.80k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3880
3881
            // Dump the pattern field
3882
1.80k
            pm_buffer_append_byte(buffer, ',');
3883
1.80k
            pm_buffer_append_string(buffer, "\"pattern\":", 10);
3884
1.80k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->pattern);
3885
3886
            // Dump the keyword_loc field
3887
1.80k
            pm_buffer_append_byte(buffer, ',');
3888
1.80k
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
3889
1.80k
            pm_dump_json_location(buffer, &cast->keyword_loc);
3890
3891
1.80k
            pm_buffer_append_byte(buffer, '}');
3892
1.80k
            break;
3893
0
        }
3894
6.41k
        case PM_MATCH_REQUIRED_NODE: {
  Branch (3894:9): [True: 6.41k, False: 999k]
3895
6.41k
            pm_buffer_append_string(buffer, "{\"type\":\"MatchRequiredNode\",\"location\":", 39);
3896
3897
6.41k
            const pm_match_required_node_t *cast = (const pm_match_required_node_t *) node;
3898
6.41k
            pm_dump_json_location(buffer, &cast->base.location);
3899
3900
            // Dump the value field
3901
6.41k
            pm_buffer_append_byte(buffer, ',');
3902
6.41k
            pm_buffer_append_string(buffer, "\"value\":", 8);
3903
6.41k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
3904
3905
            // Dump the pattern field
3906
6.41k
            pm_buffer_append_byte(buffer, ',');
3907
6.41k
            pm_buffer_append_string(buffer, "\"pattern\":", 10);
3908
6.41k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->pattern);
3909
3910
            // Dump the operator_loc field
3911
6.41k
            pm_buffer_append_byte(buffer, ',');
3912
6.41k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
3913
6.41k
            pm_dump_json_location(buffer, &cast->operator_loc);
3914
3915
6.41k
            pm_buffer_append_byte(buffer, '}');
3916
6.41k
            break;
3917
0
        }
3918
1.12k
        case PM_MATCH_WRITE_NODE: {
  Branch (3918:9): [True: 1.12k, False: 1.00M]
3919
1.12k
            pm_buffer_append_string(buffer, "{\"type\":\"MatchWriteNode\",\"location\":", 36);
3920
3921
1.12k
            const pm_match_write_node_t *cast = (const pm_match_write_node_t *) node;
3922
1.12k
            pm_dump_json_location(buffer, &cast->base.location);
3923
3924
            // Dump the call field
3925
1.12k
            pm_buffer_append_byte(buffer, ',');
3926
1.12k
            pm_buffer_append_string(buffer, "\"call\":", 7);
3927
1.12k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->call);
3928
3929
            // Dump the targets field
3930
1.12k
            pm_buffer_append_byte(buffer, ',');
3931
1.12k
            pm_buffer_append_string(buffer, "\"targets\":", 10);
3932
1.12k
            const pm_node_list_t *targets = &cast->targets;
3933
1.12k
            pm_buffer_append_byte(buffer, '[');
3934
3935
4.27k
            for (size_t index = 0; index < targets->size; 
index++3.14k
) {
  Branch (3935:36): [True: 3.14k, False: 1.12k]
3936
3.14k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')2.01k
;
  Branch (3936:21): [True: 2.01k, False: 1.12k]
3937
3.14k
                pm_dump_json(buffer, parser, targets->nodes[index]);
3938
3.14k
            }
3939
1.12k
            pm_buffer_append_byte(buffer, ']');
3940
3941
1.12k
            pm_buffer_append_byte(buffer, '}');
3942
1.12k
            break;
3943
0
        }
3944
1.14k
        case PM_MODULE_NODE: {
  Branch (3944:9): [True: 1.14k, False: 1.00M]
3945
1.14k
            pm_buffer_append_string(buffer, "{\"type\":\"ModuleNode\",\"location\":", 32);
3946
3947
1.14k
            const pm_module_node_t *cast = (const pm_module_node_t *) node;
3948
1.14k
            pm_dump_json_location(buffer, &cast->base.location);
3949
3950
            // Dump the locals field
3951
1.14k
            pm_buffer_append_byte(buffer, ',');
3952
1.14k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
3953
1.14k
            const pm_constant_id_list_t *locals = &cast->locals;
3954
1.14k
            pm_buffer_append_byte(buffer, '[');
3955
3956
1.65k
            for (size_t index = 0; index < locals->size; 
index++511
) {
  Branch (3956:36): [True: 511, False: 1.14k]
3957
511
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')114
;
  Branch (3957:21): [True: 114, False: 397]
3958
511
                pm_dump_json_constant(buffer, parser, locals->ids[index]);
3959
511
            }
3960
1.14k
            pm_buffer_append_byte(buffer, ']');
3961
3962
            // Dump the module_keyword_loc field
3963
1.14k
            pm_buffer_append_byte(buffer, ',');
3964
1.14k
            pm_buffer_append_string(buffer, "\"module_keyword_loc\":", 21);
3965
1.14k
            pm_dump_json_location(buffer, &cast->module_keyword_loc);
3966
3967
            // Dump the constant_path field
3968
1.14k
            pm_buffer_append_byte(buffer, ',');
3969
1.14k
            pm_buffer_append_string(buffer, "\"constant_path\":", 16);
3970
1.14k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->constant_path);
3971
3972
            // Dump the body field
3973
1.14k
            pm_buffer_append_byte(buffer, ',');
3974
1.14k
            pm_buffer_append_string(buffer, "\"body\":", 7);
3975
1.14k
            if (cast->body != NULL) {
  Branch (3975:17): [True: 1.02k, False: 119]
3976
1.02k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->body);
3977
1.02k
            } else {
3978
119
                pm_buffer_append_string(buffer, "null", 4);
3979
119
            }
3980
3981
            // Dump the end_keyword_loc field
3982
1.14k
            pm_buffer_append_byte(buffer, ',');
3983
1.14k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
3984
1.14k
            pm_dump_json_location(buffer, &cast->end_keyword_loc);
3985
3986
            // Dump the name field
3987
1.14k
            pm_buffer_append_byte(buffer, ',');
3988
1.14k
            pm_buffer_append_string(buffer, "\"name\":", 7);
3989
1.14k
            pm_dump_json_constant(buffer, parser, cast->name);
3990
3991
1.14k
            pm_buffer_append_byte(buffer, '}');
3992
1.14k
            break;
3993
0
        }
3994
11.5k
        case PM_MULTI_TARGET_NODE: {
  Branch (3994:9): [True: 11.5k, False: 994k]
3995
11.5k
            pm_buffer_append_string(buffer, "{\"type\":\"MultiTargetNode\",\"location\":", 37);
3996
3997
11.5k
            const pm_multi_target_node_t *cast = (const pm_multi_target_node_t *) node;
3998
11.5k
            pm_dump_json_location(buffer, &cast->base.location);
3999
4000
            // Dump the lefts field
4001
11.5k
            pm_buffer_append_byte(buffer, ',');
4002
11.5k
            pm_buffer_append_string(buffer, "\"lefts\":", 8);
4003
11.5k
            const pm_node_list_t *lefts = &cast->lefts;
4004
11.5k
            pm_buffer_append_byte(buffer, '[');
4005
4006
25.5k
            for (size_t index = 0; index < lefts->size; 
index++13.9k
) {
  Branch (4006:36): [True: 13.9k, False: 11.5k]
4007
13.9k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')4.68k
;
  Branch (4007:21): [True: 4.68k, False: 9.24k]
4008
13.9k
                pm_dump_json(buffer, parser, lefts->nodes[index]);
4009
13.9k
            }
4010
11.5k
            pm_buffer_append_byte(buffer, ']');
4011
4012
            // Dump the rest field
4013
11.5k
            pm_buffer_append_byte(buffer, ',');
4014
11.5k
            pm_buffer_append_string(buffer, "\"rest\":", 7);
4015
11.5k
            if (cast->rest != NULL) {
  Branch (4015:17): [True: 5.77k, False: 5.81k]
4016
5.77k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->rest);
4017
5.81k
            } else {
4018
5.81k
                pm_buffer_append_string(buffer, "null", 4);
4019
5.81k
            }
4020
4021
            // Dump the rights field
4022
11.5k
            pm_buffer_append_byte(buffer, ',');
4023
11.5k
            pm_buffer_append_string(buffer, "\"rights\":", 9);
4024
11.5k
            const pm_node_list_t *rights = &cast->rights;
4025
11.5k
            pm_buffer_append_byte(buffer, '[');
4026
4027
15.3k
            for (size_t index = 0; index < rights->size; 
index++3.74k
) {
  Branch (4027:36): [True: 3.74k, False: 11.5k]
4028
3.74k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')886
;
  Branch (4028:21): [True: 886, False: 2.85k]
4029
3.74k
                pm_dump_json(buffer, parser, rights->nodes[index]);
4030
3.74k
            }
4031
11.5k
            pm_buffer_append_byte(buffer, ']');
4032
4033
            // Dump the lparen_loc field
4034
11.5k
            pm_buffer_append_byte(buffer, ',');
4035
11.5k
            pm_buffer_append_string(buffer, "\"lparen_loc\":", 13);
4036
11.5k
            if (cast->lparen_loc.length != 0) {
  Branch (4036:17): [True: 8.31k, False: 3.27k]
4037
8.31k
                pm_dump_json_location(buffer, &cast->lparen_loc);
4038
8.31k
            } else {
4039
3.27k
                pm_buffer_append_string(buffer, "null", 4);
4040
3.27k
            }
4041
4042
            // Dump the rparen_loc field
4043
11.5k
            pm_buffer_append_byte(buffer, ',');
4044
11.5k
            pm_buffer_append_string(buffer, "\"rparen_loc\":", 13);
4045
11.5k
            if (cast->rparen_loc.length != 0) {
  Branch (4045:17): [True: 6.50k, False: 5.08k]
4046
6.50k
                pm_dump_json_location(buffer, &cast->rparen_loc);
4047
6.50k
            } else {
4048
5.08k
                pm_buffer_append_string(buffer, "null", 4);
4049
5.08k
            }
4050
4051
11.5k
            pm_buffer_append_byte(buffer, '}');
4052
11.5k
            break;
4053
0
        }
4054
4.98k
        case PM_MULTI_WRITE_NODE: {
  Branch (4054:9): [True: 4.98k, False: 1.00M]
4055
4.98k
            pm_buffer_append_string(buffer, "{\"type\":\"MultiWriteNode\",\"location\":", 36);
4056
4057
4.98k
            const pm_multi_write_node_t *cast = (const pm_multi_write_node_t *) node;
4058
4.98k
            pm_dump_json_location(buffer, &cast->base.location);
4059
4060
            // Dump the lefts field
4061
4.98k
            pm_buffer_append_byte(buffer, ',');
4062
4.98k
            pm_buffer_append_string(buffer, "\"lefts\":", 8);
4063
4.98k
            const pm_node_list_t *lefts = &cast->lefts;
4064
4.98k
            pm_buffer_append_byte(buffer, '[');
4065
4066
12.3k
            for (size_t index = 0; index < lefts->size; 
index++7.32k
) {
  Branch (4066:36): [True: 7.32k, False: 4.98k]
4067
7.32k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')3.23k
;
  Branch (4067:21): [True: 3.23k, False: 4.09k]
4068
7.32k
                pm_dump_json(buffer, parser, lefts->nodes[index]);
4069
7.32k
            }
4070
4.98k
            pm_buffer_append_byte(buffer, ']');
4071
4072
            // Dump the rest field
4073
4.98k
            pm_buffer_append_byte(buffer, ',');
4074
4.98k
            pm_buffer_append_string(buffer, "\"rest\":", 7);
4075
4.98k
            if (cast->rest != NULL) {
  Branch (4075:17): [True: 1.84k, False: 3.13k]
4076
1.84k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->rest);
4077
3.13k
            } else {
4078
3.13k
                pm_buffer_append_string(buffer, "null", 4);
4079
3.13k
            }
4080
4081
            // Dump the rights field
4082
4.98k
            pm_buffer_append_byte(buffer, ',');
4083
4.98k
            pm_buffer_append_string(buffer, "\"rights\":", 9);
4084
4.98k
            const pm_node_list_t *rights = &cast->rights;
4085
4.98k
            pm_buffer_append_byte(buffer, '[');
4086
4087
5.37k
            for (size_t index = 0; index < rights->size; 
index++389
) {
  Branch (4087:36): [True: 389, False: 4.98k]
4088
389
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')77
;
  Branch (4088:21): [True: 77, False: 312]
4089
389
                pm_dump_json(buffer, parser, rights->nodes[index]);
4090
389
            }
4091
4.98k
            pm_buffer_append_byte(buffer, ']');
4092
4093
            // Dump the lparen_loc field
4094
4.98k
            pm_buffer_append_byte(buffer, ',');
4095
4.98k
            pm_buffer_append_string(buffer, "\"lparen_loc\":", 13);
4096
4.98k
            if (cast->lparen_loc.length != 0) {
  Branch (4096:17): [True: 3.56k, False: 1.41k]
4097
3.56k
                pm_dump_json_location(buffer, &cast->lparen_loc);
4098
3.56k
            } else {
4099
1.41k
                pm_buffer_append_string(buffer, "null", 4);
4100
1.41k
            }
4101
4102
            // Dump the rparen_loc field
4103
4.98k
            pm_buffer_append_byte(buffer, ',');
4104
4.98k
            pm_buffer_append_string(buffer, "\"rparen_loc\":", 13);
4105
4.98k
            if (cast->rparen_loc.length != 0) {
  Branch (4105:17): [True: 3.56k, False: 1.41k]
4106
3.56k
                pm_dump_json_location(buffer, &cast->rparen_loc);
4107
3.56k
            } else {
4108
1.41k
                pm_buffer_append_string(buffer, "null", 4);
4109
1.41k
            }
4110
4111
            // Dump the operator_loc field
4112
4.98k
            pm_buffer_append_byte(buffer, ',');
4113
4.98k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4114
4.98k
            pm_dump_json_location(buffer, &cast->operator_loc);
4115
4116
            // Dump the value field
4117
4.98k
            pm_buffer_append_byte(buffer, ',');
4118
4.98k
            pm_buffer_append_string(buffer, "\"value\":", 8);
4119
4.98k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
4120
4121
4.98k
            pm_buffer_append_byte(buffer, '}');
4122
4.98k
            break;
4123
0
        }
4124
113
        case PM_NEXT_NODE: {
  Branch (4124:9): [True: 113, False: 1.00M]
4125
113
            pm_buffer_append_string(buffer, "{\"type\":\"NextNode\",\"location\":", 30);
4126
4127
113
            const pm_next_node_t *cast = (const pm_next_node_t *) node;
4128
113
            pm_dump_json_location(buffer, &cast->base.location);
4129
4130
            // Dump the arguments field
4131
113
            pm_buffer_append_byte(buffer, ',');
4132
113
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
4133
113
            if (cast->arguments != NULL) {
  Branch (4133:17): [True: 14, False: 99]
4134
14
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
4135
99
            } else {
4136
99
                pm_buffer_append_string(buffer, "null", 4);
4137
99
            }
4138
4139
            // Dump the keyword_loc field
4140
113
            pm_buffer_append_byte(buffer, ',');
4141
113
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4142
113
            pm_dump_json_location(buffer, &cast->keyword_loc);
4143
4144
113
            pm_buffer_append_byte(buffer, '}');
4145
113
            break;
4146
0
        }
4147
1.35k
        case PM_NIL_NODE: {
  Branch (4147:9): [True: 1.35k, False: 1.00M]
4148
1.35k
            pm_buffer_append_string(buffer, "{\"type\":\"NilNode\",\"location\":", 29);
4149
4150
1.35k
            const pm_nil_node_t *cast = (const pm_nil_node_t *) node;
4151
1.35k
            pm_dump_json_location(buffer, &cast->base.location);
4152
4153
1.35k
            pm_buffer_append_byte(buffer, '}');
4154
1.35k
            break;
4155
0
        }
4156
1
        case PM_NO_BLOCK_PARAMETER_NODE: {
  Branch (4156:9): [True: 1, False: 1.00M]
4157
1
            pm_buffer_append_string(buffer, "{\"type\":\"NoBlockParameterNode\",\"location\":", 42);
4158
4159
1
            const pm_no_block_parameter_node_t *cast = (const pm_no_block_parameter_node_t *) node;
4160
1
            pm_dump_json_location(buffer, &cast->base.location);
4161
4162
            // Dump the operator_loc field
4163
1
            pm_buffer_append_byte(buffer, ',');
4164
1
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4165
1
            pm_dump_json_location(buffer, &cast->operator_loc);
4166
4167
            // Dump the keyword_loc field
4168
1
            pm_buffer_append_byte(buffer, ',');
4169
1
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4170
1
            pm_dump_json_location(buffer, &cast->keyword_loc);
4171
4172
1
            pm_buffer_append_byte(buffer, '}');
4173
1
            break;
4174
0
        }
4175
235
        case PM_NO_KEYWORDS_PARAMETER_NODE: {
  Branch (4175:9): [True: 235, False: 1.00M]
4176
235
            pm_buffer_append_string(buffer, "{\"type\":\"NoKeywordsParameterNode\",\"location\":", 45);
4177
4178
235
            const pm_no_keywords_parameter_node_t *cast = (const pm_no_keywords_parameter_node_t *) node;
4179
235
            pm_dump_json_location(buffer, &cast->base.location);
4180
4181
            // Dump the operator_loc field
4182
235
            pm_buffer_append_byte(buffer, ',');
4183
235
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4184
235
            pm_dump_json_location(buffer, &cast->operator_loc);
4185
4186
            // Dump the keyword_loc field
4187
235
            pm_buffer_append_byte(buffer, ',');
4188
235
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4189
235
            pm_dump_json_location(buffer, &cast->keyword_loc);
4190
4191
235
            pm_buffer_append_byte(buffer, '}');
4192
235
            break;
4193
0
        }
4194
85
        case PM_NUMBERED_PARAMETERS_NODE: {
  Branch (4194:9): [True: 85, False: 1.00M]
4195
85
            pm_buffer_append_string(buffer, "{\"type\":\"NumberedParametersNode\",\"location\":", 44);
4196
4197
85
            const pm_numbered_parameters_node_t *cast = (const pm_numbered_parameters_node_t *) node;
4198
85
            pm_dump_json_location(buffer, &cast->base.location);
4199
4200
            // Dump the maximum field
4201
85
            pm_buffer_append_byte(buffer, ',');
4202
85
            pm_buffer_append_string(buffer, "\"maximum\":", 10);
4203
85
            pm_buffer_append_format(buffer, "%" PRIu8, cast->maximum);
4204
4205
85
            pm_buffer_append_byte(buffer, '}');
4206
85
            break;
4207
0
        }
4208
319
        case PM_NUMBERED_REFERENCE_READ_NODE: {
  Branch (4208:9): [True: 319, False: 1.00M]
4209
319
            pm_buffer_append_string(buffer, "{\"type\":\"NumberedReferenceReadNode\",\"location\":", 47);
4210
4211
319
            const pm_numbered_reference_read_node_t *cast = (const pm_numbered_reference_read_node_t *) node;
4212
319
            pm_dump_json_location(buffer, &cast->base.location);
4213
4214
            // Dump the number field
4215
319
            pm_buffer_append_byte(buffer, ',');
4216
319
            pm_buffer_append_string(buffer, "\"number\":", 9);
4217
319
            pm_buffer_append_format(buffer, "%" PRIu32, cast->number);
4218
4219
319
            pm_buffer_append_byte(buffer, '}');
4220
319
            break;
4221
0
        }
4222
2.17k
        case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
  Branch (4222:9): [True: 2.17k, False: 1.00M]
4223
2.17k
            pm_buffer_append_string(buffer, "{\"type\":\"OptionalKeywordParameterNode\",\"location\":", 50);
4224
4225
2.17k
            const pm_optional_keyword_parameter_node_t *cast = (const pm_optional_keyword_parameter_node_t *) node;
4226
2.17k
            pm_dump_json_location(buffer, &cast->base.location);
4227
4228
            // Dump the ParameterFlags field
4229
2.17k
            pm_buffer_append_byte(buffer, ',');
4230
2.17k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4231
2.17k
            size_t flags = 0;
4232
2.17k
            pm_buffer_append_byte(buffer, '[');
4233
2.17k
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
4234
59
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4234:21): [True: 0, False: 59]
4235
59
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
4236
59
                flags++;
4237
59
            }
4238
2.17k
            pm_buffer_append_byte(buffer, ']');
4239
4240
            // Dump the name field
4241
2.17k
            pm_buffer_append_byte(buffer, ',');
4242
2.17k
            pm_buffer_append_string(buffer, "\"name\":", 7);
4243
2.17k
            pm_dump_json_constant(buffer, parser, cast->name);
4244
4245
            // Dump the name_loc field
4246
2.17k
            pm_buffer_append_byte(buffer, ',');
4247
2.17k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
4248
2.17k
            pm_dump_json_location(buffer, &cast->name_loc);
4249
4250
            // Dump the value field
4251
2.17k
            pm_buffer_append_byte(buffer, ',');
4252
2.17k
            pm_buffer_append_string(buffer, "\"value\":", 8);
4253
2.17k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
4254
4255
2.17k
            pm_buffer_append_byte(buffer, '}');
4256
2.17k
            break;
4257
0
        }
4258
3.70k
        case PM_OPTIONAL_PARAMETER_NODE: {
  Branch (4258:9): [True: 3.70k, False: 1.00M]
4259
3.70k
            pm_buffer_append_string(buffer, "{\"type\":\"OptionalParameterNode\",\"location\":", 43);
4260
4261
3.70k
            const pm_optional_parameter_node_t *cast = (const pm_optional_parameter_node_t *) node;
4262
3.70k
            pm_dump_json_location(buffer, &cast->base.location);
4263
4264
            // Dump the ParameterFlags field
4265
3.70k
            pm_buffer_append_byte(buffer, ',');
4266
3.70k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4267
3.70k
            size_t flags = 0;
4268
3.70k
            pm_buffer_append_byte(buffer, '[');
4269
3.70k
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
4270
230
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4270:21): [True: 0, False: 230]
4271
230
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
4272
230
                flags++;
4273
230
            }
4274
3.70k
            pm_buffer_append_byte(buffer, ']');
4275
4276
            // Dump the name field
4277
3.70k
            pm_buffer_append_byte(buffer, ',');
4278
3.70k
            pm_buffer_append_string(buffer, "\"name\":", 7);
4279
3.70k
            pm_dump_json_constant(buffer, parser, cast->name);
4280
4281
            // Dump the name_loc field
4282
3.70k
            pm_buffer_append_byte(buffer, ',');
4283
3.70k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
4284
3.70k
            pm_dump_json_location(buffer, &cast->name_loc);
4285
4286
            // Dump the operator_loc field
4287
3.70k
            pm_buffer_append_byte(buffer, ',');
4288
3.70k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4289
3.70k
            pm_dump_json_location(buffer, &cast->operator_loc);
4290
4291
            // Dump the value field
4292
3.70k
            pm_buffer_append_byte(buffer, ',');
4293
3.70k
            pm_buffer_append_string(buffer, "\"value\":", 8);
4294
3.70k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->value);
4295
4296
3.70k
            pm_buffer_append_byte(buffer, '}');
4297
3.70k
            break;
4298
0
        }
4299
1.11k
        case PM_OR_NODE: {
  Branch (4299:9): [True: 1.11k, False: 1.00M]
4300
1.11k
            pm_buffer_append_string(buffer, "{\"type\":\"OrNode\",\"location\":", 28);
4301
4302
1.11k
            const pm_or_node_t *cast = (const pm_or_node_t *) node;
4303
1.11k
            pm_dump_json_location(buffer, &cast->base.location);
4304
4305
            // Dump the left field
4306
1.11k
            pm_buffer_append_byte(buffer, ',');
4307
1.11k
            pm_buffer_append_string(buffer, "\"left\":", 7);
4308
1.11k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->left);
4309
4310
            // Dump the right field
4311
1.11k
            pm_buffer_append_byte(buffer, ',');
4312
1.11k
            pm_buffer_append_string(buffer, "\"right\":", 8);
4313
1.11k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->right);
4314
4315
            // Dump the operator_loc field
4316
1.11k
            pm_buffer_append_byte(buffer, ',');
4317
1.11k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4318
1.11k
            pm_dump_json_location(buffer, &cast->operator_loc);
4319
4320
1.11k
            pm_buffer_append_byte(buffer, '}');
4321
1.11k
            break;
4322
0
        }
4323
18.8k
        case PM_PARAMETERS_NODE: {
  Branch (4323:9): [True: 18.8k, False: 987k]
4324
18.8k
            pm_buffer_append_string(buffer, "{\"type\":\"ParametersNode\",\"location\":", 36);
4325
4326
18.8k
            const pm_parameters_node_t *cast = (const pm_parameters_node_t *) node;
4327
18.8k
            pm_dump_json_location(buffer, &cast->base.location);
4328
4329
            // Dump the requireds field
4330
18.8k
            pm_buffer_append_byte(buffer, ',');
4331
18.8k
            pm_buffer_append_string(buffer, "\"requireds\":", 12);
4332
18.8k
            const pm_node_list_t *requireds = &cast->requireds;
4333
18.8k
            pm_buffer_append_byte(buffer, '[');
4334
4335
31.2k
            for (size_t index = 0; index < requireds->size; 
index++12.4k
) {
  Branch (4335:36): [True: 12.4k, False: 18.8k]
4336
12.4k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')1.80k
;
  Branch (4336:21): [True: 1.80k, False: 10.6k]
4337
12.4k
                pm_dump_json(buffer, parser, requireds->nodes[index]);
4338
12.4k
            }
4339
18.8k
            pm_buffer_append_byte(buffer, ']');
4340
4341
            // Dump the optionals field
4342
18.8k
            pm_buffer_append_byte(buffer, ',');
4343
18.8k
            pm_buffer_append_string(buffer, "\"optionals\":", 12);
4344
18.8k
            const pm_node_list_t *optionals = &cast->optionals;
4345
18.8k
            pm_buffer_append_byte(buffer, '[');
4346
4347
22.5k
            for (size_t index = 0; index < optionals->size; 
index++3.70k
) {
  Branch (4347:36): [True: 3.70k, False: 18.8k]
4348
3.70k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')350
;
  Branch (4348:21): [True: 350, False: 3.35k]
4349
3.70k
                pm_dump_json(buffer, parser, optionals->nodes[index]);
4350
3.70k
            }
4351
18.8k
            pm_buffer_append_byte(buffer, ']');
4352
4353
            // Dump the rest field
4354
18.8k
            pm_buffer_append_byte(buffer, ',');
4355
18.8k
            pm_buffer_append_string(buffer, "\"rest\":", 7);
4356
18.8k
            if (cast->rest != NULL) {
  Branch (4356:17): [True: 4.47k, False: 14.3k]
4357
4.47k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->rest);
4358
14.3k
            } else {
4359
14.3k
                pm_buffer_append_string(buffer, "null", 4);
4360
14.3k
            }
4361
4362
            // Dump the posts field
4363
18.8k
            pm_buffer_append_byte(buffer, ',');
4364
18.8k
            pm_buffer_append_string(buffer, "\"posts\":", 8);
4365
18.8k
            const pm_node_list_t *posts = &cast->posts;
4366
18.8k
            pm_buffer_append_byte(buffer, '[');
4367
4368
20.8k
            for (size_t index = 0; index < posts->size; 
index++2.06k
) {
  Branch (4368:36): [True: 2.06k, False: 18.8k]
4369
2.06k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')323
;
  Branch (4369:21): [True: 323, False: 1.74k]
4370
2.06k
                pm_dump_json(buffer, parser, posts->nodes[index]);
4371
2.06k
            }
4372
18.8k
            pm_buffer_append_byte(buffer, ']');
4373
4374
            // Dump the keywords field
4375
18.8k
            pm_buffer_append_byte(buffer, ',');
4376
18.8k
            pm_buffer_append_string(buffer, "\"keywords\":", 11);
4377
18.8k
            const pm_node_list_t *keywords = &cast->keywords;
4378
18.8k
            pm_buffer_append_byte(buffer, '[');
4379
4380
22.6k
            for (size_t index = 0; index < keywords->size; 
index++3.83k
) {
  Branch (4380:36): [True: 3.83k, False: 18.8k]
4381
3.83k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')1.12k
;
  Branch (4381:21): [True: 1.12k, False: 2.71k]
4382
3.83k
                pm_dump_json(buffer, parser, keywords->nodes[index]);
4383
3.83k
            }
4384
18.8k
            pm_buffer_append_byte(buffer, ']');
4385
4386
            // Dump the keyword_rest field
4387
18.8k
            pm_buffer_append_byte(buffer, ',');
4388
18.8k
            pm_buffer_append_string(buffer, "\"keyword_rest\":", 15);
4389
18.8k
            if (cast->keyword_rest != NULL) {
  Branch (4389:17): [True: 2.04k, False: 16.7k]
4390
2.04k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->keyword_rest);
4391
16.7k
            } else {
4392
16.7k
                pm_buffer_append_string(buffer, "null", 4);
4393
16.7k
            }
4394
4395
            // Dump the block field
4396
18.8k
            pm_buffer_append_byte(buffer, ',');
4397
18.8k
            pm_buffer_append_string(buffer, "\"block\":", 8);
4398
18.8k
            if (cast->block != NULL) {
  Branch (4398:17): [True: 5.60k, False: 13.2k]
4399
5.60k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
4400
13.2k
            } else {
4401
13.2k
                pm_buffer_append_string(buffer, "null", 4);
4402
13.2k
            }
4403
4404
18.8k
            pm_buffer_append_byte(buffer, '}');
4405
18.8k
            break;
4406
0
        }
4407
22.7k
        case PM_PARENTHESES_NODE: {
  Branch (4407:9): [True: 22.7k, False: 983k]
4408
22.7k
            pm_buffer_append_string(buffer, "{\"type\":\"ParenthesesNode\",\"location\":", 37);
4409
4410
22.7k
            const pm_parentheses_node_t *cast = (const pm_parentheses_node_t *) node;
4411
22.7k
            pm_dump_json_location(buffer, &cast->base.location);
4412
4413
            // Dump the ParenthesesNodeFlags field
4414
22.7k
            pm_buffer_append_byte(buffer, ',');
4415
22.7k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4416
22.7k
            size_t flags = 0;
4417
22.7k
            pm_buffer_append_byte(buffer, '[');
4418
22.7k
            if (PM_NODE_FLAG_P(cast, PM_PARENTHESES_NODE_FLAGS_MULTIPLE_STATEMENTS)) {
4419
18.3k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4419:21): [True: 0, False: 18.3k]
4420
18.3k
                pm_buffer_append_string(buffer, "\"MULTIPLE_STATEMENTS\"", 21);
4421
18.3k
                flags++;
4422
18.3k
            }
4423
22.7k
            pm_buffer_append_byte(buffer, ']');
4424
4425
            // Dump the body field
4426
22.7k
            pm_buffer_append_byte(buffer, ',');
4427
22.7k
            pm_buffer_append_string(buffer, "\"body\":", 7);
4428
22.7k
            if (cast->body != NULL) {
  Branch (4428:17): [True: 22.2k, False: 573]
4429
22.2k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->body);
4430
22.2k
            } else {
4431
573
                pm_buffer_append_string(buffer, "null", 4);
4432
573
            }
4433
4434
            // Dump the opening_loc field
4435
22.7k
            pm_buffer_append_byte(buffer, ',');
4436
22.7k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
4437
22.7k
            pm_dump_json_location(buffer, &cast->opening_loc);
4438
4439
            // Dump the closing_loc field
4440
22.7k
            pm_buffer_append_byte(buffer, ',');
4441
22.7k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
4442
22.7k
            pm_dump_json_location(buffer, &cast->closing_loc);
4443
4444
22.7k
            pm_buffer_append_byte(buffer, '}');
4445
22.7k
            break;
4446
0
        }
4447
367
        case PM_PINNED_EXPRESSION_NODE: {
  Branch (4447:9): [True: 367, False: 1.00M]
4448
367
            pm_buffer_append_string(buffer, "{\"type\":\"PinnedExpressionNode\",\"location\":", 42);
4449
4450
367
            const pm_pinned_expression_node_t *cast = (const pm_pinned_expression_node_t *) node;
4451
367
            pm_dump_json_location(buffer, &cast->base.location);
4452
4453
            // Dump the expression field
4454
367
            pm_buffer_append_byte(buffer, ',');
4455
367
            pm_buffer_append_string(buffer, "\"expression\":", 13);
4456
367
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->expression);
4457
4458
            // Dump the operator_loc field
4459
367
            pm_buffer_append_byte(buffer, ',');
4460
367
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4461
367
            pm_dump_json_location(buffer, &cast->operator_loc);
4462
4463
            // Dump the lparen_loc field
4464
367
            pm_buffer_append_byte(buffer, ',');
4465
367
            pm_buffer_append_string(buffer, "\"lparen_loc\":", 13);
4466
367
            pm_dump_json_location(buffer, &cast->lparen_loc);
4467
4468
            // Dump the rparen_loc field
4469
367
            pm_buffer_append_byte(buffer, ',');
4470
367
            pm_buffer_append_string(buffer, "\"rparen_loc\":", 13);
4471
367
            pm_dump_json_location(buffer, &cast->rparen_loc);
4472
4473
367
            pm_buffer_append_byte(buffer, '}');
4474
367
            break;
4475
0
        }
4476
700
        case PM_PINNED_VARIABLE_NODE: {
  Branch (4476:9): [True: 700, False: 1.00M]
4477
700
            pm_buffer_append_string(buffer, "{\"type\":\"PinnedVariableNode\",\"location\":", 40);
4478
4479
700
            const pm_pinned_variable_node_t *cast = (const pm_pinned_variable_node_t *) node;
4480
700
            pm_dump_json_location(buffer, &cast->base.location);
4481
4482
            // Dump the variable field
4483
700
            pm_buffer_append_byte(buffer, ',');
4484
700
            pm_buffer_append_string(buffer, "\"variable\":", 11);
4485
700
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->variable);
4486
4487
            // Dump the operator_loc field
4488
700
            pm_buffer_append_byte(buffer, ',');
4489
700
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4490
700
            pm_dump_json_location(buffer, &cast->operator_loc);
4491
4492
700
            pm_buffer_append_byte(buffer, '}');
4493
700
            break;
4494
0
        }
4495
575
        case PM_POST_EXECUTION_NODE: {
  Branch (4495:9): [True: 575, False: 1.00M]
4496
575
            pm_buffer_append_string(buffer, "{\"type\":\"PostExecutionNode\",\"location\":", 39);
4497
4498
575
            const pm_post_execution_node_t *cast = (const pm_post_execution_node_t *) node;
4499
575
            pm_dump_json_location(buffer, &cast->base.location);
4500
4501
            // Dump the statements field
4502
575
            pm_buffer_append_byte(buffer, ',');
4503
575
            pm_buffer_append_string(buffer, "\"statements\":", 13);
4504
575
            if (cast->statements != NULL) {
  Branch (4504:17): [True: 561, False: 14]
4505
561
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
4506
561
            } else {
4507
14
                pm_buffer_append_string(buffer, "null", 4);
4508
14
            }
4509
4510
            // Dump the keyword_loc field
4511
575
            pm_buffer_append_byte(buffer, ',');
4512
575
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4513
575
            pm_dump_json_location(buffer, &cast->keyword_loc);
4514
4515
            // Dump the opening_loc field
4516
575
            pm_buffer_append_byte(buffer, ',');
4517
575
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
4518
575
            pm_dump_json_location(buffer, &cast->opening_loc);
4519
4520
            // Dump the closing_loc field
4521
575
            pm_buffer_append_byte(buffer, ',');
4522
575
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
4523
575
            pm_dump_json_location(buffer, &cast->closing_loc);
4524
4525
575
            pm_buffer_append_byte(buffer, '}');
4526
575
            break;
4527
0
        }
4528
83
        case PM_PRE_EXECUTION_NODE: {
  Branch (4528:9): [True: 83, False: 1.00M]
4529
83
            pm_buffer_append_string(buffer, "{\"type\":\"PreExecutionNode\",\"location\":", 38);
4530
4531
83
            const pm_pre_execution_node_t *cast = (const pm_pre_execution_node_t *) node;
4532
83
            pm_dump_json_location(buffer, &cast->base.location);
4533
4534
            // Dump the statements field
4535
83
            pm_buffer_append_byte(buffer, ',');
4536
83
            pm_buffer_append_string(buffer, "\"statements\":", 13);
4537
83
            if (cast->statements != NULL) {
  Branch (4537:17): [True: 80, False: 3]
4538
80
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
4539
80
            } else {
4540
3
                pm_buffer_append_string(buffer, "null", 4);
4541
3
            }
4542
4543
            // Dump the keyword_loc field
4544
83
            pm_buffer_append_byte(buffer, ',');
4545
83
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4546
83
            pm_dump_json_location(buffer, &cast->keyword_loc);
4547
4548
            // Dump the opening_loc field
4549
83
            pm_buffer_append_byte(buffer, ',');
4550
83
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
4551
83
            pm_dump_json_location(buffer, &cast->opening_loc);
4552
4553
            // Dump the closing_loc field
4554
83
            pm_buffer_append_byte(buffer, ',');
4555
83
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
4556
83
            pm_dump_json_location(buffer, &cast->closing_loc);
4557
4558
83
            pm_buffer_append_byte(buffer, '}');
4559
83
            break;
4560
0
        }
4561
13.6k
        case PM_PROGRAM_NODE: {
  Branch (4561:9): [True: 13.6k, False: 992k]
4562
13.6k
            pm_buffer_append_string(buffer, "{\"type\":\"ProgramNode\",\"location\":", 33);
4563
4564
13.6k
            const pm_program_node_t *cast = (const pm_program_node_t *) node;
4565
13.6k
            pm_dump_json_location(buffer, &cast->base.location);
4566
4567
            // Dump the locals field
4568
13.6k
            pm_buffer_append_byte(buffer, ',');
4569
13.6k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
4570
13.6k
            const pm_constant_id_list_t *locals = &cast->locals;
4571
13.6k
            pm_buffer_append_byte(buffer, '[');
4572
4573
36.7k
            for (size_t index = 0; index < locals->size; 
index++23.0k
) {
  Branch (4573:36): [True: 23.0k, False: 13.6k]
4574
23.0k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')16.4k
;
  Branch (4574:21): [True: 16.4k, False: 6.58k]
4575
23.0k
                pm_dump_json_constant(buffer, parser, locals->ids[index]);
4576
23.0k
            }
4577
13.6k
            pm_buffer_append_byte(buffer, ']');
4578
4579
            // Dump the statements field
4580
13.6k
            pm_buffer_append_byte(buffer, ',');
4581
13.6k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
4582
13.6k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
4583
4584
13.6k
            pm_buffer_append_byte(buffer, '}');
4585
13.6k
            break;
4586
0
        }
4587
5.01k
        case PM_RANGE_NODE: {
  Branch (4587:9): [True: 5.01k, False: 1.00M]
4588
5.01k
            pm_buffer_append_string(buffer, "{\"type\":\"RangeNode\",\"location\":", 31);
4589
4590
5.01k
            const pm_range_node_t *cast = (const pm_range_node_t *) node;
4591
5.01k
            pm_dump_json_location(buffer, &cast->base.location);
4592
4593
            // Dump the RangeFlags field
4594
5.01k
            pm_buffer_append_byte(buffer, ',');
4595
5.01k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4596
5.01k
            size_t flags = 0;
4597
5.01k
            pm_buffer_append_byte(buffer, '[');
4598
5.01k
            if (PM_NODE_FLAG_P(cast, PM_RANGE_FLAGS_EXCLUDE_END)) {
4599
904
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4599:21): [True: 0, False: 904]
4600
904
                pm_buffer_append_string(buffer, "\"EXCLUDE_END\"", 13);
4601
904
                flags++;
4602
904
            }
4603
5.01k
            pm_buffer_append_byte(buffer, ']');
4604
4605
            // Dump the left field
4606
5.01k
            pm_buffer_append_byte(buffer, ',');
4607
5.01k
            pm_buffer_append_string(buffer, "\"left\":", 7);
4608
5.01k
            if (cast->left != NULL) {
  Branch (4608:17): [True: 3.85k, False: 1.16k]
4609
3.85k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->left);
4610
3.85k
            } else {
4611
1.16k
                pm_buffer_append_string(buffer, "null", 4);
4612
1.16k
            }
4613
4614
            // Dump the right field
4615
5.01k
            pm_buffer_append_byte(buffer, ',');
4616
5.01k
            pm_buffer_append_string(buffer, "\"right\":", 8);
4617
5.01k
            if (cast->right != NULL) {
  Branch (4617:17): [True: 4.72k, False: 295]
4618
4.72k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->right);
4619
4.72k
            } else {
4620
295
                pm_buffer_append_string(buffer, "null", 4);
4621
295
            }
4622
4623
            // Dump the operator_loc field
4624
5.01k
            pm_buffer_append_byte(buffer, ',');
4625
5.01k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4626
5.01k
            pm_dump_json_location(buffer, &cast->operator_loc);
4627
4628
5.01k
            pm_buffer_append_byte(buffer, '}');
4629
5.01k
            break;
4630
0
        }
4631
2.12k
        case PM_RATIONAL_NODE: {
  Branch (4631:9): [True: 2.12k, False: 1.00M]
4632
2.12k
            pm_buffer_append_string(buffer, "{\"type\":\"RationalNode\",\"location\":", 34);
4633
4634
2.12k
            const pm_rational_node_t *cast = (const pm_rational_node_t *) node;
4635
2.12k
            pm_dump_json_location(buffer, &cast->base.location);
4636
4637
            // Dump the IntegerBaseFlags field
4638
2.12k
            pm_buffer_append_byte(buffer, ',');
4639
2.12k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4640
2.12k
            size_t flags = 0;
4641
2.12k
            pm_buffer_append_byte(buffer, '[');
4642
2.12k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_BINARY)) {
4643
84
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4643:21): [True: 0, False: 84]
4644
84
                pm_buffer_append_string(buffer, "\"BINARY\"", 8);
4645
84
                flags++;
4646
84
            }
4647
2.12k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_DECIMAL)) {
4648
1.85k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4648:21): [True: 0, False: 1.85k]
4649
1.85k
                pm_buffer_append_string(buffer, "\"DECIMAL\"", 9);
4650
1.85k
                flags++;
4651
1.85k
            }
4652
2.12k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_OCTAL)) {
4653
158
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4653:21): [True: 0, False: 158]
4654
158
                pm_buffer_append_string(buffer, "\"OCTAL\"", 7);
4655
158
                flags++;
4656
158
            }
4657
2.12k
            if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_HEXADECIMAL)) {
4658
20
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4658:21): [True: 0, False: 20]
4659
20
                pm_buffer_append_string(buffer, "\"HEXADECIMAL\"", 13);
4660
20
                flags++;
4661
20
            }
4662
2.12k
            pm_buffer_append_byte(buffer, ']');
4663
4664
            // Dump the numerator field
4665
2.12k
            pm_buffer_append_byte(buffer, ',');
4666
2.12k
            pm_buffer_append_string(buffer, "\"numerator\":", 12);
4667
2.12k
            pm_integer_string(buffer, &cast->numerator);
4668
4669
            // Dump the denominator field
4670
2.12k
            pm_buffer_append_byte(buffer, ',');
4671
2.12k
            pm_buffer_append_string(buffer, "\"denominator\":", 14);
4672
2.12k
            pm_integer_string(buffer, &cast->denominator);
4673
4674
2.12k
            pm_buffer_append_byte(buffer, '}');
4675
2.12k
            break;
4676
0
        }
4677
65
        case PM_REDO_NODE: {
  Branch (4677:9): [True: 65, False: 1.00M]
4678
65
            pm_buffer_append_string(buffer, "{\"type\":\"RedoNode\",\"location\":", 30);
4679
4680
65
            const pm_redo_node_t *cast = (const pm_redo_node_t *) node;
4681
65
            pm_dump_json_location(buffer, &cast->base.location);
4682
4683
65
            pm_buffer_append_byte(buffer, '}');
4684
65
            break;
4685
0
        }
4686
6.59k
        case PM_REGULAR_EXPRESSION_NODE: {
  Branch (4686:9): [True: 6.59k, False: 999k]
4687
6.59k
            pm_buffer_append_string(buffer, "{\"type\":\"RegularExpressionNode\",\"location\":", 43);
4688
4689
6.59k
            const pm_regular_expression_node_t *cast = (const pm_regular_expression_node_t *) node;
4690
6.59k
            pm_dump_json_location(buffer, &cast->base.location);
4691
4692
            // Dump the RegularExpressionFlags field
4693
6.59k
            pm_buffer_append_byte(buffer, ',');
4694
6.59k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4695
6.59k
            size_t flags = 0;
4696
6.59k
            pm_buffer_append_byte(buffer, '[');
4697
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
4698
926
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4698:21): [True: 0, False: 926]
4699
926
                pm_buffer_append_string(buffer, "\"IGNORE_CASE\"", 13);
4700
926
                flags++;
4701
926
            }
4702
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EXTENDED)) {
4703
278
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')2
;
  Branch (4703:21): [True: 2, False: 276]
4704
278
                pm_buffer_append_string(buffer, "\"EXTENDED\"", 10);
4705
278
                flags++;
4706
278
            }
4707
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE)) {
4708
30
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')24
;
  Branch (4708:21): [True: 24, False: 6]
4709
30
                pm_buffer_append_string(buffer, "\"MULTI_LINE\"", 12);
4710
30
                flags++;
4711
30
            }
4712
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ONCE)) {
4713
178
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')49
;
  Branch (4713:21): [True: 49, False: 129]
4714
178
                pm_buffer_append_string(buffer, "\"ONCE\"", 6);
4715
178
                flags++;
4716
178
            }
4717
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_EUC_JP)) {
4718
236
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')194
;
  Branch (4718:21): [True: 194, False: 42]
4719
236
                pm_buffer_append_string(buffer, "\"EUC_JP\"", 8);
4720
236
                flags++;
4721
236
            }
4722
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT)) {
4723
88
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')45
;
  Branch (4723:21): [True: 45, False: 43]
4724
88
                pm_buffer_append_string(buffer, "\"ASCII_8BIT\"", 12);
4725
88
                flags++;
4726
88
            }
4727
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J)) {
4728
80
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')43
;
  Branch (4728:21): [True: 43, False: 37]
4729
80
                pm_buffer_append_string(buffer, "\"WINDOWS_31J\"", 13);
4730
80
                flags++;
4731
80
            }
4732
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_UTF_8)) {
4733
17
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')10
;
  Branch (4733:21): [True: 10, False: 7]
4734
17
                pm_buffer_append_string(buffer, "\"UTF_8\"", 7);
4735
17
                flags++;
4736
17
            }
4737
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING)) {
4738
225
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')1
;
  Branch (4738:21): [True: 1, False: 224]
4739
225
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
4740
225
                flags++;
4741
225
            }
4742
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING)) {
4743
2
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4743:21): [True: 0, False: 2]
4744
2
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
4745
2
                flags++;
4746
2
            }
4747
6.59k
            if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING)) {
4748
5.34k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')1.07k
;
  Branch (4748:21): [True: 1.07k, False: 4.27k]
4749
5.34k
                pm_buffer_append_string(buffer, "\"FORCED_US_ASCII_ENCODING\"", 26);
4750
5.34k
                flags++;
4751
5.34k
            }
4752
6.59k
            pm_buffer_append_byte(buffer, ']');
4753
4754
            // Dump the opening_loc field
4755
6.59k
            pm_buffer_append_byte(buffer, ',');
4756
6.59k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
4757
6.59k
            pm_dump_json_location(buffer, &cast->opening_loc);
4758
4759
            // Dump the content_loc field
4760
6.59k
            pm_buffer_append_byte(buffer, ',');
4761
6.59k
            pm_buffer_append_string(buffer, "\"content_loc\":", 14);
4762
6.59k
            pm_dump_json_location(buffer, &cast->content_loc);
4763
4764
            // Dump the closing_loc field
4765
6.59k
            pm_buffer_append_byte(buffer, ',');
4766
6.59k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
4767
6.59k
            pm_dump_json_location(buffer, &cast->closing_loc);
4768
4769
            // Dump the unescaped field
4770
6.59k
            pm_buffer_append_byte(buffer, ',');
4771
6.59k
            pm_buffer_append_string(buffer, "\"unescaped\":", 12);
4772
6.59k
            const pm_string_t *unescaped = &cast->unescaped;
4773
6.59k
            pm_buffer_append_byte(buffer, '"');
4774
6.59k
            pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
4775
6.59k
            pm_buffer_append_byte(buffer, '"');
4776
4777
6.59k
            pm_buffer_append_byte(buffer, '}');
4778
6.59k
            break;
4779
0
        }
4780
1.66k
        case PM_REQUIRED_KEYWORD_PARAMETER_NODE: {
  Branch (4780:9): [True: 1.66k, False: 1.00M]
4781
1.66k
            pm_buffer_append_string(buffer, "{\"type\":\"RequiredKeywordParameterNode\",\"location\":", 50);
4782
4783
1.66k
            const pm_required_keyword_parameter_node_t *cast = (const pm_required_keyword_parameter_node_t *) node;
4784
1.66k
            pm_dump_json_location(buffer, &cast->base.location);
4785
4786
            // Dump the ParameterFlags field
4787
1.66k
            pm_buffer_append_byte(buffer, ',');
4788
1.66k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4789
1.66k
            size_t flags = 0;
4790
1.66k
            pm_buffer_append_byte(buffer, '[');
4791
1.66k
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
4792
156
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4792:21): [True: 0, False: 156]
4793
156
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
4794
156
                flags++;
4795
156
            }
4796
1.66k
            pm_buffer_append_byte(buffer, ']');
4797
4798
            // Dump the name field
4799
1.66k
            pm_buffer_append_byte(buffer, ',');
4800
1.66k
            pm_buffer_append_string(buffer, "\"name\":", 7);
4801
1.66k
            pm_dump_json_constant(buffer, parser, cast->name);
4802
4803
            // Dump the name_loc field
4804
1.66k
            pm_buffer_append_byte(buffer, ',');
4805
1.66k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
4806
1.66k
            pm_dump_json_location(buffer, &cast->name_loc);
4807
4808
1.66k
            pm_buffer_append_byte(buffer, '}');
4809
1.66k
            break;
4810
0
        }
4811
18.6k
        case PM_REQUIRED_PARAMETER_NODE: {
  Branch (4811:9): [True: 18.6k, False: 987k]
4812
18.6k
            pm_buffer_append_string(buffer, "{\"type\":\"RequiredParameterNode\",\"location\":", 43);
4813
4814
18.6k
            const pm_required_parameter_node_t *cast = (const pm_required_parameter_node_t *) node;
4815
18.6k
            pm_dump_json_location(buffer, &cast->base.location);
4816
4817
            // Dump the ParameterFlags field
4818
18.6k
            pm_buffer_append_byte(buffer, ',');
4819
18.6k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4820
18.6k
            size_t flags = 0;
4821
18.6k
            pm_buffer_append_byte(buffer, '[');
4822
18.6k
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
4823
2.04k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4823:21): [True: 0, False: 2.04k]
4824
2.04k
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
4825
2.04k
                flags++;
4826
2.04k
            }
4827
18.6k
            pm_buffer_append_byte(buffer, ']');
4828
4829
            // Dump the name field
4830
18.6k
            pm_buffer_append_byte(buffer, ',');
4831
18.6k
            pm_buffer_append_string(buffer, "\"name\":", 7);
4832
18.6k
            pm_dump_json_constant(buffer, parser, cast->name);
4833
4834
18.6k
            pm_buffer_append_byte(buffer, '}');
4835
18.6k
            break;
4836
0
        }
4837
1.48k
        case PM_RESCUE_MODIFIER_NODE: {
  Branch (4837:9): [True: 1.48k, False: 1.00M]
4838
1.48k
            pm_buffer_append_string(buffer, "{\"type\":\"RescueModifierNode\",\"location\":", 40);
4839
4840
1.48k
            const pm_rescue_modifier_node_t *cast = (const pm_rescue_modifier_node_t *) node;
4841
1.48k
            pm_dump_json_location(buffer, &cast->base.location);
4842
4843
            // Dump the expression field
4844
1.48k
            pm_buffer_append_byte(buffer, ',');
4845
1.48k
            pm_buffer_append_string(buffer, "\"expression\":", 13);
4846
1.48k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->expression);
4847
4848
            // Dump the keyword_loc field
4849
1.48k
            pm_buffer_append_byte(buffer, ',');
4850
1.48k
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4851
1.48k
            pm_dump_json_location(buffer, &cast->keyword_loc);
4852
4853
            // Dump the rescue_expression field
4854
1.48k
            pm_buffer_append_byte(buffer, ',');
4855
1.48k
            pm_buffer_append_string(buffer, "\"rescue_expression\":", 20);
4856
1.48k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->rescue_expression);
4857
4858
1.48k
            pm_buffer_append_byte(buffer, '}');
4859
1.48k
            break;
4860
0
        }
4861
1.32k
        case PM_RESCUE_NODE: {
  Branch (4861:9): [True: 1.32k, False: 1.00M]
4862
1.32k
            pm_buffer_append_string(buffer, "{\"type\":\"RescueNode\",\"location\":", 32);
4863
4864
1.32k
            const pm_rescue_node_t *cast = (const pm_rescue_node_t *) node;
4865
1.32k
            pm_dump_json_location(buffer, &cast->base.location);
4866
4867
            // Dump the keyword_loc field
4868
1.32k
            pm_buffer_append_byte(buffer, ',');
4869
1.32k
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4870
1.32k
            pm_dump_json_location(buffer, &cast->keyword_loc);
4871
4872
            // Dump the exceptions field
4873
1.32k
            pm_buffer_append_byte(buffer, ',');
4874
1.32k
            pm_buffer_append_string(buffer, "\"exceptions\":", 13);
4875
1.32k
            const pm_node_list_t *exceptions = &cast->exceptions;
4876
1.32k
            pm_buffer_append_byte(buffer, '[');
4877
4878
1.76k
            for (size_t index = 0; index < exceptions->size; 
index++436
) {
  Branch (4878:36): [True: 436, False: 1.32k]
4879
436
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')221
;
  Branch (4879:21): [True: 221, False: 215]
4880
436
                pm_dump_json(buffer, parser, exceptions->nodes[index]);
4881
436
            }
4882
1.32k
            pm_buffer_append_byte(buffer, ']');
4883
4884
            // Dump the operator_loc field
4885
1.32k
            pm_buffer_append_byte(buffer, ',');
4886
1.32k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4887
1.32k
            if (cast->operator_loc.length != 0) {
  Branch (4887:17): [True: 227, False: 1.10k]
4888
227
                pm_dump_json_location(buffer, &cast->operator_loc);
4889
1.10k
            } else {
4890
1.10k
                pm_buffer_append_string(buffer, "null", 4);
4891
1.10k
            }
4892
4893
            // Dump the reference field
4894
1.32k
            pm_buffer_append_byte(buffer, ',');
4895
1.32k
            pm_buffer_append_string(buffer, "\"reference\":", 12);
4896
1.32k
            if (cast->reference != NULL) {
  Branch (4896:17): [True: 227, False: 1.10k]
4897
227
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->reference);
4898
1.10k
            } else {
4899
1.10k
                pm_buffer_append_string(buffer, "null", 4);
4900
1.10k
            }
4901
4902
            // Dump the then_keyword_loc field
4903
1.32k
            pm_buffer_append_byte(buffer, ',');
4904
1.32k
            pm_buffer_append_string(buffer, "\"then_keyword_loc\":", 19);
4905
1.32k
            if (cast->then_keyword_loc.length != 0) {
  Branch (4905:17): [True: 3, False: 1.32k]
4906
3
                pm_dump_json_location(buffer, &cast->then_keyword_loc);
4907
1.32k
            } else {
4908
1.32k
                pm_buffer_append_string(buffer, "null", 4);
4909
1.32k
            }
4910
4911
            // Dump the statements field
4912
1.32k
            pm_buffer_append_byte(buffer, ',');
4913
1.32k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
4914
1.32k
            if (cast->statements != NULL) {
  Branch (4914:17): [True: 691, False: 638]
4915
691
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
4916
691
            } else {
4917
638
                pm_buffer_append_string(buffer, "null", 4);
4918
638
            }
4919
4920
            // Dump the subsequent field
4921
1.32k
            pm_buffer_append_byte(buffer, ',');
4922
1.32k
            pm_buffer_append_string(buffer, "\"subsequent\":", 13);
4923
1.32k
            if (cast->subsequent != NULL) {
  Branch (4923:17): [True: 96, False: 1.23k]
4924
96
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->subsequent);
4925
1.23k
            } else {
4926
1.23k
                pm_buffer_append_string(buffer, "null", 4);
4927
1.23k
            }
4928
4929
1.32k
            pm_buffer_append_byte(buffer, '}');
4930
1.32k
            break;
4931
0
        }
4932
4.47k
        case PM_REST_PARAMETER_NODE: {
  Branch (4932:9): [True: 4.47k, False: 1.00M]
4933
4.47k
            pm_buffer_append_string(buffer, "{\"type\":\"RestParameterNode\",\"location\":", 39);
4934
4935
4.47k
            const pm_rest_parameter_node_t *cast = (const pm_rest_parameter_node_t *) node;
4936
4.47k
            pm_dump_json_location(buffer, &cast->base.location);
4937
4938
            // Dump the ParameterFlags field
4939
4.47k
            pm_buffer_append_byte(buffer, ',');
4940
4.47k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
4941
4.47k
            size_t flags = 0;
4942
4.47k
            pm_buffer_append_byte(buffer, '[');
4943
4.47k
            if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
4944
103
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (4944:21): [True: 0, False: 103]
4945
103
                pm_buffer_append_string(buffer, "\"REPEATED_PARAMETER\"", 20);
4946
103
                flags++;
4947
103
            }
4948
4.47k
            pm_buffer_append_byte(buffer, ']');
4949
4950
            // Dump the name field
4951
4.47k
            pm_buffer_append_byte(buffer, ',');
4952
4.47k
            pm_buffer_append_string(buffer, "\"name\":", 7);
4953
4.47k
            if (cast->name != PM_CONSTANT_ID_UNSET) {
  Branch (4953:17): [True: 2.85k, False: 1.62k]
4954
2.85k
                pm_dump_json_constant(buffer, parser, cast->name);
4955
2.85k
            } else {
4956
1.62k
                pm_buffer_append_string(buffer, "null", 4);
4957
1.62k
            }
4958
4959
            // Dump the name_loc field
4960
4.47k
            pm_buffer_append_byte(buffer, ',');
4961
4.47k
            pm_buffer_append_string(buffer, "\"name_loc\":", 11);
4962
4.47k
            if (cast->name_loc.length != 0) {
  Branch (4962:17): [True: 2.85k, False: 1.62k]
4963
2.85k
                pm_dump_json_location(buffer, &cast->name_loc);
4964
2.85k
            } else {
4965
1.62k
                pm_buffer_append_string(buffer, "null", 4);
4966
1.62k
            }
4967
4968
            // Dump the operator_loc field
4969
4.47k
            pm_buffer_append_byte(buffer, ',');
4970
4.47k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
4971
4.47k
            pm_dump_json_location(buffer, &cast->operator_loc);
4972
4973
4.47k
            pm_buffer_append_byte(buffer, '}');
4974
4.47k
            break;
4975
0
        }
4976
307
        case PM_RETRY_NODE: {
  Branch (4976:9): [True: 307, False: 1.00M]
4977
307
            pm_buffer_append_string(buffer, "{\"type\":\"RetryNode\",\"location\":", 31);
4978
4979
307
            const pm_retry_node_t *cast = (const pm_retry_node_t *) node;
4980
307
            pm_dump_json_location(buffer, &cast->base.location);
4981
4982
307
            pm_buffer_append_byte(buffer, '}');
4983
307
            break;
4984
0
        }
4985
1.70k
        case PM_RETURN_NODE: {
  Branch (4985:9): [True: 1.70k, False: 1.00M]
4986
1.70k
            pm_buffer_append_string(buffer, "{\"type\":\"ReturnNode\",\"location\":", 32);
4987
4988
1.70k
            const pm_return_node_t *cast = (const pm_return_node_t *) node;
4989
1.70k
            pm_dump_json_location(buffer, &cast->base.location);
4990
4991
            // Dump the keyword_loc field
4992
1.70k
            pm_buffer_append_byte(buffer, ',');
4993
1.70k
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
4994
1.70k
            pm_dump_json_location(buffer, &cast->keyword_loc);
4995
4996
            // Dump the arguments field
4997
1.70k
            pm_buffer_append_byte(buffer, ',');
4998
1.70k
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
4999
1.70k
            if (cast->arguments != NULL) {
  Branch (4999:17): [True: 327, False: 1.38k]
5000
327
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
5001
1.38k
            } else {
5002
1.38k
                pm_buffer_append_string(buffer, "null", 4);
5003
1.38k
            }
5004
5005
1.70k
            pm_buffer_append_byte(buffer, '}');
5006
1.70k
            break;
5007
0
        }
5008
1.17k
        case PM_SELF_NODE: {
  Branch (5008:9): [True: 1.17k, False: 1.00M]
5009
1.17k
            pm_buffer_append_string(buffer, "{\"type\":\"SelfNode\",\"location\":", 30);
5010
5011
1.17k
            const pm_self_node_t *cast = (const pm_self_node_t *) node;
5012
1.17k
            pm_dump_json_location(buffer, &cast->base.location);
5013
5014
1.17k
            pm_buffer_append_byte(buffer, '}');
5015
1.17k
            break;
5016
0
        }
5017
0
        case PM_SHAREABLE_CONSTANT_NODE: {
  Branch (5017:9): [True: 0, False: 1.00M]
5018
0
            pm_buffer_append_string(buffer, "{\"type\":\"ShareableConstantNode\",\"location\":", 43);
5019
5020
0
            const pm_shareable_constant_node_t *cast = (const pm_shareable_constant_node_t *) node;
5021
0
            pm_dump_json_location(buffer, &cast->base.location);
5022
5023
            // Dump the ShareableConstantNodeFlags field
5024
0
            pm_buffer_append_byte(buffer, ',');
5025
0
            pm_buffer_append_string(buffer, "\"flags\":", 8);
5026
0
            size_t flags = 0;
5027
0
            pm_buffer_append_byte(buffer, '[');
5028
0
            if (PM_NODE_FLAG_P(cast, PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL)) {
5029
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (5029:21): [True: 0, False: 0]
5030
0
                pm_buffer_append_string(buffer, "\"LITERAL\"", 9);
5031
0
                flags++;
5032
0
            }
5033
0
            if (PM_NODE_FLAG_P(cast, PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING)) {
5034
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (5034:21): [True: 0, False: 0]
5035
0
                pm_buffer_append_string(buffer, "\"EXPERIMENTAL_EVERYTHING\"", 25);
5036
0
                flags++;
5037
0
            }
5038
0
            if (PM_NODE_FLAG_P(cast, PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY)) {
5039
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (5039:21): [True: 0, False: 0]
5040
0
                pm_buffer_append_string(buffer, "\"EXPERIMENTAL_COPY\"", 19);
5041
0
                flags++;
5042
0
            }
5043
0
            pm_buffer_append_byte(buffer, ']');
5044
5045
            // Dump the write field
5046
0
            pm_buffer_append_byte(buffer, ',');
5047
0
            pm_buffer_append_string(buffer, "\"write\":", 8);
5048
0
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->write);
5049
5050
0
            pm_buffer_append_byte(buffer, '}');
5051
0
            break;
5052
0
        }
5053
1.00k
        case PM_SINGLETON_CLASS_NODE: {
  Branch (5053:9): [True: 1.00k, False: 1.00M]
5054
1.00k
            pm_buffer_append_string(buffer, "{\"type\":\"SingletonClassNode\",\"location\":", 40);
5055
5056
1.00k
            const pm_singleton_class_node_t *cast = (const pm_singleton_class_node_t *) node;
5057
1.00k
            pm_dump_json_location(buffer, &cast->base.location);
5058
5059
            // Dump the locals field
5060
1.00k
            pm_buffer_append_byte(buffer, ',');
5061
1.00k
            pm_buffer_append_string(buffer, "\"locals\":", 9);
5062
1.00k
            const pm_constant_id_list_t *locals = &cast->locals;
5063
1.00k
            pm_buffer_append_byte(buffer, '[');
5064
5065
1.37k
            for (size_t index = 0; index < locals->size; 
index++371
) {
  Branch (5065:36): [True: 371, False: 1.00k]
5066
371
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')256
;
  Branch (5066:21): [True: 256, False: 115]
5067
371
                pm_dump_json_constant(buffer, parser, locals->ids[index]);
5068
371
            }
5069
1.00k
            pm_buffer_append_byte(buffer, ']');
5070
5071
            // Dump the class_keyword_loc field
5072
1.00k
            pm_buffer_append_byte(buffer, ',');
5073
1.00k
            pm_buffer_append_string(buffer, "\"class_keyword_loc\":", 20);
5074
1.00k
            pm_dump_json_location(buffer, &cast->class_keyword_loc);
5075
5076
            // Dump the operator_loc field
5077
1.00k
            pm_buffer_append_byte(buffer, ',');
5078
1.00k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
5079
1.00k
            pm_dump_json_location(buffer, &cast->operator_loc);
5080
5081
            // Dump the expression field
5082
1.00k
            pm_buffer_append_byte(buffer, ',');
5083
1.00k
            pm_buffer_append_string(buffer, "\"expression\":", 13);
5084
1.00k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->expression);
5085
5086
            // Dump the body field
5087
1.00k
            pm_buffer_append_byte(buffer, ',');
5088
1.00k
            pm_buffer_append_string(buffer, "\"body\":", 7);
5089
1.00k
            if (cast->body != NULL) {
  Branch (5089:17): [True: 875, False: 132]
5090
875
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->body);
5091
875
            } else {
5092
132
                pm_buffer_append_string(buffer, "null", 4);
5093
132
            }
5094
5095
            // Dump the end_keyword_loc field
5096
1.00k
            pm_buffer_append_byte(buffer, ',');
5097
1.00k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
5098
1.00k
            pm_dump_json_location(buffer, &cast->end_keyword_loc);
5099
5100
1.00k
            pm_buffer_append_byte(buffer, '}');
5101
1.00k
            break;
5102
0
        }
5103
297
        case PM_SOURCE_ENCODING_NODE: {
  Branch (5103:9): [True: 297, False: 1.00M]
5104
297
            pm_buffer_append_string(buffer, "{\"type\":\"SourceEncodingNode\",\"location\":", 40);
5105
5106
297
            const pm_source_encoding_node_t *cast = (const pm_source_encoding_node_t *) node;
5107
297
            pm_dump_json_location(buffer, &cast->base.location);
5108
5109
297
            pm_buffer_append_byte(buffer, '}');
5110
297
            break;
5111
0
        }
5112
343
        case PM_SOURCE_FILE_NODE: {
  Branch (5112:9): [True: 343, False: 1.00M]
5113
343
            pm_buffer_append_string(buffer, "{\"type\":\"SourceFileNode\",\"location\":", 36);
5114
5115
343
            const pm_source_file_node_t *cast = (const pm_source_file_node_t *) node;
5116
343
            pm_dump_json_location(buffer, &cast->base.location);
5117
5118
            // Dump the StringFlags field
5119
343
            pm_buffer_append_byte(buffer, ',');
5120
343
            pm_buffer_append_string(buffer, "\"flags\":", 8);
5121
343
            size_t flags = 0;
5122
343
            pm_buffer_append_byte(buffer, '[');
5123
343
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FORCED_UTF8_ENCODING)) {
5124
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (5124:21): [True: 0, False: 0]
5125
0
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
5126
0
                flags++;
5127
0
            }
5128
343
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FORCED_BINARY_ENCODING)) {
5129
0
                if (flags != 0) pm_buffer_append_byte(buffer, ',');
  Branch (5129:21): [True: 0, False: 0]
5130
0
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
5131
0
                flags++;
5132
0
            }
5133
343
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FROZEN)) {
5134
8
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5134:21): [True: 0, False: 8]
5135
8
                pm_buffer_append_string(buffer, "\"FROZEN\"", 8);
5136
8
                flags++;
5137
8
            }
5138
343
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_MUTABLE)) {
5139
3
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5139:21): [True: 0, False: 3]
5140
3
                pm_buffer_append_string(buffer, "\"MUTABLE\"", 9);
5141
3
                flags++;
5142
3
            }
5143
343
            pm_buffer_append_byte(buffer, ']');
5144
5145
            // Dump the filepath field
5146
343
            pm_buffer_append_byte(buffer, ',');
5147
343
            pm_buffer_append_string(buffer, "\"filepath\":", 11);
5148
343
            const pm_string_t *filepath = &cast->filepath;
5149
343
            pm_buffer_append_byte(buffer, '"');
5150
343
            pm_buffer_append_source(buffer, pm_string_source(filepath), pm_string_length(filepath), PM_BUFFER_ESCAPING_JSON);
5151
343
            pm_buffer_append_byte(buffer, '"');
5152
5153
343
            pm_buffer_append_byte(buffer, '}');
5154
343
            break;
5155
0
        }
5156
364
        case PM_SOURCE_LINE_NODE: {
  Branch (5156:9): [True: 364, False: 1.00M]
5157
364
            pm_buffer_append_string(buffer, "{\"type\":\"SourceLineNode\",\"location\":", 36);
5158
5159
364
            const pm_source_line_node_t *cast = (const pm_source_line_node_t *) node;
5160
364
            pm_dump_json_location(buffer, &cast->base.location);
5161
5162
364
            pm_buffer_append_byte(buffer, '}');
5163
364
            break;
5164
0
        }
5165
11.7k
        case PM_SPLAT_NODE: {
  Branch (5165:9): [True: 11.7k, False: 994k]
5166
11.7k
            pm_buffer_append_string(buffer, "{\"type\":\"SplatNode\",\"location\":", 31);
5167
5168
11.7k
            const pm_splat_node_t *cast = (const pm_splat_node_t *) node;
5169
11.7k
            pm_dump_json_location(buffer, &cast->base.location);
5170
5171
            // Dump the operator_loc field
5172
11.7k
            pm_buffer_append_byte(buffer, ',');
5173
11.7k
            pm_buffer_append_string(buffer, "\"operator_loc\":", 15);
5174
11.7k
            pm_dump_json_location(buffer, &cast->operator_loc);
5175
5176
            // Dump the expression field
5177
11.7k
            pm_buffer_append_byte(buffer, ',');
5178
11.7k
            pm_buffer_append_string(buffer, "\"expression\":", 13);
5179
11.7k
            if (cast->expression != NULL) {
  Branch (5179:17): [True: 7.78k, False: 3.95k]
5180
7.78k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->expression);
5181
7.78k
            } else {
5182
3.95k
                pm_buffer_append_string(buffer, "null", 4);
5183
3.95k
            }
5184
5185
11.7k
            pm_buffer_append_byte(buffer, '}');
5186
11.7k
            break;
5187
0
        }
5188
73.3k
        case PM_STATEMENTS_NODE: {
  Branch (5188:9): [True: 73.3k, False: 932k]
5189
73.3k
            pm_buffer_append_string(buffer, "{\"type\":\"StatementsNode\",\"location\":", 36);
5190
5191
73.3k
            const pm_statements_node_t *cast = (const pm_statements_node_t *) node;
5192
73.3k
            pm_dump_json_location(buffer, &cast->base.location);
5193
5194
            // Dump the body field
5195
73.3k
            pm_buffer_append_byte(buffer, ',');
5196
73.3k
            pm_buffer_append_string(buffer, "\"body\":", 7);
5197
73.3k
            const pm_node_list_t *body = &cast->body;
5198
73.3k
            pm_buffer_append_byte(buffer, '[');
5199
5200
372k
            for (size_t index = 0; index < body->size; 
index++298k
) {
  Branch (5200:36): [True: 298k, False: 73.3k]
5201
298k
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')225k
;
  Branch (5201:21): [True: 225k, False: 73.2k]
5202
298k
                pm_dump_json(buffer, parser, body->nodes[index]);
5203
298k
            }
5204
73.3k
            pm_buffer_append_byte(buffer, ']');
5205
5206
73.3k
            pm_buffer_append_byte(buffer, '}');
5207
73.3k
            break;
5208
0
        }
5209
49.7k
        case PM_STRING_NODE: {
  Branch (5209:9): [True: 49.7k, False: 956k]
5210
49.7k
            pm_buffer_append_string(buffer, "{\"type\":\"StringNode\",\"location\":", 32);
5211
5212
49.7k
            const pm_string_node_t *cast = (const pm_string_node_t *) node;
5213
49.7k
            pm_dump_json_location(buffer, &cast->base.location);
5214
5215
            // Dump the StringFlags field
5216
49.7k
            pm_buffer_append_byte(buffer, ',');
5217
49.7k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
5218
49.7k
            size_t flags = 0;
5219
49.7k
            pm_buffer_append_byte(buffer, '[');
5220
49.7k
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FORCED_UTF8_ENCODING)) {
5221
1.32k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5221:21): [True: 0, False: 1.32k]
5222
1.32k
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
5223
1.32k
                flags++;
5224
1.32k
            }
5225
49.7k
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FORCED_BINARY_ENCODING)) {
5226
92
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5226:21): [True: 0, False: 92]
5227
92
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
5228
92
                flags++;
5229
92
            }
5230
49.7k
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FROZEN)) {
5231
20.9k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')910
;
  Branch (5231:21): [True: 910, False: 20.0k]
5232
20.9k
                pm_buffer_append_string(buffer, "\"FROZEN\"", 8);
5233
20.9k
                flags++;
5234
20.9k
            }
5235
49.7k
            if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_MUTABLE)) {
5236
1.27k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')149
;
  Branch (5236:21): [True: 149, False: 1.12k]
5237
1.27k
                pm_buffer_append_string(buffer, "\"MUTABLE\"", 9);
5238
1.27k
                flags++;
5239
1.27k
            }
5240
49.7k
            pm_buffer_append_byte(buffer, ']');
5241
5242
            // Dump the opening_loc field
5243
49.7k
            pm_buffer_append_byte(buffer, ',');
5244
49.7k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
5245
49.7k
            if (cast->opening_loc.length != 0) {
  Branch (5245:17): [True: 23.0k, False: 26.7k]
5246
23.0k
                pm_dump_json_location(buffer, &cast->opening_loc);
5247
26.7k
            } else {
5248
26.7k
                pm_buffer_append_string(buffer, "null", 4);
5249
26.7k
            }
5250
5251
            // Dump the content_loc field
5252
49.7k
            pm_buffer_append_byte(buffer, ',');
5253
49.7k
            pm_buffer_append_string(buffer, "\"content_loc\":", 14);
5254
49.7k
            pm_dump_json_location(buffer, &cast->content_loc);
5255
5256
            // Dump the closing_loc field
5257
49.7k
            pm_buffer_append_byte(buffer, ',');
5258
49.7k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
5259
49.7k
            if (cast->closing_loc.length != 0) {
  Branch (5259:17): [True: 19.4k, False: 30.3k]
5260
19.4k
                pm_dump_json_location(buffer, &cast->closing_loc);
5261
30.3k
            } else {
5262
30.3k
                pm_buffer_append_string(buffer, "null", 4);
5263
30.3k
            }
5264
5265
            // Dump the unescaped field
5266
49.7k
            pm_buffer_append_byte(buffer, ',');
5267
49.7k
            pm_buffer_append_string(buffer, "\"unescaped\":", 12);
5268
49.7k
            const pm_string_t *unescaped = &cast->unescaped;
5269
49.7k
            pm_buffer_append_byte(buffer, '"');
5270
49.7k
            pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
5271
49.7k
            pm_buffer_append_byte(buffer, '"');
5272
5273
49.7k
            pm_buffer_append_byte(buffer, '}');
5274
49.7k
            break;
5275
0
        }
5276
229
        case PM_SUPER_NODE: {
  Branch (5276:9): [True: 229, False: 1.00M]
5277
229
            pm_buffer_append_string(buffer, "{\"type\":\"SuperNode\",\"location\":", 31);
5278
5279
229
            const pm_super_node_t *cast = (const pm_super_node_t *) node;
5280
229
            pm_dump_json_location(buffer, &cast->base.location);
5281
5282
            // Dump the keyword_loc field
5283
229
            pm_buffer_append_byte(buffer, ',');
5284
229
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
5285
229
            pm_dump_json_location(buffer, &cast->keyword_loc);
5286
5287
            // Dump the lparen_loc field
5288
229
            pm_buffer_append_byte(buffer, ',');
5289
229
            pm_buffer_append_string(buffer, "\"lparen_loc\":", 13);
5290
229
            if (cast->lparen_loc.length != 0) {
  Branch (5290:17): [True: 148, False: 81]
5291
148
                pm_dump_json_location(buffer, &cast->lparen_loc);
5292
148
            } else {
5293
81
                pm_buffer_append_string(buffer, "null", 4);
5294
81
            }
5295
5296
            // Dump the arguments field
5297
229
            pm_buffer_append_byte(buffer, ',');
5298
229
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
5299
229
            if (cast->arguments != NULL) {
  Branch (5299:17): [True: 153, False: 76]
5300
153
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
5301
153
            } else {
5302
76
                pm_buffer_append_string(buffer, "null", 4);
5303
76
            }
5304
5305
            // Dump the rparen_loc field
5306
229
            pm_buffer_append_byte(buffer, ',');
5307
229
            pm_buffer_append_string(buffer, "\"rparen_loc\":", 13);
5308
229
            if (cast->rparen_loc.length != 0) {
  Branch (5308:17): [True: 129, False: 100]
5309
129
                pm_dump_json_location(buffer, &cast->rparen_loc);
5310
129
            } else {
5311
100
                pm_buffer_append_string(buffer, "null", 4);
5312
100
            }
5313
5314
            // Dump the block field
5315
229
            pm_buffer_append_byte(buffer, ',');
5316
229
            pm_buffer_append_string(buffer, "\"block\":", 8);
5317
229
            if (cast->block != NULL) {
  Branch (5317:17): [True: 109, False: 120]
5318
109
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->block);
5319
120
            } else {
5320
120
                pm_buffer_append_string(buffer, "null", 4);
5321
120
            }
5322
5323
229
            pm_buffer_append_byte(buffer, '}');
5324
229
            break;
5325
0
        }
5326
29.7k
        case PM_SYMBOL_NODE: {
  Branch (5326:9): [True: 29.7k, False: 976k]
5327
29.7k
            pm_buffer_append_string(buffer, "{\"type\":\"SymbolNode\",\"location\":", 32);
5328
5329
29.7k
            const pm_symbol_node_t *cast = (const pm_symbol_node_t *) node;
5330
29.7k
            pm_dump_json_location(buffer, &cast->base.location);
5331
5332
            // Dump the SymbolFlags field
5333
29.7k
            pm_buffer_append_byte(buffer, ',');
5334
29.7k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
5335
29.7k
            size_t flags = 0;
5336
29.7k
            pm_buffer_append_byte(buffer, '[');
5337
29.7k
            if (PM_NODE_FLAG_P(cast, PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING)) {
5338
103
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5338:21): [True: 0, False: 103]
5339
103
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
5340
103
                flags++;
5341
103
            }
5342
29.7k
            if (PM_NODE_FLAG_P(cast, PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING)) {
5343
30
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5343:21): [True: 0, False: 30]
5344
30
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
5345
30
                flags++;
5346
30
            }
5347
29.7k
            if (PM_NODE_FLAG_P(cast, PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING)) {
5348
27.4k
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5348:21): [True: 0, False: 27.4k]
5349
27.4k
                pm_buffer_append_string(buffer, "\"FORCED_US_ASCII_ENCODING\"", 26);
5350
27.4k
                flags++;
5351
27.4k
            }
5352
29.7k
            pm_buffer_append_byte(buffer, ']');
5353
5354
            // Dump the opening_loc field
5355
29.7k
            pm_buffer_append_byte(buffer, ',');
5356
29.7k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
5357
29.7k
            if (cast->opening_loc.length != 0) {
  Branch (5357:17): [True: 14.4k, False: 15.2k]
5358
14.4k
                pm_dump_json_location(buffer, &cast->opening_loc);
5359
15.2k
            } else {
5360
15.2k
                pm_buffer_append_string(buffer, "null", 4);
5361
15.2k
            }
5362
5363
            // Dump the content_loc field
5364
29.7k
            pm_buffer_append_byte(buffer, ',');
5365
29.7k
            pm_buffer_append_string(buffer, "\"content_loc\":", 14);
5366
29.7k
            pm_dump_json_location(buffer, &cast->content_loc);
5367
5368
            // Dump the closing_loc field
5369
29.7k
            pm_buffer_append_byte(buffer, ',');
5370
29.7k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
5371
29.7k
            if (cast->closing_loc.length != 0) {
  Branch (5371:17): [True: 8.89k, False: 20.8k]
5372
8.89k
                pm_dump_json_location(buffer, &cast->closing_loc);
5373
20.8k
            } else {
5374
20.8k
                pm_buffer_append_string(buffer, "null", 4);
5375
20.8k
            }
5376
5377
            // Dump the unescaped field
5378
29.7k
            pm_buffer_append_byte(buffer, ',');
5379
29.7k
            pm_buffer_append_string(buffer, "\"unescaped\":", 12);
5380
29.7k
            const pm_string_t *unescaped = &cast->unescaped;
5381
29.7k
            pm_buffer_append_byte(buffer, '"');
5382
29.7k
            pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
5383
29.7k
            pm_buffer_append_byte(buffer, '"');
5384
5385
29.7k
            pm_buffer_append_byte(buffer, '}');
5386
29.7k
            break;
5387
0
        }
5388
6.45k
        case PM_TRUE_NODE: {
  Branch (5388:9): [True: 6.45k, False: 999k]
5389
6.45k
            pm_buffer_append_string(buffer, "{\"type\":\"TrueNode\",\"location\":", 30);
5390
5391
6.45k
            const pm_true_node_t *cast = (const pm_true_node_t *) node;
5392
6.45k
            pm_dump_json_location(buffer, &cast->base.location);
5393
5394
6.45k
            pm_buffer_append_byte(buffer, '}');
5395
6.45k
            break;
5396
0
        }
5397
345
        case PM_UNDEF_NODE: {
  Branch (5397:9): [True: 345, False: 1.00M]
5398
345
            pm_buffer_append_string(buffer, "{\"type\":\"UndefNode\",\"location\":", 31);
5399
5400
345
            const pm_undef_node_t *cast = (const pm_undef_node_t *) node;
5401
345
            pm_dump_json_location(buffer, &cast->base.location);
5402
5403
            // Dump the names field
5404
345
            pm_buffer_append_byte(buffer, ',');
5405
345
            pm_buffer_append_string(buffer, "\"names\":", 8);
5406
345
            const pm_node_list_t *names = &cast->names;
5407
345
            pm_buffer_append_byte(buffer, '[');
5408
5409
712
            for (size_t index = 0; index < names->size; 
index++367
) {
  Branch (5409:36): [True: 367, False: 345]
5410
367
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')43
;
  Branch (5410:21): [True: 43, False: 324]
5411
367
                pm_dump_json(buffer, parser, names->nodes[index]);
5412
367
            }
5413
345
            pm_buffer_append_byte(buffer, ']');
5414
5415
            // Dump the keyword_loc field
5416
345
            pm_buffer_append_byte(buffer, ',');
5417
345
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
5418
345
            pm_dump_json_location(buffer, &cast->keyword_loc);
5419
5420
345
            pm_buffer_append_byte(buffer, '}');
5421
345
            break;
5422
0
        }
5423
98
        case PM_UNLESS_NODE: {
  Branch (5423:9): [True: 98, False: 1.00M]
5424
98
            pm_buffer_append_string(buffer, "{\"type\":\"UnlessNode\",\"location\":", 32);
5425
5426
98
            const pm_unless_node_t *cast = (const pm_unless_node_t *) node;
5427
98
            pm_dump_json_location(buffer, &cast->base.location);
5428
5429
            // Dump the unless_keyword_loc field
5430
98
            pm_buffer_append_byte(buffer, ',');
5431
98
            pm_buffer_append_string(buffer, "\"unless_keyword_loc\":", 21);
5432
98
            pm_dump_json_location(buffer, &cast->unless_keyword_loc);
5433
5434
            // Dump the predicate field
5435
98
            pm_buffer_append_byte(buffer, ',');
5436
98
            pm_buffer_append_string(buffer, "\"predicate\":", 12);
5437
98
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->predicate);
5438
5439
            // Dump the then_keyword_loc field
5440
98
            pm_buffer_append_byte(buffer, ',');
5441
98
            pm_buffer_append_string(buffer, "\"then_keyword_loc\":", 19);
5442
98
            if (cast->then_keyword_loc.length != 0) {
  Branch (5442:17): [True: 5, False: 93]
5443
5
                pm_dump_json_location(buffer, &cast->then_keyword_loc);
5444
93
            } else {
5445
93
                pm_buffer_append_string(buffer, "null", 4);
5446
93
            }
5447
5448
            // Dump the statements field
5449
98
            pm_buffer_append_byte(buffer, ',');
5450
98
            pm_buffer_append_string(buffer, "\"statements\":", 13);
5451
98
            if (cast->statements != NULL) {
  Branch (5451:17): [True: 89, False: 9]
5452
89
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
5453
89
            } else {
5454
9
                pm_buffer_append_string(buffer, "null", 4);
5455
9
            }
5456
5457
            // Dump the else_clause field
5458
98
            pm_buffer_append_byte(buffer, ',');
5459
98
            pm_buffer_append_string(buffer, "\"else_clause\":", 14);
5460
98
            if (cast->else_clause != NULL) {
  Branch (5460:17): [True: 13, False: 85]
5461
13
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->else_clause);
5462
85
            } else {
5463
85
                pm_buffer_append_string(buffer, "null", 4);
5464
85
            }
5465
5466
            // Dump the end_keyword_loc field
5467
98
            pm_buffer_append_byte(buffer, ',');
5468
98
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
5469
98
            if (cast->end_keyword_loc.length != 0) {
  Branch (5469:17): [True: 33, False: 65]
5470
33
                pm_dump_json_location(buffer, &cast->end_keyword_loc);
5471
65
            } else {
5472
65
                pm_buffer_append_string(buffer, "null", 4);
5473
65
            }
5474
5475
98
            pm_buffer_append_byte(buffer, '}');
5476
98
            break;
5477
0
        }
5478
783
        case PM_UNTIL_NODE: {
  Branch (5478:9): [True: 783, False: 1.00M]
5479
783
            pm_buffer_append_string(buffer, "{\"type\":\"UntilNode\",\"location\":", 31);
5480
5481
783
            const pm_until_node_t *cast = (const pm_until_node_t *) node;
5482
783
            pm_dump_json_location(buffer, &cast->base.location);
5483
5484
            // Dump the LoopFlags field
5485
783
            pm_buffer_append_byte(buffer, ',');
5486
783
            pm_buffer_append_string(buffer, "\"flags\":", 8);
5487
783
            size_t flags = 0;
5488
783
            pm_buffer_append_byte(buffer, '[');
5489
783
            if (PM_NODE_FLAG_P(cast, PM_LOOP_FLAGS_BEGIN_MODIFIER)) {
5490
59
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5490:21): [True: 0, False: 59]
5491
59
                pm_buffer_append_string(buffer, "\"BEGIN_MODIFIER\"", 16);
5492
59
                flags++;
5493
59
            }
5494
783
            pm_buffer_append_byte(buffer, ']');
5495
5496
            // Dump the until_keyword_loc field
5497
783
            pm_buffer_append_byte(buffer, ',');
5498
783
            pm_buffer_append_string(buffer, "\"until_keyword_loc\":", 20);
5499
783
            pm_dump_json_location(buffer, &cast->until_keyword_loc);
5500
5501
            // Dump the do_keyword_loc field
5502
783
            pm_buffer_append_byte(buffer, ',');
5503
783
            pm_buffer_append_string(buffer, "\"do_keyword_loc\":", 17);
5504
783
            if (cast->do_keyword_loc.length != 0) {
  Branch (5504:17): [True: 84, False: 699]
5505
84
                pm_dump_json_location(buffer, &cast->do_keyword_loc);
5506
699
            } else {
5507
699
                pm_buffer_append_string(buffer, "null", 4);
5508
699
            }
5509
5510
            // Dump the end_keyword_loc field
5511
783
            pm_buffer_append_byte(buffer, ',');
5512
783
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
5513
783
            if (cast->end_keyword_loc.length != 0) {
  Branch (5513:17): [True: 465, False: 318]
5514
465
                pm_dump_json_location(buffer, &cast->end_keyword_loc);
5515
465
            } else {
5516
318
                pm_buffer_append_string(buffer, "null", 4);
5517
318
            }
5518
5519
            // Dump the predicate field
5520
783
            pm_buffer_append_byte(buffer, ',');
5521
783
            pm_buffer_append_string(buffer, "\"predicate\":", 12);
5522
783
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->predicate);
5523
5524
            // Dump the statements field
5525
783
            pm_buffer_append_byte(buffer, ',');
5526
783
            pm_buffer_append_string(buffer, "\"statements\":", 13);
5527
783
            if (cast->statements != NULL) {
  Branch (5527:17): [True: 571, False: 212]
5528
571
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
5529
571
            } else {
5530
212
                pm_buffer_append_string(buffer, "null", 4);
5531
212
            }
5532
5533
783
            pm_buffer_append_byte(buffer, '}');
5534
783
            break;
5535
0
        }
5536
616
        case PM_WHEN_NODE: {
  Branch (5536:9): [True: 616, False: 1.00M]
5537
616
            pm_buffer_append_string(buffer, "{\"type\":\"WhenNode\",\"location\":", 30);
5538
5539
616
            const pm_when_node_t *cast = (const pm_when_node_t *) node;
5540
616
            pm_dump_json_location(buffer, &cast->base.location);
5541
5542
            // Dump the when_keyword_loc field
5543
616
            pm_buffer_append_byte(buffer, ',');
5544
616
            pm_buffer_append_string(buffer, "\"when_keyword_loc\":", 19);
5545
616
            pm_dump_json_location(buffer, &cast->when_keyword_loc);
5546
5547
            // Dump the conditions field
5548
616
            pm_buffer_append_byte(buffer, ',');
5549
616
            pm_buffer_append_string(buffer, "\"conditions\":", 13);
5550
616
            const pm_node_list_t *conditions = &cast->conditions;
5551
616
            pm_buffer_append_byte(buffer, '[');
5552
5553
1.30k
            for (size_t index = 0; index < conditions->size; 
index++693
) {
  Branch (5553:36): [True: 693, False: 616]
5554
693
                if (index != 0) 
pm_buffer_append_byte(buffer, ',')77
;
  Branch (5554:21): [True: 77, False: 616]
5555
693
                pm_dump_json(buffer, parser, conditions->nodes[index]);
5556
693
            }
5557
616
            pm_buffer_append_byte(buffer, ']');
5558
5559
            // Dump the then_keyword_loc field
5560
616
            pm_buffer_append_byte(buffer, ',');
5561
616
            pm_buffer_append_string(buffer, "\"then_keyword_loc\":", 19);
5562
616
            if (cast->then_keyword_loc.length != 0) {
  Branch (5562:17): [True: 36, False: 580]
5563
36
                pm_dump_json_location(buffer, &cast->then_keyword_loc);
5564
580
            } else {
5565
580
                pm_buffer_append_string(buffer, "null", 4);
5566
580
            }
5567
5568
            // Dump the statements field
5569
616
            pm_buffer_append_byte(buffer, ',');
5570
616
            pm_buffer_append_string(buffer, "\"statements\":", 13);
5571
616
            if (cast->statements != NULL) {
  Branch (5571:17): [True: 253, False: 363]
5572
253
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
5573
363
            } else {
5574
363
                pm_buffer_append_string(buffer, "null", 4);
5575
363
            }
5576
5577
616
            pm_buffer_append_byte(buffer, '}');
5578
616
            break;
5579
0
        }
5580
3.11k
        case PM_WHILE_NODE: {
  Branch (5580:9): [True: 3.11k, False: 1.00M]
5581
3.11k
            pm_buffer_append_string(buffer, "{\"type\":\"WhileNode\",\"location\":", 31);
5582
5583
3.11k
            const pm_while_node_t *cast = (const pm_while_node_t *) node;
5584
3.11k
            pm_dump_json_location(buffer, &cast->base.location);
5585
5586
            // Dump the LoopFlags field
5587
3.11k
            pm_buffer_append_byte(buffer, ',');
5588
3.11k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
5589
3.11k
            size_t flags = 0;
5590
3.11k
            pm_buffer_append_byte(buffer, '[');
5591
3.11k
            if (PM_NODE_FLAG_P(cast, PM_LOOP_FLAGS_BEGIN_MODIFIER)) {
5592
227
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5592:21): [True: 0, False: 227]
5593
227
                pm_buffer_append_string(buffer, "\"BEGIN_MODIFIER\"", 16);
5594
227
                flags++;
5595
227
            }
5596
3.11k
            pm_buffer_append_byte(buffer, ']');
5597
5598
            // Dump the while_keyword_loc field
5599
3.11k
            pm_buffer_append_byte(buffer, ',');
5600
3.11k
            pm_buffer_append_string(buffer, "\"while_keyword_loc\":", 20);
5601
3.11k
            pm_dump_json_location(buffer, &cast->while_keyword_loc);
5602
5603
            // Dump the do_keyword_loc field
5604
3.11k
            pm_buffer_append_byte(buffer, ',');
5605
3.11k
            pm_buffer_append_string(buffer, "\"do_keyword_loc\":", 17);
5606
3.11k
            if (cast->do_keyword_loc.length != 0) {
  Branch (5606:17): [True: 287, False: 2.82k]
5607
287
                pm_dump_json_location(buffer, &cast->do_keyword_loc);
5608
2.82k
            } else {
5609
2.82k
                pm_buffer_append_string(buffer, "null", 4);
5610
2.82k
            }
5611
5612
            // Dump the end_keyword_loc field
5613
3.11k
            pm_buffer_append_byte(buffer, ',');
5614
3.11k
            pm_buffer_append_string(buffer, "\"end_keyword_loc\":", 18);
5615
3.11k
            if (cast->end_keyword_loc.length != 0) {
  Branch (5615:17): [True: 1.09k, False: 2.02k]
5616
1.09k
                pm_dump_json_location(buffer, &cast->end_keyword_loc);
5617
2.02k
            } else {
5618
2.02k
                pm_buffer_append_string(buffer, "null", 4);
5619
2.02k
            }
5620
5621
            // Dump the predicate field
5622
3.11k
            pm_buffer_append_byte(buffer, ',');
5623
3.11k
            pm_buffer_append_string(buffer, "\"predicate\":", 12);
5624
3.11k
            pm_dump_json(buffer, parser, (const pm_node_t *) cast->predicate);
5625
5626
            // Dump the statements field
5627
3.11k
            pm_buffer_append_byte(buffer, ',');
5628
3.11k
            pm_buffer_append_string(buffer, "\"statements\":", 13);
5629
3.11k
            if (cast->statements != NULL) {
  Branch (5629:17): [True: 2.90k, False: 213]
5630
2.90k
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->statements);
5631
2.90k
            } else {
5632
213
                pm_buffer_append_string(buffer, "null", 4);
5633
213
            }
5634
5635
3.11k
            pm_buffer_append_byte(buffer, '}');
5636
3.11k
            break;
5637
0
        }
5638
1.71k
        case PM_X_STRING_NODE: {
  Branch (5638:9): [True: 1.71k, False: 1.00M]
5639
1.71k
            pm_buffer_append_string(buffer, "{\"type\":\"XStringNode\",\"location\":", 33);
5640
5641
1.71k
            const pm_x_string_node_t *cast = (const pm_x_string_node_t *) node;
5642
1.71k
            pm_dump_json_location(buffer, &cast->base.location);
5643
5644
            // Dump the EncodingFlags field
5645
1.71k
            pm_buffer_append_byte(buffer, ',');
5646
1.71k
            pm_buffer_append_string(buffer, "\"flags\":", 8);
5647
1.71k
            size_t flags = 0;
5648
1.71k
            pm_buffer_append_byte(buffer, '[');
5649
1.71k
            if (PM_NODE_FLAG_P(cast, PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING)) {
5650
3
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5650:21): [True: 0, False: 3]
5651
3
                pm_buffer_append_string(buffer, "\"FORCED_UTF8_ENCODING\"", 22);
5652
3
                flags++;
5653
3
            }
5654
1.71k
            if (PM_NODE_FLAG_P(cast, PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING)) {
5655
3
                if (flags != 0) 
pm_buffer_append_byte(buffer, ',')0
;
  Branch (5655:21): [True: 0, False: 3]
5656
3
                pm_buffer_append_string(buffer, "\"FORCED_BINARY_ENCODING\"", 24);
5657
3
                flags++;
5658
3
            }
5659
1.71k
            pm_buffer_append_byte(buffer, ']');
5660
5661
            // Dump the opening_loc field
5662
1.71k
            pm_buffer_append_byte(buffer, ',');
5663
1.71k
            pm_buffer_append_string(buffer, "\"opening_loc\":", 14);
5664
1.71k
            pm_dump_json_location(buffer, &cast->opening_loc);
5665
5666
            // Dump the content_loc field
5667
1.71k
            pm_buffer_append_byte(buffer, ',');
5668
1.71k
            pm_buffer_append_string(buffer, "\"content_loc\":", 14);
5669
1.71k
            pm_dump_json_location(buffer, &cast->content_loc);
5670
5671
            // Dump the closing_loc field
5672
1.71k
            pm_buffer_append_byte(buffer, ',');
5673
1.71k
            pm_buffer_append_string(buffer, "\"closing_loc\":", 14);
5674
1.71k
            pm_dump_json_location(buffer, &cast->closing_loc);
5675
5676
            // Dump the unescaped field
5677
1.71k
            pm_buffer_append_byte(buffer, ',');
5678
1.71k
            pm_buffer_append_string(buffer, "\"unescaped\":", 12);
5679
1.71k
            const pm_string_t *unescaped = &cast->unescaped;
5680
1.71k
            pm_buffer_append_byte(buffer, '"');
5681
1.71k
            pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
5682
1.71k
            pm_buffer_append_byte(buffer, '"');
5683
5684
1.71k
            pm_buffer_append_byte(buffer, '}');
5685
1.71k
            break;
5686
0
        }
5687
109
        case PM_YIELD_NODE: {
  Branch (5687:9): [True: 109, False: 1.00M]
5688
109
            pm_buffer_append_string(buffer, "{\"type\":\"YieldNode\",\"location\":", 31);
5689
5690
109
            const pm_yield_node_t *cast = (const pm_yield_node_t *) node;
5691
109
            pm_dump_json_location(buffer, &cast->base.location);
5692
5693
            // Dump the keyword_loc field
5694
109
            pm_buffer_append_byte(buffer, ',');
5695
109
            pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
5696
109
            pm_dump_json_location(buffer, &cast->keyword_loc);
5697
5698
            // Dump the lparen_loc field
5699
109
            pm_buffer_append_byte(buffer, ',');
5700
109
            pm_buffer_append_string(buffer, "\"lparen_loc\":", 13);
5701
109
            if (cast->lparen_loc.length != 0) {
  Branch (5701:17): [True: 36, False: 73]
5702
36
                pm_dump_json_location(buffer, &cast->lparen_loc);
5703
73
            } else {
5704
73
                pm_buffer_append_string(buffer, "null", 4);
5705
73
            }
5706
5707
            // Dump the arguments field
5708
109
            pm_buffer_append_byte(buffer, ',');
5709
109
            pm_buffer_append_string(buffer, "\"arguments\":", 12);
5710
109
            if (cast->arguments != NULL) {
  Branch (5710:17): [True: 50, False: 59]
5711
50
                pm_dump_json(buffer, parser, (const pm_node_t *) cast->arguments);
5712
59
            } else {
5713
59
                pm_buffer_append_string(buffer, "null", 4);
5714
59
            }
5715
5716
            // Dump the rparen_loc field
5717
109
            pm_buffer_append_byte(buffer, ',');
5718
109
            pm_buffer_append_string(buffer, "\"rparen_loc\":", 13);
5719
109
            if (cast->rparen_loc.length != 0) {
  Branch (5719:17): [True: 21, False: 88]
5720
21
                pm_dump_json_location(buffer, &cast->rparen_loc);
5721
88
            } else {
5722
88
                pm_buffer_append_string(buffer, "null", 4);
5723
88
            }
5724
5725
109
            pm_buffer_append_byte(buffer, '}');
5726
109
            break;
5727
0
        }
5728
0
        case PM_SCOPE_NODE:
  Branch (5728:9): [True: 0, False: 1.00M]
5729
0
            break;
5730
1.00M
    }
5731
1.00M
}
5732
5733
#endif