Coverage Report

Created: 2026-11-10 14:14

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