3022 pm_buffer_append_string(buffer,
"{\"type\":\"AliasGlobalVariableNode\",\"location\":", 45);
3025 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3028 pm_buffer_append_byte(buffer,
',');
3029 pm_buffer_append_string(buffer,
"\"new_name\":", 11);
3033 pm_buffer_append_byte(buffer,
',');
3034 pm_buffer_append_string(buffer,
"\"old_name\":", 11);
3038 pm_buffer_append_byte(buffer,
',');
3039 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
3040 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
3042 pm_buffer_append_byte(buffer,
'}');
3046 pm_buffer_append_string(buffer,
"{\"type\":\"AliasMethodNode\",\"location\":", 37);
3049 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3052 pm_buffer_append_byte(buffer,
',');
3053 pm_buffer_append_string(buffer,
"\"new_name\":", 11);
3057 pm_buffer_append_byte(buffer,
',');
3058 pm_buffer_append_string(buffer,
"\"old_name\":", 11);
3062 pm_buffer_append_byte(buffer,
',');
3063 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
3064 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
3066 pm_buffer_append_byte(buffer,
'}');
3070 pm_buffer_append_string(buffer,
"{\"type\":\"AlternationPatternNode\",\"location\":", 44);
3073 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3076 pm_buffer_append_byte(buffer,
',');
3077 pm_buffer_append_string(buffer,
"\"left\":", 7);
3078 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
left);
3081 pm_buffer_append_byte(buffer,
',');
3082 pm_buffer_append_string(buffer,
"\"right\":", 8);
3086 pm_buffer_append_byte(buffer,
',');
3087 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3088 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3090 pm_buffer_append_byte(buffer,
'}');
3094 pm_buffer_append_string(buffer,
"{\"type\":\"AndNode\",\"location\":", 29);
3097 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3100 pm_buffer_append_byte(buffer,
',');
3101 pm_buffer_append_string(buffer,
"\"left\":", 7);
3102 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
left);
3105 pm_buffer_append_byte(buffer,
',');
3106 pm_buffer_append_string(buffer,
"\"right\":", 8);
3110 pm_buffer_append_byte(buffer,
',');
3111 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3112 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3114 pm_buffer_append_byte(buffer,
'}');
3118 pm_buffer_append_string(buffer,
"{\"type\":\"ArgumentsNode\",\"location\":", 35);
3121 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3124 pm_buffer_append_byte(buffer,
',');
3125 pm_buffer_append_string(buffer,
"\"ArgumentsNodeFlags\":", 21);
3127 pm_buffer_append_byte(buffer,
'[');
3129 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3130 pm_buffer_append_string(buffer,
"\"CONTAINS_FORWARDING\"", 21);
3134 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3135 pm_buffer_append_string(buffer,
"\"CONTAINS_KEYWORDS\"", 19);
3139 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3140 pm_buffer_append_string(buffer,
"\"CONTAINS_KEYWORD_SPLAT\"", 24);
3144 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3145 pm_buffer_append_string(buffer,
"\"CONTAINS_SPLAT\"", 16);
3149 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3150 pm_buffer_append_string(buffer,
"\"CONTAINS_MULTIPLE_SPLATS\"", 26);
3153 pm_buffer_append_byte(buffer,
']');
3156 pm_buffer_append_byte(buffer,
',');
3157 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
3159 pm_buffer_append_byte(buffer,
'[');
3161 for (
size_t index = 0; index < arguments->
size; index++) {
3162 if (index != 0) pm_buffer_append_byte(buffer,
',');
3163 pm_dump_json(buffer, parser, arguments->
nodes[index]);
3165 pm_buffer_append_byte(buffer,
']');
3167 pm_buffer_append_byte(buffer,
'}');
3171 pm_buffer_append_string(buffer,
"{\"type\":\"ArrayNode\",\"location\":", 31);
3174 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3177 pm_buffer_append_byte(buffer,
',');
3178 pm_buffer_append_string(buffer,
"\"ArrayNodeFlags\":", 17);
3180 pm_buffer_append_byte(buffer,
'[');
3182 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3183 pm_buffer_append_string(buffer,
"\"CONTAINS_SPLAT\"", 16);
3186 pm_buffer_append_byte(buffer,
']');
3189 pm_buffer_append_byte(buffer,
',');
3190 pm_buffer_append_string(buffer,
"\"elements\":", 11);
3192 pm_buffer_append_byte(buffer,
'[');
3194 for (
size_t index = 0; index < elements->
size; index++) {
3195 if (index != 0) pm_buffer_append_byte(buffer,
',');
3196 pm_dump_json(buffer, parser, elements->
nodes[index]);
3198 pm_buffer_append_byte(buffer,
']');
3201 pm_buffer_append_byte(buffer,
',');
3202 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
3204 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
3206 pm_buffer_append_string(buffer,
"null", 4);
3210 pm_buffer_append_byte(buffer,
',');
3211 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
3213 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
3215 pm_buffer_append_string(buffer,
"null", 4);
3218 pm_buffer_append_byte(buffer,
'}');
3222 pm_buffer_append_string(buffer,
"{\"type\":\"ArrayPatternNode\",\"location\":", 38);
3225 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3228 pm_buffer_append_byte(buffer,
',');
3229 pm_buffer_append_string(buffer,
"\"constant\":", 11);
3233 pm_buffer_append_string(buffer,
"null", 4);
3237 pm_buffer_append_byte(buffer,
',');
3238 pm_buffer_append_string(buffer,
"\"requireds\":", 12);
3240 pm_buffer_append_byte(buffer,
'[');
3242 for (
size_t index = 0; index < requireds->
size; index++) {
3243 if (index != 0) pm_buffer_append_byte(buffer,
',');
3244 pm_dump_json(buffer, parser, requireds->
nodes[index]);
3246 pm_buffer_append_byte(buffer,
']');
3249 pm_buffer_append_byte(buffer,
',');
3250 pm_buffer_append_string(buffer,
"\"rest\":", 7);
3251 if (cast->
rest != NULL) {
3252 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
rest);
3254 pm_buffer_append_string(buffer,
"null", 4);
3258 pm_buffer_append_byte(buffer,
',');
3259 pm_buffer_append_string(buffer,
"\"posts\":", 8);
3261 pm_buffer_append_byte(buffer,
'[');
3263 for (
size_t index = 0; index < posts->
size; index++) {
3264 if (index != 0) pm_buffer_append_byte(buffer,
',');
3265 pm_dump_json(buffer, parser, posts->
nodes[index]);
3267 pm_buffer_append_byte(buffer,
']');
3270 pm_buffer_append_byte(buffer,
',');
3271 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
3273 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
3275 pm_buffer_append_string(buffer,
"null", 4);
3279 pm_buffer_append_byte(buffer,
',');
3280 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
3282 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
3284 pm_buffer_append_string(buffer,
"null", 4);
3287 pm_buffer_append_byte(buffer,
'}');
3291 pm_buffer_append_string(buffer,
"{\"type\":\"AssocNode\",\"location\":", 31);
3294 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3297 pm_buffer_append_byte(buffer,
',');
3298 pm_buffer_append_string(buffer,
"\"key\":", 6);
3299 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
key);
3302 pm_buffer_append_byte(buffer,
',');
3303 pm_buffer_append_string(buffer,
"\"value\":", 8);
3307 pm_buffer_append_byte(buffer,
',');
3308 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3310 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3312 pm_buffer_append_string(buffer,
"null", 4);
3315 pm_buffer_append_byte(buffer,
'}');
3319 pm_buffer_append_string(buffer,
"{\"type\":\"AssocSplatNode\",\"location\":", 36);
3322 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3325 pm_buffer_append_byte(buffer,
',');
3326 pm_buffer_append_string(buffer,
"\"value\":", 8);
3327 if (cast->
value != NULL) {
3330 pm_buffer_append_string(buffer,
"null", 4);
3334 pm_buffer_append_byte(buffer,
',');
3335 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3336 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3338 pm_buffer_append_byte(buffer,
'}');
3342 pm_buffer_append_string(buffer,
"{\"type\":\"BackReferenceReadNode\",\"location\":", 43);
3345 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3348 pm_buffer_append_byte(buffer,
',');
3349 pm_buffer_append_string(buffer,
"\"name\":", 7);
3350 pm_dump_json_constant(buffer, parser, cast->
name);
3352 pm_buffer_append_byte(buffer,
'}');
3356 pm_buffer_append_string(buffer,
"{\"type\":\"BeginNode\",\"location\":", 31);
3359 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3362 pm_buffer_append_byte(buffer,
',');
3363 pm_buffer_append_string(buffer,
"\"begin_keyword_loc\":", 20);
3367 pm_buffer_append_string(buffer,
"null", 4);
3371 pm_buffer_append_byte(buffer,
',');
3372 pm_buffer_append_string(buffer,
"\"statements\":", 13);
3376 pm_buffer_append_string(buffer,
"null", 4);
3380 pm_buffer_append_byte(buffer,
',');
3381 pm_buffer_append_string(buffer,
"\"rescue_clause\":", 16);
3385 pm_buffer_append_string(buffer,
"null", 4);
3389 pm_buffer_append_byte(buffer,
',');
3390 pm_buffer_append_string(buffer,
"\"else_clause\":", 14);
3394 pm_buffer_append_string(buffer,
"null", 4);
3398 pm_buffer_append_byte(buffer,
',');
3399 pm_buffer_append_string(buffer,
"\"ensure_clause\":", 16);
3403 pm_buffer_append_string(buffer,
"null", 4);
3407 pm_buffer_append_byte(buffer,
',');
3408 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
3412 pm_buffer_append_string(buffer,
"null", 4);
3415 pm_buffer_append_byte(buffer,
'}');
3419 pm_buffer_append_string(buffer,
"{\"type\":\"BlockArgumentNode\",\"location\":", 39);
3422 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3425 pm_buffer_append_byte(buffer,
',');
3426 pm_buffer_append_string(buffer,
"\"expression\":", 13);
3430 pm_buffer_append_string(buffer,
"null", 4);
3434 pm_buffer_append_byte(buffer,
',');
3435 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3436 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3438 pm_buffer_append_byte(buffer,
'}');
3442 pm_buffer_append_string(buffer,
"{\"type\":\"BlockLocalVariableNode\",\"location\":", 44);
3445 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3448 pm_buffer_append_byte(buffer,
',');
3449 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
3451 pm_buffer_append_byte(buffer,
'[');
3453 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3454 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
3457 pm_buffer_append_byte(buffer,
']');
3460 pm_buffer_append_byte(buffer,
',');
3461 pm_buffer_append_string(buffer,
"\"name\":", 7);
3462 pm_dump_json_constant(buffer, parser, cast->
name);
3464 pm_buffer_append_byte(buffer,
'}');
3468 pm_buffer_append_string(buffer,
"{\"type\":\"BlockNode\",\"location\":", 31);
3471 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3474 pm_buffer_append_byte(buffer,
',');
3475 pm_buffer_append_string(buffer,
"\"locals\":", 9);
3477 pm_buffer_append_byte(buffer,
'[');
3479 for (
size_t index = 0; index < locals->
size; index++) {
3480 if (index != 0) pm_buffer_append_byte(buffer,
',');
3481 pm_dump_json_constant(buffer, parser, locals->
ids[index]);
3483 pm_buffer_append_byte(buffer,
']');
3486 pm_buffer_append_byte(buffer,
',');
3487 pm_buffer_append_string(buffer,
"\"parameters\":", 13);
3491 pm_buffer_append_string(buffer,
"null", 4);
3495 pm_buffer_append_byte(buffer,
',');
3496 pm_buffer_append_string(buffer,
"\"body\":", 7);
3497 if (cast->
body != NULL) {
3498 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
body);
3500 pm_buffer_append_string(buffer,
"null", 4);
3504 pm_buffer_append_byte(buffer,
',');
3505 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
3506 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
3509 pm_buffer_append_byte(buffer,
',');
3510 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
3511 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
3513 pm_buffer_append_byte(buffer,
'}');
3517 pm_buffer_append_string(buffer,
"{\"type\":\"BlockParameterNode\",\"location\":", 40);
3520 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3523 pm_buffer_append_byte(buffer,
',');
3524 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
3526 pm_buffer_append_byte(buffer,
'[');
3528 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3529 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
3532 pm_buffer_append_byte(buffer,
']');
3535 pm_buffer_append_byte(buffer,
',');
3536 pm_buffer_append_string(buffer,
"\"name\":", 7);
3538 pm_dump_json_constant(buffer, parser, cast->
name);
3540 pm_buffer_append_string(buffer,
"null", 4);
3544 pm_buffer_append_byte(buffer,
',');
3545 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
3547 pm_dump_json_location(buffer, parser, &cast->
name_loc);
3549 pm_buffer_append_string(buffer,
"null", 4);
3553 pm_buffer_append_byte(buffer,
',');
3554 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3555 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3557 pm_buffer_append_byte(buffer,
'}');
3561 pm_buffer_append_string(buffer,
"{\"type\":\"BlockParametersNode\",\"location\":", 41);
3564 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3567 pm_buffer_append_byte(buffer,
',');
3568 pm_buffer_append_string(buffer,
"\"parameters\":", 13);
3572 pm_buffer_append_string(buffer,
"null", 4);
3576 pm_buffer_append_byte(buffer,
',');
3577 pm_buffer_append_string(buffer,
"\"locals\":", 9);
3579 pm_buffer_append_byte(buffer,
'[');
3581 for (
size_t index = 0; index < locals->
size; index++) {
3582 if (index != 0) pm_buffer_append_byte(buffer,
',');
3583 pm_dump_json(buffer, parser, locals->
nodes[index]);
3585 pm_buffer_append_byte(buffer,
']');
3588 pm_buffer_append_byte(buffer,
',');
3589 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
3591 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
3593 pm_buffer_append_string(buffer,
"null", 4);
3597 pm_buffer_append_byte(buffer,
',');
3598 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
3600 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
3602 pm_buffer_append_string(buffer,
"null", 4);
3605 pm_buffer_append_byte(buffer,
'}');
3609 pm_buffer_append_string(buffer,
"{\"type\":\"BreakNode\",\"location\":", 31);
3612 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3615 pm_buffer_append_byte(buffer,
',');
3616 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
3620 pm_buffer_append_string(buffer,
"null", 4);
3624 pm_buffer_append_byte(buffer,
',');
3625 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
3626 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
3628 pm_buffer_append_byte(buffer,
'}');
3632 pm_buffer_append_string(buffer,
"{\"type\":\"CallAndWriteNode\",\"location\":", 38);
3635 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3638 pm_buffer_append_byte(buffer,
',');
3639 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
3641 pm_buffer_append_byte(buffer,
'[');
3643 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3644 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
3648 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3649 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
3653 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3654 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
3658 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3659 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
3662 pm_buffer_append_byte(buffer,
']');
3665 pm_buffer_append_byte(buffer,
',');
3666 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
3670 pm_buffer_append_string(buffer,
"null", 4);
3674 pm_buffer_append_byte(buffer,
',');
3675 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
3679 pm_buffer_append_string(buffer,
"null", 4);
3683 pm_buffer_append_byte(buffer,
',');
3684 pm_buffer_append_string(buffer,
"\"message_loc\":", 14);
3686 pm_dump_json_location(buffer, parser, &cast->
message_loc);
3688 pm_buffer_append_string(buffer,
"null", 4);
3692 pm_buffer_append_byte(buffer,
',');
3693 pm_buffer_append_string(buffer,
"\"read_name\":", 12);
3694 pm_dump_json_constant(buffer, parser, cast->
read_name);
3697 pm_buffer_append_byte(buffer,
',');
3698 pm_buffer_append_string(buffer,
"\"write_name\":", 13);
3699 pm_dump_json_constant(buffer, parser, cast->
write_name);
3702 pm_buffer_append_byte(buffer,
',');
3703 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3704 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3707 pm_buffer_append_byte(buffer,
',');
3708 pm_buffer_append_string(buffer,
"\"value\":", 8);
3711 pm_buffer_append_byte(buffer,
'}');
3715 pm_buffer_append_string(buffer,
"{\"type\":\"CallNode\",\"location\":", 30);
3718 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3721 pm_buffer_append_byte(buffer,
',');
3722 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
3724 pm_buffer_append_byte(buffer,
'[');
3726 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3727 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
3731 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3732 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
3736 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3737 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
3741 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3742 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
3745 pm_buffer_append_byte(buffer,
']');
3748 pm_buffer_append_byte(buffer,
',');
3749 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
3753 pm_buffer_append_string(buffer,
"null", 4);
3757 pm_buffer_append_byte(buffer,
',');
3758 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
3762 pm_buffer_append_string(buffer,
"null", 4);
3766 pm_buffer_append_byte(buffer,
',');
3767 pm_buffer_append_string(buffer,
"\"name\":", 7);
3768 pm_dump_json_constant(buffer, parser, cast->
name);
3771 pm_buffer_append_byte(buffer,
',');
3772 pm_buffer_append_string(buffer,
"\"message_loc\":", 14);
3774 pm_dump_json_location(buffer, parser, &cast->
message_loc);
3776 pm_buffer_append_string(buffer,
"null", 4);
3780 pm_buffer_append_byte(buffer,
',');
3781 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
3783 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
3785 pm_buffer_append_string(buffer,
"null", 4);
3789 pm_buffer_append_byte(buffer,
',');
3790 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
3794 pm_buffer_append_string(buffer,
"null", 4);
3798 pm_buffer_append_byte(buffer,
',');
3799 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
3801 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
3803 pm_buffer_append_string(buffer,
"null", 4);
3807 pm_buffer_append_byte(buffer,
',');
3808 pm_buffer_append_string(buffer,
"\"block\":", 8);
3809 if (cast->
block != NULL) {
3812 pm_buffer_append_string(buffer,
"null", 4);
3815 pm_buffer_append_byte(buffer,
'}');
3819 pm_buffer_append_string(buffer,
"{\"type\":\"CallOperatorWriteNode\",\"location\":", 43);
3822 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3825 pm_buffer_append_byte(buffer,
',');
3826 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
3828 pm_buffer_append_byte(buffer,
'[');
3830 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3831 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
3835 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3836 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
3840 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3841 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
3845 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3846 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
3849 pm_buffer_append_byte(buffer,
']');
3852 pm_buffer_append_byte(buffer,
',');
3853 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
3857 pm_buffer_append_string(buffer,
"null", 4);
3861 pm_buffer_append_byte(buffer,
',');
3862 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
3866 pm_buffer_append_string(buffer,
"null", 4);
3870 pm_buffer_append_byte(buffer,
',');
3871 pm_buffer_append_string(buffer,
"\"message_loc\":", 14);
3873 pm_dump_json_location(buffer, parser, &cast->
message_loc);
3875 pm_buffer_append_string(buffer,
"null", 4);
3879 pm_buffer_append_byte(buffer,
',');
3880 pm_buffer_append_string(buffer,
"\"read_name\":", 12);
3881 pm_dump_json_constant(buffer, parser, cast->
read_name);
3884 pm_buffer_append_byte(buffer,
',');
3885 pm_buffer_append_string(buffer,
"\"write_name\":", 13);
3886 pm_dump_json_constant(buffer, parser, cast->
write_name);
3889 pm_buffer_append_byte(buffer,
',');
3890 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
3894 pm_buffer_append_byte(buffer,
',');
3895 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
3899 pm_buffer_append_byte(buffer,
',');
3900 pm_buffer_append_string(buffer,
"\"value\":", 8);
3903 pm_buffer_append_byte(buffer,
'}');
3907 pm_buffer_append_string(buffer,
"{\"type\":\"CallOrWriteNode\",\"location\":", 37);
3910 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3913 pm_buffer_append_byte(buffer,
',');
3914 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
3916 pm_buffer_append_byte(buffer,
'[');
3918 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3919 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
3923 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3924 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
3928 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3929 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
3933 if (flags != 0) pm_buffer_append_byte(buffer,
',');
3934 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
3937 pm_buffer_append_byte(buffer,
']');
3940 pm_buffer_append_byte(buffer,
',');
3941 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
3945 pm_buffer_append_string(buffer,
"null", 4);
3949 pm_buffer_append_byte(buffer,
',');
3950 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
3954 pm_buffer_append_string(buffer,
"null", 4);
3958 pm_buffer_append_byte(buffer,
',');
3959 pm_buffer_append_string(buffer,
"\"message_loc\":", 14);
3961 pm_dump_json_location(buffer, parser, &cast->
message_loc);
3963 pm_buffer_append_string(buffer,
"null", 4);
3967 pm_buffer_append_byte(buffer,
',');
3968 pm_buffer_append_string(buffer,
"\"read_name\":", 12);
3969 pm_dump_json_constant(buffer, parser, cast->
read_name);
3972 pm_buffer_append_byte(buffer,
',');
3973 pm_buffer_append_string(buffer,
"\"write_name\":", 13);
3974 pm_dump_json_constant(buffer, parser, cast->
write_name);
3977 pm_buffer_append_byte(buffer,
',');
3978 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
3979 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
3982 pm_buffer_append_byte(buffer,
',');
3983 pm_buffer_append_string(buffer,
"\"value\":", 8);
3986 pm_buffer_append_byte(buffer,
'}');
3990 pm_buffer_append_string(buffer,
"{\"type\":\"CallTargetNode\",\"location\":", 36);
3993 pm_dump_json_location(buffer, parser, &cast->
base.
location);
3996 pm_buffer_append_byte(buffer,
',');
3997 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
3999 pm_buffer_append_byte(buffer,
'[');
4001 if (flags != 0) pm_buffer_append_byte(buffer,
',');
4002 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
4006 if (flags != 0) pm_buffer_append_byte(buffer,
',');
4007 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
4011 if (flags != 0) pm_buffer_append_byte(buffer,
',');
4012 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
4016 if (flags != 0) pm_buffer_append_byte(buffer,
',');
4017 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
4020 pm_buffer_append_byte(buffer,
']');
4023 pm_buffer_append_byte(buffer,
',');
4024 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
4028 pm_buffer_append_byte(buffer,
',');
4029 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
4033 pm_buffer_append_byte(buffer,
',');
4034 pm_buffer_append_string(buffer,
"\"name\":", 7);
4035 pm_dump_json_constant(buffer, parser, cast->
name);
4038 pm_buffer_append_byte(buffer,
',');
4039 pm_buffer_append_string(buffer,
"\"message_loc\":", 14);
4040 pm_dump_json_location(buffer, parser, &cast->
message_loc);
4042 pm_buffer_append_byte(buffer,
'}');
4046 pm_buffer_append_string(buffer,
"{\"type\":\"CapturePatternNode\",\"location\":", 40);
4049 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4052 pm_buffer_append_byte(buffer,
',');
4053 pm_buffer_append_string(buffer,
"\"value\":", 8);
4057 pm_buffer_append_byte(buffer,
',');
4058 pm_buffer_append_string(buffer,
"\"target\":", 9);
4062 pm_buffer_append_byte(buffer,
',');
4063 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4064 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4066 pm_buffer_append_byte(buffer,
'}');
4070 pm_buffer_append_string(buffer,
"{\"type\":\"CaseMatchNode\",\"location\":", 35);
4073 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4076 pm_buffer_append_byte(buffer,
',');
4077 pm_buffer_append_string(buffer,
"\"predicate\":", 12);
4081 pm_buffer_append_string(buffer,
"null", 4);
4085 pm_buffer_append_byte(buffer,
',');
4086 pm_buffer_append_string(buffer,
"\"conditions\":", 13);
4088 pm_buffer_append_byte(buffer,
'[');
4090 for (
size_t index = 0; index < conditions->
size; index++) {
4091 if (index != 0) pm_buffer_append_byte(buffer,
',');
4092 pm_dump_json(buffer, parser, conditions->
nodes[index]);
4094 pm_buffer_append_byte(buffer,
']');
4097 pm_buffer_append_byte(buffer,
',');
4098 pm_buffer_append_string(buffer,
"\"else_clause\":", 14);
4102 pm_buffer_append_string(buffer,
"null", 4);
4106 pm_buffer_append_byte(buffer,
',');
4107 pm_buffer_append_string(buffer,
"\"case_keyword_loc\":", 19);
4111 pm_buffer_append_byte(buffer,
',');
4112 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
4115 pm_buffer_append_byte(buffer,
'}');
4119 pm_buffer_append_string(buffer,
"{\"type\":\"CaseNode\",\"location\":", 30);
4122 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4125 pm_buffer_append_byte(buffer,
',');
4126 pm_buffer_append_string(buffer,
"\"predicate\":", 12);
4130 pm_buffer_append_string(buffer,
"null", 4);
4134 pm_buffer_append_byte(buffer,
',');
4135 pm_buffer_append_string(buffer,
"\"conditions\":", 13);
4137 pm_buffer_append_byte(buffer,
'[');
4139 for (
size_t index = 0; index < conditions->
size; index++) {
4140 if (index != 0) pm_buffer_append_byte(buffer,
',');
4141 pm_dump_json(buffer, parser, conditions->
nodes[index]);
4143 pm_buffer_append_byte(buffer,
']');
4146 pm_buffer_append_byte(buffer,
',');
4147 pm_buffer_append_string(buffer,
"\"else_clause\":", 14);
4151 pm_buffer_append_string(buffer,
"null", 4);
4155 pm_buffer_append_byte(buffer,
',');
4156 pm_buffer_append_string(buffer,
"\"case_keyword_loc\":", 19);
4160 pm_buffer_append_byte(buffer,
',');
4161 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
4164 pm_buffer_append_byte(buffer,
'}');
4168 pm_buffer_append_string(buffer,
"{\"type\":\"ClassNode\",\"location\":", 31);
4171 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4174 pm_buffer_append_byte(buffer,
',');
4175 pm_buffer_append_string(buffer,
"\"locals\":", 9);
4177 pm_buffer_append_byte(buffer,
'[');
4179 for (
size_t index = 0; index < locals->
size; index++) {
4180 if (index != 0) pm_buffer_append_byte(buffer,
',');
4181 pm_dump_json_constant(buffer, parser, locals->
ids[index]);
4183 pm_buffer_append_byte(buffer,
']');
4186 pm_buffer_append_byte(buffer,
',');
4187 pm_buffer_append_string(buffer,
"\"class_keyword_loc\":", 20);
4191 pm_buffer_append_byte(buffer,
',');
4192 pm_buffer_append_string(buffer,
"\"constant_path\":", 16);
4196 pm_buffer_append_byte(buffer,
',');
4197 pm_buffer_append_string(buffer,
"\"inheritance_operator_loc\":", 27);
4201 pm_buffer_append_string(buffer,
"null", 4);
4205 pm_buffer_append_byte(buffer,
',');
4206 pm_buffer_append_string(buffer,
"\"superclass\":", 13);
4210 pm_buffer_append_string(buffer,
"null", 4);
4214 pm_buffer_append_byte(buffer,
',');
4215 pm_buffer_append_string(buffer,
"\"body\":", 7);
4216 if (cast->
body != NULL) {
4217 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
body);
4219 pm_buffer_append_string(buffer,
"null", 4);
4223 pm_buffer_append_byte(buffer,
',');
4224 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
4228 pm_buffer_append_byte(buffer,
',');
4229 pm_buffer_append_string(buffer,
"\"name\":", 7);
4230 pm_dump_json_constant(buffer, parser, cast->
name);
4232 pm_buffer_append_byte(buffer,
'}');
4236 pm_buffer_append_string(buffer,
"{\"type\":\"ClassVariableAndWriteNode\",\"location\":", 47);
4239 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4242 pm_buffer_append_byte(buffer,
',');
4243 pm_buffer_append_string(buffer,
"\"name\":", 7);
4244 pm_dump_json_constant(buffer, parser, cast->
name);
4247 pm_buffer_append_byte(buffer,
',');
4248 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4249 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4252 pm_buffer_append_byte(buffer,
',');
4253 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4254 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4257 pm_buffer_append_byte(buffer,
',');
4258 pm_buffer_append_string(buffer,
"\"value\":", 8);
4261 pm_buffer_append_byte(buffer,
'}');
4265 pm_buffer_append_string(buffer,
"{\"type\":\"ClassVariableOperatorWriteNode\",\"location\":", 52);
4268 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4271 pm_buffer_append_byte(buffer,
',');
4272 pm_buffer_append_string(buffer,
"\"name\":", 7);
4273 pm_dump_json_constant(buffer, parser, cast->
name);
4276 pm_buffer_append_byte(buffer,
',');
4277 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4278 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4281 pm_buffer_append_byte(buffer,
',');
4282 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
4286 pm_buffer_append_byte(buffer,
',');
4287 pm_buffer_append_string(buffer,
"\"value\":", 8);
4291 pm_buffer_append_byte(buffer,
',');
4292 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
4295 pm_buffer_append_byte(buffer,
'}');
4299 pm_buffer_append_string(buffer,
"{\"type\":\"ClassVariableOrWriteNode\",\"location\":", 46);
4302 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4305 pm_buffer_append_byte(buffer,
',');
4306 pm_buffer_append_string(buffer,
"\"name\":", 7);
4307 pm_dump_json_constant(buffer, parser, cast->
name);
4310 pm_buffer_append_byte(buffer,
',');
4311 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4312 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4315 pm_buffer_append_byte(buffer,
',');
4316 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4317 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4320 pm_buffer_append_byte(buffer,
',');
4321 pm_buffer_append_string(buffer,
"\"value\":", 8);
4324 pm_buffer_append_byte(buffer,
'}');
4328 pm_buffer_append_string(buffer,
"{\"type\":\"ClassVariableReadNode\",\"location\":", 43);
4331 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4334 pm_buffer_append_byte(buffer,
',');
4335 pm_buffer_append_string(buffer,
"\"name\":", 7);
4336 pm_dump_json_constant(buffer, parser, cast->
name);
4338 pm_buffer_append_byte(buffer,
'}');
4342 pm_buffer_append_string(buffer,
"{\"type\":\"ClassVariableTargetNode\",\"location\":", 45);
4345 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4348 pm_buffer_append_byte(buffer,
',');
4349 pm_buffer_append_string(buffer,
"\"name\":", 7);
4350 pm_dump_json_constant(buffer, parser, cast->
name);
4352 pm_buffer_append_byte(buffer,
'}');
4356 pm_buffer_append_string(buffer,
"{\"type\":\"ClassVariableWriteNode\",\"location\":", 44);
4359 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4362 pm_buffer_append_byte(buffer,
',');
4363 pm_buffer_append_string(buffer,
"\"name\":", 7);
4364 pm_dump_json_constant(buffer, parser, cast->
name);
4367 pm_buffer_append_byte(buffer,
',');
4368 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4369 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4372 pm_buffer_append_byte(buffer,
',');
4373 pm_buffer_append_string(buffer,
"\"value\":", 8);
4377 pm_buffer_append_byte(buffer,
',');
4378 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4379 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4381 pm_buffer_append_byte(buffer,
'}');
4385 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantAndWriteNode\",\"location\":", 42);
4388 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4391 pm_buffer_append_byte(buffer,
',');
4392 pm_buffer_append_string(buffer,
"\"name\":", 7);
4393 pm_dump_json_constant(buffer, parser, cast->
name);
4396 pm_buffer_append_byte(buffer,
',');
4397 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4398 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4401 pm_buffer_append_byte(buffer,
',');
4402 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4403 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4406 pm_buffer_append_byte(buffer,
',');
4407 pm_buffer_append_string(buffer,
"\"value\":", 8);
4410 pm_buffer_append_byte(buffer,
'}');
4414 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantOperatorWriteNode\",\"location\":", 47);
4417 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4420 pm_buffer_append_byte(buffer,
',');
4421 pm_buffer_append_string(buffer,
"\"name\":", 7);
4422 pm_dump_json_constant(buffer, parser, cast->
name);
4425 pm_buffer_append_byte(buffer,
',');
4426 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4427 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4430 pm_buffer_append_byte(buffer,
',');
4431 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
4435 pm_buffer_append_byte(buffer,
',');
4436 pm_buffer_append_string(buffer,
"\"value\":", 8);
4440 pm_buffer_append_byte(buffer,
',');
4441 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
4444 pm_buffer_append_byte(buffer,
'}');
4448 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantOrWriteNode\",\"location\":", 41);
4451 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4454 pm_buffer_append_byte(buffer,
',');
4455 pm_buffer_append_string(buffer,
"\"name\":", 7);
4456 pm_dump_json_constant(buffer, parser, cast->
name);
4459 pm_buffer_append_byte(buffer,
',');
4460 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4461 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4464 pm_buffer_append_byte(buffer,
',');
4465 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4466 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4469 pm_buffer_append_byte(buffer,
',');
4470 pm_buffer_append_string(buffer,
"\"value\":", 8);
4473 pm_buffer_append_byte(buffer,
'}');
4477 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantPathAndWriteNode\",\"location\":", 46);
4480 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4483 pm_buffer_append_byte(buffer,
',');
4484 pm_buffer_append_string(buffer,
"\"target\":", 9);
4488 pm_buffer_append_byte(buffer,
',');
4489 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4490 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4493 pm_buffer_append_byte(buffer,
',');
4494 pm_buffer_append_string(buffer,
"\"value\":", 8);
4497 pm_buffer_append_byte(buffer,
'}');
4501 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantPathNode\",\"location\":", 38);
4504 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4507 pm_buffer_append_byte(buffer,
',');
4508 pm_buffer_append_string(buffer,
"\"parent\":", 9);
4509 if (cast->
parent != NULL) {
4512 pm_buffer_append_string(buffer,
"null", 4);
4516 pm_buffer_append_byte(buffer,
',');
4517 pm_buffer_append_string(buffer,
"\"name\":", 7);
4519 pm_dump_json_constant(buffer, parser, cast->
name);
4521 pm_buffer_append_string(buffer,
"null", 4);
4525 pm_buffer_append_byte(buffer,
',');
4526 pm_buffer_append_string(buffer,
"\"delimiter_loc\":", 16);
4527 pm_dump_json_location(buffer, parser, &cast->
delimiter_loc);
4530 pm_buffer_append_byte(buffer,
',');
4531 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4532 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4534 pm_buffer_append_byte(buffer,
'}');
4538 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantPathOperatorWriteNode\",\"location\":", 51);
4541 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4544 pm_buffer_append_byte(buffer,
',');
4545 pm_buffer_append_string(buffer,
"\"target\":", 9);
4549 pm_buffer_append_byte(buffer,
',');
4550 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
4554 pm_buffer_append_byte(buffer,
',');
4555 pm_buffer_append_string(buffer,
"\"value\":", 8);
4559 pm_buffer_append_byte(buffer,
',');
4560 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
4563 pm_buffer_append_byte(buffer,
'}');
4567 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantPathOrWriteNode\",\"location\":", 45);
4570 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4573 pm_buffer_append_byte(buffer,
',');
4574 pm_buffer_append_string(buffer,
"\"target\":", 9);
4578 pm_buffer_append_byte(buffer,
',');
4579 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4580 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4583 pm_buffer_append_byte(buffer,
',');
4584 pm_buffer_append_string(buffer,
"\"value\":", 8);
4587 pm_buffer_append_byte(buffer,
'}');
4591 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantPathTargetNode\",\"location\":", 44);
4594 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4597 pm_buffer_append_byte(buffer,
',');
4598 pm_buffer_append_string(buffer,
"\"parent\":", 9);
4599 if (cast->
parent != NULL) {
4602 pm_buffer_append_string(buffer,
"null", 4);
4606 pm_buffer_append_byte(buffer,
',');
4607 pm_buffer_append_string(buffer,
"\"name\":", 7);
4609 pm_dump_json_constant(buffer, parser, cast->
name);
4611 pm_buffer_append_string(buffer,
"null", 4);
4615 pm_buffer_append_byte(buffer,
',');
4616 pm_buffer_append_string(buffer,
"\"delimiter_loc\":", 16);
4617 pm_dump_json_location(buffer, parser, &cast->
delimiter_loc);
4620 pm_buffer_append_byte(buffer,
',');
4621 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4622 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4624 pm_buffer_append_byte(buffer,
'}');
4628 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantPathWriteNode\",\"location\":", 43);
4631 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4634 pm_buffer_append_byte(buffer,
',');
4635 pm_buffer_append_string(buffer,
"\"target\":", 9);
4639 pm_buffer_append_byte(buffer,
',');
4640 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4641 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4644 pm_buffer_append_byte(buffer,
',');
4645 pm_buffer_append_string(buffer,
"\"value\":", 8);
4648 pm_buffer_append_byte(buffer,
'}');
4652 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantReadNode\",\"location\":", 38);
4655 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4658 pm_buffer_append_byte(buffer,
',');
4659 pm_buffer_append_string(buffer,
"\"name\":", 7);
4660 pm_dump_json_constant(buffer, parser, cast->
name);
4662 pm_buffer_append_byte(buffer,
'}');
4666 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantTargetNode\",\"location\":", 40);
4669 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4672 pm_buffer_append_byte(buffer,
',');
4673 pm_buffer_append_string(buffer,
"\"name\":", 7);
4674 pm_dump_json_constant(buffer, parser, cast->
name);
4676 pm_buffer_append_byte(buffer,
'}');
4680 pm_buffer_append_string(buffer,
"{\"type\":\"ConstantWriteNode\",\"location\":", 39);
4683 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4686 pm_buffer_append_byte(buffer,
',');
4687 pm_buffer_append_string(buffer,
"\"name\":", 7);
4688 pm_dump_json_constant(buffer, parser, cast->
name);
4691 pm_buffer_append_byte(buffer,
',');
4692 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4693 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4696 pm_buffer_append_byte(buffer,
',');
4697 pm_buffer_append_string(buffer,
"\"value\":", 8);
4701 pm_buffer_append_byte(buffer,
',');
4702 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4703 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4705 pm_buffer_append_byte(buffer,
'}');
4709 pm_buffer_append_string(buffer,
"{\"type\":\"DefNode\",\"location\":", 29);
4712 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4715 pm_buffer_append_byte(buffer,
',');
4716 pm_buffer_append_string(buffer,
"\"name\":", 7);
4717 pm_dump_json_constant(buffer, parser, cast->
name);
4720 pm_buffer_append_byte(buffer,
',');
4721 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
4722 pm_dump_json_location(buffer, parser, &cast->
name_loc);
4725 pm_buffer_append_byte(buffer,
',');
4726 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
4730 pm_buffer_append_string(buffer,
"null", 4);
4734 pm_buffer_append_byte(buffer,
',');
4735 pm_buffer_append_string(buffer,
"\"parameters\":", 13);
4739 pm_buffer_append_string(buffer,
"null", 4);
4743 pm_buffer_append_byte(buffer,
',');
4744 pm_buffer_append_string(buffer,
"\"body\":", 7);
4745 if (cast->
body != NULL) {
4746 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
body);
4748 pm_buffer_append_string(buffer,
"null", 4);
4752 pm_buffer_append_byte(buffer,
',');
4753 pm_buffer_append_string(buffer,
"\"locals\":", 9);
4755 pm_buffer_append_byte(buffer,
'[');
4757 for (
size_t index = 0; index < locals->
size; index++) {
4758 if (index != 0) pm_buffer_append_byte(buffer,
',');
4759 pm_dump_json_constant(buffer, parser, locals->
ids[index]);
4761 pm_buffer_append_byte(buffer,
']');
4764 pm_buffer_append_byte(buffer,
',');
4765 pm_buffer_append_string(buffer,
"\"def_keyword_loc\":", 18);
4769 pm_buffer_append_byte(buffer,
',');
4770 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4772 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4774 pm_buffer_append_string(buffer,
"null", 4);
4778 pm_buffer_append_byte(buffer,
',');
4779 pm_buffer_append_string(buffer,
"\"lparen_loc\":", 13);
4781 pm_dump_json_location(buffer, parser, &cast->
lparen_loc);
4783 pm_buffer_append_string(buffer,
"null", 4);
4787 pm_buffer_append_byte(buffer,
',');
4788 pm_buffer_append_string(buffer,
"\"rparen_loc\":", 13);
4790 pm_dump_json_location(buffer, parser, &cast->
rparen_loc);
4792 pm_buffer_append_string(buffer,
"null", 4);
4796 pm_buffer_append_byte(buffer,
',');
4797 pm_buffer_append_string(buffer,
"\"equal_loc\":", 12);
4799 pm_dump_json_location(buffer, parser, &cast->
equal_loc);
4801 pm_buffer_append_string(buffer,
"null", 4);
4805 pm_buffer_append_byte(buffer,
',');
4806 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
4810 pm_buffer_append_string(buffer,
"null", 4);
4813 pm_buffer_append_byte(buffer,
'}');
4817 pm_buffer_append_string(buffer,
"{\"type\":\"DefinedNode\",\"location\":", 33);
4820 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4823 pm_buffer_append_byte(buffer,
',');
4824 pm_buffer_append_string(buffer,
"\"lparen_loc\":", 13);
4826 pm_dump_json_location(buffer, parser, &cast->
lparen_loc);
4828 pm_buffer_append_string(buffer,
"null", 4);
4832 pm_buffer_append_byte(buffer,
',');
4833 pm_buffer_append_string(buffer,
"\"value\":", 8);
4837 pm_buffer_append_byte(buffer,
',');
4838 pm_buffer_append_string(buffer,
"\"rparen_loc\":", 13);
4840 pm_dump_json_location(buffer, parser, &cast->
rparen_loc);
4842 pm_buffer_append_string(buffer,
"null", 4);
4846 pm_buffer_append_byte(buffer,
',');
4847 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
4848 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
4850 pm_buffer_append_byte(buffer,
'}');
4854 pm_buffer_append_string(buffer,
"{\"type\":\"ElseNode\",\"location\":", 30);
4857 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4860 pm_buffer_append_byte(buffer,
',');
4861 pm_buffer_append_string(buffer,
"\"else_keyword_loc\":", 19);
4865 pm_buffer_append_byte(buffer,
',');
4866 pm_buffer_append_string(buffer,
"\"statements\":", 13);
4870 pm_buffer_append_string(buffer,
"null", 4);
4874 pm_buffer_append_byte(buffer,
',');
4875 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
4879 pm_buffer_append_string(buffer,
"null", 4);
4882 pm_buffer_append_byte(buffer,
'}');
4886 pm_buffer_append_string(buffer,
"{\"type\":\"EmbeddedStatementsNode\",\"location\":", 44);
4889 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4892 pm_buffer_append_byte(buffer,
',');
4893 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
4894 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
4897 pm_buffer_append_byte(buffer,
',');
4898 pm_buffer_append_string(buffer,
"\"statements\":", 13);
4902 pm_buffer_append_string(buffer,
"null", 4);
4906 pm_buffer_append_byte(buffer,
',');
4907 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
4908 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
4910 pm_buffer_append_byte(buffer,
'}');
4914 pm_buffer_append_string(buffer,
"{\"type\":\"EmbeddedVariableNode\",\"location\":", 42);
4917 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4920 pm_buffer_append_byte(buffer,
',');
4921 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
4922 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
4925 pm_buffer_append_byte(buffer,
',');
4926 pm_buffer_append_string(buffer,
"\"variable\":", 11);
4929 pm_buffer_append_byte(buffer,
'}');
4933 pm_buffer_append_string(buffer,
"{\"type\":\"EnsureNode\",\"location\":", 32);
4936 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4939 pm_buffer_append_byte(buffer,
',');
4940 pm_buffer_append_string(buffer,
"\"ensure_keyword_loc\":", 21);
4944 pm_buffer_append_byte(buffer,
',');
4945 pm_buffer_append_string(buffer,
"\"statements\":", 13);
4949 pm_buffer_append_string(buffer,
"null", 4);
4953 pm_buffer_append_byte(buffer,
',');
4954 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
4957 pm_buffer_append_byte(buffer,
'}');
4961 pm_buffer_append_string(buffer,
"{\"type\":\"FalseNode\",\"location\":", 31);
4964 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4966 pm_buffer_append_byte(buffer,
'}');
4970 pm_buffer_append_string(buffer,
"{\"type\":\"FindPatternNode\",\"location\":", 37);
4973 pm_dump_json_location(buffer, parser, &cast->
base.
location);
4976 pm_buffer_append_byte(buffer,
',');
4977 pm_buffer_append_string(buffer,
"\"constant\":", 11);
4981 pm_buffer_append_string(buffer,
"null", 4);
4985 pm_buffer_append_byte(buffer,
',');
4986 pm_buffer_append_string(buffer,
"\"left\":", 7);
4987 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
left);
4990 pm_buffer_append_byte(buffer,
',');
4991 pm_buffer_append_string(buffer,
"\"requireds\":", 12);
4993 pm_buffer_append_byte(buffer,
'[');
4995 for (
size_t index = 0; index < requireds->
size; index++) {
4996 if (index != 0) pm_buffer_append_byte(buffer,
',');
4997 pm_dump_json(buffer, parser, requireds->
nodes[index]);
4999 pm_buffer_append_byte(buffer,
']');
5002 pm_buffer_append_byte(buffer,
',');
5003 pm_buffer_append_string(buffer,
"\"right\":", 8);
5007 pm_buffer_append_byte(buffer,
',');
5008 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
5010 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
5012 pm_buffer_append_string(buffer,
"null", 4);
5016 pm_buffer_append_byte(buffer,
',');
5017 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
5019 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
5021 pm_buffer_append_string(buffer,
"null", 4);
5024 pm_buffer_append_byte(buffer,
'}');
5028 pm_buffer_append_string(buffer,
"{\"type\":\"FlipFlopNode\",\"location\":", 34);
5031 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5034 pm_buffer_append_byte(buffer,
',');
5035 pm_buffer_append_string(buffer,
"\"RangeFlags\":", 13);
5037 pm_buffer_append_byte(buffer,
'[');
5039 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5040 pm_buffer_append_string(buffer,
"\"EXCLUDE_END\"", 13);
5043 pm_buffer_append_byte(buffer,
']');
5046 pm_buffer_append_byte(buffer,
',');
5047 pm_buffer_append_string(buffer,
"\"left\":", 7);
5048 if (cast->
left != NULL) {
5049 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
left);
5051 pm_buffer_append_string(buffer,
"null", 4);
5055 pm_buffer_append_byte(buffer,
',');
5056 pm_buffer_append_string(buffer,
"\"right\":", 8);
5057 if (cast->
right != NULL) {
5060 pm_buffer_append_string(buffer,
"null", 4);
5064 pm_buffer_append_byte(buffer,
',');
5065 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5066 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5068 pm_buffer_append_byte(buffer,
'}');
5072 pm_buffer_append_string(buffer,
"{\"type\":\"FloatNode\",\"location\":", 31);
5075 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5078 pm_buffer_append_byte(buffer,
',');
5079 pm_buffer_append_string(buffer,
"\"value\":", 8);
5080 pm_buffer_append_format(buffer,
"%f", cast->
value);
5082 pm_buffer_append_byte(buffer,
'}');
5086 pm_buffer_append_string(buffer,
"{\"type\":\"ForNode\",\"location\":", 29);
5089 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5092 pm_buffer_append_byte(buffer,
',');
5093 pm_buffer_append_string(buffer,
"\"index\":", 8);
5097 pm_buffer_append_byte(buffer,
',');
5098 pm_buffer_append_string(buffer,
"\"collection\":", 13);
5102 pm_buffer_append_byte(buffer,
',');
5103 pm_buffer_append_string(buffer,
"\"statements\":", 13);
5107 pm_buffer_append_string(buffer,
"null", 4);
5111 pm_buffer_append_byte(buffer,
',');
5112 pm_buffer_append_string(buffer,
"\"for_keyword_loc\":", 18);
5116 pm_buffer_append_byte(buffer,
',');
5117 pm_buffer_append_string(buffer,
"\"in_keyword_loc\":", 17);
5121 pm_buffer_append_byte(buffer,
',');
5122 pm_buffer_append_string(buffer,
"\"do_keyword_loc\":", 17);
5126 pm_buffer_append_string(buffer,
"null", 4);
5130 pm_buffer_append_byte(buffer,
',');
5131 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
5134 pm_buffer_append_byte(buffer,
'}');
5138 pm_buffer_append_string(buffer,
"{\"type\":\"ForwardingArgumentsNode\",\"location\":", 45);
5141 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5143 pm_buffer_append_byte(buffer,
'}');
5147 pm_buffer_append_string(buffer,
"{\"type\":\"ForwardingParameterNode\",\"location\":", 45);
5150 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5152 pm_buffer_append_byte(buffer,
'}');
5156 pm_buffer_append_string(buffer,
"{\"type\":\"ForwardingSuperNode\",\"location\":", 41);
5159 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5162 pm_buffer_append_byte(buffer,
',');
5163 pm_buffer_append_string(buffer,
"\"block\":", 8);
5164 if (cast->
block != NULL) {
5167 pm_buffer_append_string(buffer,
"null", 4);
5170 pm_buffer_append_byte(buffer,
'}');
5174 pm_buffer_append_string(buffer,
"{\"type\":\"GlobalVariableAndWriteNode\",\"location\":", 48);
5177 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5180 pm_buffer_append_byte(buffer,
',');
5181 pm_buffer_append_string(buffer,
"\"name\":", 7);
5182 pm_dump_json_constant(buffer, parser, cast->
name);
5185 pm_buffer_append_byte(buffer,
',');
5186 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
5187 pm_dump_json_location(buffer, parser, &cast->
name_loc);
5190 pm_buffer_append_byte(buffer,
',');
5191 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5192 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5195 pm_buffer_append_byte(buffer,
',');
5196 pm_buffer_append_string(buffer,
"\"value\":", 8);
5199 pm_buffer_append_byte(buffer,
'}');
5203 pm_buffer_append_string(buffer,
"{\"type\":\"GlobalVariableOperatorWriteNode\",\"location\":", 53);
5206 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5209 pm_buffer_append_byte(buffer,
',');
5210 pm_buffer_append_string(buffer,
"\"name\":", 7);
5211 pm_dump_json_constant(buffer, parser, cast->
name);
5214 pm_buffer_append_byte(buffer,
',');
5215 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
5216 pm_dump_json_location(buffer, parser, &cast->
name_loc);
5219 pm_buffer_append_byte(buffer,
',');
5220 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
5224 pm_buffer_append_byte(buffer,
',');
5225 pm_buffer_append_string(buffer,
"\"value\":", 8);
5229 pm_buffer_append_byte(buffer,
',');
5230 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
5233 pm_buffer_append_byte(buffer,
'}');
5237 pm_buffer_append_string(buffer,
"{\"type\":\"GlobalVariableOrWriteNode\",\"location\":", 47);
5240 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5243 pm_buffer_append_byte(buffer,
',');
5244 pm_buffer_append_string(buffer,
"\"name\":", 7);
5245 pm_dump_json_constant(buffer, parser, cast->
name);
5248 pm_buffer_append_byte(buffer,
',');
5249 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
5250 pm_dump_json_location(buffer, parser, &cast->
name_loc);
5253 pm_buffer_append_byte(buffer,
',');
5254 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5255 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5258 pm_buffer_append_byte(buffer,
',');
5259 pm_buffer_append_string(buffer,
"\"value\":", 8);
5262 pm_buffer_append_byte(buffer,
'}');
5266 pm_buffer_append_string(buffer,
"{\"type\":\"GlobalVariableReadNode\",\"location\":", 44);
5269 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5272 pm_buffer_append_byte(buffer,
',');
5273 pm_buffer_append_string(buffer,
"\"name\":", 7);
5274 pm_dump_json_constant(buffer, parser, cast->
name);
5276 pm_buffer_append_byte(buffer,
'}');
5280 pm_buffer_append_string(buffer,
"{\"type\":\"GlobalVariableTargetNode\",\"location\":", 46);
5283 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5286 pm_buffer_append_byte(buffer,
',');
5287 pm_buffer_append_string(buffer,
"\"name\":", 7);
5288 pm_dump_json_constant(buffer, parser, cast->
name);
5290 pm_buffer_append_byte(buffer,
'}');
5294 pm_buffer_append_string(buffer,
"{\"type\":\"GlobalVariableWriteNode\",\"location\":", 45);
5297 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5300 pm_buffer_append_byte(buffer,
',');
5301 pm_buffer_append_string(buffer,
"\"name\":", 7);
5302 pm_dump_json_constant(buffer, parser, cast->
name);
5305 pm_buffer_append_byte(buffer,
',');
5306 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
5307 pm_dump_json_location(buffer, parser, &cast->
name_loc);
5310 pm_buffer_append_byte(buffer,
',');
5311 pm_buffer_append_string(buffer,
"\"value\":", 8);
5315 pm_buffer_append_byte(buffer,
',');
5316 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5317 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5319 pm_buffer_append_byte(buffer,
'}');
5323 pm_buffer_append_string(buffer,
"{\"type\":\"HashNode\",\"location\":", 30);
5326 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5329 pm_buffer_append_byte(buffer,
',');
5330 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
5331 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
5334 pm_buffer_append_byte(buffer,
',');
5335 pm_buffer_append_string(buffer,
"\"elements\":", 11);
5337 pm_buffer_append_byte(buffer,
'[');
5339 for (
size_t index = 0; index < elements->
size; index++) {
5340 if (index != 0) pm_buffer_append_byte(buffer,
',');
5341 pm_dump_json(buffer, parser, elements->
nodes[index]);
5343 pm_buffer_append_byte(buffer,
']');
5346 pm_buffer_append_byte(buffer,
',');
5347 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
5348 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
5350 pm_buffer_append_byte(buffer,
'}');
5354 pm_buffer_append_string(buffer,
"{\"type\":\"HashPatternNode\",\"location\":", 37);
5357 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5360 pm_buffer_append_byte(buffer,
',');
5361 pm_buffer_append_string(buffer,
"\"constant\":", 11);
5365 pm_buffer_append_string(buffer,
"null", 4);
5369 pm_buffer_append_byte(buffer,
',');
5370 pm_buffer_append_string(buffer,
"\"elements\":", 11);
5372 pm_buffer_append_byte(buffer,
'[');
5374 for (
size_t index = 0; index < elements->
size; index++) {
5375 if (index != 0) pm_buffer_append_byte(buffer,
',');
5376 pm_dump_json(buffer, parser, elements->
nodes[index]);
5378 pm_buffer_append_byte(buffer,
']');
5381 pm_buffer_append_byte(buffer,
',');
5382 pm_buffer_append_string(buffer,
"\"rest\":", 7);
5383 if (cast->
rest != NULL) {
5384 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
rest);
5386 pm_buffer_append_string(buffer,
"null", 4);
5390 pm_buffer_append_byte(buffer,
',');
5391 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
5393 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
5395 pm_buffer_append_string(buffer,
"null", 4);
5399 pm_buffer_append_byte(buffer,
',');
5400 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
5402 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
5404 pm_buffer_append_string(buffer,
"null", 4);
5407 pm_buffer_append_byte(buffer,
'}');
5411 pm_buffer_append_string(buffer,
"{\"type\":\"IfNode\",\"location\":", 28);
5414 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5417 pm_buffer_append_byte(buffer,
',');
5418 pm_buffer_append_string(buffer,
"\"if_keyword_loc\":", 17);
5422 pm_buffer_append_string(buffer,
"null", 4);
5426 pm_buffer_append_byte(buffer,
',');
5427 pm_buffer_append_string(buffer,
"\"predicate\":", 12);
5431 pm_buffer_append_byte(buffer,
',');
5432 pm_buffer_append_string(buffer,
"\"then_keyword_loc\":", 19);
5436 pm_buffer_append_string(buffer,
"null", 4);
5440 pm_buffer_append_byte(buffer,
',');
5441 pm_buffer_append_string(buffer,
"\"statements\":", 13);
5445 pm_buffer_append_string(buffer,
"null", 4);
5449 pm_buffer_append_byte(buffer,
',');
5450 pm_buffer_append_string(buffer,
"\"subsequent\":", 13);
5454 pm_buffer_append_string(buffer,
"null", 4);
5458 pm_buffer_append_byte(buffer,
',');
5459 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
5463 pm_buffer_append_string(buffer,
"null", 4);
5466 pm_buffer_append_byte(buffer,
'}');
5470 pm_buffer_append_string(buffer,
"{\"type\":\"ImaginaryNode\",\"location\":", 35);
5473 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5476 pm_buffer_append_byte(buffer,
',');
5477 pm_buffer_append_string(buffer,
"\"numeric\":", 10);
5480 pm_buffer_append_byte(buffer,
'}');
5484 pm_buffer_append_string(buffer,
"{\"type\":\"ImplicitNode\",\"location\":", 34);
5487 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5490 pm_buffer_append_byte(buffer,
',');
5491 pm_buffer_append_string(buffer,
"\"value\":", 8);
5494 pm_buffer_append_byte(buffer,
'}');
5498 pm_buffer_append_string(buffer,
"{\"type\":\"ImplicitRestNode\",\"location\":", 38);
5501 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5503 pm_buffer_append_byte(buffer,
'}');
5507 pm_buffer_append_string(buffer,
"{\"type\":\"InNode\",\"location\":", 28);
5510 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5513 pm_buffer_append_byte(buffer,
',');
5514 pm_buffer_append_string(buffer,
"\"pattern\":", 10);
5518 pm_buffer_append_byte(buffer,
',');
5519 pm_buffer_append_string(buffer,
"\"statements\":", 13);
5523 pm_buffer_append_string(buffer,
"null", 4);
5527 pm_buffer_append_byte(buffer,
',');
5528 pm_buffer_append_string(buffer,
"\"in_loc\":", 9);
5529 pm_dump_json_location(buffer, parser, &cast->
in_loc);
5532 pm_buffer_append_byte(buffer,
',');
5533 pm_buffer_append_string(buffer,
"\"then_loc\":", 11);
5535 pm_dump_json_location(buffer, parser, &cast->
then_loc);
5537 pm_buffer_append_string(buffer,
"null", 4);
5540 pm_buffer_append_byte(buffer,
'}');
5544 pm_buffer_append_string(buffer,
"{\"type\":\"IndexAndWriteNode\",\"location\":", 39);
5547 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5550 pm_buffer_append_byte(buffer,
',');
5551 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
5553 pm_buffer_append_byte(buffer,
'[');
5555 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5556 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
5560 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5561 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
5565 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5566 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
5570 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5571 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
5574 pm_buffer_append_byte(buffer,
']');
5577 pm_buffer_append_byte(buffer,
',');
5578 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
5582 pm_buffer_append_string(buffer,
"null", 4);
5586 pm_buffer_append_byte(buffer,
',');
5587 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
5591 pm_buffer_append_string(buffer,
"null", 4);
5595 pm_buffer_append_byte(buffer,
',');
5596 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
5597 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
5600 pm_buffer_append_byte(buffer,
',');
5601 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
5605 pm_buffer_append_string(buffer,
"null", 4);
5609 pm_buffer_append_byte(buffer,
',');
5610 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
5611 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
5614 pm_buffer_append_byte(buffer,
',');
5615 pm_buffer_append_string(buffer,
"\"block\":", 8);
5616 if (cast->
block != NULL) {
5619 pm_buffer_append_string(buffer,
"null", 4);
5623 pm_buffer_append_byte(buffer,
',');
5624 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5625 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5628 pm_buffer_append_byte(buffer,
',');
5629 pm_buffer_append_string(buffer,
"\"value\":", 8);
5632 pm_buffer_append_byte(buffer,
'}');
5636 pm_buffer_append_string(buffer,
"{\"type\":\"IndexOperatorWriteNode\",\"location\":", 44);
5639 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5642 pm_buffer_append_byte(buffer,
',');
5643 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
5645 pm_buffer_append_byte(buffer,
'[');
5647 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5648 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
5652 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5653 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
5657 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5658 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
5662 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5663 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
5666 pm_buffer_append_byte(buffer,
']');
5669 pm_buffer_append_byte(buffer,
',');
5670 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
5674 pm_buffer_append_string(buffer,
"null", 4);
5678 pm_buffer_append_byte(buffer,
',');
5679 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
5683 pm_buffer_append_string(buffer,
"null", 4);
5687 pm_buffer_append_byte(buffer,
',');
5688 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
5689 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
5692 pm_buffer_append_byte(buffer,
',');
5693 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
5697 pm_buffer_append_string(buffer,
"null", 4);
5701 pm_buffer_append_byte(buffer,
',');
5702 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
5703 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
5706 pm_buffer_append_byte(buffer,
',');
5707 pm_buffer_append_string(buffer,
"\"block\":", 8);
5708 if (cast->
block != NULL) {
5711 pm_buffer_append_string(buffer,
"null", 4);
5715 pm_buffer_append_byte(buffer,
',');
5716 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
5720 pm_buffer_append_byte(buffer,
',');
5721 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
5725 pm_buffer_append_byte(buffer,
',');
5726 pm_buffer_append_string(buffer,
"\"value\":", 8);
5729 pm_buffer_append_byte(buffer,
'}');
5733 pm_buffer_append_string(buffer,
"{\"type\":\"IndexOrWriteNode\",\"location\":", 38);
5736 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5739 pm_buffer_append_byte(buffer,
',');
5740 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
5742 pm_buffer_append_byte(buffer,
'[');
5744 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5745 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
5749 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5750 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
5754 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5755 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
5759 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5760 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
5763 pm_buffer_append_byte(buffer,
']');
5766 pm_buffer_append_byte(buffer,
',');
5767 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
5771 pm_buffer_append_string(buffer,
"null", 4);
5775 pm_buffer_append_byte(buffer,
',');
5776 pm_buffer_append_string(buffer,
"\"call_operator_loc\":", 20);
5780 pm_buffer_append_string(buffer,
"null", 4);
5784 pm_buffer_append_byte(buffer,
',');
5785 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
5786 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
5789 pm_buffer_append_byte(buffer,
',');
5790 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
5794 pm_buffer_append_string(buffer,
"null", 4);
5798 pm_buffer_append_byte(buffer,
',');
5799 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
5800 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
5803 pm_buffer_append_byte(buffer,
',');
5804 pm_buffer_append_string(buffer,
"\"block\":", 8);
5805 if (cast->
block != NULL) {
5808 pm_buffer_append_string(buffer,
"null", 4);
5812 pm_buffer_append_byte(buffer,
',');
5813 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5814 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5817 pm_buffer_append_byte(buffer,
',');
5818 pm_buffer_append_string(buffer,
"\"value\":", 8);
5821 pm_buffer_append_byte(buffer,
'}');
5825 pm_buffer_append_string(buffer,
"{\"type\":\"IndexTargetNode\",\"location\":", 37);
5828 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5831 pm_buffer_append_byte(buffer,
',');
5832 pm_buffer_append_string(buffer,
"\"CallNodeFlags\":", 16);
5834 pm_buffer_append_byte(buffer,
'[');
5836 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5837 pm_buffer_append_string(buffer,
"\"SAFE_NAVIGATION\"", 17);
5841 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5842 pm_buffer_append_string(buffer,
"\"VARIABLE_CALL\"", 15);
5846 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5847 pm_buffer_append_string(buffer,
"\"ATTRIBUTE_WRITE\"", 17);
5851 if (flags != 0) pm_buffer_append_byte(buffer,
',');
5852 pm_buffer_append_string(buffer,
"\"IGNORE_VISIBILITY\"", 19);
5855 pm_buffer_append_byte(buffer,
']');
5858 pm_buffer_append_byte(buffer,
',');
5859 pm_buffer_append_string(buffer,
"\"receiver\":", 11);
5863 pm_buffer_append_byte(buffer,
',');
5864 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
5865 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
5868 pm_buffer_append_byte(buffer,
',');
5869 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
5873 pm_buffer_append_string(buffer,
"null", 4);
5877 pm_buffer_append_byte(buffer,
',');
5878 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
5879 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
5882 pm_buffer_append_byte(buffer,
',');
5883 pm_buffer_append_string(buffer,
"\"block\":", 8);
5884 if (cast->
block != NULL) {
5887 pm_buffer_append_string(buffer,
"null", 4);
5890 pm_buffer_append_byte(buffer,
'}');
5894 pm_buffer_append_string(buffer,
"{\"type\":\"InstanceVariableAndWriteNode\",\"location\":", 50);
5897 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5900 pm_buffer_append_byte(buffer,
',');
5901 pm_buffer_append_string(buffer,
"\"name\":", 7);
5902 pm_dump_json_constant(buffer, parser, cast->
name);
5905 pm_buffer_append_byte(buffer,
',');
5906 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
5907 pm_dump_json_location(buffer, parser, &cast->
name_loc);
5910 pm_buffer_append_byte(buffer,
',');
5911 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5912 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5915 pm_buffer_append_byte(buffer,
',');
5916 pm_buffer_append_string(buffer,
"\"value\":", 8);
5919 pm_buffer_append_byte(buffer,
'}');
5923 pm_buffer_append_string(buffer,
"{\"type\":\"InstanceVariableOperatorWriteNode\",\"location\":", 55);
5926 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5929 pm_buffer_append_byte(buffer,
',');
5930 pm_buffer_append_string(buffer,
"\"name\":", 7);
5931 pm_dump_json_constant(buffer, parser, cast->
name);
5934 pm_buffer_append_byte(buffer,
',');
5935 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
5936 pm_dump_json_location(buffer, parser, &cast->
name_loc);
5939 pm_buffer_append_byte(buffer,
',');
5940 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
5944 pm_buffer_append_byte(buffer,
',');
5945 pm_buffer_append_string(buffer,
"\"value\":", 8);
5949 pm_buffer_append_byte(buffer,
',');
5950 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
5953 pm_buffer_append_byte(buffer,
'}');
5957 pm_buffer_append_string(buffer,
"{\"type\":\"InstanceVariableOrWriteNode\",\"location\":", 49);
5960 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5963 pm_buffer_append_byte(buffer,
',');
5964 pm_buffer_append_string(buffer,
"\"name\":", 7);
5965 pm_dump_json_constant(buffer, parser, cast->
name);
5968 pm_buffer_append_byte(buffer,
',');
5969 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
5970 pm_dump_json_location(buffer, parser, &cast->
name_loc);
5973 pm_buffer_append_byte(buffer,
',');
5974 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
5975 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
5978 pm_buffer_append_byte(buffer,
',');
5979 pm_buffer_append_string(buffer,
"\"value\":", 8);
5982 pm_buffer_append_byte(buffer,
'}');
5986 pm_buffer_append_string(buffer,
"{\"type\":\"InstanceVariableReadNode\",\"location\":", 46);
5989 pm_dump_json_location(buffer, parser, &cast->
base.
location);
5992 pm_buffer_append_byte(buffer,
',');
5993 pm_buffer_append_string(buffer,
"\"name\":", 7);
5994 pm_dump_json_constant(buffer, parser, cast->
name);
5996 pm_buffer_append_byte(buffer,
'}');
6000 pm_buffer_append_string(buffer,
"{\"type\":\"InstanceVariableTargetNode\",\"location\":", 48);
6003 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6006 pm_buffer_append_byte(buffer,
',');
6007 pm_buffer_append_string(buffer,
"\"name\":", 7);
6008 pm_dump_json_constant(buffer, parser, cast->
name);
6010 pm_buffer_append_byte(buffer,
'}');
6014 pm_buffer_append_string(buffer,
"{\"type\":\"InstanceVariableWriteNode\",\"location\":", 47);
6017 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6020 pm_buffer_append_byte(buffer,
',');
6021 pm_buffer_append_string(buffer,
"\"name\":", 7);
6022 pm_dump_json_constant(buffer, parser, cast->
name);
6025 pm_buffer_append_byte(buffer,
',');
6026 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
6027 pm_dump_json_location(buffer, parser, &cast->
name_loc);
6030 pm_buffer_append_byte(buffer,
',');
6031 pm_buffer_append_string(buffer,
"\"value\":", 8);
6035 pm_buffer_append_byte(buffer,
',');
6036 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6037 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6039 pm_buffer_append_byte(buffer,
'}');
6043 pm_buffer_append_string(buffer,
"{\"type\":\"IntegerNode\",\"location\":", 33);
6046 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6049 pm_buffer_append_byte(buffer,
',');
6050 pm_buffer_append_string(buffer,
"\"IntegerBaseFlags\":", 19);
6052 pm_buffer_append_byte(buffer,
'[');
6054 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6055 pm_buffer_append_string(buffer,
"\"BINARY\"", 8);
6059 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6060 pm_buffer_append_string(buffer,
"\"DECIMAL\"", 9);
6064 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6065 pm_buffer_append_string(buffer,
"\"OCTAL\"", 7);
6069 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6070 pm_buffer_append_string(buffer,
"\"HEXADECIMAL\"", 13);
6073 pm_buffer_append_byte(buffer,
']');
6076 pm_buffer_append_byte(buffer,
',');
6077 pm_buffer_append_string(buffer,
"\"value\":", 8);
6078 pm_integer_string(buffer, &cast->
value);
6080 pm_buffer_append_byte(buffer,
'}');
6084 pm_buffer_append_string(buffer,
"{\"type\":\"InterpolatedMatchLastLineNode\",\"location\":", 51);
6087 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6090 pm_buffer_append_byte(buffer,
',');
6091 pm_buffer_append_string(buffer,
"\"RegularExpressionFlags\":", 25);
6093 pm_buffer_append_byte(buffer,
'[');
6095 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6096 pm_buffer_append_string(buffer,
"\"IGNORE_CASE\"", 13);
6100 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6101 pm_buffer_append_string(buffer,
"\"EXTENDED\"", 10);
6105 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6106 pm_buffer_append_string(buffer,
"\"MULTI_LINE\"", 12);
6110 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6111 pm_buffer_append_string(buffer,
"\"ONCE\"", 6);
6115 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6116 pm_buffer_append_string(buffer,
"\"EUC_JP\"", 8);
6120 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6121 pm_buffer_append_string(buffer,
"\"ASCII_8BIT\"", 12);
6125 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6126 pm_buffer_append_string(buffer,
"\"WINDOWS_31J\"", 13);
6130 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6131 pm_buffer_append_string(buffer,
"\"UTF_8\"", 7);
6135 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6136 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
6140 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6141 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
6145 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6146 pm_buffer_append_string(buffer,
"\"FORCED_US_ASCII_ENCODING\"", 26);
6149 pm_buffer_append_byte(buffer,
']');
6152 pm_buffer_append_byte(buffer,
',');
6153 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
6154 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
6157 pm_buffer_append_byte(buffer,
',');
6158 pm_buffer_append_string(buffer,
"\"parts\":", 8);
6160 pm_buffer_append_byte(buffer,
'[');
6162 for (
size_t index = 0; index < parts->
size; index++) {
6163 if (index != 0) pm_buffer_append_byte(buffer,
',');
6164 pm_dump_json(buffer, parser, parts->
nodes[index]);
6166 pm_buffer_append_byte(buffer,
']');
6169 pm_buffer_append_byte(buffer,
',');
6170 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
6171 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
6173 pm_buffer_append_byte(buffer,
'}');
6177 pm_buffer_append_string(buffer,
"{\"type\":\"InterpolatedRegularExpressionNode\",\"location\":", 55);
6180 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6183 pm_buffer_append_byte(buffer,
',');
6184 pm_buffer_append_string(buffer,
"\"RegularExpressionFlags\":", 25);
6186 pm_buffer_append_byte(buffer,
'[');
6188 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6189 pm_buffer_append_string(buffer,
"\"IGNORE_CASE\"", 13);
6193 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6194 pm_buffer_append_string(buffer,
"\"EXTENDED\"", 10);
6198 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6199 pm_buffer_append_string(buffer,
"\"MULTI_LINE\"", 12);
6203 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6204 pm_buffer_append_string(buffer,
"\"ONCE\"", 6);
6208 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6209 pm_buffer_append_string(buffer,
"\"EUC_JP\"", 8);
6213 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6214 pm_buffer_append_string(buffer,
"\"ASCII_8BIT\"", 12);
6218 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6219 pm_buffer_append_string(buffer,
"\"WINDOWS_31J\"", 13);
6223 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6224 pm_buffer_append_string(buffer,
"\"UTF_8\"", 7);
6228 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6229 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
6233 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6234 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
6238 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6239 pm_buffer_append_string(buffer,
"\"FORCED_US_ASCII_ENCODING\"", 26);
6242 pm_buffer_append_byte(buffer,
']');
6245 pm_buffer_append_byte(buffer,
',');
6246 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
6247 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
6250 pm_buffer_append_byte(buffer,
',');
6251 pm_buffer_append_string(buffer,
"\"parts\":", 8);
6253 pm_buffer_append_byte(buffer,
'[');
6255 for (
size_t index = 0; index < parts->
size; index++) {
6256 if (index != 0) pm_buffer_append_byte(buffer,
',');
6257 pm_dump_json(buffer, parser, parts->
nodes[index]);
6259 pm_buffer_append_byte(buffer,
']');
6262 pm_buffer_append_byte(buffer,
',');
6263 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
6264 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
6266 pm_buffer_append_byte(buffer,
'}');
6270 pm_buffer_append_string(buffer,
"{\"type\":\"InterpolatedStringNode\",\"location\":", 44);
6273 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6276 pm_buffer_append_byte(buffer,
',');
6277 pm_buffer_append_string(buffer,
"\"InterpolatedStringNodeFlags\":", 30);
6279 pm_buffer_append_byte(buffer,
'[');
6281 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6282 pm_buffer_append_string(buffer,
"\"FROZEN\"", 8);
6286 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6287 pm_buffer_append_string(buffer,
"\"MUTABLE\"", 9);
6290 pm_buffer_append_byte(buffer,
']');
6293 pm_buffer_append_byte(buffer,
',');
6294 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
6296 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
6298 pm_buffer_append_string(buffer,
"null", 4);
6302 pm_buffer_append_byte(buffer,
',');
6303 pm_buffer_append_string(buffer,
"\"parts\":", 8);
6305 pm_buffer_append_byte(buffer,
'[');
6307 for (
size_t index = 0; index < parts->
size; index++) {
6308 if (index != 0) pm_buffer_append_byte(buffer,
',');
6309 pm_dump_json(buffer, parser, parts->
nodes[index]);
6311 pm_buffer_append_byte(buffer,
']');
6314 pm_buffer_append_byte(buffer,
',');
6315 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
6317 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
6319 pm_buffer_append_string(buffer,
"null", 4);
6322 pm_buffer_append_byte(buffer,
'}');
6326 pm_buffer_append_string(buffer,
"{\"type\":\"InterpolatedSymbolNode\",\"location\":", 44);
6329 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6332 pm_buffer_append_byte(buffer,
',');
6333 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
6335 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
6337 pm_buffer_append_string(buffer,
"null", 4);
6341 pm_buffer_append_byte(buffer,
',');
6342 pm_buffer_append_string(buffer,
"\"parts\":", 8);
6344 pm_buffer_append_byte(buffer,
'[');
6346 for (
size_t index = 0; index < parts->
size; index++) {
6347 if (index != 0) pm_buffer_append_byte(buffer,
',');
6348 pm_dump_json(buffer, parser, parts->
nodes[index]);
6350 pm_buffer_append_byte(buffer,
']');
6353 pm_buffer_append_byte(buffer,
',');
6354 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
6356 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
6358 pm_buffer_append_string(buffer,
"null", 4);
6361 pm_buffer_append_byte(buffer,
'}');
6365 pm_buffer_append_string(buffer,
"{\"type\":\"InterpolatedXStringNode\",\"location\":", 45);
6368 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6371 pm_buffer_append_byte(buffer,
',');
6372 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
6373 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
6376 pm_buffer_append_byte(buffer,
',');
6377 pm_buffer_append_string(buffer,
"\"parts\":", 8);
6379 pm_buffer_append_byte(buffer,
'[');
6381 for (
size_t index = 0; index < parts->
size; index++) {
6382 if (index != 0) pm_buffer_append_byte(buffer,
',');
6383 pm_dump_json(buffer, parser, parts->
nodes[index]);
6385 pm_buffer_append_byte(buffer,
']');
6388 pm_buffer_append_byte(buffer,
',');
6389 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
6390 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
6392 pm_buffer_append_byte(buffer,
'}');
6396 pm_buffer_append_string(buffer,
"{\"type\":\"ItLocalVariableReadNode\",\"location\":", 45);
6399 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6401 pm_buffer_append_byte(buffer,
'}');
6405 pm_buffer_append_string(buffer,
"{\"type\":\"ItParametersNode\",\"location\":", 38);
6408 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6410 pm_buffer_append_byte(buffer,
'}');
6414 pm_buffer_append_string(buffer,
"{\"type\":\"KeywordHashNode\",\"location\":", 37);
6417 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6420 pm_buffer_append_byte(buffer,
',');
6421 pm_buffer_append_string(buffer,
"\"KeywordHashNodeFlags\":", 23);
6423 pm_buffer_append_byte(buffer,
'[');
6425 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6426 pm_buffer_append_string(buffer,
"\"SYMBOL_KEYS\"", 13);
6429 pm_buffer_append_byte(buffer,
']');
6432 pm_buffer_append_byte(buffer,
',');
6433 pm_buffer_append_string(buffer,
"\"elements\":", 11);
6435 pm_buffer_append_byte(buffer,
'[');
6437 for (
size_t index = 0; index < elements->
size; index++) {
6438 if (index != 0) pm_buffer_append_byte(buffer,
',');
6439 pm_dump_json(buffer, parser, elements->
nodes[index]);
6441 pm_buffer_append_byte(buffer,
']');
6443 pm_buffer_append_byte(buffer,
'}');
6447 pm_buffer_append_string(buffer,
"{\"type\":\"KeywordRestParameterNode\",\"location\":", 46);
6450 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6453 pm_buffer_append_byte(buffer,
',');
6454 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
6456 pm_buffer_append_byte(buffer,
'[');
6458 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6459 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
6462 pm_buffer_append_byte(buffer,
']');
6465 pm_buffer_append_byte(buffer,
',');
6466 pm_buffer_append_string(buffer,
"\"name\":", 7);
6468 pm_dump_json_constant(buffer, parser, cast->
name);
6470 pm_buffer_append_string(buffer,
"null", 4);
6474 pm_buffer_append_byte(buffer,
',');
6475 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
6477 pm_dump_json_location(buffer, parser, &cast->
name_loc);
6479 pm_buffer_append_string(buffer,
"null", 4);
6483 pm_buffer_append_byte(buffer,
',');
6484 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6485 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6487 pm_buffer_append_byte(buffer,
'}');
6491 pm_buffer_append_string(buffer,
"{\"type\":\"LambdaNode\",\"location\":", 32);
6494 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6497 pm_buffer_append_byte(buffer,
',');
6498 pm_buffer_append_string(buffer,
"\"locals\":", 9);
6500 pm_buffer_append_byte(buffer,
'[');
6502 for (
size_t index = 0; index < locals->
size; index++) {
6503 if (index != 0) pm_buffer_append_byte(buffer,
',');
6504 pm_dump_json_constant(buffer, parser, locals->
ids[index]);
6506 pm_buffer_append_byte(buffer,
']');
6509 pm_buffer_append_byte(buffer,
',');
6510 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6511 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6514 pm_buffer_append_byte(buffer,
',');
6515 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
6516 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
6519 pm_buffer_append_byte(buffer,
',');
6520 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
6521 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
6524 pm_buffer_append_byte(buffer,
',');
6525 pm_buffer_append_string(buffer,
"\"parameters\":", 13);
6529 pm_buffer_append_string(buffer,
"null", 4);
6533 pm_buffer_append_byte(buffer,
',');
6534 pm_buffer_append_string(buffer,
"\"body\":", 7);
6535 if (cast->
body != NULL) {
6536 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
body);
6538 pm_buffer_append_string(buffer,
"null", 4);
6541 pm_buffer_append_byte(buffer,
'}');
6545 pm_buffer_append_string(buffer,
"{\"type\":\"LocalVariableAndWriteNode\",\"location\":", 47);
6548 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6551 pm_buffer_append_byte(buffer,
',');
6552 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
6553 pm_dump_json_location(buffer, parser, &cast->
name_loc);
6556 pm_buffer_append_byte(buffer,
',');
6557 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6558 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6561 pm_buffer_append_byte(buffer,
',');
6562 pm_buffer_append_string(buffer,
"\"value\":", 8);
6566 pm_buffer_append_byte(buffer,
',');
6567 pm_buffer_append_string(buffer,
"\"name\":", 7);
6568 pm_dump_json_constant(buffer, parser, cast->
name);
6571 pm_buffer_append_byte(buffer,
',');
6572 pm_buffer_append_string(buffer,
"\"depth\":", 8);
6573 pm_buffer_append_format(buffer,
"%" PRIu32, cast->
depth);
6575 pm_buffer_append_byte(buffer,
'}');
6579 pm_buffer_append_string(buffer,
"{\"type\":\"LocalVariableOperatorWriteNode\",\"location\":", 52);
6582 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6585 pm_buffer_append_byte(buffer,
',');
6586 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
6587 pm_dump_json_location(buffer, parser, &cast->
name_loc);
6590 pm_buffer_append_byte(buffer,
',');
6591 pm_buffer_append_string(buffer,
"\"binary_operator_loc\":", 22);
6595 pm_buffer_append_byte(buffer,
',');
6596 pm_buffer_append_string(buffer,
"\"value\":", 8);
6600 pm_buffer_append_byte(buffer,
',');
6601 pm_buffer_append_string(buffer,
"\"name\":", 7);
6602 pm_dump_json_constant(buffer, parser, cast->
name);
6605 pm_buffer_append_byte(buffer,
',');
6606 pm_buffer_append_string(buffer,
"\"binary_operator\":", 18);
6610 pm_buffer_append_byte(buffer,
',');
6611 pm_buffer_append_string(buffer,
"\"depth\":", 8);
6612 pm_buffer_append_format(buffer,
"%" PRIu32, cast->
depth);
6614 pm_buffer_append_byte(buffer,
'}');
6618 pm_buffer_append_string(buffer,
"{\"type\":\"LocalVariableOrWriteNode\",\"location\":", 46);
6621 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6624 pm_buffer_append_byte(buffer,
',');
6625 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
6626 pm_dump_json_location(buffer, parser, &cast->
name_loc);
6629 pm_buffer_append_byte(buffer,
',');
6630 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6631 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6634 pm_buffer_append_byte(buffer,
',');
6635 pm_buffer_append_string(buffer,
"\"value\":", 8);
6639 pm_buffer_append_byte(buffer,
',');
6640 pm_buffer_append_string(buffer,
"\"name\":", 7);
6641 pm_dump_json_constant(buffer, parser, cast->
name);
6644 pm_buffer_append_byte(buffer,
',');
6645 pm_buffer_append_string(buffer,
"\"depth\":", 8);
6646 pm_buffer_append_format(buffer,
"%" PRIu32, cast->
depth);
6648 pm_buffer_append_byte(buffer,
'}');
6652 pm_buffer_append_string(buffer,
"{\"type\":\"LocalVariableReadNode\",\"location\":", 43);
6655 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6658 pm_buffer_append_byte(buffer,
',');
6659 pm_buffer_append_string(buffer,
"\"name\":", 7);
6660 pm_dump_json_constant(buffer, parser, cast->
name);
6663 pm_buffer_append_byte(buffer,
',');
6664 pm_buffer_append_string(buffer,
"\"depth\":", 8);
6665 pm_buffer_append_format(buffer,
"%" PRIu32, cast->
depth);
6667 pm_buffer_append_byte(buffer,
'}');
6671 pm_buffer_append_string(buffer,
"{\"type\":\"LocalVariableTargetNode\",\"location\":", 45);
6674 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6677 pm_buffer_append_byte(buffer,
',');
6678 pm_buffer_append_string(buffer,
"\"name\":", 7);
6679 pm_dump_json_constant(buffer, parser, cast->
name);
6682 pm_buffer_append_byte(buffer,
',');
6683 pm_buffer_append_string(buffer,
"\"depth\":", 8);
6684 pm_buffer_append_format(buffer,
"%" PRIu32, cast->
depth);
6686 pm_buffer_append_byte(buffer,
'}');
6690 pm_buffer_append_string(buffer,
"{\"type\":\"LocalVariableWriteNode\",\"location\":", 44);
6693 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6696 pm_buffer_append_byte(buffer,
',');
6697 pm_buffer_append_string(buffer,
"\"name\":", 7);
6698 pm_dump_json_constant(buffer, parser, cast->
name);
6701 pm_buffer_append_byte(buffer,
',');
6702 pm_buffer_append_string(buffer,
"\"depth\":", 8);
6703 pm_buffer_append_format(buffer,
"%" PRIu32, cast->
depth);
6706 pm_buffer_append_byte(buffer,
',');
6707 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
6708 pm_dump_json_location(buffer, parser, &cast->
name_loc);
6711 pm_buffer_append_byte(buffer,
',');
6712 pm_buffer_append_string(buffer,
"\"value\":", 8);
6716 pm_buffer_append_byte(buffer,
',');
6717 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6718 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6720 pm_buffer_append_byte(buffer,
'}');
6724 pm_buffer_append_string(buffer,
"{\"type\":\"MatchLastLineNode\",\"location\":", 39);
6727 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6730 pm_buffer_append_byte(buffer,
',');
6731 pm_buffer_append_string(buffer,
"\"RegularExpressionFlags\":", 25);
6733 pm_buffer_append_byte(buffer,
'[');
6735 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6736 pm_buffer_append_string(buffer,
"\"IGNORE_CASE\"", 13);
6740 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6741 pm_buffer_append_string(buffer,
"\"EXTENDED\"", 10);
6745 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6746 pm_buffer_append_string(buffer,
"\"MULTI_LINE\"", 12);
6750 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6751 pm_buffer_append_string(buffer,
"\"ONCE\"", 6);
6755 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6756 pm_buffer_append_string(buffer,
"\"EUC_JP\"", 8);
6760 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6761 pm_buffer_append_string(buffer,
"\"ASCII_8BIT\"", 12);
6765 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6766 pm_buffer_append_string(buffer,
"\"WINDOWS_31J\"", 13);
6770 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6771 pm_buffer_append_string(buffer,
"\"UTF_8\"", 7);
6775 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6776 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
6780 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6781 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
6785 if (flags != 0) pm_buffer_append_byte(buffer,
',');
6786 pm_buffer_append_string(buffer,
"\"FORCED_US_ASCII_ENCODING\"", 26);
6789 pm_buffer_append_byte(buffer,
']');
6792 pm_buffer_append_byte(buffer,
',');
6793 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
6794 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
6797 pm_buffer_append_byte(buffer,
',');
6798 pm_buffer_append_string(buffer,
"\"content_loc\":", 14);
6799 pm_dump_json_location(buffer, parser, &cast->
content_loc);
6802 pm_buffer_append_byte(buffer,
',');
6803 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
6804 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
6807 pm_buffer_append_byte(buffer,
',');
6808 pm_buffer_append_string(buffer,
"\"unescaped\":", 12);
6810 pm_buffer_append_byte(buffer,
'"');
6811 pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
6812 pm_buffer_append_byte(buffer,
'"');
6814 pm_buffer_append_byte(buffer,
'}');
6818 pm_buffer_append_string(buffer,
"{\"type\":\"MatchPredicateNode\",\"location\":", 40);
6821 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6824 pm_buffer_append_byte(buffer,
',');
6825 pm_buffer_append_string(buffer,
"\"value\":", 8);
6829 pm_buffer_append_byte(buffer,
',');
6830 pm_buffer_append_string(buffer,
"\"pattern\":", 10);
6834 pm_buffer_append_byte(buffer,
',');
6835 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6836 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6838 pm_buffer_append_byte(buffer,
'}');
6842 pm_buffer_append_string(buffer,
"{\"type\":\"MatchRequiredNode\",\"location\":", 39);
6845 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6848 pm_buffer_append_byte(buffer,
',');
6849 pm_buffer_append_string(buffer,
"\"value\":", 8);
6853 pm_buffer_append_byte(buffer,
',');
6854 pm_buffer_append_string(buffer,
"\"pattern\":", 10);
6858 pm_buffer_append_byte(buffer,
',');
6859 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
6860 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
6862 pm_buffer_append_byte(buffer,
'}');
6866 pm_buffer_append_string(buffer,
"{\"type\":\"MatchWriteNode\",\"location\":", 36);
6869 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6872 pm_buffer_append_byte(buffer,
',');
6873 pm_buffer_append_string(buffer,
"\"call\":", 7);
6874 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
call);
6877 pm_buffer_append_byte(buffer,
',');
6878 pm_buffer_append_string(buffer,
"\"targets\":", 10);
6880 pm_buffer_append_byte(buffer,
'[');
6882 for (
size_t index = 0; index < targets->
size; index++) {
6883 if (index != 0) pm_buffer_append_byte(buffer,
',');
6884 pm_dump_json(buffer, parser, targets->
nodes[index]);
6886 pm_buffer_append_byte(buffer,
']');
6888 pm_buffer_append_byte(buffer,
'}');
6892 pm_buffer_append_string(buffer,
"{\"type\":\"MissingNode\",\"location\":", 33);
6895 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6897 pm_buffer_append_byte(buffer,
'}');
6901 pm_buffer_append_string(buffer,
"{\"type\":\"ModuleNode\",\"location\":", 32);
6904 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6907 pm_buffer_append_byte(buffer,
',');
6908 pm_buffer_append_string(buffer,
"\"locals\":", 9);
6910 pm_buffer_append_byte(buffer,
'[');
6912 for (
size_t index = 0; index < locals->
size; index++) {
6913 if (index != 0) pm_buffer_append_byte(buffer,
',');
6914 pm_dump_json_constant(buffer, parser, locals->
ids[index]);
6916 pm_buffer_append_byte(buffer,
']');
6919 pm_buffer_append_byte(buffer,
',');
6920 pm_buffer_append_string(buffer,
"\"module_keyword_loc\":", 21);
6924 pm_buffer_append_byte(buffer,
',');
6925 pm_buffer_append_string(buffer,
"\"constant_path\":", 16);
6929 pm_buffer_append_byte(buffer,
',');
6930 pm_buffer_append_string(buffer,
"\"body\":", 7);
6931 if (cast->
body != NULL) {
6932 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
body);
6934 pm_buffer_append_string(buffer,
"null", 4);
6938 pm_buffer_append_byte(buffer,
',');
6939 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
6943 pm_buffer_append_byte(buffer,
',');
6944 pm_buffer_append_string(buffer,
"\"name\":", 7);
6945 pm_dump_json_constant(buffer, parser, cast->
name);
6947 pm_buffer_append_byte(buffer,
'}');
6951 pm_buffer_append_string(buffer,
"{\"type\":\"MultiTargetNode\",\"location\":", 37);
6954 pm_dump_json_location(buffer, parser, &cast->
base.
location);
6957 pm_buffer_append_byte(buffer,
',');
6958 pm_buffer_append_string(buffer,
"\"lefts\":", 8);
6960 pm_buffer_append_byte(buffer,
'[');
6962 for (
size_t index = 0; index < lefts->
size; index++) {
6963 if (index != 0) pm_buffer_append_byte(buffer,
',');
6964 pm_dump_json(buffer, parser, lefts->
nodes[index]);
6966 pm_buffer_append_byte(buffer,
']');
6969 pm_buffer_append_byte(buffer,
',');
6970 pm_buffer_append_string(buffer,
"\"rest\":", 7);
6971 if (cast->
rest != NULL) {
6972 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
rest);
6974 pm_buffer_append_string(buffer,
"null", 4);
6978 pm_buffer_append_byte(buffer,
',');
6979 pm_buffer_append_string(buffer,
"\"rights\":", 9);
6981 pm_buffer_append_byte(buffer,
'[');
6983 for (
size_t index = 0; index < rights->
size; index++) {
6984 if (index != 0) pm_buffer_append_byte(buffer,
',');
6985 pm_dump_json(buffer, parser, rights->
nodes[index]);
6987 pm_buffer_append_byte(buffer,
']');
6990 pm_buffer_append_byte(buffer,
',');
6991 pm_buffer_append_string(buffer,
"\"lparen_loc\":", 13);
6993 pm_dump_json_location(buffer, parser, &cast->
lparen_loc);
6995 pm_buffer_append_string(buffer,
"null", 4);
6999 pm_buffer_append_byte(buffer,
',');
7000 pm_buffer_append_string(buffer,
"\"rparen_loc\":", 13);
7002 pm_dump_json_location(buffer, parser, &cast->
rparen_loc);
7004 pm_buffer_append_string(buffer,
"null", 4);
7007 pm_buffer_append_byte(buffer,
'}');
7011 pm_buffer_append_string(buffer,
"{\"type\":\"MultiWriteNode\",\"location\":", 36);
7014 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7017 pm_buffer_append_byte(buffer,
',');
7018 pm_buffer_append_string(buffer,
"\"lefts\":", 8);
7020 pm_buffer_append_byte(buffer,
'[');
7022 for (
size_t index = 0; index < lefts->
size; index++) {
7023 if (index != 0) pm_buffer_append_byte(buffer,
',');
7024 pm_dump_json(buffer, parser, lefts->
nodes[index]);
7026 pm_buffer_append_byte(buffer,
']');
7029 pm_buffer_append_byte(buffer,
',');
7030 pm_buffer_append_string(buffer,
"\"rest\":", 7);
7031 if (cast->
rest != NULL) {
7032 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
rest);
7034 pm_buffer_append_string(buffer,
"null", 4);
7038 pm_buffer_append_byte(buffer,
',');
7039 pm_buffer_append_string(buffer,
"\"rights\":", 9);
7041 pm_buffer_append_byte(buffer,
'[');
7043 for (
size_t index = 0; index < rights->
size; index++) {
7044 if (index != 0) pm_buffer_append_byte(buffer,
',');
7045 pm_dump_json(buffer, parser, rights->
nodes[index]);
7047 pm_buffer_append_byte(buffer,
']');
7050 pm_buffer_append_byte(buffer,
',');
7051 pm_buffer_append_string(buffer,
"\"lparen_loc\":", 13);
7053 pm_dump_json_location(buffer, parser, &cast->
lparen_loc);
7055 pm_buffer_append_string(buffer,
"null", 4);
7059 pm_buffer_append_byte(buffer,
',');
7060 pm_buffer_append_string(buffer,
"\"rparen_loc\":", 13);
7062 pm_dump_json_location(buffer, parser, &cast->
rparen_loc);
7064 pm_buffer_append_string(buffer,
"null", 4);
7068 pm_buffer_append_byte(buffer,
',');
7069 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7070 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7073 pm_buffer_append_byte(buffer,
',');
7074 pm_buffer_append_string(buffer,
"\"value\":", 8);
7077 pm_buffer_append_byte(buffer,
'}');
7081 pm_buffer_append_string(buffer,
"{\"type\":\"NextNode\",\"location\":", 30);
7084 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7087 pm_buffer_append_byte(buffer,
',');
7088 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
7092 pm_buffer_append_string(buffer,
"null", 4);
7096 pm_buffer_append_byte(buffer,
',');
7097 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
7098 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
7100 pm_buffer_append_byte(buffer,
'}');
7104 pm_buffer_append_string(buffer,
"{\"type\":\"NilNode\",\"location\":", 29);
7107 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7109 pm_buffer_append_byte(buffer,
'}');
7113 pm_buffer_append_string(buffer,
"{\"type\":\"NoKeywordsParameterNode\",\"location\":", 45);
7116 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7119 pm_buffer_append_byte(buffer,
',');
7120 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7121 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7124 pm_buffer_append_byte(buffer,
',');
7125 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
7126 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
7128 pm_buffer_append_byte(buffer,
'}');
7132 pm_buffer_append_string(buffer,
"{\"type\":\"NumberedParametersNode\",\"location\":", 44);
7135 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7138 pm_buffer_append_byte(buffer,
',');
7139 pm_buffer_append_string(buffer,
"\"maximum\":", 10);
7140 pm_buffer_append_format(buffer,
"%" PRIu8, cast->
maximum);
7142 pm_buffer_append_byte(buffer,
'}');
7146 pm_buffer_append_string(buffer,
"{\"type\":\"NumberedReferenceReadNode\",\"location\":", 47);
7149 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7152 pm_buffer_append_byte(buffer,
',');
7153 pm_buffer_append_string(buffer,
"\"number\":", 9);
7154 pm_buffer_append_format(buffer,
"%" PRIu32, cast->
number);
7156 pm_buffer_append_byte(buffer,
'}');
7160 pm_buffer_append_string(buffer,
"{\"type\":\"OptionalKeywordParameterNode\",\"location\":", 50);
7163 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7166 pm_buffer_append_byte(buffer,
',');
7167 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
7169 pm_buffer_append_byte(buffer,
'[');
7171 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7172 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
7175 pm_buffer_append_byte(buffer,
']');
7178 pm_buffer_append_byte(buffer,
',');
7179 pm_buffer_append_string(buffer,
"\"name\":", 7);
7180 pm_dump_json_constant(buffer, parser, cast->
name);
7183 pm_buffer_append_byte(buffer,
',');
7184 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
7185 pm_dump_json_location(buffer, parser, &cast->
name_loc);
7188 pm_buffer_append_byte(buffer,
',');
7189 pm_buffer_append_string(buffer,
"\"value\":", 8);
7192 pm_buffer_append_byte(buffer,
'}');
7196 pm_buffer_append_string(buffer,
"{\"type\":\"OptionalParameterNode\",\"location\":", 43);
7199 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7202 pm_buffer_append_byte(buffer,
',');
7203 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
7205 pm_buffer_append_byte(buffer,
'[');
7207 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7208 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
7211 pm_buffer_append_byte(buffer,
']');
7214 pm_buffer_append_byte(buffer,
',');
7215 pm_buffer_append_string(buffer,
"\"name\":", 7);
7216 pm_dump_json_constant(buffer, parser, cast->
name);
7219 pm_buffer_append_byte(buffer,
',');
7220 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
7221 pm_dump_json_location(buffer, parser, &cast->
name_loc);
7224 pm_buffer_append_byte(buffer,
',');
7225 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7226 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7229 pm_buffer_append_byte(buffer,
',');
7230 pm_buffer_append_string(buffer,
"\"value\":", 8);
7233 pm_buffer_append_byte(buffer,
'}');
7237 pm_buffer_append_string(buffer,
"{\"type\":\"OrNode\",\"location\":", 28);
7240 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7243 pm_buffer_append_byte(buffer,
',');
7244 pm_buffer_append_string(buffer,
"\"left\":", 7);
7245 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
left);
7248 pm_buffer_append_byte(buffer,
',');
7249 pm_buffer_append_string(buffer,
"\"right\":", 8);
7253 pm_buffer_append_byte(buffer,
',');
7254 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7255 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7257 pm_buffer_append_byte(buffer,
'}');
7261 pm_buffer_append_string(buffer,
"{\"type\":\"ParametersNode\",\"location\":", 36);
7264 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7267 pm_buffer_append_byte(buffer,
',');
7268 pm_buffer_append_string(buffer,
"\"requireds\":", 12);
7270 pm_buffer_append_byte(buffer,
'[');
7272 for (
size_t index = 0; index < requireds->
size; index++) {
7273 if (index != 0) pm_buffer_append_byte(buffer,
',');
7274 pm_dump_json(buffer, parser, requireds->
nodes[index]);
7276 pm_buffer_append_byte(buffer,
']');
7279 pm_buffer_append_byte(buffer,
',');
7280 pm_buffer_append_string(buffer,
"\"optionals\":", 12);
7282 pm_buffer_append_byte(buffer,
'[');
7284 for (
size_t index = 0; index < optionals->
size; index++) {
7285 if (index != 0) pm_buffer_append_byte(buffer,
',');
7286 pm_dump_json(buffer, parser, optionals->
nodes[index]);
7288 pm_buffer_append_byte(buffer,
']');
7291 pm_buffer_append_byte(buffer,
',');
7292 pm_buffer_append_string(buffer,
"\"rest\":", 7);
7293 if (cast->
rest != NULL) {
7294 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
rest);
7296 pm_buffer_append_string(buffer,
"null", 4);
7300 pm_buffer_append_byte(buffer,
',');
7301 pm_buffer_append_string(buffer,
"\"posts\":", 8);
7303 pm_buffer_append_byte(buffer,
'[');
7305 for (
size_t index = 0; index < posts->
size; index++) {
7306 if (index != 0) pm_buffer_append_byte(buffer,
',');
7307 pm_dump_json(buffer, parser, posts->
nodes[index]);
7309 pm_buffer_append_byte(buffer,
']');
7312 pm_buffer_append_byte(buffer,
',');
7313 pm_buffer_append_string(buffer,
"\"keywords\":", 11);
7315 pm_buffer_append_byte(buffer,
'[');
7317 for (
size_t index = 0; index < keywords->
size; index++) {
7318 if (index != 0) pm_buffer_append_byte(buffer,
',');
7319 pm_dump_json(buffer, parser, keywords->
nodes[index]);
7321 pm_buffer_append_byte(buffer,
']');
7324 pm_buffer_append_byte(buffer,
',');
7325 pm_buffer_append_string(buffer,
"\"keyword_rest\":", 15);
7329 pm_buffer_append_string(buffer,
"null", 4);
7333 pm_buffer_append_byte(buffer,
',');
7334 pm_buffer_append_string(buffer,
"\"block\":", 8);
7335 if (cast->
block != NULL) {
7338 pm_buffer_append_string(buffer,
"null", 4);
7341 pm_buffer_append_byte(buffer,
'}');
7345 pm_buffer_append_string(buffer,
"{\"type\":\"ParenthesesNode\",\"location\":", 37);
7348 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7351 pm_buffer_append_byte(buffer,
',');
7352 pm_buffer_append_string(buffer,
"\"ParenthesesNodeFlags\":", 23);
7354 pm_buffer_append_byte(buffer,
'[');
7356 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7357 pm_buffer_append_string(buffer,
"\"MULTIPLE_STATEMENTS\"", 21);
7360 pm_buffer_append_byte(buffer,
']');
7363 pm_buffer_append_byte(buffer,
',');
7364 pm_buffer_append_string(buffer,
"\"body\":", 7);
7365 if (cast->
body != NULL) {
7366 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
body);
7368 pm_buffer_append_string(buffer,
"null", 4);
7372 pm_buffer_append_byte(buffer,
',');
7373 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
7374 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
7377 pm_buffer_append_byte(buffer,
',');
7378 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
7379 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
7381 pm_buffer_append_byte(buffer,
'}');
7385 pm_buffer_append_string(buffer,
"{\"type\":\"PinnedExpressionNode\",\"location\":", 42);
7388 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7391 pm_buffer_append_byte(buffer,
',');
7392 pm_buffer_append_string(buffer,
"\"expression\":", 13);
7396 pm_buffer_append_byte(buffer,
',');
7397 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7398 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7401 pm_buffer_append_byte(buffer,
',');
7402 pm_buffer_append_string(buffer,
"\"lparen_loc\":", 13);
7403 pm_dump_json_location(buffer, parser, &cast->
lparen_loc);
7406 pm_buffer_append_byte(buffer,
',');
7407 pm_buffer_append_string(buffer,
"\"rparen_loc\":", 13);
7408 pm_dump_json_location(buffer, parser, &cast->
rparen_loc);
7410 pm_buffer_append_byte(buffer,
'}');
7414 pm_buffer_append_string(buffer,
"{\"type\":\"PinnedVariableNode\",\"location\":", 40);
7417 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7420 pm_buffer_append_byte(buffer,
',');
7421 pm_buffer_append_string(buffer,
"\"variable\":", 11);
7425 pm_buffer_append_byte(buffer,
',');
7426 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7427 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7429 pm_buffer_append_byte(buffer,
'}');
7433 pm_buffer_append_string(buffer,
"{\"type\":\"PostExecutionNode\",\"location\":", 39);
7436 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7439 pm_buffer_append_byte(buffer,
',');
7440 pm_buffer_append_string(buffer,
"\"statements\":", 13);
7444 pm_buffer_append_string(buffer,
"null", 4);
7448 pm_buffer_append_byte(buffer,
',');
7449 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
7450 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
7453 pm_buffer_append_byte(buffer,
',');
7454 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
7455 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
7458 pm_buffer_append_byte(buffer,
',');
7459 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
7460 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
7462 pm_buffer_append_byte(buffer,
'}');
7466 pm_buffer_append_string(buffer,
"{\"type\":\"PreExecutionNode\",\"location\":", 38);
7469 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7472 pm_buffer_append_byte(buffer,
',');
7473 pm_buffer_append_string(buffer,
"\"statements\":", 13);
7477 pm_buffer_append_string(buffer,
"null", 4);
7481 pm_buffer_append_byte(buffer,
',');
7482 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
7483 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
7486 pm_buffer_append_byte(buffer,
',');
7487 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
7488 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
7491 pm_buffer_append_byte(buffer,
',');
7492 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
7493 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
7495 pm_buffer_append_byte(buffer,
'}');
7499 pm_buffer_append_string(buffer,
"{\"type\":\"ProgramNode\",\"location\":", 33);
7502 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7505 pm_buffer_append_byte(buffer,
',');
7506 pm_buffer_append_string(buffer,
"\"locals\":", 9);
7508 pm_buffer_append_byte(buffer,
'[');
7510 for (
size_t index = 0; index < locals->
size; index++) {
7511 if (index != 0) pm_buffer_append_byte(buffer,
',');
7512 pm_dump_json_constant(buffer, parser, locals->
ids[index]);
7514 pm_buffer_append_byte(buffer,
']');
7517 pm_buffer_append_byte(buffer,
',');
7518 pm_buffer_append_string(buffer,
"\"statements\":", 13);
7521 pm_buffer_append_byte(buffer,
'}');
7525 pm_buffer_append_string(buffer,
"{\"type\":\"RangeNode\",\"location\":", 31);
7528 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7531 pm_buffer_append_byte(buffer,
',');
7532 pm_buffer_append_string(buffer,
"\"RangeFlags\":", 13);
7534 pm_buffer_append_byte(buffer,
'[');
7536 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7537 pm_buffer_append_string(buffer,
"\"EXCLUDE_END\"", 13);
7540 pm_buffer_append_byte(buffer,
']');
7543 pm_buffer_append_byte(buffer,
',');
7544 pm_buffer_append_string(buffer,
"\"left\":", 7);
7545 if (cast->
left != NULL) {
7546 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
left);
7548 pm_buffer_append_string(buffer,
"null", 4);
7552 pm_buffer_append_byte(buffer,
',');
7553 pm_buffer_append_string(buffer,
"\"right\":", 8);
7554 if (cast->
right != NULL) {
7557 pm_buffer_append_string(buffer,
"null", 4);
7561 pm_buffer_append_byte(buffer,
',');
7562 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7563 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7565 pm_buffer_append_byte(buffer,
'}');
7569 pm_buffer_append_string(buffer,
"{\"type\":\"RationalNode\",\"location\":", 34);
7572 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7575 pm_buffer_append_byte(buffer,
',');
7576 pm_buffer_append_string(buffer,
"\"IntegerBaseFlags\":", 19);
7578 pm_buffer_append_byte(buffer,
'[');
7580 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7581 pm_buffer_append_string(buffer,
"\"BINARY\"", 8);
7585 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7586 pm_buffer_append_string(buffer,
"\"DECIMAL\"", 9);
7590 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7591 pm_buffer_append_string(buffer,
"\"OCTAL\"", 7);
7595 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7596 pm_buffer_append_string(buffer,
"\"HEXADECIMAL\"", 13);
7599 pm_buffer_append_byte(buffer,
']');
7602 pm_buffer_append_byte(buffer,
',');
7603 pm_buffer_append_string(buffer,
"\"numerator\":", 12);
7604 pm_integer_string(buffer, &cast->
numerator);
7607 pm_buffer_append_byte(buffer,
',');
7608 pm_buffer_append_string(buffer,
"\"denominator\":", 14);
7611 pm_buffer_append_byte(buffer,
'}');
7615 pm_buffer_append_string(buffer,
"{\"type\":\"RedoNode\",\"location\":", 30);
7618 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7620 pm_buffer_append_byte(buffer,
'}');
7624 pm_buffer_append_string(buffer,
"{\"type\":\"RegularExpressionNode\",\"location\":", 43);
7627 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7630 pm_buffer_append_byte(buffer,
',');
7631 pm_buffer_append_string(buffer,
"\"RegularExpressionFlags\":", 25);
7633 pm_buffer_append_byte(buffer,
'[');
7635 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7636 pm_buffer_append_string(buffer,
"\"IGNORE_CASE\"", 13);
7640 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7641 pm_buffer_append_string(buffer,
"\"EXTENDED\"", 10);
7645 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7646 pm_buffer_append_string(buffer,
"\"MULTI_LINE\"", 12);
7650 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7651 pm_buffer_append_string(buffer,
"\"ONCE\"", 6);
7655 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7656 pm_buffer_append_string(buffer,
"\"EUC_JP\"", 8);
7660 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7661 pm_buffer_append_string(buffer,
"\"ASCII_8BIT\"", 12);
7665 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7666 pm_buffer_append_string(buffer,
"\"WINDOWS_31J\"", 13);
7670 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7671 pm_buffer_append_string(buffer,
"\"UTF_8\"", 7);
7675 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7676 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
7680 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7681 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
7685 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7686 pm_buffer_append_string(buffer,
"\"FORCED_US_ASCII_ENCODING\"", 26);
7689 pm_buffer_append_byte(buffer,
']');
7692 pm_buffer_append_byte(buffer,
',');
7693 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
7694 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
7697 pm_buffer_append_byte(buffer,
',');
7698 pm_buffer_append_string(buffer,
"\"content_loc\":", 14);
7699 pm_dump_json_location(buffer, parser, &cast->
content_loc);
7702 pm_buffer_append_byte(buffer,
',');
7703 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
7704 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
7707 pm_buffer_append_byte(buffer,
',');
7708 pm_buffer_append_string(buffer,
"\"unescaped\":", 12);
7710 pm_buffer_append_byte(buffer,
'"');
7711 pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
7712 pm_buffer_append_byte(buffer,
'"');
7714 pm_buffer_append_byte(buffer,
'}');
7718 pm_buffer_append_string(buffer,
"{\"type\":\"RequiredKeywordParameterNode\",\"location\":", 50);
7721 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7724 pm_buffer_append_byte(buffer,
',');
7725 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
7727 pm_buffer_append_byte(buffer,
'[');
7729 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7730 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
7733 pm_buffer_append_byte(buffer,
']');
7736 pm_buffer_append_byte(buffer,
',');
7737 pm_buffer_append_string(buffer,
"\"name\":", 7);
7738 pm_dump_json_constant(buffer, parser, cast->
name);
7741 pm_buffer_append_byte(buffer,
',');
7742 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
7743 pm_dump_json_location(buffer, parser, &cast->
name_loc);
7745 pm_buffer_append_byte(buffer,
'}');
7749 pm_buffer_append_string(buffer,
"{\"type\":\"RequiredParameterNode\",\"location\":", 43);
7752 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7755 pm_buffer_append_byte(buffer,
',');
7756 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
7758 pm_buffer_append_byte(buffer,
'[');
7760 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7761 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
7764 pm_buffer_append_byte(buffer,
']');
7767 pm_buffer_append_byte(buffer,
',');
7768 pm_buffer_append_string(buffer,
"\"name\":", 7);
7769 pm_dump_json_constant(buffer, parser, cast->
name);
7771 pm_buffer_append_byte(buffer,
'}');
7775 pm_buffer_append_string(buffer,
"{\"type\":\"RescueModifierNode\",\"location\":", 40);
7778 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7781 pm_buffer_append_byte(buffer,
',');
7782 pm_buffer_append_string(buffer,
"\"expression\":", 13);
7786 pm_buffer_append_byte(buffer,
',');
7787 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
7788 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
7791 pm_buffer_append_byte(buffer,
',');
7792 pm_buffer_append_string(buffer,
"\"rescue_expression\":", 20);
7795 pm_buffer_append_byte(buffer,
'}');
7799 pm_buffer_append_string(buffer,
"{\"type\":\"RescueNode\",\"location\":", 32);
7802 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7805 pm_buffer_append_byte(buffer,
',');
7806 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
7807 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
7810 pm_buffer_append_byte(buffer,
',');
7811 pm_buffer_append_string(buffer,
"\"exceptions\":", 13);
7813 pm_buffer_append_byte(buffer,
'[');
7815 for (
size_t index = 0; index < exceptions->
size; index++) {
7816 if (index != 0) pm_buffer_append_byte(buffer,
',');
7817 pm_dump_json(buffer, parser, exceptions->
nodes[index]);
7819 pm_buffer_append_byte(buffer,
']');
7822 pm_buffer_append_byte(buffer,
',');
7823 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7825 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7827 pm_buffer_append_string(buffer,
"null", 4);
7831 pm_buffer_append_byte(buffer,
',');
7832 pm_buffer_append_string(buffer,
"\"reference\":", 12);
7836 pm_buffer_append_string(buffer,
"null", 4);
7840 pm_buffer_append_byte(buffer,
',');
7841 pm_buffer_append_string(buffer,
"\"then_keyword_loc\":", 19);
7845 pm_buffer_append_string(buffer,
"null", 4);
7849 pm_buffer_append_byte(buffer,
',');
7850 pm_buffer_append_string(buffer,
"\"statements\":", 13);
7854 pm_buffer_append_string(buffer,
"null", 4);
7858 pm_buffer_append_byte(buffer,
',');
7859 pm_buffer_append_string(buffer,
"\"subsequent\":", 13);
7863 pm_buffer_append_string(buffer,
"null", 4);
7866 pm_buffer_append_byte(buffer,
'}');
7870 pm_buffer_append_string(buffer,
"{\"type\":\"RestParameterNode\",\"location\":", 39);
7873 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7876 pm_buffer_append_byte(buffer,
',');
7877 pm_buffer_append_string(buffer,
"\"ParameterFlags\":", 17);
7879 pm_buffer_append_byte(buffer,
'[');
7881 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7882 pm_buffer_append_string(buffer,
"\"REPEATED_PARAMETER\"", 20);
7885 pm_buffer_append_byte(buffer,
']');
7888 pm_buffer_append_byte(buffer,
',');
7889 pm_buffer_append_string(buffer,
"\"name\":", 7);
7891 pm_dump_json_constant(buffer, parser, cast->
name);
7893 pm_buffer_append_string(buffer,
"null", 4);
7897 pm_buffer_append_byte(buffer,
',');
7898 pm_buffer_append_string(buffer,
"\"name_loc\":", 11);
7900 pm_dump_json_location(buffer, parser, &cast->
name_loc);
7902 pm_buffer_append_string(buffer,
"null", 4);
7906 pm_buffer_append_byte(buffer,
',');
7907 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
7908 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
7910 pm_buffer_append_byte(buffer,
'}');
7914 pm_buffer_append_string(buffer,
"{\"type\":\"RetryNode\",\"location\":", 31);
7917 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7919 pm_buffer_append_byte(buffer,
'}');
7923 pm_buffer_append_string(buffer,
"{\"type\":\"ReturnNode\",\"location\":", 32);
7926 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7929 pm_buffer_append_byte(buffer,
',');
7930 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
7931 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
7934 pm_buffer_append_byte(buffer,
',');
7935 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
7939 pm_buffer_append_string(buffer,
"null", 4);
7942 pm_buffer_append_byte(buffer,
'}');
7946 pm_buffer_append_string(buffer,
"{\"type\":\"SelfNode\",\"location\":", 30);
7949 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7951 pm_buffer_append_byte(buffer,
'}');
7955 pm_buffer_append_string(buffer,
"{\"type\":\"ShareableConstantNode\",\"location\":", 43);
7958 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7961 pm_buffer_append_byte(buffer,
',');
7962 pm_buffer_append_string(buffer,
"\"ShareableConstantNodeFlags\":", 29);
7964 pm_buffer_append_byte(buffer,
'[');
7966 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7967 pm_buffer_append_string(buffer,
"\"LITERAL\"", 9);
7971 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7972 pm_buffer_append_string(buffer,
"\"EXPERIMENTAL_EVERYTHING\"", 25);
7976 if (flags != 0) pm_buffer_append_byte(buffer,
',');
7977 pm_buffer_append_string(buffer,
"\"EXPERIMENTAL_COPY\"", 19);
7980 pm_buffer_append_byte(buffer,
']');
7983 pm_buffer_append_byte(buffer,
',');
7984 pm_buffer_append_string(buffer,
"\"write\":", 8);
7987 pm_buffer_append_byte(buffer,
'}');
7991 pm_buffer_append_string(buffer,
"{\"type\":\"SingletonClassNode\",\"location\":", 40);
7994 pm_dump_json_location(buffer, parser, &cast->
base.
location);
7997 pm_buffer_append_byte(buffer,
',');
7998 pm_buffer_append_string(buffer,
"\"locals\":", 9);
8000 pm_buffer_append_byte(buffer,
'[');
8002 for (
size_t index = 0; index < locals->
size; index++) {
8003 if (index != 0) pm_buffer_append_byte(buffer,
',');
8004 pm_dump_json_constant(buffer, parser, locals->
ids[index]);
8006 pm_buffer_append_byte(buffer,
']');
8009 pm_buffer_append_byte(buffer,
',');
8010 pm_buffer_append_string(buffer,
"\"class_keyword_loc\":", 20);
8014 pm_buffer_append_byte(buffer,
',');
8015 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
8016 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
8019 pm_buffer_append_byte(buffer,
',');
8020 pm_buffer_append_string(buffer,
"\"expression\":", 13);
8024 pm_buffer_append_byte(buffer,
',');
8025 pm_buffer_append_string(buffer,
"\"body\":", 7);
8026 if (cast->
body != NULL) {
8027 pm_dump_json(buffer, parser, (
const pm_node_t *) cast->
body);
8029 pm_buffer_append_string(buffer,
"null", 4);
8033 pm_buffer_append_byte(buffer,
',');
8034 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
8037 pm_buffer_append_byte(buffer,
'}');
8041 pm_buffer_append_string(buffer,
"{\"type\":\"SourceEncodingNode\",\"location\":", 40);
8044 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8046 pm_buffer_append_byte(buffer,
'}');
8050 pm_buffer_append_string(buffer,
"{\"type\":\"SourceFileNode\",\"location\":", 36);
8053 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8056 pm_buffer_append_byte(buffer,
',');
8057 pm_buffer_append_string(buffer,
"\"StringFlags\":", 14);
8059 pm_buffer_append_byte(buffer,
'[');
8061 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8062 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
8066 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8067 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
8071 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8072 pm_buffer_append_string(buffer,
"\"FROZEN\"", 8);
8076 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8077 pm_buffer_append_string(buffer,
"\"MUTABLE\"", 9);
8080 pm_buffer_append_byte(buffer,
']');
8083 pm_buffer_append_byte(buffer,
',');
8084 pm_buffer_append_string(buffer,
"\"filepath\":", 11);
8086 pm_buffer_append_byte(buffer,
'"');
8087 pm_buffer_append_source(buffer, pm_string_source(filepath), pm_string_length(filepath), PM_BUFFER_ESCAPING_JSON);
8088 pm_buffer_append_byte(buffer,
'"');
8090 pm_buffer_append_byte(buffer,
'}');
8094 pm_buffer_append_string(buffer,
"{\"type\":\"SourceLineNode\",\"location\":", 36);
8097 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8099 pm_buffer_append_byte(buffer,
'}');
8103 pm_buffer_append_string(buffer,
"{\"type\":\"SplatNode\",\"location\":", 31);
8106 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8109 pm_buffer_append_byte(buffer,
',');
8110 pm_buffer_append_string(buffer,
"\"operator_loc\":", 15);
8111 pm_dump_json_location(buffer, parser, &cast->
operator_loc);
8114 pm_buffer_append_byte(buffer,
',');
8115 pm_buffer_append_string(buffer,
"\"expression\":", 13);
8119 pm_buffer_append_string(buffer,
"null", 4);
8122 pm_buffer_append_byte(buffer,
'}');
8126 pm_buffer_append_string(buffer,
"{\"type\":\"StatementsNode\",\"location\":", 36);
8129 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8132 pm_buffer_append_byte(buffer,
',');
8133 pm_buffer_append_string(buffer,
"\"body\":", 7);
8135 pm_buffer_append_byte(buffer,
'[');
8137 for (
size_t index = 0; index < body->
size; index++) {
8138 if (index != 0) pm_buffer_append_byte(buffer,
',');
8139 pm_dump_json(buffer, parser, body->
nodes[index]);
8141 pm_buffer_append_byte(buffer,
']');
8143 pm_buffer_append_byte(buffer,
'}');
8147 pm_buffer_append_string(buffer,
"{\"type\":\"StringNode\",\"location\":", 32);
8150 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8153 pm_buffer_append_byte(buffer,
',');
8154 pm_buffer_append_string(buffer,
"\"StringFlags\":", 14);
8156 pm_buffer_append_byte(buffer,
'[');
8158 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8159 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
8163 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8164 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
8168 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8169 pm_buffer_append_string(buffer,
"\"FROZEN\"", 8);
8173 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8174 pm_buffer_append_string(buffer,
"\"MUTABLE\"", 9);
8177 pm_buffer_append_byte(buffer,
']');
8180 pm_buffer_append_byte(buffer,
',');
8181 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
8183 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
8185 pm_buffer_append_string(buffer,
"null", 4);
8189 pm_buffer_append_byte(buffer,
',');
8190 pm_buffer_append_string(buffer,
"\"content_loc\":", 14);
8191 pm_dump_json_location(buffer, parser, &cast->
content_loc);
8194 pm_buffer_append_byte(buffer,
',');
8195 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
8197 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
8199 pm_buffer_append_string(buffer,
"null", 4);
8203 pm_buffer_append_byte(buffer,
',');
8204 pm_buffer_append_string(buffer,
"\"unescaped\":", 12);
8206 pm_buffer_append_byte(buffer,
'"');
8207 pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
8208 pm_buffer_append_byte(buffer,
'"');
8210 pm_buffer_append_byte(buffer,
'}');
8214 pm_buffer_append_string(buffer,
"{\"type\":\"SuperNode\",\"location\":", 31);
8217 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8220 pm_buffer_append_byte(buffer,
',');
8221 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
8222 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
8225 pm_buffer_append_byte(buffer,
',');
8226 pm_buffer_append_string(buffer,
"\"lparen_loc\":", 13);
8228 pm_dump_json_location(buffer, parser, &cast->
lparen_loc);
8230 pm_buffer_append_string(buffer,
"null", 4);
8234 pm_buffer_append_byte(buffer,
',');
8235 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
8239 pm_buffer_append_string(buffer,
"null", 4);
8243 pm_buffer_append_byte(buffer,
',');
8244 pm_buffer_append_string(buffer,
"\"rparen_loc\":", 13);
8246 pm_dump_json_location(buffer, parser, &cast->
rparen_loc);
8248 pm_buffer_append_string(buffer,
"null", 4);
8252 pm_buffer_append_byte(buffer,
',');
8253 pm_buffer_append_string(buffer,
"\"block\":", 8);
8254 if (cast->
block != NULL) {
8257 pm_buffer_append_string(buffer,
"null", 4);
8260 pm_buffer_append_byte(buffer,
'}');
8264 pm_buffer_append_string(buffer,
"{\"type\":\"SymbolNode\",\"location\":", 32);
8267 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8270 pm_buffer_append_byte(buffer,
',');
8271 pm_buffer_append_string(buffer,
"\"SymbolFlags\":", 14);
8273 pm_buffer_append_byte(buffer,
'[');
8275 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8276 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
8280 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8281 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
8285 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8286 pm_buffer_append_string(buffer,
"\"FORCED_US_ASCII_ENCODING\"", 26);
8289 pm_buffer_append_byte(buffer,
']');
8292 pm_buffer_append_byte(buffer,
',');
8293 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
8295 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
8297 pm_buffer_append_string(buffer,
"null", 4);
8301 pm_buffer_append_byte(buffer,
',');
8302 pm_buffer_append_string(buffer,
"\"value_loc\":", 12);
8304 pm_dump_json_location(buffer, parser, &cast->
value_loc);
8306 pm_buffer_append_string(buffer,
"null", 4);
8310 pm_buffer_append_byte(buffer,
',');
8311 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
8313 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
8315 pm_buffer_append_string(buffer,
"null", 4);
8319 pm_buffer_append_byte(buffer,
',');
8320 pm_buffer_append_string(buffer,
"\"unescaped\":", 12);
8322 pm_buffer_append_byte(buffer,
'"');
8323 pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
8324 pm_buffer_append_byte(buffer,
'"');
8326 pm_buffer_append_byte(buffer,
'}');
8330 pm_buffer_append_string(buffer,
"{\"type\":\"TrueNode\",\"location\":", 30);
8333 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8335 pm_buffer_append_byte(buffer,
'}');
8339 pm_buffer_append_string(buffer,
"{\"type\":\"UndefNode\",\"location\":", 31);
8342 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8345 pm_buffer_append_byte(buffer,
',');
8346 pm_buffer_append_string(buffer,
"\"names\":", 8);
8348 pm_buffer_append_byte(buffer,
'[');
8350 for (
size_t index = 0; index < names->
size; index++) {
8351 if (index != 0) pm_buffer_append_byte(buffer,
',');
8352 pm_dump_json(buffer, parser, names->
nodes[index]);
8354 pm_buffer_append_byte(buffer,
']');
8357 pm_buffer_append_byte(buffer,
',');
8358 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
8359 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
8361 pm_buffer_append_byte(buffer,
'}');
8365 pm_buffer_append_string(buffer,
"{\"type\":\"UnlessNode\",\"location\":", 32);
8368 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8371 pm_buffer_append_byte(buffer,
',');
8372 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
8373 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
8376 pm_buffer_append_byte(buffer,
',');
8377 pm_buffer_append_string(buffer,
"\"predicate\":", 12);
8381 pm_buffer_append_byte(buffer,
',');
8382 pm_buffer_append_string(buffer,
"\"then_keyword_loc\":", 19);
8386 pm_buffer_append_string(buffer,
"null", 4);
8390 pm_buffer_append_byte(buffer,
',');
8391 pm_buffer_append_string(buffer,
"\"statements\":", 13);
8395 pm_buffer_append_string(buffer,
"null", 4);
8399 pm_buffer_append_byte(buffer,
',');
8400 pm_buffer_append_string(buffer,
"\"else_clause\":", 14);
8404 pm_buffer_append_string(buffer,
"null", 4);
8408 pm_buffer_append_byte(buffer,
',');
8409 pm_buffer_append_string(buffer,
"\"end_keyword_loc\":", 18);
8413 pm_buffer_append_string(buffer,
"null", 4);
8416 pm_buffer_append_byte(buffer,
'}');
8420 pm_buffer_append_string(buffer,
"{\"type\":\"UntilNode\",\"location\":", 31);
8423 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8426 pm_buffer_append_byte(buffer,
',');
8427 pm_buffer_append_string(buffer,
"\"LoopFlags\":", 12);
8429 pm_buffer_append_byte(buffer,
'[');
8431 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8432 pm_buffer_append_string(buffer,
"\"BEGIN_MODIFIER\"", 16);
8435 pm_buffer_append_byte(buffer,
']');
8438 pm_buffer_append_byte(buffer,
',');
8439 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
8440 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
8443 pm_buffer_append_byte(buffer,
',');
8444 pm_buffer_append_string(buffer,
"\"do_keyword_loc\":", 17);
8448 pm_buffer_append_string(buffer,
"null", 4);
8452 pm_buffer_append_byte(buffer,
',');
8453 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
8455 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
8457 pm_buffer_append_string(buffer,
"null", 4);
8461 pm_buffer_append_byte(buffer,
',');
8462 pm_buffer_append_string(buffer,
"\"predicate\":", 12);
8466 pm_buffer_append_byte(buffer,
',');
8467 pm_buffer_append_string(buffer,
"\"statements\":", 13);
8471 pm_buffer_append_string(buffer,
"null", 4);
8474 pm_buffer_append_byte(buffer,
'}');
8478 pm_buffer_append_string(buffer,
"{\"type\":\"WhenNode\",\"location\":", 30);
8481 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8484 pm_buffer_append_byte(buffer,
',');
8485 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
8486 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
8489 pm_buffer_append_byte(buffer,
',');
8490 pm_buffer_append_string(buffer,
"\"conditions\":", 13);
8492 pm_buffer_append_byte(buffer,
'[');
8494 for (
size_t index = 0; index < conditions->
size; index++) {
8495 if (index != 0) pm_buffer_append_byte(buffer,
',');
8496 pm_dump_json(buffer, parser, conditions->
nodes[index]);
8498 pm_buffer_append_byte(buffer,
']');
8501 pm_buffer_append_byte(buffer,
',');
8502 pm_buffer_append_string(buffer,
"\"then_keyword_loc\":", 19);
8506 pm_buffer_append_string(buffer,
"null", 4);
8510 pm_buffer_append_byte(buffer,
',');
8511 pm_buffer_append_string(buffer,
"\"statements\":", 13);
8515 pm_buffer_append_string(buffer,
"null", 4);
8518 pm_buffer_append_byte(buffer,
'}');
8522 pm_buffer_append_string(buffer,
"{\"type\":\"WhileNode\",\"location\":", 31);
8525 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8528 pm_buffer_append_byte(buffer,
',');
8529 pm_buffer_append_string(buffer,
"\"LoopFlags\":", 12);
8531 pm_buffer_append_byte(buffer,
'[');
8533 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8534 pm_buffer_append_string(buffer,
"\"BEGIN_MODIFIER\"", 16);
8537 pm_buffer_append_byte(buffer,
']');
8540 pm_buffer_append_byte(buffer,
',');
8541 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
8542 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
8545 pm_buffer_append_byte(buffer,
',');
8546 pm_buffer_append_string(buffer,
"\"do_keyword_loc\":", 17);
8550 pm_buffer_append_string(buffer,
"null", 4);
8554 pm_buffer_append_byte(buffer,
',');
8555 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
8557 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
8559 pm_buffer_append_string(buffer,
"null", 4);
8563 pm_buffer_append_byte(buffer,
',');
8564 pm_buffer_append_string(buffer,
"\"predicate\":", 12);
8568 pm_buffer_append_byte(buffer,
',');
8569 pm_buffer_append_string(buffer,
"\"statements\":", 13);
8573 pm_buffer_append_string(buffer,
"null", 4);
8576 pm_buffer_append_byte(buffer,
'}');
8580 pm_buffer_append_string(buffer,
"{\"type\":\"XStringNode\",\"location\":", 33);
8583 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8586 pm_buffer_append_byte(buffer,
',');
8587 pm_buffer_append_string(buffer,
"\"EncodingFlags\":", 16);
8589 pm_buffer_append_byte(buffer,
'[');
8591 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8592 pm_buffer_append_string(buffer,
"\"FORCED_UTF8_ENCODING\"", 22);
8596 if (flags != 0) pm_buffer_append_byte(buffer,
',');
8597 pm_buffer_append_string(buffer,
"\"FORCED_BINARY_ENCODING\"", 24);
8600 pm_buffer_append_byte(buffer,
']');
8603 pm_buffer_append_byte(buffer,
',');
8604 pm_buffer_append_string(buffer,
"\"opening_loc\":", 14);
8605 pm_dump_json_location(buffer, parser, &cast->
opening_loc);
8608 pm_buffer_append_byte(buffer,
',');
8609 pm_buffer_append_string(buffer,
"\"content_loc\":", 14);
8610 pm_dump_json_location(buffer, parser, &cast->
content_loc);
8613 pm_buffer_append_byte(buffer,
',');
8614 pm_buffer_append_string(buffer,
"\"closing_loc\":", 14);
8615 pm_dump_json_location(buffer, parser, &cast->
closing_loc);
8618 pm_buffer_append_byte(buffer,
',');
8619 pm_buffer_append_string(buffer,
"\"unescaped\":", 12);
8621 pm_buffer_append_byte(buffer,
'"');
8622 pm_buffer_append_source(buffer, pm_string_source(unescaped), pm_string_length(unescaped), PM_BUFFER_ESCAPING_JSON);
8623 pm_buffer_append_byte(buffer,
'"');
8625 pm_buffer_append_byte(buffer,
'}');
8629 pm_buffer_append_string(buffer,
"{\"type\":\"YieldNode\",\"location\":", 31);
8632 pm_dump_json_location(buffer, parser, &cast->
base.
location);
8635 pm_buffer_append_byte(buffer,
',');
8636 pm_buffer_append_string(buffer,
"\"keyword_loc\":", 14);
8637 pm_dump_json_location(buffer, parser, &cast->
keyword_loc);
8640 pm_buffer_append_byte(buffer,
',');
8641 pm_buffer_append_string(buffer,
"\"lparen_loc\":", 13);
8643 pm_dump_json_location(buffer, parser, &cast->
lparen_loc);
8645 pm_buffer_append_string(buffer,
"null", 4);
8649 pm_buffer_append_byte(buffer,
',');
8650 pm_buffer_append_string(buffer,
"\"arguments\":", 12);
8654 pm_buffer_append_string(buffer,
"null", 4);
8658 pm_buffer_append_byte(buffer,
',');
8659 pm_buffer_append_string(buffer,
"\"rparen_loc\":", 13);
8661 pm_dump_json_location(buffer, parser, &cast->
rparen_loc);
8663 pm_buffer_append_string(buffer,
"null", 4);
8666 pm_buffer_append_byte(buffer,
'}');