summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2023-12-04 16:40:59 -0500
committerJemma Issroff <jemmaissroff@gmail.com>2023-12-06 09:55:48 -0500
commit018dbf18d50b34a3ea564bfe0264a423de4b33bb (patch)
tree366e75c39f9061d853830bb602276b1f893db1ce
parentda1519b223e1accfcef1c831f9fdc6421724ea7c (diff)
[ruby/prism] Add locals_body_index to DefNode, BlockNode, LambdaNode
The locals_body_index gives the index in the locals array where the locals from the body start. This allows compilers to easily index past the parameters in the locals array. https://github.com/ruby/prism/commit/5d4627b890
-rw-r--r--prism/config.yml6
-rw-r--r--prism/prism.c28
-rw-r--r--test/prism/errors_test.rb25
-rw-r--r--test/prism/snapshots/arrays.txt9
-rw-r--r--test/prism/snapshots/begin_ensure.txt2
-rw-r--r--test/prism/snapshots/blocks.txt21
-rw-r--r--test/prism/snapshots/break.txt2
-rw-r--r--test/prism/snapshots/endless_methods.txt3
-rw-r--r--test/prism/snapshots/hashes.txt1
-rw-r--r--test/prism/snapshots/if.txt3
-rw-r--r--test/prism/snapshots/indented_file_end.txt1
-rw-r--r--test/prism/snapshots/keyword_method_names.txt9
-rw-r--r--test/prism/snapshots/lambda.txt5
-rw-r--r--test/prism/snapshots/method_calls.txt21
-rw-r--r--test/prism/snapshots/methods.txt67
-rw-r--r--test/prism/snapshots/non_alphanumeric_methods.txt35
-rw-r--r--test/prism/snapshots/patterns.txt7
-rw-r--r--test/prism/snapshots/procs.txt11
-rw-r--r--test/prism/snapshots/regex.txt1
-rw-r--r--test/prism/snapshots/rescue.txt3
-rw-r--r--test/prism/snapshots/seattlerb/TestRubyParserShared.txt2
-rw-r--r--test/prism/snapshots/seattlerb/args_kw_block.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg__bare.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_kwsplat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_optional.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_splat_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_args_kwargs.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_args_no_kwargs.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt1.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2_2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt3.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_break.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt2
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt2
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt2
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_colon.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_dot.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_colon.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_dot.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_splat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_kw.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_kw__required.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_next.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_optarg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_paren_splat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_reg_optarg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_return.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_scope.txt1
-rw-r--r--test/prism/snapshots/seattlerb/block_splat_reg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/bug169.txt1
-rw-r--r--test/prism/snapshots/seattlerb/bug236.txt2
-rw-r--r--test/prism/snapshots/seattlerb/bug_187.txt2
-rw-r--r--test/prism/snapshots/seattlerb/bug_249.txt2
-rw-r--r--test/prism/snapshots/seattlerb/bug_args__19.txt1
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn.txt1
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt1
-rw-r--r--test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt2
-rw-r--r--test/prism/snapshots/seattlerb/bug_masgn_right.txt1
-rw-r--r--test/prism/snapshots/seattlerb/call_array_block_call.txt1
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt2
-rw-r--r--test/prism/snapshots/seattlerb/call_begin_call_block_call.txt1
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt2
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt2
-rw-r--r--test/prism/snapshots/seattlerb/case_in.txt1
-rw-r--r--test/prism/snapshots/seattlerb/class_comments.txt1
-rw-r--r--test/prism/snapshots/seattlerb/dasgn_icky2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_forward_args.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_args_forward_args.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_comments.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_env.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_val.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_no_kwargs.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt3
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_last_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_reg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_powarg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_splat_arg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defn_unary_not.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defns_reserved.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt2
-rw-r--r--test/prism/snapshots/seattlerb/defs_comments.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defs_kwarg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt3
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_3.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_5.txt2
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__10.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__11.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__12.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__6.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__7.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__8.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__9.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult6_.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__7.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__8.txt1
-rw-r--r--test/prism/snapshots/seattlerb/difficult7_.txt1
-rw-r--r--test/prism/snapshots/seattlerb/do_bug.txt1
-rw-r--r--test/prism/snapshots/seattlerb/do_lambda.txt1
-rw-r--r--test/prism/snapshots/seattlerb/f_kw.txt1
-rw-r--r--test/prism/snapshots/seattlerb/f_kw__required.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_1.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_1.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_1.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_2__19.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_3.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_4.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_5.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_6.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_1.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_1.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_1.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_2.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt1
-rw-r--r--test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt4
-rw-r--r--test/prism/snapshots/seattlerb/magic_encoding_comment.txt1
-rw-r--r--test/prism/snapshots/seattlerb/module_comments.txt1
-rw-r--r--test/prism/snapshots/seattlerb/parse_def_special_name.txt1
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_no_args.txt1
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_complex.txt1
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt2
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt1
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt1
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt1
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_return.txt1
-rw-r--r--test/prism/snapshots/seattlerb/pipe_semicolon.txt1
-rw-r--r--test/prism/snapshots/seattlerb/pipe_space.txt1
-rw-r--r--test/prism/snapshots/seattlerb/required_kwarg_no_value.txt1
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt1
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt1
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_raised.txt1
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt1
-rw-r--r--test/prism/snapshots/seattlerb/rescue_in_block.txt1
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt1
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt1
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call.txt2
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt2
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw.txt1
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw__required.txt1
-rw-r--r--test/prism/snapshots/seattlerb/stabby_proc_scope.txt1
-rw-r--r--test/prism/snapshots/super.txt2
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/block.txt30
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/class.txt1
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/def.txt30
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defs.txt11
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/dstr.txt1
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/if.txt1
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/lambda.txt6
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/literal.txt1
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/module.txt1
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/send.txt4
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/27.txt1
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/31.txt2
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/32.txt2
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/super.txt5
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/while.txt6
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/block.txt6
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/def.txt2
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/while.txt4
-rw-r--r--test/prism/snapshots/while.txt7
-rw-r--r--test/prism/snapshots/whitequark/anonymous_blockarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/arg.txt2
-rw-r--r--test/prism/snapshots/whitequark/arg_duplicate_ignored.txt2
-rw-r--r--test/prism/snapshots/whitequark/arg_label.txt3
-rw-r--r--test/prism/snapshots/whitequark/arg_scope.txt1
-rw-r--r--test/prism/snapshots/whitequark/args.txt31
-rw-r--r--test/prism/snapshots/whitequark/begin_cmdarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/blockarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/blockargs.txt35
-rw-r--r--test/prism/snapshots/whitequark/break_block.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_435.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_447.txt2
-rw-r--r--test/prism/snapshots/whitequark/bug_452.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_466.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_481.txt2
-rw-r--r--test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_cmdarg.txt2
-rw-r--r--test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt2
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt11
-rw-r--r--test/prism/snapshots/whitequark/bug_heredoc_do.txt1
-rw-r--r--test/prism/snapshots/whitequark/bug_lambda_leakage.txt1
-rw-r--r--test/prism/snapshots/whitequark/class_definition_in_while_cond.txt4
-rw-r--r--test/prism/snapshots/whitequark/const_op_asgn.txt2
-rw-r--r--test/prism/snapshots/whitequark/def.txt6
-rw-r--r--test/prism/snapshots/whitequark/defs.txt5
-rw-r--r--test/prism/snapshots/whitequark/endless_comparison_method.txt6
-rw-r--r--test/prism/snapshots/whitequark/endless_method.txt4
-rw-r--r--test/prism/snapshots/whitequark/endless_method_command_syntax.txt8
-rw-r--r--test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt1
-rw-r--r--test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt2
-rw-r--r--test/prism/snapshots/whitequark/endless_method_without_args.txt4
-rw-r--r--test/prism/snapshots/whitequark/forward_arg.txt1
-rw-r--r--test/prism/snapshots/whitequark/forward_arg_with_open_args.txt10
-rw-r--r--test/prism/snapshots/whitequark/forward_args_legacy.txt3
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/forwarded_restarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/kwarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/kwnilarg.txt3
-rw-r--r--test/prism/snapshots/whitequark/kwoptarg.txt1
-rw-r--r--test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt1
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_named.txt1
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_unnamed.txt1
-rw-r--r--test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt2
-rw-r--r--test/prism/snapshots/whitequark/method_definition_in_while_cond.txt8
-rw-r--r--test/prism/snapshots/whitequark/next_block.txt1
-rw-r--r--test/prism/snapshots/whitequark/numbered_args_after_27.txt4
-rw-r--r--test/prism/snapshots/whitequark/numparam_outside_block.txt1
-rw-r--r--test/prism/snapshots/whitequark/optarg.txt2
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_272.txt1
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_490.txt3
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_507.txt1
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_525.txt2
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_604.txt1
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_645.txt1
-rw-r--r--test/prism/snapshots/whitequark/procarg0.txt2
-rw-r--r--test/prism/snapshots/whitequark/rescue_in_lambda_block.txt1
-rw-r--r--test/prism/snapshots/whitequark/rescue_without_begin_end.txt1
-rw-r--r--test/prism/snapshots/whitequark/restarg_named.txt1
-rw-r--r--test/prism/snapshots/whitequark/restarg_unnamed.txt1
-rw-r--r--test/prism/snapshots/whitequark/return_block.txt1
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_10653.txt5
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11107.txt2
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11380.txt2
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873.txt18
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_a.txt30
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_b.txt2
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12073.txt1
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_13547.txt1
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_14690.txt2
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_15789.txt4
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_9669.txt1
-rw-r--r--test/prism/snapshots/whitequark/send_block_chain_cmd.txt10
-rw-r--r--test/prism/snapshots/whitequark/send_block_conditional.txt1
-rw-r--r--test/prism/snapshots/whitequark/send_lambda.txt3
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args.txt2
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_noparen.txt2
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_shadow.txt1
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_legacy.txt1
-rw-r--r--test/prism/snapshots/whitequark/send_self_block.txt4
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_block.txt3
-rw-r--r--test/prism/snapshots/whitequark/space_args_block.txt1
-rw-r--r--test/prism/snapshots/whitequark/super_block.txt2
-rw-r--r--test/prism/snapshots/whitequark/trailing_forward_arg.txt1
-rw-r--r--test/prism/snapshots/whitequark/var_op_asgn.txt1
291 files changed, 873 insertions, 3 deletions
diff --git a/prism/config.yml b/prism/config.yml
index 806fb25c9f..f7b6751eaa 100644
--- a/prism/config.yml
+++ b/prism/config.yml
@@ -587,6 +587,8 @@ nodes:
fields:
- name: locals
type: constant[]
+ - name: locals_body_index
+ type: uint32
- name: parameters
type: node?
- name: body
@@ -1103,6 +1105,8 @@ nodes:
type: node?
- name: locals
type: constant[]
+ - name: locals_body_index
+ type: uint32
- name: def_keyword_loc
type: location
- name: operator_loc
@@ -1761,6 +1765,8 @@ nodes:
fields:
- name: locals
type: constant[]
+ - name: locals_body_index
+ type: uint32
- name: operator_loc
type: location
- name: opening_loc
diff --git a/prism/prism.c b/prism/prism.c
index 3036e1cfa8..fee14e395f 100644
--- a/prism/prism.c
+++ b/prism/prism.c
@@ -1467,7 +1467,7 @@ pm_block_argument_node_create(pm_parser_t *parser, const pm_token_t *operator, p
* Allocate and initialize a new BlockNode node.
*/
static pm_block_node_t *
-pm_block_node_create(pm_parser_t *parser, pm_constant_id_list_t *locals, const pm_token_t *opening, pm_node_t *parameters, pm_node_t *body, const pm_token_t *closing) {
+pm_block_node_create(pm_parser_t *parser, pm_constant_id_list_t *locals, uint32_t locals_body_index, const pm_token_t *opening, pm_node_t *parameters, pm_node_t *body, const pm_token_t *closing) {
pm_block_node_t *node = PM_ALLOC_NODE(parser, pm_block_node_t);
*node = (pm_block_node_t) {
@@ -1476,6 +1476,7 @@ pm_block_node_create(pm_parser_t *parser, pm_constant_id_list_t *locals, const p
.location = { .start = opening->start, .end = closing->end },
},
.locals = *locals,
+ .locals_body_index = locals_body_index,
.parameters = parameters,
.body = body,
.opening_loc = PM_LOCATION_TOKEN_VALUE(opening),
@@ -2631,6 +2632,7 @@ pm_def_node_create(
pm_parameters_node_t *parameters,
pm_node_t *body,
pm_constant_id_list_t *locals,
+ uint32_t locals_body_index,
const pm_token_t *def_keyword,
const pm_token_t *operator,
const pm_token_t *lparen,
@@ -2658,6 +2660,7 @@ pm_def_node_create(
.parameters = parameters,
.body = body,
.locals = *locals,
+ .locals_body_index = locals_body_index,
.def_keyword_loc = PM_LOCATION_TOKEN_VALUE(def_keyword),
.operator_loc = PM_OPTIONAL_LOCATION_TOKEN_VALUE(operator),
.lparen_loc = PM_OPTIONAL_LOCATION_TOKEN_VALUE(lparen),
@@ -3954,6 +3957,7 @@ static pm_lambda_node_t *
pm_lambda_node_create(
pm_parser_t *parser,
pm_constant_id_list_t *locals,
+ uint32_t locals_body_index,
const pm_token_t *operator,
const pm_token_t *opening,
const pm_token_t *closing,
@@ -3971,6 +3975,7 @@ pm_lambda_node_create(
},
},
.locals = *locals,
+ .locals_body_index = locals_body_index,
.operator_loc = PM_LOCATION_TOKEN_VALUE(operator),
.opening_loc = PM_LOCATION_TOKEN_VALUE(opening),
.closing_loc = PM_LOCATION_TOKEN_VALUE(closing),
@@ -11915,6 +11920,12 @@ parse_block(pm_parser_t *parser) {
pm_block_parameters_node_closing_set(block_parameters, &parser->previous);
}
+ uint32_t locals_body_index = 0;
+
+ if (block_parameters) {
+ locals_body_index = (uint32_t) parser->current_scope->locals.size;
+ }
+
accept1(parser, PM_TOKEN_NEWLINE);
pm_node_t *statements = NULL;
@@ -11946,12 +11957,13 @@ parse_block(pm_parser_t *parser) {
if (parameters == NULL && (maximum > 0)) {
parameters = (pm_node_t *) pm_numbered_parameters_node_create(parser, &(pm_location_t) { .start = opening.start, .end = parser->previous.end }, maximum);
+ locals_body_index = maximum;
}
pm_constant_id_list_t locals = parser->current_scope->locals;
pm_parser_scope_pop(parser);
pm_accepts_block_stack_pop(parser);
- return pm_block_node_create(parser, &locals, &opening, parameters, statements, &parser->previous);
+ return pm_block_node_create(parser, &locals, locals_body_index, &opening, parameters, statements, &parser->previous);
}
/**
@@ -14807,6 +14819,8 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b
}
}
+ uint32_t locals_body_index = (uint32_t) parser->current_scope->locals.size;
+
context_pop(parser);
pm_node_t *statements = NULL;
pm_token_t equal;
@@ -14877,6 +14891,7 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b
params,
statements,
&locals,
+ locals_body_index,
&def_keyword,
&operator,
&lparen,
@@ -15798,6 +15813,12 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b
}
}
+ uint32_t locals_body_index = 0;
+
+ if (block_parameters) {
+ locals_body_index = (uint32_t) parser->current_scope->locals.size;
+ }
+
pm_token_t opening;
pm_node_t *body = NULL;
parser->lambda_enclosure_nesting = previous_lambda_enclosure_nesting;
@@ -15832,12 +15853,13 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b
if (parameters == NULL && (maximum > 0)) {
parameters = (pm_node_t *) pm_numbered_parameters_node_create(parser, &(pm_location_t) { .start = operator.start, .end = parser->previous.end }, maximum);
+ locals_body_index = maximum;
}
pm_constant_id_list_t locals = parser->current_scope->locals;
pm_parser_scope_pop(parser);
pm_accepts_block_stack_pop(parser);
- return (pm_node_t *) pm_lambda_node_create(parser, &locals, &operator, &opening, &parser->previous, parameters, body);
+ return (pm_node_t *) pm_lambda_node_create(parser, &locals, locals_body_index, &operator, &opening, &parser->previous, parameters, body);
}
case PM_TOKEN_UPLUS: {
parser_lex(parser);
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb
index 9bc8d3dd8e..54b710b146 100644
--- a/test/prism/errors_test.rb
+++ b/test/prism/errors_test.rb
@@ -419,6 +419,7 @@ module Prism
nil,
StatementsNode([ModuleNode([], Location(), ConstantReadNode(:A), nil, Location(), :A)]),
[],
+ 0,
Location(),
nil,
nil,
@@ -449,6 +450,7 @@ module Prism
nil,
BlockNode(
[],
+ 0,
nil,
StatementsNode([ModuleNode([], Location(), ConstantReadNode(:Foo), nil, Location(), :Foo)]),
Location(),
@@ -458,6 +460,7 @@ module Prism
)]
),
[],
+ 0,
Location(),
nil,
nil,
@@ -508,6 +511,7 @@ module Prism
)]
),
[],
+ 0,
Location(),
nil,
nil,
@@ -548,6 +552,7 @@ module Prism
], [], nil, [], [], nil, nil),
nil,
[:A, :@a, :$A, :@@a],
+ 4,
Location(),
nil,
Location(),
@@ -619,6 +624,7 @@ module Prism
),
nil,
[:a, :b, :c],
+ 3,
Location(),
nil,
Location(),
@@ -635,6 +641,7 @@ module Prism
def test_do_not_allow_trailing_commas_in_lambda_parameters
expected = LambdaNode(
[:a, :b],
+ 2,
Location(),
Location(),
Location(),
@@ -703,6 +710,7 @@ module Prism
),
nil,
[:block, :a],
+ 2,
Location(),
nil,
Location(),
@@ -723,6 +731,7 @@ module Prism
ParametersNode([], [], nil, [RequiredParameterNode(:a)], [], nil, BlockParameterNode(nil, nil, Location())),
nil,
[:&, :a],
+ 2,
Location(),
nil,
Location(),
@@ -752,6 +761,7 @@ module Prism
),
nil,
[:"...", :a],
+ 2,
Location(),
nil,
Location(),
@@ -780,6 +790,7 @@ module Prism
),
nil,
[:b, :a],
+ 2,
Location(),
nil,
Location(),
@@ -808,6 +819,7 @@ module Prism
),
nil,
[:rest, :b],
+ 2,
Location(),
nil,
Location(),
@@ -829,6 +841,7 @@ module Prism
ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil),
nil,
[:"..."],
+ 1,
Location(),
nil,
Location(),
@@ -858,6 +871,7 @@ module Prism
),
nil,
[:args, :a, :b],
+ 3,
Location(),
nil,
Location(),
@@ -888,6 +902,7 @@ module Prism
),
nil,
[:args, :a, :b],
+ 3,
Location(),
nil,
Location(),
@@ -918,6 +933,7 @@ module Prism
),
nil,
[:args, :a, :b],
+ 3,
Location(),
nil,
Location(),
@@ -951,6 +967,7 @@ module Prism
),
nil,
[:a, :b, :c, :d, :e],
+ 5,
Location(),
nil,
Location(),
@@ -1000,6 +1017,7 @@ module Prism
nil,
StatementsNode([IntegerNode(IntegerBaseFlags::DECIMAL)]),
[],
+ 0,
Location(),
nil,
Location(),
@@ -1016,6 +1034,7 @@ module Prism
def test_do_not_allow_forward_arguments_in_lambda_literals
expected = LambdaNode(
[],
+ 0,
Location(),
Location(),
Location(),
@@ -1039,6 +1058,7 @@ module Prism
nil,
BlockNode(
[],
+ 0,
BlockParametersNode(ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil), [], Location(), Location()),
nil,
Location(),
@@ -1114,6 +1134,7 @@ module Prism
ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b), RequiredParameterNode(:a)], [], nil, [], [], nil, nil),
nil,
[:a, :b],
+ 2,
Location(),
nil,
Location(),
@@ -1134,6 +1155,7 @@ module Prism
ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b)], [], RestParameterNode(:a, Location(), Location()), [], [], nil, nil),
nil,
[:a, :b],
+ 2,
Location(),
nil,
Location(),
@@ -1153,6 +1175,7 @@ module Prism
ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b)], [], nil, [], [], KeywordRestParameterNode(:a, Location(), Location()), nil),
nil,
[:a, :b],
+ 2,
Location(),
nil,
Location(),
@@ -1172,6 +1195,7 @@ module Prism
ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b)], [], nil, [], [], nil, BlockParameterNode(:a, Location(), Location())),
nil,
[:a, :b],
+ 2,
Location(),
nil,
Location(),
@@ -1191,6 +1215,7 @@ module Prism
ParametersNode([], [OptionalParameterNode(:a, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL))], RestParameterNode(:c, Location(), Location()), [RequiredParameterNode(:b)], [], nil, nil),
nil,
[:a, :b, :c],
+ 3,
Location(),
nil,
Location(),
diff --git a/test/prism/snapshots/arrays.txt b/test/prism/snapshots/arrays.txt
index 30b4a5a786..a9adea9627 100644
--- a/test/prism/snapshots/arrays.txt
+++ b/test/prism/snapshots/arrays.txt
@@ -1042,6 +1042,7 @@
│ │ │ └── operator_loc: (89,6)-(89,7) = "&"
│ │ └── flags: ∅
│ ├── locals: [:&]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (88,0)-(88,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (88,7)-(88,8) = "("
@@ -1821,6 +1822,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (128,0)-(128,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (128,5)-(128,6) = "("
@@ -1876,6 +1878,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (130,0)-(130,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (130,5)-(130,6) = "("
@@ -1931,6 +1934,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (132,0)-(132,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (132,5)-(132,6) = "("
@@ -1988,6 +1992,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (134,0)-(134,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (134,5)-(134,6) = "("
@@ -2044,6 +2049,7 @@
│ │ @ IntegerNode (location: (136,18)-(136,19))
│ │ └── flags: decimal
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (136,0)-(136,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (136,5)-(136,6) = "("
@@ -2101,6 +2107,7 @@
│ │ @ IntegerNode (location: (138,22)-(138,23))
│ │ └── flags: decimal
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (138,0)-(138,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (138,5)-(138,6) = "("
@@ -2166,6 +2173,7 @@
│ │ ├── ensure_clause: ∅
│ │ └── end_keyword_loc: (140,26)-(140,29) = "end"
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (140,0)-(140,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (140,5)-(140,6) = "("
@@ -2233,6 +2241,7 @@
│ ├── ensure_clause: ∅
│ └── end_keyword_loc: (142,29)-(142,32) = "end"
├── locals: [:*]
+ ├── locals_body_index: 1
├── def_keyword_loc: (142,0)-(142,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (142,5)-(142,6) = "("
diff --git a/test/prism/snapshots/begin_ensure.txt b/test/prism/snapshots/begin_ensure.txt
index 14698a263e..45115c7567 100644
--- a/test/prism/snapshots/begin_ensure.txt
+++ b/test/prism/snapshots/begin_ensure.txt
@@ -191,6 +191,7 @@
│ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ @ BlockNode (location: (15,40)-(21,3))
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body:
│ │ │ │ │ │ │ │ @ StatementsNode (location: (16,2)-(20,5))
@@ -224,6 +225,7 @@
│ │ │ │ │ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ │ │ │ │ @ BlockNode (location: (18,22)-(19,7))
│ │ │ │ │ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ │ │ │ │ ├── opening_loc: (18,22)-(18,24) = "do"
diff --git a/test/prism/snapshots/blocks.txt b/test/prism/snapshots/blocks.txt
index 6dd117ab4a..d667f39b8f 100644
--- a/test/prism/snapshots/blocks.txt
+++ b/test/prism/snapshots/blocks.txt
@@ -37,6 +37,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,9)-(1,16))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (1,11)-(1,14))
@@ -88,6 +89,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,9)-(5,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (4,0)-(4,3))
@@ -131,6 +133,7 @@
│ ├── block:
│ │ @ BlockNode (location: (7,12)-(7,35))
│ │ ├── locals: [:x, :memo]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (7,14)-(7,23))
│ │ │ ├── parameters:
@@ -176,6 +179,7 @@
│ ├── block:
│ │ @ BlockNode (location: (9,4)-(9,10))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (9,4)-(9,6) = "do"
@@ -215,6 +219,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (11,14)-(11,20))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (11,14)-(11,16) = "do"
@@ -250,6 +255,7 @@
│ ├── block:
│ │ @ BlockNode (location: (13,8)-(13,14))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (13,8)-(13,10) = "do"
@@ -292,6 +298,7 @@
│ ├── block:
│ │ @ BlockNode (location: (15,12)-(15,18))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (15,12)-(15,14) = "do"
@@ -308,6 +315,7 @@
│ ├── block:
│ │ @ BlockNode (location: (17,4)-(18,3))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (17,7)-(17,17))
│ │ │ ├── parameters:
@@ -367,6 +375,7 @@
│ ├── block:
│ │ @ BlockNode (location: (20,4)-(22,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (21,0)-(22,3))
@@ -397,6 +406,7 @@
│ ├── block:
│ │ @ BlockNode (location: (24,4)-(29,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (25,2)-(28,5))
@@ -412,6 +422,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (25,6)-(28,5))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body:
│ │ │ │ │ @ StatementsNode (location: (26,4)-(27,7))
@@ -427,6 +438,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (26,8)-(27,7))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ ├── opening_loc: (26,8)-(26,10) = "do"
@@ -472,6 +484,7 @@
│ ├── block:
│ │ @ BlockNode (location: (31,9)-(31,16))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (31,11)-(31,14))
@@ -500,6 +513,7 @@
│ ├── block:
│ │ @ BlockNode (location: (33,4)-(33,24))
│ │ ├── locals: [:x, :y, :z]
+ │ │ ├── locals_body_index: 3
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (33,6)-(33,20))
│ │ │ ├── parameters:
@@ -546,6 +560,7 @@
│ ├── block:
│ │ @ BlockNode (location: (35,4)-(35,11))
│ │ ├── locals: [:x]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (35,6)-(35,9))
│ │ │ ├── parameters:
@@ -585,6 +600,7 @@
│ ├── block:
│ │ @ BlockNode (location: (38,5)-(39,3))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (38,8)-(38,11))
│ │ │ ├── parameters:
@@ -616,6 +632,7 @@
│ ├── block:
│ │ @ BlockNode (location: (41,5)-(41,12))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (41,7)-(41,10))
│ │ │ ├── parameters:
@@ -647,6 +664,7 @@
│ ├── block:
│ │ @ BlockNode (location: (43,2)-(44,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (43,2)-(43,4) = "do"
@@ -663,6 +681,7 @@
│ ├── block:
│ │ @ BlockNode (location: (46,2)-(46,4))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (46,2)-(46,3) = "{"
@@ -688,6 +707,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (48,11)-(52,1))
│ │ │ │ ├── locals: [:a, :b]
+ │ │ │ │ ├── locals_body_index: 2
│ │ │ │ ├── parameters:
│ │ │ │ │ @ BlockParametersNode (location: (48,13)-(51,3))
│ │ │ │ │ ├── parameters:
@@ -733,6 +753,7 @@
├── block:
│ @ BlockNode (location: (54,4)-(54,17))
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (54,7)-(54,13))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/break.txt b/test/prism/snapshots/break.txt
index 48991bb6eb..f54f6c5202 100644
--- a/test/prism/snapshots/break.txt
+++ b/test/prism/snapshots/break.txt
@@ -138,6 +138,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (23,4)-(23,16))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body:
│ │ │ │ @ StatementsNode (location: (23,6)-(23,14))
@@ -179,6 +180,7 @@
│ ├── block:
│ │ @ BlockNode (location: (25,4)-(25,17))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (25,6)-(25,9))
│ │ │ ├── parameters:
diff --git a/test/prism/snapshots/endless_methods.txt b/test/prism/snapshots/endless_methods.txt
index a8d685ade6..4ca6781a5a 100644
--- a/test/prism/snapshots/endless_methods.txt
+++ b/test/prism/snapshots/endless_methods.txt
@@ -14,6 +14,7 @@
│ │ └── @ IntegerNode (location: (1,10)-(1,11))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -48,6 +49,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -95,6 +97,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (5,0)-(5,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/hashes.txt b/test/prism/snapshots/hashes.txt
index 824def5ca1..49db4e1c25 100644
--- a/test/prism/snapshots/hashes.txt
+++ b/test/prism/snapshots/hashes.txt
@@ -272,6 +272,7 @@
├── block:
│ @ BlockNode (location: (23,4)-(26,3))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (24,2)-(25,20))
diff --git a/test/prism/snapshots/if.txt b/test/prism/snapshots/if.txt
index b48b58d1c0..c368b5c73e 100644
--- a/test/prism/snapshots/if.txt
+++ b/test/prism/snapshots/if.txt
@@ -346,6 +346,7 @@
│ ├── block:
│ │ @ BlockNode (location: (34,9)-(35,5))
│ │ ├── locals: [:_]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (34,12)-(34,15))
│ │ │ ├── parameters:
@@ -387,6 +388,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (37,9)-(38,5))
│ │ │ ├── locals: [:_]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── parameters:
│ │ │ │ @ BlockParametersNode (location: (37,12)-(37,15))
│ │ │ │ ├── parameters:
@@ -424,6 +426,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (40,9)-(41,5))
│ │ │ │ ├── locals: [:_]
+ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ ├── parameters:
│ │ │ │ │ @ BlockParametersNode (location: (40,12)-(40,15))
│ │ │ │ │ ├── parameters:
diff --git a/test/prism/snapshots/indented_file_end.txt b/test/prism/snapshots/indented_file_end.txt
index aa43ec5a1e..91e8aed58a 100644
--- a/test/prism/snapshots/indented_file_end.txt
+++ b/test/prism/snapshots/indented_file_end.txt
@@ -10,6 +10,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,4)-(1,7) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/keyword_method_names.txt b/test/prism/snapshots/keyword_method_names.txt
index 0714fa3d4b..7b2a222fa5 100644
--- a/test/prism/snapshots/keyword_method_names.txt
+++ b/test/prism/snapshots/keyword_method_names.txt
@@ -10,6 +10,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -24,6 +25,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (4,0)-(4,3) = "def"
│ ├── operator_loc: (4,8)-(4,9) = "."
│ ├── lparen_loc: ∅
@@ -58,12 +60,14 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (8,6)-(9,5))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (8,6)-(8,8) = "do"
│ │ │ │ │ └── closing_loc: (9,2)-(9,5) = "end"
│ │ │ │ └── flags: ∅
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── def_keyword_loc: (7,8)-(7,11) = "def"
│ │ │ ├── operator_loc: ∅
│ │ │ ├── lparen_loc: ∅
@@ -94,6 +98,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (12,0)-(12,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (12,5)-(12,6) = "("
@@ -108,6 +113,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (15,0)-(15,3) = "def"
│ ├── operator_loc: (15,16)-(15,17) = "."
│ ├── lparen_loc: ∅
@@ -135,6 +141,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (22,0)-(22,3) = "def"
│ ├── operator_loc: (22,12)-(22,13) = "."
│ ├── lparen_loc: ∅
@@ -149,6 +156,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (25,0)-(25,3) = "def"
│ ├── operator_loc: (25,12)-(25,13) = "."
│ ├── lparen_loc: ∅
@@ -163,6 +171,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (28,0)-(28,3) = "def"
├── operator_loc: (28,7)-(28,9) = "::"
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/lambda.txt b/test/prism/snapshots/lambda.txt
index 8e358b2709..f1bf71a82b 100644
--- a/test/prism/snapshots/lambda.txt
+++ b/test/prism/snapshots/lambda.txt
@@ -5,6 +5,7 @@
└── body: (length: 5)
├── @ LambdaNode (location: (1,0)-(3,4))
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (3,2)-(3,3) = "{"
│ ├── closing_loc: (3,3)-(3,4) = "}"
@@ -27,6 +28,7 @@
│ └── body: ∅
├── @ LambdaNode (location: (5,0)-(5,18))
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (5,0)-(5,2) = "->"
│ ├── opening_loc: (5,15)-(5,16) = "{"
│ ├── closing_loc: (5,17)-(5,18) = "}"
@@ -77,6 +79,7 @@
│ └── body: ∅
├── @ LambdaNode (location: (7,0)-(7,15))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (7,0)-(7,2) = "->"
│ ├── opening_loc: (7,13)-(7,14) = "{"
│ ├── closing_loc: (7,14)-(7,15) = "}"
@@ -126,6 +129,7 @@
│ └── body: ∅
├── @ LambdaNode (location: (9,0)-(9,19))
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (9,0)-(9,2) = "->"
│ ├── opening_loc: (9,13)-(9,15) = "do"
│ ├── closing_loc: (9,16)-(9,19) = "end"
@@ -161,6 +165,7 @@
│ └── body: ∅
└── @ LambdaNode (location: (11,0)-(11,18))
├── locals: [:foo]
+ ├── locals_body_index: 1
├── operator_loc: (11,0)-(11,2) = "->"
├── opening_loc: (11,12)-(11,14) = "do"
├── closing_loc: (11,15)-(11,18) = "end"
diff --git a/test/prism/snapshots/method_calls.txt b/test/prism/snapshots/method_calls.txt
index 57c233fb51..fdd4a0338f 100644
--- a/test/prism/snapshots/method_calls.txt
+++ b/test/prism/snapshots/method_calls.txt
@@ -918,6 +918,7 @@
│ ├── block:
│ │ @ BlockNode (location: (64,16)-(64,36))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (64,19)-(64,25))
│ │ │ ├── parameters:
@@ -1345,6 +1346,7 @@
│ ├── block:
│ │ @ BlockNode (location: (93,7)-(93,10))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (93,7)-(93,8) = "{"
@@ -1371,6 +1373,7 @@
│ ├── block:
│ │ @ BlockNode (location: (95,8)-(95,14))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (95,10)-(95,12))
@@ -1459,6 +1462,7 @@
│ ├── block:
│ │ @ BlockNode (location: (101,14)-(101,17))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (101,14)-(101,15) = "{"
@@ -1531,6 +1535,7 @@
│ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ @ BlockNode (location: (105,20)-(105,26))
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ ├── opening_loc: (105,20)-(105,22) = "do"
@@ -1578,6 +1583,7 @@
│ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ @ BlockNode (location: (107,16)-(107,22))
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ ├── opening_loc: (107,16)-(107,18) = "do"
@@ -1628,6 +1634,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (109,15)-(109,27))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body:
│ │ │ │ │ │ │ @ StatementsNode (location: (109,18)-(109,23))
@@ -1648,6 +1655,7 @@
│ ├── block:
│ │ @ BlockNode (location: (109,30)-(109,36))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (109,30)-(109,32) = "do"
@@ -1684,6 +1692,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (111,18)-(111,24))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (111,18)-(111,20) = "do"
@@ -1724,6 +1733,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (113,19)-(113,25))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (113,19)-(113,21) = "do"
@@ -1757,6 +1767,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (115,9)-(115,15))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (115,9)-(115,11) = "do"
@@ -1796,6 +1807,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (117,16)-(117,24))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (117,19)-(117,20))
@@ -1855,6 +1867,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (121,8)-(123,7))
│ │ │ │ │ ├── locals: [:a]
+ │ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ │ ├── parameters:
│ │ │ │ │ │ @ BlockParametersNode (location: (121,11)-(121,14))
│ │ │ │ │ │ ├── parameters:
@@ -1928,6 +1941,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (128,8)-(130,7))
│ │ │ │ │ │ ├── locals: [:a]
+ │ │ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ │ │ ├── parameters:
│ │ │ │ │ │ │ @ BlockParametersNode (location: (128,11)-(128,14))
│ │ │ │ │ │ │ ├── parameters:
@@ -1982,6 +1996,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (133,8)-(134,7))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (133,8)-(133,10) = "do"
@@ -2016,6 +2031,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (137,7)-(137,9))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (137,7)-(137,8) = "{"
@@ -2049,6 +2065,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (139,7)-(139,16))
│ │ │ │ ├── locals: [:a]
+ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ ├── parameters:
│ │ │ │ │ @ BlockParametersNode (location: (139,9)-(139,12))
│ │ │ │ │ ├── parameters:
@@ -2091,6 +2108,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (141,2)-(141,4))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (141,2)-(141,3) = "{"
@@ -2114,6 +2132,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (141,9)-(141,11))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (141,9)-(141,10) = "{"
@@ -2153,6 +2172,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (143,9)-(143,11))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (143,9)-(143,10) = "{"
@@ -2260,6 +2280,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:*]
+ ├── locals_body_index: 1
├── def_keyword_loc: (149,0)-(149,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (149,5)-(149,6) = "("
diff --git a/test/prism/snapshots/methods.txt b/test/prism/snapshots/methods.txt
index b185e1ef42..8076c0f305 100644
--- a/test/prism/snapshots/methods.txt
+++ b/test/prism/snapshots/methods.txt
@@ -28,6 +28,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar, :baz]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -76,6 +77,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar, :baz, :optional, :bin, :bag]
+ │ ├── locals_body_index: 5
│ ├── def_keyword_loc: (4,0)-(4,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (4,7)-(4,8) = "("
@@ -100,6 +102,7 @@
│ │ │ └── end_keyword_loc: (8,15)-(8,18) = "end"
│ │ └── end_keyword_loc: (8,15)-(8,18) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (8,0)-(8,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -127,6 +130,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (10,0)-(10,3) = "def"
│ ├── operator_loc: (10,7)-(10,8) = "."
│ ├── lparen_loc: ∅
@@ -154,6 +158,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (13,0)-(13,3) = "def"
│ ├── operator_loc: (13,7)-(13,9) = "::"
│ ├── lparen_loc: ∅
@@ -168,6 +173,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (16,0)-(16,3) = "def"
│ ├── operator_loc: (16,9)-(16,10) = "."
│ ├── lparen_loc: ∅
@@ -190,6 +196,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (19,0)-(19,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (19,5)-(19,6) = "("
@@ -205,6 +212,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (22,0)-(22,3) = "def"
│ ├── operator_loc: (22,8)-(22,9) = "."
│ ├── lparen_loc: ∅
@@ -228,6 +236,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (25,0)-(25,3) = "def"
│ ├── operator_loc: (25,5)-(25,6) = "."
│ ├── lparen_loc: ∅
@@ -243,6 +252,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (28,0)-(28,3) = "def"
│ ├── operator_loc: (28,8)-(28,9) = "."
│ ├── lparen_loc: ∅
@@ -267,6 +277,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (31,0)-(31,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -297,6 +308,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (35,0)-(35,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (35,5)-(35,6) = "("
@@ -322,6 +334,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (38,0)-(38,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (38,5)-(38,6) = "("
@@ -347,6 +360,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:**]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (41,0)-(41,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (41,5)-(41,6) = "("
@@ -368,6 +382,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (44,7)-(44,10) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -395,6 +410,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b, :c, :d]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (47,0)-(47,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -409,6 +425,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (50,0)-(50,3) = "def"
│ ├── operator_loc: (50,7)-(50,8) = "."
│ ├── lparen_loc: ∅
@@ -439,6 +456,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (53,0)-(53,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -469,6 +487,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (56,0)-(56,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (56,5)-(56,6) = "("
@@ -499,6 +518,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (59,0)-(59,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (59,5)-(59,6) = "("
@@ -540,6 +560,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (65,0)-(65,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -553,6 +574,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (68,0)-(68,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (68,5)-(68,6) = "("
@@ -583,6 +605,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (71,0)-(71,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -606,6 +629,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (74,0)-(74,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -641,6 +665,7 @@
│ │ │ └── end_keyword_loc: (77,29)-(77,32) = "end"
│ │ └── end_keyword_loc: (77,29)-(77,32) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (77,0)-(77,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -666,6 +691,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (79,0)-(79,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -691,6 +717,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (82,0)-(82,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (82,5)-(82,6) = "("
@@ -714,6 +741,7 @@
│ │ │ └── flags: decimal
│ │ └── operator_loc: (86,2)-(86,3) = "="
│ ├── locals: [:b]
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (85,0)-(85,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -728,6 +756,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (89,0)-(89,3) = "def"
│ ├── operator_loc: (89,8)-(89,9) = "."
│ ├── lparen_loc: ∅
@@ -742,6 +771,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (92,0)-(92,3) = "def"
│ ├── operator_loc: (92,8)-(92,9) = "."
│ ├── lparen_loc: ∅
@@ -755,6 +785,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (95,0)-(95,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -796,6 +827,7 @@
│ │ ├── closing_loc: ∅
│ │ └── unescaped: "bye"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (98,0)-(98,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -813,6 +845,7 @@
│ │ └── @ IntegerNode (location: (103,10)-(103,11))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (103,0)-(103,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -830,6 +863,7 @@
│ │ └── @ IntegerNode (location: (104,10)-(104,11))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (104,0)-(104,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -857,6 +891,7 @@
│ │ └── @ IntegerNode (location: (106,15)-(106,18))
│ │ └── flags: decimal
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (106,0)-(106,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (106,7)-(106,8) = "("
@@ -874,6 +909,7 @@
│ │ └── @ IntegerNode (location: (108,10)-(108,13))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (108,0)-(108,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -917,6 +953,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (110,0)-(110,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (110,5)-(110,6) = "("
@@ -955,6 +992,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (112,0)-(112,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (112,5)-(112,6) = "("
@@ -997,6 +1035,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (114,0)-(114,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (114,5)-(114,6) = "("
@@ -1030,6 +1069,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (116,0)-(116,3) = "def"
│ ├── operator_loc: (116,11)-(116,12) = "."
│ ├── lparen_loc: ∅
@@ -1055,6 +1095,7 @@
│ │ └── operator_loc: (119,6)-(119,7) = "&"
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (119,0)-(119,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1080,6 +1121,7 @@
│ │ └── operator_loc: (122,6)-(122,7) = "&"
│ ├── body: ∅
│ ├── locals: [:&]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (122,0)-(122,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (122,5)-(122,6) = "("
@@ -1095,6 +1137,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (125,0)-(125,3) = "def"
│ ├── operator_loc: (125,9)-(125,10) = "."
│ ├── lparen_loc: ∅
@@ -1128,6 +1171,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (128,0)-(128,3) = "def"
│ ├── operator_loc: (128,11)-(128,12) = "."
│ ├── lparen_loc: ∅
@@ -1142,6 +1186,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (131,0)-(131,3) = "def"
│ ├── operator_loc: (131,8)-(131,9) = "."
│ ├── lparen_loc: ∅
@@ -1164,6 +1209,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (133,11)-(133,14) = "def"
│ ├── operator_loc: (133,20)-(133,21) = "."
│ ├── lparen_loc: ∅
@@ -1218,6 +1264,7 @@
│ │ │ └── closing_loc: (136,24)-(136,25) = "}"
│ │ └── closing_loc: (136,25)-(136,26) = "\""
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (136,0)-(136,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (136,5)-(136,6) = "("
@@ -1291,6 +1338,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (138,0)-(138,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1331,6 +1379,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (142,0)-(142,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (142,7)-(142,8) = "("
@@ -1369,6 +1418,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (145,0)-(145,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (145,7)-(145,8) = "("
@@ -1407,6 +1457,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (148,0)-(148,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (148,7)-(148,8) = "("
@@ -1448,6 +1499,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (151,0)-(151,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (151,7)-(151,8) = "("
@@ -1487,6 +1539,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (154,0)-(154,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (154,7)-(154,8) = "("
@@ -1526,6 +1579,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (157,0)-(157,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (157,7)-(157,8) = "("
@@ -1580,6 +1634,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (161,12)-(161,14))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (161,12)-(161,13) = "{"
@@ -1590,6 +1645,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (160,0)-(160,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (160,10)-(160,11) = "("
@@ -1619,6 +1675,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:_a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (164,0)-(164,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (164,7)-(164,8) = "("
@@ -1643,6 +1700,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (168,0)-(168,3) = "def"
│ ├── operator_loc: (168,7)-(168,8) = "."
│ ├── lparen_loc: ∅
@@ -1678,6 +1736,7 @@
│ │ ├── closing_loc: (170,12)-(170,13) = "]"
│ │ └── flags: contains_splat
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (170,0)-(170,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (170,5)-(170,6) = "("
@@ -1723,6 +1782,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (172,0)-(172,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1768,6 +1828,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (174,0)-(174,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1813,6 +1874,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (176,0)-(176,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1844,6 +1906,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (178,0)-(178,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1881,6 +1944,7 @@
│ │ │ └── operator_loc: (181,6)-(181,7) = "&"
│ │ └── flags: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (180,0)-(180,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (180,7)-(180,8) = "("
@@ -1926,6 +1990,7 @@
│ │ │ │ │ │ ├── name: :bar
│ │ │ │ │ │ └── depth: 0
│ │ │ │ │ ├── locals: [:bar]
+ │ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ │ ├── def_keyword_loc: (184,15)-(184,18) = "def"
│ │ │ │ │ ├── operator_loc: ∅
│ │ │ │ │ ├── lparen_loc: (184,22)-(184,23) = "("
@@ -1947,6 +2012,7 @@
│ │ └── @ IntegerNode (location: (184,41)-(184,42))
│ │ └── flags: decimal
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (184,0)-(184,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (184,7)-(184,8) = "("
@@ -1994,6 +2060,7 @@
│ └── @ IntegerNode (location: (186,36)-(186,37))
│ └── flags: decimal
├── locals: [:bar]
+ ├── locals_body_index: 1
├── def_keyword_loc: (186,0)-(186,3) = "def"
├── operator_loc: (186,20)-(186,21) = "."
├── lparen_loc: (186,24)-(186,25) = "("
diff --git a/test/prism/snapshots/non_alphanumeric_methods.txt b/test/prism/snapshots/non_alphanumeric_methods.txt
index b846dc9b7c..408d909c8a 100644
--- a/test/prism/snapshots/non_alphanumeric_methods.txt
+++ b/test/prism/snapshots/non_alphanumeric_methods.txt
@@ -10,6 +10,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -23,6 +24,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (4,0)-(4,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -36,6 +38,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -49,6 +52,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (10,0)-(10,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -63,6 +67,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (13,0)-(13,3) = "def"
│ ├── operator_loc: (13,8)-(13,9) = "."
│ ├── lparen_loc: ∅
@@ -76,6 +81,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (16,0)-(16,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -89,6 +95,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (19,0)-(19,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -102,6 +109,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (22,0)-(22,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -133,6 +141,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (27,0)-(27,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -146,6 +155,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (30,0)-(30,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (30,5)-(30,6) = "("
@@ -169,6 +179,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (33,0)-(33,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -183,6 +194,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (36,0)-(36,3) = "def"
│ ├── operator_loc: (36,8)-(36,9) = "."
│ ├── lparen_loc: ∅
@@ -196,6 +208,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (39,0)-(39,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -209,6 +222,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (42,0)-(42,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -222,6 +236,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (45,0)-(45,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -245,6 +260,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (48,0)-(48,3) = "def"
│ ├── operator_loc: (48,5)-(48,6) = "."
│ ├── lparen_loc: ∅
@@ -258,6 +274,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (50,0)-(50,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -271,6 +288,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (53,0)-(53,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -284,6 +302,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (56,0)-(56,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -297,6 +316,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (59,0)-(59,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -310,6 +330,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (62,0)-(62,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -323,6 +344,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (65,0)-(65,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -336,6 +358,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (68,0)-(68,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -349,6 +372,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (71,0)-(71,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -362,6 +386,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (74,0)-(74,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -375,6 +400,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (77,0)-(77,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -388,6 +414,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (80,0)-(80,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -401,6 +428,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (83,0)-(83,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -414,6 +442,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (86,0)-(86,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -427,6 +456,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (89,0)-(89,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -440,6 +470,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (92,0)-(92,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -453,6 +484,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (95,0)-(95,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -467,6 +499,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (98,0)-(98,3) = "def"
│ ├── operator_loc: (98,8)-(98,9) = "."
│ ├── lparen_loc: ∅
@@ -480,6 +513,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (101,0)-(101,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -493,6 +527,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (104,0)-(104,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/patterns.txt b/test/prism/snapshots/patterns.txt
index 44e15fb644..ee18448206 100644
--- a/test/prism/snapshots/patterns.txt
+++ b/test/prism/snapshots/patterns.txt
@@ -481,6 +481,7 @@
│ ├── pattern:
│ │ @ LambdaNode (location: (26,7)-(26,17))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (26,7)-(26,9) = "->"
│ │ ├── opening_loc: (26,10)-(26,11) = "{"
│ │ ├── closing_loc: (26,16)-(26,17) = "}"
@@ -1185,6 +1186,7 @@
│ │ ├── left:
│ │ │ @ LambdaNode (location: (52,7)-(52,17))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (52,7)-(52,9) = "->"
│ │ │ ├── opening_loc: (52,10)-(52,11) = "{"
│ │ │ ├── closing_loc: (52,16)-(52,17) = "}"
@@ -1198,6 +1200,7 @@
│ │ ├── right:
│ │ │ @ LambdaNode (location: (52,21)-(52,31))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (52,21)-(52,23) = "->"
│ │ │ ├── opening_loc: (52,24)-(52,25) = "{"
│ │ │ ├── closing_loc: (52,30)-(52,31) = "}"
@@ -2783,6 +2786,7 @@
│ ├── pattern:
│ │ @ LambdaNode (location: (125,7)-(125,17))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (125,7)-(125,9) = "->"
│ │ ├── opening_loc: (125,10)-(125,11) = "{"
│ │ ├── closing_loc: (125,16)-(125,17) = "}"
@@ -3449,6 +3453,7 @@
│ │ ├── pattern:
│ │ │ @ LambdaNode (location: (152,13)-(152,23))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (152,13)-(152,15) = "->"
│ │ │ ├── opening_loc: (152,16)-(152,17) = "{"
│ │ │ ├── closing_loc: (152,22)-(152,23) = "}"
@@ -4430,6 +4435,7 @@
│ │ │ │ └── body: (length: 1)
│ │ │ │ └── @ LambdaNode (location: (179,13)-(179,23))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── operator_loc: (179,13)-(179,15) = "->"
│ │ │ │ ├── opening_loc: (179,16)-(179,17) = "{"
│ │ │ │ ├── closing_loc: (179,22)-(179,23) = "}"
@@ -4636,6 +4642,7 @@
├── block:
│ @ BlockNode (location: (198,4)-(200,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (199,2)-(199,29))
diff --git a/test/prism/snapshots/procs.txt b/test/prism/snapshots/procs.txt
index 25783cfb34..66b5cf3b1f 100644
--- a/test/prism/snapshots/procs.txt
+++ b/test/prism/snapshots/procs.txt
@@ -5,6 +5,7 @@
└── body: (length: 10)
├── @ LambdaNode (location: (1,0)-(1,21))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,16)-(1,17) = "{"
│ ├── closing_loc: (1,20)-(1,21) = "}"
@@ -38,6 +39,7 @@
│ └── depth: 0
├── @ LambdaNode (location: (3,0)-(5,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (3,0)-(3,2) = "->"
│ ├── opening_loc: (3,3)-(3,5) = "do"
│ ├── closing_loc: (5,0)-(5,3) = "end"
@@ -56,6 +58,7 @@
│ └── end_keyword_loc: (5,0)-(5,3) = "end"
├── @ LambdaNode (location: (7,0)-(11,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (7,0)-(7,2) = "->"
│ ├── opening_loc: (7,3)-(7,5) = "do"
│ ├── closing_loc: (11,0)-(11,3) = "end"
@@ -85,6 +88,7 @@
│ └── end_keyword_loc: (11,0)-(11,3) = "end"
├── @ LambdaNode (location: (13,0)-(13,10))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (13,0)-(13,2) = "->"
│ ├── opening_loc: (13,3)-(13,4) = "{"
│ ├── closing_loc: (13,9)-(13,10) = "}"
@@ -104,6 +108,7 @@
│ └── flags: variable_call
├── @ LambdaNode (location: (15,0)-(15,15))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (15,0)-(15,2) = "->"
│ ├── opening_loc: (15,3)-(15,5) = "do"
│ ├── closing_loc: (15,12)-(15,15) = "end"
@@ -123,6 +128,7 @@
│ └── flags: variable_call
├── @ LambdaNode (location: (17,0)-(17,29))
│ ├── locals: [:a, :b, :c, :d, :e]
+ │ ├── locals_body_index: 5
│ ├── operator_loc: (17,0)-(17,2) = "->"
│ ├── opening_loc: (17,24)-(17,25) = "{"
│ ├── closing_loc: (17,28)-(17,29) = "}"
@@ -167,6 +173,7 @@
│ └── depth: 0
├── @ LambdaNode (location: (19,0)-(19,40))
│ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
+ │ ├── locals_body_index: 7
│ ├── operator_loc: (19,0)-(19,2) = "->"
│ ├── opening_loc: (19,35)-(19,36) = "{"
│ ├── closing_loc: (19,39)-(19,40) = "}"
@@ -219,6 +226,7 @@
│ └── depth: 0
├── @ LambdaNode (location: (21,0)-(23,3))
│ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
+ │ ├── locals_body_index: 7
│ ├── operator_loc: (21,0)-(21,2) = "->"
│ ├── opening_loc: (21,35)-(21,37) = "do"
│ ├── closing_loc: (23,0)-(23,3) = "end"
@@ -271,6 +279,7 @@
│ └── depth: 0
├── @ LambdaNode (location: (25,0)-(25,25))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (25,0)-(25,2) = "->"
│ ├── opening_loc: (25,7)-(25,8) = "{"
│ ├── closing_loc: (25,24)-(25,25) = "}"
@@ -295,6 +304,7 @@
│ └── body: (length: 1)
│ └── @ LambdaNode (location: (25,9)-(25,23))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (25,9)-(25,11) = "->"
│ ├── opening_loc: (25,14)-(25,15) = "{"
│ ├── closing_loc: (25,22)-(25,23) = "}"
@@ -338,6 +348,7 @@
│ └── flags: ∅
└── @ LambdaNode (location: (27,0)-(27,19))
├── locals: [:a, :b, :c]
+ ├── locals_body_index: 3
├── operator_loc: (27,0)-(27,2) = "->"
├── opening_loc: (27,16)-(27,17) = "{"
├── closing_loc: (27,18)-(27,19) = "}"
diff --git a/test/prism/snapshots/regex.txt b/test/prism/snapshots/regex.txt
index 3b6ed09c53..e25e4dd262 100644
--- a/test/prism/snapshots/regex.txt
+++ b/test/prism/snapshots/regex.txt
@@ -326,6 +326,7 @@
├── block:
│ @ BlockNode (location: (40,4)-(40,24))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (40,6)-(40,22))
diff --git a/test/prism/snapshots/rescue.txt b/test/prism/snapshots/rescue.txt
index 4537d911cf..5a79cd7aa4 100644
--- a/test/prism/snapshots/rescue.txt
+++ b/test/prism/snapshots/rescue.txt
@@ -162,6 +162,7 @@
│ ├── block:
│ │ @ BlockNode (location: (18,4)-(20,3))
│ │ ├── locals: [:x]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (18,7)-(18,10))
│ │ │ ├── parameters:
@@ -312,6 +313,7 @@
│ │ └── rescue_expression:
│ │ @ NilNode (location: (26,41)-(26,44))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (26,0)-(26,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -377,6 +379,7 @@
│ ├── ensure_clause: ∅
│ └── end_keyword_loc: (31,0)-(31,3) = "end"
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (28,0)-(28,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
index aa8ee4dfcd..56e892bc89 100644
--- a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
+++ b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
@@ -160,6 +160,7 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: ∅
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── def_keyword_loc: (52,2)-(52,5) = "def"
│ │ ├── operator_loc: (52,10)-(52,11) = "."
│ │ ├── lparen_loc: (52,12)-(52,13) = "("
@@ -252,6 +253,7 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: ∅
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── def_keyword_loc: (67,2)-(67,5) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: (67,7)-(67,8) = "("
diff --git a/test/prism/snapshots/seattlerb/args_kw_block.txt b/test/prism/snapshots/seattlerb/args_kw_block.txt
index 8d4bc2be38..538a2691d6 100644
--- a/test/prism/snapshots/seattlerb/args_kw_block.txt
+++ b/test/prism/snapshots/seattlerb/args_kw_block.txt
@@ -28,6 +28,7 @@
│ └── operator_loc: (1,12)-(1,13) = "&"
├── body: ∅
├── locals: [:a, :b]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/block_arg__bare.txt b/test/prism/snapshots/seattlerb/block_arg__bare.txt
index ae83960e6a..81d5727812 100644
--- a/test/prism/snapshots/seattlerb/block_arg__bare.txt
+++ b/test/prism/snapshots/seattlerb/block_arg__bare.txt
@@ -22,6 +22,7 @@
│ └── operator_loc: (1,6)-(1,7) = "&"
├── body: ∅
├── locals: [:&]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
index 054e43754a..1837a569c8 100644
--- a/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,11))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,9))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
index 2731158862..575790b9b6 100644
--- a/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,21))
│ ├── locals: [:b, :c, :d, :e]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,19))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
index 94b9fa4f01..6167754363 100644
--- a/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,20))
│ ├── locals: [:b, :c, :d]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,18))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
index 5e362a1019..33b7b53197 100644
--- a/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,25))
│ ├── locals: [:b, :c, :d, :e, :f]
+ │ ├── locals_body_index: 5
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,23))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_arg_optional.txt b/test/prism/snapshots/seattlerb/block_arg_optional.txt
index f95c7aebaa..90fad77d2e 100644
--- a/test/prism/snapshots/seattlerb/block_arg_optional.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_optional.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,13))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_arg_scope.txt b/test/prism/snapshots/seattlerb/block_arg_scope.txt
index 1c060378ca..1e356ea375 100644
--- a/test/prism/snapshots/seattlerb/block_arg_scope.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_scope.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,12))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,10))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_arg_scope2.txt b/test/prism/snapshots/seattlerb/block_arg_scope2.txt
index 9d8da491ec..6afa7586de 100644
--- a/test/prism/snapshots/seattlerb/block_arg_scope2.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_scope2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,14))
│ ├── locals: [:b, :c, :d]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,3)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt
index aad8a88607..d51953269b 100644
--- a/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt
+++ b/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,16))
│ ├── locals: [:b, :c, :d]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,14))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_args_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_kwargs.txt
index 484c64bc36..dc2ce516e0 100644
--- a/test/prism/snapshots/seattlerb/block_args_kwargs.txt
+++ b/test/prism/snapshots/seattlerb/block_args_kwargs.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,23))
│ ├── locals: [:kwargs]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,14))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt
index bec50cfb2a..6ad45cf5e6 100644
--- a/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt
+++ b/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,13))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_args_opt1.txt b/test/prism/snapshots/seattlerb/block_args_opt1.txt
index c2cfae78c8..0318342b83 100644
--- a/test/prism/snapshots/seattlerb/block_args_opt1.txt
+++ b/test/prism/snapshots/seattlerb/block_args_opt1.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,24))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_args_opt2.txt b/test/prism/snapshots/seattlerb/block_args_opt2.txt
index 1ec66cb9fa..a207cf244d 100644
--- a/test/prism/snapshots/seattlerb/block_args_opt2.txt
+++ b/test/prism/snapshots/seattlerb/block_args_opt2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,18))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,16))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_args_opt2_2.txt b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
index e6722c5e65..a79041020d 100644
--- a/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
+++ b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,35))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,23))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_args_opt3.txt b/test/prism/snapshots/seattlerb/block_args_opt3.txt
index 0cdfa0bf8e..0c1f87b36a 100644
--- a/test/prism/snapshots/seattlerb/block_args_opt3.txt
+++ b/test/prism/snapshots/seattlerb/block_args_opt3.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,42))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,27))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_break.txt b/test/prism/snapshots/seattlerb/block_break.txt
index 9187ab3524..557ac8a744 100644
--- a/test/prism/snapshots/seattlerb/block_break.txt
+++ b/test/prism/snapshots/seattlerb/block_break.txt
@@ -31,6 +31,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,14)-(1,26))
│ │ │ ├── locals: [:bar]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── parameters:
│ │ │ │ @ BlockParametersNode (location: (1,17)-(1,22))
│ │ │ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt b/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt
index 9a6ac52537..e9e37fc104 100644
--- a/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt
+++ b/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt
@@ -41,6 +41,7 @@
│ │ │ │ ├── block: ∅
│ │ │ │ └── flags: variable_call
│ │ │ ├── locals: [:c]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
│ │ │ ├── operator_loc: ∅
│ │ │ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -72,6 +73,7 @@
├── block:
│ @ BlockNode (location: (4,5)-(4,11))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (4,5)-(4,7) = "do"
diff --git a/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt b/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt
index 981b56eed5..434c01c6bd 100644
--- a/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt
+++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt
@@ -39,6 +39,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,8)-(1,16))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (1,11)-(1,12))
@@ -65,6 +66,7 @@
├── block:
│ @ BlockNode (location: (1,19)-(1,31))
│ ├── locals: [:f]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,22)-(1,25))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt b/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
index 92a264fff3..c79d1cc775 100644
--- a/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
+++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
@@ -39,6 +39,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,8)-(1,16))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (1,11)-(1,12))
@@ -78,6 +79,7 @@
├── block:
│ @ BlockNode (location: (1,21)-(1,33))
│ ├── locals: [:g]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,24)-(1,27))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_call_operation_colon.txt b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
index 35029c74c3..61ea4563e8 100644
--- a/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
+++ b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
@@ -39,6 +39,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,6)-(1,12))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,6)-(1,8) = "do"
diff --git a/test/prism/snapshots/seattlerb/block_call_operation_dot.txt b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
index 85ad62fca7..053c2bfae2 100644
--- a/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
+++ b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
@@ -39,6 +39,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,6)-(1,12))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,6)-(1,8) = "do"
diff --git a/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt b/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt
index 08adde5fd8..8067e7ef96 100644
--- a/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt
+++ b/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt
@@ -53,6 +53,7 @@
├── block:
│ @ BlockNode (location: (2,4)-(2,10))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (2,4)-(2,6) = "do"
diff --git a/test/prism/snapshots/seattlerb/block_command_operation_colon.txt b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
index 5537ba25a7..00982fc3c6 100644
--- a/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
+++ b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
@@ -24,6 +24,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,5)-(1,11))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,5)-(1,7) = "do"
diff --git a/test/prism/snapshots/seattlerb/block_command_operation_dot.txt b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
index 13589d2262..c0fc8e9c2b 100644
--- a/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
+++ b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
@@ -24,6 +24,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,5)-(1,11))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,5)-(1,7) = "do"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
index f50df15dc7..8c903f2b93 100644
--- a/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
+++ b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,14))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
index 74a3902c1a..cb182552e6 100644
--- a/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
+++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,14))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
index caeda850b0..f3a6ce858d 100644
--- a/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
+++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,18))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,16))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_decomp_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_splat.txt
index 4335b5f4ac..49e31bdd13 100644
--- a/test/prism/snapshots/seattlerb/block_decomp_splat.txt
+++ b/test/prism/snapshots/seattlerb/block_decomp_splat.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,12))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,10))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_kw.txt b/test/prism/snapshots/seattlerb/block_kw.txt
index 1ace3d9389..5b2598035f 100644
--- a/test/prism/snapshots/seattlerb/block_kw.txt
+++ b/test/prism/snapshots/seattlerb/block_kw.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,5)-(1,15))
│ ├── locals: [:k]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,7)-(1,13))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_kw__required.txt b/test/prism/snapshots/seattlerb/block_kw__required.txt
index f1b40925fe..aef63cce1e 100644
--- a/test/prism/snapshots/seattlerb/block_kw__required.txt
+++ b/test/prism/snapshots/seattlerb/block_kw__required.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,5)-(1,16))
│ ├── locals: [:k]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,8)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt
index ce495a7a7e..f7e4743588 100644
--- a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt
+++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,3)-(1,20))
│ ├── locals: [:kw]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,5)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
index 3bf3b252f1..17a7e4bdca 100644
--- a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
+++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,3)-(1,33))
│ ├── locals: [:kw, :kw2]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,5)-(1,28))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_next.txt b/test/prism/snapshots/seattlerb/block_next.txt
index 4fde9c7300..ff5cc42dcd 100644
--- a/test/prism/snapshots/seattlerb/block_next.txt
+++ b/test/prism/snapshots/seattlerb/block_next.txt
@@ -31,6 +31,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,13)-(1,25))
│ │ │ ├── locals: [:bar]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── parameters:
│ │ │ │ @ BlockParametersNode (location: (1,16)-(1,21))
│ │ │ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_opt_arg.txt b/test/prism/snapshots/seattlerb/block_opt_arg.txt
index 4e3863c1d0..340047a301 100644
--- a/test/prism/snapshots/seattlerb/block_opt_arg.txt
+++ b/test/prism/snapshots/seattlerb/block_opt_arg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,14))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_opt_splat.txt b/test/prism/snapshots/seattlerb/block_opt_splat.txt
index 54009f2e0f..23aad10246 100644
--- a/test/prism/snapshots/seattlerb/block_opt_splat.txt
+++ b/test/prism/snapshots/seattlerb/block_opt_splat.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt
index a1cccaf42a..3994cef507 100644
--- a/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt
+++ b/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,22))
│ ├── locals: [:b, :c, :d, :e]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,20))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_optarg.txt b/test/prism/snapshots/seattlerb/block_optarg.txt
index 6a22978ec9..998be35976 100644
--- a/test/prism/snapshots/seattlerb/block_optarg.txt
+++ b/test/prism/snapshots/seattlerb/block_optarg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,14))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_paren_splat.txt b/test/prism/snapshots/seattlerb/block_paren_splat.txt
index 04987521fe..f6b32c8f94 100644
--- a/test/prism/snapshots/seattlerb/block_paren_splat.txt
+++ b/test/prism/snapshots/seattlerb/block_paren_splat.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,15))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,13))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_reg_optarg.txt b/test/prism/snapshots/seattlerb/block_reg_optarg.txt
index e9ad2f1a6a..8e01cd401c 100644
--- a/test/prism/snapshots/seattlerb/block_reg_optarg.txt
+++ b/test/prism/snapshots/seattlerb/block_reg_optarg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_return.txt b/test/prism/snapshots/seattlerb/block_return.txt
index 858e1a9de4..f361704d01 100644
--- a/test/prism/snapshots/seattlerb/block_return.txt
+++ b/test/prism/snapshots/seattlerb/block_return.txt
@@ -32,6 +32,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,15)-(1,27))
│ │ ├── locals: [:bar]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (1,18)-(1,23))
│ │ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/block_scope.txt b/test/prism/snapshots/seattlerb/block_scope.txt
index 3a2e23d27f..409c544f39 100644
--- a/test/prism/snapshots/seattlerb/block_scope.txt
+++ b/test/prism/snapshots/seattlerb/block_scope.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,10))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,8))
│ │ ├── parameters: ∅
diff --git a/test/prism/snapshots/seattlerb/block_splat_reg.txt b/test/prism/snapshots/seattlerb/block_splat_reg.txt
index 5f7d263def..93b5dd5ea6 100644
--- a/test/prism/snapshots/seattlerb/block_splat_reg.txt
+++ b/test/prism/snapshots/seattlerb/block_splat_reg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,13))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/bug169.txt b/test/prism/snapshots/seattlerb/bug169.txt
index 901778c873..22ef18c5c1 100644
--- a/test/prism/snapshots/seattlerb/bug169.txt
+++ b/test/prism/snapshots/seattlerb/bug169.txt
@@ -21,6 +21,7 @@
├── block:
│ @ BlockNode (location: (1,5)-(1,7))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,5)-(1,6) = "{"
diff --git a/test/prism/snapshots/seattlerb/bug236.txt b/test/prism/snapshots/seattlerb/bug236.txt
index c9009c0bf0..4aceae0e77 100644
--- a/test/prism/snapshots/seattlerb/bug236.txt
+++ b/test/prism/snapshots/seattlerb/bug236.txt
@@ -14,6 +14,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,1)-(1,7))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (1,2)-(1,6))
│ │ │ ├── parameters:
@@ -46,6 +47,7 @@
├── block:
│ @ BlockNode (location: (3,1)-(3,6))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (3,2)-(3,5))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/bug_187.txt b/test/prism/snapshots/seattlerb/bug_187.txt
index 83c443c7c2..99feff8208 100644
--- a/test/prism/snapshots/seattlerb/bug_187.txt
+++ b/test/prism/snapshots/seattlerb/bug_187.txt
@@ -41,12 +41,14 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (2,4)-(2,10))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (2,4)-(2,6) = "do"
│ │ │ │ └── closing_loc: (2,7)-(2,10) = "end"
│ │ │ └── flags: ∅
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (1,8)-(1,11) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_249.txt b/test/prism/snapshots/seattlerb/bug_249.txt
index 720c4d16f2..8bf56e31c4 100644
--- a/test/prism/snapshots/seattlerb/bug_249.txt
+++ b/test/prism/snapshots/seattlerb/bug_249.txt
@@ -31,6 +31,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (1,17)-(4,4))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body:
│ │ │ │ │ │ │ @ StatementsNode (location: (2,0)-(3,3))
@@ -42,6 +43,7 @@
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── def_keyword_loc: (2,0)-(2,3) = "def"
│ │ │ │ │ │ │ ├── operator_loc: ∅
│ │ │ │ │ │ │ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/bug_args__19.txt b/test/prism/snapshots/seattlerb/bug_args__19.txt
index f4cf106679..7b102791c3 100644
--- a/test/prism/snapshots/seattlerb/bug_args__19.txt
+++ b/test/prism/snapshots/seattlerb/bug_args__19.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,16))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn.txt b/test/prism/snapshots/seattlerb/bug_args_masgn.txt
index ba00a0c0e2..7ebbef045c 100644
--- a/test/prism/snapshots/seattlerb/bug_args_masgn.txt
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn2.txt b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
index f417b7e040..349f3694df 100644
--- a/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,22))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,20))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt b/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt
index 8554ec03d0..4f88bea49b 100644
--- a/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,19))
│ ├── locals: [:k, :v, :i]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,17))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
index ba9ed0d49f..4258931735 100644
--- a/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
+++ b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
@@ -35,6 +35,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,6)-(1,9) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -73,6 +74,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (6,6)-(6,9) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (6,11)-(6,12) = "("
diff --git a/test/prism/snapshots/seattlerb/bug_masgn_right.txt b/test/prism/snapshots/seattlerb/bug_masgn_right.txt
index fba08a0260..5996d1996a 100644
--- a/test/prism/snapshots/seattlerb/bug_masgn_right.txt
+++ b/test/prism/snapshots/seattlerb/bug_masgn_right.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/call_array_block_call.txt b/test/prism/snapshots/seattlerb/call_array_block_call.txt
index b5705817ac..65daaf7287 100644
--- a/test/prism/snapshots/seattlerb/call_array_block_call.txt
+++ b/test/prism/snapshots/seattlerb/call_array_block_call.txt
@@ -26,6 +26,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (1,11)-(1,17))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (1,11)-(1,13) = "do"
diff --git a/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
index 92f98926f6..291cdc87ea 100644
--- a/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
+++ b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
@@ -16,6 +16,7 @@
│ │ ├── elements: (length: 1)
│ │ │ └── @ LambdaNode (location: (1,3)-(1,10))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (1,3)-(1,5) = "->"
│ │ │ ├── opening_loc: (1,8)-(1,9) = "{"
│ │ │ ├── closing_loc: (1,9)-(1,10) = "}"
@@ -34,6 +35,7 @@
├── block:
│ @ BlockNode (location: (1,12)-(2,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,12)-(1,14) = "do"
diff --git a/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
index ac3bccb3f6..2ac8fe131d 100644
--- a/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
+++ b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
@@ -38,6 +38,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (2,4)-(2,10))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (2,4)-(2,6) = "do"
diff --git a/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt b/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt
index 9d94a45e5d..9c088aef64 100644
--- a/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt
+++ b/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt
@@ -14,6 +14,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (1,2)-(1,13))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ ├── opening_loc: (1,5)-(1,7) = "do"
│ │ ├── closing_loc: (1,10)-(1,13) = "end"
@@ -28,6 +29,7 @@
├── block:
│ @ BlockNode (location: (1,14)-(1,22))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (1,17)-(1,18))
diff --git a/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
index c641ccdeeb..8494370d36 100644
--- a/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
+++ b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
@@ -14,6 +14,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (1,2)-(1,10))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ ├── opening_loc: (1,5)-(1,6) = "{"
│ │ ├── closing_loc: (1,9)-(1,10) = "}"
@@ -28,6 +29,7 @@
├── block:
│ @ BlockNode (location: (1,11)-(1,19))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (1,14)-(1,15))
diff --git a/test/prism/snapshots/seattlerb/case_in.txt b/test/prism/snapshots/seattlerb/case_in.txt
index 793448fb7a..9134e2cb52 100644
--- a/test/prism/snapshots/seattlerb/case_in.txt
+++ b/test/prism/snapshots/seattlerb/case_in.txt
@@ -520,6 +520,7 @@
│ │ │ ├── requireds: (length: 2)
│ │ │ │ ├── @ LambdaNode (location: (70,4)-(70,18))
│ │ │ │ │ ├── locals: [:b]
+ │ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ │ ├── operator_loc: (70,4)-(70,6) = "->"
│ │ │ │ │ ├── opening_loc: (70,10)-(70,11) = "{"
│ │ │ │ │ ├── closing_loc: (70,17)-(70,18) = "}"
diff --git a/test/prism/snapshots/seattlerb/class_comments.txt b/test/prism/snapshots/seattlerb/class_comments.txt
index 5ac05b6be6..47e2043df6 100644
--- a/test/prism/snapshots/seattlerb/class_comments.txt
+++ b/test/prism/snapshots/seattlerb/class_comments.txt
@@ -21,6 +21,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (6,2)-(6,5) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/dasgn_icky2.txt b/test/prism/snapshots/seattlerb/dasgn_icky2.txt
index 34540783fc..96e4277b9c 100644
--- a/test/prism/snapshots/seattlerb/dasgn_icky2.txt
+++ b/test/prism/snapshots/seattlerb/dasgn_icky2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(8,3))
│ ├── locals: [:v]
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (2,2)-(7,5))
diff --git a/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
index 0edbf87616..6adedb2395 100644
--- a/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
+++ b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
@@ -26,6 +26,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:interp, :*, :args]
+ ├── locals_body_index: 3
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,8)-(1,9) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
index 6218bc60f0..d96b5062ed 100644
--- a/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
+++ b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
@@ -40,6 +40,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:x, :"..."]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_args_forward_args.txt b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
index a7e896ff6a..5f9b4b0084 100644
--- a/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
+++ b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
@@ -49,6 +49,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:x, :y, :z, :"..."]
+ ├── locals_body_index: 4
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_comments.txt b/test/prism/snapshots/seattlerb/defn_comments.txt
index 585aa65c9a..bc4ba5462b 100644
--- a/test/prism/snapshots/seattlerb/defn_comments.txt
+++ b/test/prism/snapshots/seattlerb/defn_comments.txt
@@ -10,6 +10,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (4,0)-(4,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_endless_command.txt b/test/prism/snapshots/seattlerb/defn_endless_command.txt
index ed5bd89b53..432a84098a 100644
--- a/test/prism/snapshots/seattlerb/defn_endless_command.txt
+++ b/test/prism/snapshots/seattlerb/defn_endless_command.txt
@@ -27,6 +27,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
index 2b12d3155b..c7ed60977b 100644
--- a/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
+++ b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
@@ -33,6 +33,7 @@
│ @ IntegerNode (location: (1,41)-(1,43))
│ └── flags: decimal
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_forward_args.txt b/test/prism/snapshots/seattlerb/defn_forward_args.txt
index 4ed738aa1e..87a605a2f6 100644
--- a/test/prism/snapshots/seattlerb/defn_forward_args.txt
+++ b/test/prism/snapshots/seattlerb/defn_forward_args.txt
@@ -35,6 +35,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:"..."]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
index deacd362e4..69fe71cabd 100644
--- a/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
+++ b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
@@ -35,6 +35,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:"..."]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_env.txt b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
index f96a658206..469d680f19 100644
--- a/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
@@ -45,6 +45,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:testing]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,8)-(1,9) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
index 4ca746c224..18ead9e624 100644
--- a/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
@@ -32,6 +32,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a, :b, :c]
+ ├── locals_body_index: 3
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
index 5356f73143..a711c39305 100644
--- a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
@@ -28,6 +28,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:b, :c]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
index 4ccf1907f9..f16cf144ad 100644
--- a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
@@ -28,6 +28,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:b, :**]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
index 435c2f224c..699f854e8a 100644
--- a/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
@@ -32,6 +32,7 @@
│ ├── name: :kw
│ └── depth: 0
├── locals: [:kw]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt
index 6905bd1973..9899f4360d 100644
--- a/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt
@@ -24,6 +24,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_val.txt b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
index 772c7b6224..beca85c996 100644
--- a/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
@@ -26,6 +26,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a, :b]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_no_kwargs.txt b/test/prism/snapshots/seattlerb/defn_no_kwargs.txt
index 0ef0634a53..868fe3d202 100644
--- a/test/prism/snapshots/seattlerb/defn_no_kwargs.txt
+++ b/test/prism/snapshots/seattlerb/defn_no_kwargs.txt
@@ -21,6 +21,7 @@
│ └── block: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner.txt b/test/prism/snapshots/seattlerb/defn_oneliner.txt
index cc833341cd..eaf3269128 100644
--- a/test/prism/snapshots/seattlerb/defn_oneliner.txt
+++ b/test/prism/snapshots/seattlerb/defn_oneliner.txt
@@ -38,6 +38,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:cmd]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,8)-(1,9) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt b/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
index 359332adba..7252adaa93 100644
--- a/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
@@ -35,6 +35,7 @@
│ │ └── @ IntegerNode (location: (2,14)-(2,16))
│ │ └── flags: decimal
│ ├── locals: [:o]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (2,2)-(2,5) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (2,8)-(2,9) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt
index 98b7c88bc0..d1c07fd58a 100644
--- a/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt
@@ -22,6 +22,7 @@
│ ├── block: ∅
│ └── flags: variable_call
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt
index ea77c4c61b..579f629bc9 100644
--- a/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt
@@ -22,6 +22,7 @@
│ ├── block: ∅
│ └── flags: variable_call
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,8)-(1,9) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
index 670d5e7e62..1e052dd5f4 100644
--- a/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
@@ -55,6 +55,7 @@
│ │ ├── ensure_clause: ∅
│ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
│ ├── locals: [:cmd]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,8)-(1,9) = "("
@@ -101,6 +102,7 @@
│ │ └── rescue_expression:
│ │ @ NilNode (location: (9,21)-(9,24))
│ ├── locals: [:cmd]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (8,0)-(8,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (8,8)-(8,9) = "("
@@ -147,6 +149,7 @@
│ └── rescue_expression:
│ @ NilNode (location: (13,35)-(13,38))
├── locals: [:cmd]
+ ├── locals_body_index: 1
├── def_keyword_loc: (13,0)-(13,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (13,8)-(13,9) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt b/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt
index e82a9c8091..fae68d5342 100644
--- a/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt
+++ b/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt
@@ -24,6 +24,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:arg]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_opt_reg.txt b/test/prism/snapshots/seattlerb/defn_opt_reg.txt
index 437eaa7472..aeff12d658 100644
--- a/test/prism/snapshots/seattlerb/defn_opt_reg.txt
+++ b/test/prism/snapshots/seattlerb/defn_opt_reg.txt
@@ -26,6 +26,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a, :b]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt b/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
index 4ad2a5303e..7ec94cf670 100644
--- a/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
+++ b/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
@@ -31,6 +31,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a, :b, :c]
+ ├── locals_body_index: 3
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,6)-(1,7) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_powarg.txt b/test/prism/snapshots/seattlerb/defn_powarg.txt
index a903d1f741..1b0fbe656c 100644
--- a/test/prism/snapshots/seattlerb/defn_powarg.txt
+++ b/test/prism/snapshots/seattlerb/defn_powarg.txt
@@ -22,6 +22,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:opts]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt b/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
index 0b6614abbc..5129ccb227 100644
--- a/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
+++ b/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
@@ -32,6 +32,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a, :b, :d]
+ ├── locals_body_index: 3
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_splat_arg.txt b/test/prism/snapshots/seattlerb/defn_splat_arg.txt
index 40b79287d0..453673f753 100644
--- a/test/prism/snapshots/seattlerb/defn_splat_arg.txt
+++ b/test/prism/snapshots/seattlerb/defn_splat_arg.txt
@@ -24,6 +24,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:*, :a]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/defn_unary_not.txt b/test/prism/snapshots/seattlerb/defn_unary_not.txt
index 61afb79ad1..9f3fc27171 100644
--- a/test/prism/snapshots/seattlerb/defn_unary_not.txt
+++ b/test/prism/snapshots/seattlerb/defn_unary_not.txt
@@ -13,6 +13,7 @@
│ └── body: (length: 1)
│ └── @ TrueNode (location: (1,8)-(1,12))
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defns_reserved.txt b/test/prism/snapshots/seattlerb/defns_reserved.txt
index 96860b49ce..97ed2d542e 100644
--- a/test/prism/snapshots/seattlerb/defns_reserved.txt
+++ b/test/prism/snapshots/seattlerb/defns_reserved.txt
@@ -11,6 +11,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: (1,8)-(1,9) = "."
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt b/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt
index 118db362cb..3d80dc144b 100644
--- a/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt
+++ b/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt
@@ -42,12 +42,14 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (1,18)-(1,25))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (1,18)-(1,20) = "do"
│ │ │ │ └── closing_loc: (1,22)-(1,25) = "end"
│ │ │ └── flags: ∅
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
│ │ ├── operator_loc: (1,10)-(1,11) = "."
│ │ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_comments.txt b/test/prism/snapshots/seattlerb/defs_comments.txt
index a2976e7ee2..a25b50614d 100644
--- a/test/prism/snapshots/seattlerb/defs_comments.txt
+++ b/test/prism/snapshots/seattlerb/defs_comments.txt
@@ -11,6 +11,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (4,0)-(4,3) = "def"
├── operator_loc: (4,8)-(4,9) = "."
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_endless_command.txt b/test/prism/snapshots/seattlerb/defs_endless_command.txt
index 44ce92fa8f..873a8dd2ec 100644
--- a/test/prism/snapshots/seattlerb/defs_endless_command.txt
+++ b/test/prism/snapshots/seattlerb/defs_endless_command.txt
@@ -37,6 +37,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: (1,5)-(1,6) = "."
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
index 9e6a4b5db5..a066466ec8 100644
--- a/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
+++ b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
@@ -43,6 +43,7 @@
│ @ IntegerNode (location: (1,43)-(1,45))
│ └── flags: decimal
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: (1,5)-(1,6) = "."
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_kwarg.txt b/test/prism/snapshots/seattlerb/defs_kwarg.txt
index 62571e863d..9c42a36282 100644
--- a/test/prism/snapshots/seattlerb/defs_kwarg.txt
+++ b/test/prism/snapshots/seattlerb/defs_kwarg.txt
@@ -25,6 +25,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:b]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: (1,8)-(1,9) = "."
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner.txt b/test/prism/snapshots/seattlerb/defs_oneliner.txt
index 11199857e3..fdab8085c3 100644
--- a/test/prism/snapshots/seattlerb/defs_oneliner.txt
+++ b/test/prism/snapshots/seattlerb/defs_oneliner.txt
@@ -39,6 +39,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:cmd]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: (1,8)-(1,9) = "."
├── lparen_loc: (1,13)-(1,14) = "("
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt b/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
index 45ae30ecea..ffbb6befd8 100644
--- a/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
+++ b/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
@@ -36,6 +36,7 @@
│ │ └── @ IntegerNode (location: (2,19)-(2,21))
│ │ └── flags: decimal
│ ├── locals: [:o]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (2,2)-(2,5) = "def"
│ ├── operator_loc: (2,10)-(2,11) = "."
│ ├── lparen_loc: (2,13)-(2,14) = "("
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
index 72cce7e459..b0f2f85216 100644
--- a/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
+++ b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
@@ -56,6 +56,7 @@
│ │ ├── ensure_clause: ∅
│ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
│ ├── locals: [:cmd]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: (1,8)-(1,9) = "."
│ ├── lparen_loc: (1,13)-(1,14) = "("
@@ -103,6 +104,7 @@
│ │ └── rescue_expression:
│ │ @ NilNode (location: (9,21)-(9,24))
│ ├── locals: [:cmd]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (8,0)-(8,3) = "def"
│ ├── operator_loc: (8,8)-(8,9) = "."
│ ├── lparen_loc: (8,13)-(8,14) = "("
@@ -150,6 +152,7 @@
│ └── rescue_expression:
│ @ NilNode (location: (13,40)-(13,43))
├── locals: [:cmd]
+ ├── locals_body_index: 1
├── def_keyword_loc: (13,0)-(13,3) = "def"
├── operator_loc: (13,8)-(13,9) = "."
├── lparen_loc: (13,13)-(13,14) = "("
diff --git a/test/prism/snapshots/seattlerb/difficult3_.txt b/test/prism/snapshots/seattlerb/difficult3_.txt
index 3f2b0545dc..11d687db2b 100644
--- a/test/prism/snapshots/seattlerb/difficult3_.txt
+++ b/test/prism/snapshots/seattlerb/difficult3_.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,18))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,16))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3_2.txt b/test/prism/snapshots/seattlerb/difficult3_2.txt
index 1352705188..c41903b1b3 100644
--- a/test/prism/snapshots/seattlerb/difficult3_2.txt
+++ b/test/prism/snapshots/seattlerb/difficult3_2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,13))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3_3.txt b/test/prism/snapshots/seattlerb/difficult3_3.txt
index 04207aad7a..883dc77544 100644
--- a/test/prism/snapshots/seattlerb/difficult3_3.txt
+++ b/test/prism/snapshots/seattlerb/difficult3_3.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3_5.txt b/test/prism/snapshots/seattlerb/difficult3_5.txt
index d446ac88b0..8f33ebb1ae 100644
--- a/test/prism/snapshots/seattlerb/difficult3_5.txt
+++ b/test/prism/snapshots/seattlerb/difficult3_5.txt
@@ -14,6 +14,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (1,2)-(1,19))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ ├── opening_loc: (1,7)-(1,8) = "{"
│ │ ├── closing_loc: (1,18)-(1,19) = "}"
@@ -37,6 +38,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,11)-(1,17))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,11)-(1,13) = "do"
diff --git a/test/prism/snapshots/seattlerb/difficult3__10.txt b/test/prism/snapshots/seattlerb/difficult3__10.txt
index eabf92f1f4..c85aaa66b8 100644
--- a/test/prism/snapshots/seattlerb/difficult3__10.txt
+++ b/test/prism/snapshots/seattlerb/difficult3__10.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,18))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,16))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3__11.txt b/test/prism/snapshots/seattlerb/difficult3__11.txt
index 16e2bd68b1..5c646b7196 100644
--- a/test/prism/snapshots/seattlerb/difficult3__11.txt
+++ b/test/prism/snapshots/seattlerb/difficult3__11.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,14))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3__12.txt b/test/prism/snapshots/seattlerb/difficult3__12.txt
index 072b3fb130..d6a1701b17 100644
--- a/test/prism/snapshots/seattlerb/difficult3__12.txt
+++ b/test/prism/snapshots/seattlerb/difficult3__12.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3__6.txt b/test/prism/snapshots/seattlerb/difficult3__6.txt
index 2afabb3bb1..7761d844f1 100644
--- a/test/prism/snapshots/seattlerb/difficult3__6.txt
+++ b/test/prism/snapshots/seattlerb/difficult3__6.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,21))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,19))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3__7.txt b/test/prism/snapshots/seattlerb/difficult3__7.txt
index c44ed91659..8d175ea863 100644
--- a/test/prism/snapshots/seattlerb/difficult3__7.txt
+++ b/test/prism/snapshots/seattlerb/difficult3__7.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3__8.txt b/test/prism/snapshots/seattlerb/difficult3__8.txt
index fe6e57b9e5..a0ec0ae934 100644
--- a/test/prism/snapshots/seattlerb/difficult3__8.txt
+++ b/test/prism/snapshots/seattlerb/difficult3__8.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,20))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,18))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult3__9.txt b/test/prism/snapshots/seattlerb/difficult3__9.txt
index 313eac0f2c..37d05acb84 100644
--- a/test/prism/snapshots/seattlerb/difficult3__9.txt
+++ b/test/prism/snapshots/seattlerb/difficult3__9.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,15))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,13))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/difficult6_.txt b/test/prism/snapshots/seattlerb/difficult6_.txt
index 3c2c093bad..71e92dcee5 100644
--- a/test/prism/snapshots/seattlerb/difficult6_.txt
+++ b/test/prism/snapshots/seattlerb/difficult6_.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,25))
├── locals: [:a, :b]
+ ├── locals_body_index: 2
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,13)-(1,14) = "{"
├── closing_loc: (1,24)-(1,25) = "}"
diff --git a/test/prism/snapshots/seattlerb/difficult6__7.txt b/test/prism/snapshots/seattlerb/difficult6__7.txt
index 2b8bf58ae0..f7331b87e4 100644
--- a/test/prism/snapshots/seattlerb/difficult6__7.txt
+++ b/test/prism/snapshots/seattlerb/difficult6__7.txt
@@ -35,6 +35,7 @@
├── block:
│ @ BlockNode (location: (1,8)-(1,11))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (1,9)-(1,10))
diff --git a/test/prism/snapshots/seattlerb/difficult6__8.txt b/test/prism/snapshots/seattlerb/difficult6__8.txt
index 88f0436a72..a08c5eccc5 100644
--- a/test/prism/snapshots/seattlerb/difficult6__8.txt
+++ b/test/prism/snapshots/seattlerb/difficult6__8.txt
@@ -35,6 +35,7 @@
├── block:
│ @ BlockNode (location: (1,9)-(1,12))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (1,10)-(1,11))
diff --git a/test/prism/snapshots/seattlerb/difficult7_.txt b/test/prism/snapshots/seattlerb/difficult7_.txt
index 5650727fad..2f8166421c 100644
--- a/test/prism/snapshots/seattlerb/difficult7_.txt
+++ b/test/prism/snapshots/seattlerb/difficult7_.txt
@@ -25,6 +25,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (2,18)-(2,33))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body:
│ │ │ │ │ @ StatementsNode (location: (2,20)-(2,31))
diff --git a/test/prism/snapshots/seattlerb/do_bug.txt b/test/prism/snapshots/seattlerb/do_bug.txt
index 14c707055f..4ef29b5a2e 100644
--- a/test/prism/snapshots/seattlerb/do_bug.txt
+++ b/test/prism/snapshots/seattlerb/do_bug.txt
@@ -39,6 +39,7 @@
├── block:
│ @ BlockNode (location: (2,4)-(4,3))
│ ├── locals: [:c]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (2,7)-(2,10))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/do_lambda.txt b/test/prism/snapshots/seattlerb/do_lambda.txt
index 4713fb3e4b..9de71cea2d 100644
--- a/test/prism/snapshots/seattlerb/do_lambda.txt
+++ b/test/prism/snapshots/seattlerb/do_lambda.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,11))
├── locals: []
+ ├── locals_body_index: 0
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,5)-(1,7) = "do"
├── closing_loc: (1,8)-(1,11) = "end"
diff --git a/test/prism/snapshots/seattlerb/f_kw.txt b/test/prism/snapshots/seattlerb/f_kw.txt
index 435f5547b8..3f4d6d6981 100644
--- a/test/prism/snapshots/seattlerb/f_kw.txt
+++ b/test/prism/snapshots/seattlerb/f_kw.txt
@@ -24,6 +24,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:k]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/f_kw__required.txt b/test/prism/snapshots/seattlerb/f_kw__required.txt
index 62a17289bd..61fe5edbae 100644
--- a/test/prism/snapshots/seattlerb/f_kw__required.txt
+++ b/test/prism/snapshots/seattlerb/f_kw__required.txt
@@ -21,6 +21,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:k]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/iter_args_1.txt b/test/prism/snapshots/seattlerb/iter_args_1.txt
index 3b0deb9ae6..86d2974746 100644
--- a/test/prism/snapshots/seattlerb/iter_args_1.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_1.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,11))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,9))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_10_1.txt b/test/prism/snapshots/seattlerb/iter_args_10_1.txt
index 341954af29..41db5311e3 100644
--- a/test/prism/snapshots/seattlerb/iter_args_10_1.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_10_1.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,21))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,19))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_10_2.txt b/test/prism/snapshots/seattlerb/iter_args_10_2.txt
index d2bcc55c71..511ea42820 100644
--- a/test/prism/snapshots/seattlerb/iter_args_10_2.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_10_2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,25))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,23))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_11_1.txt b/test/prism/snapshots/seattlerb/iter_args_11_1.txt
index d70ee259f2..b9abf90fd7 100644
--- a/test/prism/snapshots/seattlerb/iter_args_11_1.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_11_1.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,24))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,22))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_11_2.txt b/test/prism/snapshots/seattlerb/iter_args_11_2.txt
index 553ad42132..10fae97455 100644
--- a/test/prism/snapshots/seattlerb/iter_args_11_2.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_11_2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,28))
│ ├── locals: [:a, :b, :c, :d, :e]
+ │ ├── locals_body_index: 5
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,26))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_2__19.txt b/test/prism/snapshots/seattlerb/iter_args_2__19.txt
index 967df1ac35..4e2c2d8337 100644
--- a/test/prism/snapshots/seattlerb/iter_args_2__19.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_2__19.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,14))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,12))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_3.txt b/test/prism/snapshots/seattlerb/iter_args_3.txt
index b0570dc8ce..90e04a8650 100644
--- a/test/prism/snapshots/seattlerb/iter_args_3.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_3.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,20))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,18))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_4.txt b/test/prism/snapshots/seattlerb/iter_args_4.txt
index 9e6822aea2..4433820c6c 100644
--- a/test/prism/snapshots/seattlerb/iter_args_4.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_4.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,16))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,14))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_5.txt b/test/prism/snapshots/seattlerb/iter_args_5.txt
index 0af5cda322..c47531f69e 100644
--- a/test/prism/snapshots/seattlerb/iter_args_5.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_5.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,13))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_6.txt b/test/prism/snapshots/seattlerb/iter_args_6.txt
index 34a6a87559..f5bcbbe027 100644
--- a/test/prism/snapshots/seattlerb/iter_args_6.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_6.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,18))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,16))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_7_1.txt b/test/prism/snapshots/seattlerb/iter_args_7_1.txt
index cb9521efd1..ca1a729acb 100644
--- a/test/prism/snapshots/seattlerb/iter_args_7_1.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_7_1.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,18))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,16))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_7_2.txt b/test/prism/snapshots/seattlerb/iter_args_7_2.txt
index dcb74967d9..f581191e39 100644
--- a/test/prism/snapshots/seattlerb/iter_args_7_2.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_7_2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,22))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,20))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_8_1.txt b/test/prism/snapshots/seattlerb/iter_args_8_1.txt
index 7f15b98ea9..c9ddadf4c6 100644
--- a/test/prism/snapshots/seattlerb/iter_args_8_1.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_8_1.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,21))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,19))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_8_2.txt b/test/prism/snapshots/seattlerb/iter_args_8_2.txt
index 305798bab2..f5e2e19fb6 100644
--- a/test/prism/snapshots/seattlerb/iter_args_8_2.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_8_2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,25))
│ ├── locals: [:a, :b, :c, :d]
+ │ ├── locals_body_index: 4
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,23))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_9_1.txt b/test/prism/snapshots/seattlerb/iter_args_9_1.txt
index 0f37861d68..5d89d7c6c4 100644
--- a/test/prism/snapshots/seattlerb/iter_args_9_1.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_9_1.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_args_9_2.txt b/test/prism/snapshots/seattlerb/iter_args_9_2.txt
index 3933c7d1da..5bb7359e03 100644
--- a/test/prism/snapshots/seattlerb/iter_args_9_2.txt
+++ b/test/prism/snapshots/seattlerb/iter_args_9_2.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,21))
│ ├── locals: [:a, :b, :c]
+ │ ├── locals_body_index: 3
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,19))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_kwarg.txt b/test/prism/snapshots/seattlerb/iter_kwarg.txt
index 6175f85b7f..8aa0823bc5 100644
--- a/test/prism/snapshots/seattlerb/iter_kwarg.txt
+++ b/test/prism/snapshots/seattlerb/iter_kwarg.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,12))
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,10))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
index 3d197900d1..bf1a2e8f82 100644
--- a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
+++ b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(1,17))
│ ├── locals: [:b, :c]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,4)-(1,15))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
index 65048d534d..b9018e8f50 100644
--- a/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
+++ b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
@@ -14,6 +14,7 @@
│ │ ├── arguments: (length: 1)
│ │ │ └── @ LambdaNode (location: (1,2)-(1,11))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ │ ├── opening_loc: (1,5)-(1,7) = "do"
│ │ │ ├── closing_loc: (1,8)-(1,11) = "end"
@@ -34,6 +35,7 @@
│ │ ├── arguments: (length: 1)
│ │ │ └── @ LambdaNode (location: (3,2)-(3,7))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (3,2)-(3,4) = "->"
│ │ │ ├── opening_loc: (3,5)-(3,6) = "{"
│ │ │ ├── closing_loc: (3,6)-(3,7) = "}"
@@ -54,6 +56,7 @@
│ │ ├── arguments: (length: 1)
│ │ │ └── @ LambdaNode (location: (5,2)-(5,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (5,2)-(5,4) = "->"
│ │ │ ├── opening_loc: (5,7)-(5,9) = "do"
│ │ │ ├── closing_loc: (5,10)-(5,13) = "end"
@@ -79,6 +82,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (7,2)-(7,9))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (7,2)-(7,4) = "->"
│ │ ├── opening_loc: (7,7)-(7,8) = "{"
│ │ ├── closing_loc: (7,8)-(7,9) = "}"
diff --git a/test/prism/snapshots/seattlerb/magic_encoding_comment.txt b/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
index 969d318d39..24cb61c2d0 100644
--- a/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
+++ b/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
@@ -35,6 +35,7 @@
│ │ │ └── unescaped: "però"
│ │ └── operator_loc: (2,55)-(2,56) = "="
│ ├── locals: [:così]
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (2,36)-(2,39) = "def"
│ ├── operator_loc: (2,44)-(2,45) = "."
│ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/module_comments.txt b/test/prism/snapshots/seattlerb/module_comments.txt
index 2785187a29..8e8b2fd9cc 100644
--- a/test/prism/snapshots/seattlerb/module_comments.txt
+++ b/test/prism/snapshots/seattlerb/module_comments.txt
@@ -19,6 +19,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,2)-(7,5) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_def_special_name.txt b/test/prism/snapshots/seattlerb/parse_def_special_name.txt
index dfbfe8a391..1373229932 100644
--- a/test/prism/snapshots/seattlerb/parse_def_special_name.txt
+++ b/test/prism/snapshots/seattlerb/parse_def_special_name.txt
@@ -10,6 +10,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
index 2421482f67..557fcd6546 100644
--- a/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
+++ b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,2)-(3,3))
│ ├── locals: [:x, :y]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,5)-(1,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
index 79c10f0e4e..dda6852a0f 100644
--- a/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
@@ -56,6 +56,7 @@
│ │ └── depth: 0
│ └── flags: ∅
├── locals: [:y]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt
index 74240322ac..e9d68521e4 100644
--- a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt
@@ -10,6 +10,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -23,6 +24,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (5,0)-(5,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt
index d19fa698f6..8a0a1c752a 100644
--- a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt
@@ -20,6 +20,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt b/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt
index e582bc2b5f..fc36ac7a5c 100644
--- a/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt
+++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt
@@ -27,6 +27,7 @@
├── block:
│ @ BlockNode (location: (1,4)-(3,3))
│ ├── locals: [:x, :y]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,7)-(1,13))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
index ca8f6fd729..ad318e4b05 100644
--- a/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
+++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
@@ -27,6 +27,7 @@
├── block:
│ @ BlockNode (location: (1,5)-(3,3))
│ ├── locals: [:x, :y]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,8)-(1,14))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/seattlerb/parse_line_return.txt b/test/prism/snapshots/seattlerb/parse_line_return.txt
index f735c8a3f6..46312194d5 100644
--- a/test/prism/snapshots/seattlerb/parse_line_return.txt
+++ b/test/prism/snapshots/seattlerb/parse_line_return.txt
@@ -30,6 +30,7 @@
│ ├── consequent: ∅
│ └── end_keyword_loc: (4,8)-(4,11) = "end"
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,6)-(1,9) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/pipe_semicolon.txt b/test/prism/snapshots/seattlerb/pipe_semicolon.txt
index 1201e87a66..18e7d25a27 100644
--- a/test/prism/snapshots/seattlerb/pipe_semicolon.txt
+++ b/test/prism/snapshots/seattlerb/pipe_semicolon.txt
@@ -24,6 +24,7 @@
├── block:
│ @ BlockNode (location: (1,4)-(1,18))
│ ├── locals: [:c]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,7)-(1,14))
│ │ ├── parameters: ∅
diff --git a/test/prism/snapshots/seattlerb/pipe_space.txt b/test/prism/snapshots/seattlerb/pipe_space.txt
index 9ecf022775..c04ea4b775 100644
--- a/test/prism/snapshots/seattlerb/pipe_space.txt
+++ b/test/prism/snapshots/seattlerb/pipe_space.txt
@@ -24,6 +24,7 @@
├── block:
│ @ BlockNode (location: (1,4)-(1,14))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,7)-(1,10))
│ │ ├── parameters: ∅
diff --git a/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt b/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt
index 8c62ac7882..fe2ce0bc7e 100644
--- a/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt
+++ b/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt
@@ -24,6 +24,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:a, :b]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
index bdd92a5482..fa67add940 100644
--- a/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
@@ -16,6 +16,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,5)-(5,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (2,2)-(5,3))
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
index a137470b71..2f2b21602f 100644
--- a/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,4)-(9,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ BeginNode (location: (2,2)-(9,3))
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
index a7300bda96..ca565cb6d8 100644
--- a/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,4)-(5,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ BeginNode (location: (2,2)-(5,3))
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
index 1d192161d7..69ae4d1173 100644
--- a/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,4)-(9,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ BeginNode (location: (2,2)-(9,3))
diff --git a/test/prism/snapshots/seattlerb/rescue_in_block.txt b/test/prism/snapshots/seattlerb/rescue_in_block.txt
index 8864c835b1..7598ad6d45 100644
--- a/test/prism/snapshots/seattlerb/rescue_in_block.txt
+++ b/test/prism/snapshots/seattlerb/rescue_in_block.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,5)-(4,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ BeginNode (location: (2,0)-(4,3))
diff --git a/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt b/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
index 7392e71525..a2c67e609c 100644
--- a/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
+++ b/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,5))
├── locals: [:a]
+ ├── locals_body_index: 1
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,3)-(1,4) = "{"
├── closing_loc: (1,4)-(1,5) = "}"
diff --git a/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
index 0661b2a2aa..1cd4580bc5 100644
--- a/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
+++ b/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,23))
├── locals: [:b, :c, :d, :e, :f]
+ ├── locals_body_index: 5
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,21)-(1,22) = "{"
├── closing_loc: (1,22)-(1,23) = "}"
diff --git a/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
index 19ea912814..f1c9237e32 100644
--- a/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
+++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
@@ -14,6 +14,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (1,2)-(4,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ ├── opening_loc: (1,8)-(1,10) = "do"
│ │ ├── closing_loc: (4,0)-(4,3) = "end"
@@ -47,6 +48,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (2,4)-(3,3))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (2,4)-(2,6) = "do"
diff --git a/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt b/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
index 84f7aaebf9..13062e1c5a 100644
--- a/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
+++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
@@ -14,6 +14,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (1,2)-(4,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ ├── opening_loc: (1,8)-(1,10) = "do"
│ │ ├── closing_loc: (4,0)-(4,3) = "end"
@@ -42,6 +43,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (2,5)-(3,3))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (2,5)-(2,7) = "do"
diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw.txt b/test/prism/snapshots/seattlerb/stabby_block_kw.txt
index fe95390a27..b9a2151a76 100644
--- a/test/prism/snapshots/seattlerb/stabby_block_kw.txt
+++ b/test/prism/snapshots/seattlerb/stabby_block_kw.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,13))
├── locals: [:k]
+ ├── locals_body_index: 1
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,10)-(1,11) = "{"
├── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt b/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt
index 99a2e70586..5d0ac1e5c0 100644
--- a/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt
+++ b/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,11))
├── locals: [:k]
+ ├── locals_body_index: 1
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,8)-(1,9) = "{"
├── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/seattlerb/stabby_proc_scope.txt b/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
index 059192d67f..23ab524fad 100644
--- a/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
+++ b/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,11))
├── locals: [:a, :b]
+ ├── locals_body_index: 2
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,9)-(1,10) = "{"
├── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/super.txt b/test/prism/snapshots/super.txt
index 55d7526b37..cc18ac15ff 100644
--- a/test/prism/snapshots/super.txt
+++ b/test/prism/snapshots/super.txt
@@ -69,6 +69,7 @@
│ └── block:
│ @ BlockNode (location: (13,6)-(13,8))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (13,6)-(13,7) = "{"
@@ -90,6 +91,7 @@
│ └── block:
│ @ BlockNode (location: (15,15)-(15,17))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (15,15)-(15,16) = "{"
diff --git a/test/prism/snapshots/unparser/corpus/literal/block.txt b/test/prism/snapshots/unparser/corpus/literal/block.txt
index 82cb3c20e4..610af9dd55 100644
--- a/test/prism/snapshots/unparser/corpus/literal/block.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/block.txt
@@ -14,6 +14,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,4)-(2,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,4)-(1,5) = "{"
@@ -30,6 +31,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,4)-(4,1))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (3,6)-(3,9))
│ │ │ ├── parameters:
@@ -61,6 +63,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,4)-(6,1))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (5,6)-(5,10))
│ │ │ ├── parameters:
@@ -93,6 +96,7 @@
│ ├── block:
│ │ @ BlockNode (location: (7,4)-(8,1))
│ │ ├── locals: [:a, :x]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (7,6)-(7,13))
│ │ │ ├── parameters:
@@ -127,6 +131,7 @@
│ ├── block:
│ │ @ BlockNode (location: (9,4)-(10,1))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (9,6)-(9,12))
│ │ │ ├── parameters:
@@ -165,6 +170,7 @@
│ ├── block:
│ │ @ BlockNode (location: (11,7)-(13,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (12,2)-(12,5))
@@ -184,6 +190,7 @@
│ ├── block:
│ │ @ BlockNode (location: (14,4)-(16,1))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (14,6)-(14,13))
│ │ │ ├── parameters:
@@ -222,6 +229,7 @@
│ ├── block:
│ │ @ BlockNode (location: (17,4)-(19,1))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (17,6)-(17,12))
│ │ │ ├── parameters:
@@ -260,6 +268,7 @@
│ ├── block:
│ │ @ BlockNode (location: (20,4)-(22,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (21,2)-(21,5))
@@ -298,6 +307,7 @@
│ ├── block:
│ │ @ BlockNode (location: (23,8)-(25,1))
│ │ ├── locals: [:a, :b, :c]
+ │ │ ├── locals_body_index: 3
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (23,10)-(23,21))
│ │ │ ├── parameters:
@@ -361,6 +371,7 @@
│ ├── block:
│ │ @ BlockNode (location: (26,8)-(27,1))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (26,10)-(26,17))
│ │ │ ├── parameters:
@@ -406,6 +417,7 @@
│ ├── block:
│ │ @ BlockNode (location: (28,8)-(29,1))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (28,10)-(28,16))
│ │ │ ├── parameters:
@@ -449,6 +461,7 @@
│ ├── block:
│ │ @ BlockNode (location: (30,8)-(31,1))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (30,10)-(30,18))
│ │ │ ├── parameters: ∅
@@ -484,6 +497,7 @@
│ ├── block:
│ │ @ BlockNode (location: (32,8)-(34,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (32,10)-(32,13))
│ │ │ ├── parameters:
@@ -539,6 +553,7 @@
│ ├── block:
│ │ @ BlockNode (location: (35,8)-(37,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (35,10)-(35,15))
│ │ │ ├── parameters:
@@ -599,6 +614,7 @@
│ ├── block:
│ │ @ BlockNode (location: (38,8)-(40,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (38,10)-(38,17))
│ │ │ ├── parameters:
@@ -665,6 +681,7 @@
│ ├── block:
│ │ @ BlockNode (location: (41,8)-(43,1))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (41,10)-(41,20))
│ │ │ ├── parameters:
@@ -733,6 +750,7 @@
│ ├── block:
│ │ @ BlockNode (location: (44,8)-(46,1))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (44,10)-(44,18))
│ │ │ ├── parameters:
@@ -796,6 +814,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (47,8)-(48,1))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (47,8)-(47,9) = "{"
@@ -820,6 +839,7 @@
│ ├── block:
│ │ @ BlockNode (location: (49,2)-(51,3))
│ │ ├── locals: [:e]
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (50,0)-(51,3))
@@ -855,6 +875,7 @@
│ ├── block:
│ │ @ BlockNode (location: (52,2)-(56,3))
│ │ ├── locals: [:bar]
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (53,2)-(56,3))
@@ -907,6 +928,7 @@
│ ├── block:
│ │ @ BlockNode (location: (57,2)-(61,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (58,2)-(61,3))
@@ -976,6 +998,7 @@
│ ├── block:
│ │ @ BlockNode (location: (62,2)-(66,3))
│ │ ├── locals: [:exception]
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (63,2)-(66,3))
@@ -1048,6 +1071,7 @@
│ ├── block:
│ │ @ BlockNode (location: (67,2)-(71,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (68,2)-(71,3))
@@ -1115,6 +1139,7 @@
│ ├── block:
│ │ @ BlockNode (location: (72,2)-(75,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (73,2)-(75,3))
@@ -1159,6 +1184,7 @@
│ ├── block:
│ │ @ BlockNode (location: (76,2)-(81,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (77,2)-(81,3))
@@ -1217,6 +1243,7 @@
│ ├── block:
│ │ @ BlockNode (location: (82,2)-(86,3))
│ │ ├── locals: [:exception]
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (83,2)-(86,3))
@@ -1287,6 +1314,7 @@
│ ├── block:
│ │ @ BlockNode (location: (87,2)-(89,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (88,0)-(89,3))
@@ -1314,6 +1342,7 @@
│ ├── block:
│ │ @ BlockNode (location: (90,2)-(93,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (91,0)-(93,3))
@@ -1348,6 +1377,7 @@
├── block:
│ @ BlockNode (location: (94,4)-(96,1))
│ ├── locals: [:_1, :_2]
+ │ ├── locals_body_index: 2
│ ├── parameters:
│ │ @ NumberedParametersNode (location: (94,4)-(96,1))
│ │ └── maximum: 2
diff --git a/test/prism/snapshots/unparser/corpus/literal/class.txt b/test/prism/snapshots/unparser/corpus/literal/class.txt
index 29b27bc18c..63cb4a7d76 100644
--- a/test/prism/snapshots/unparser/corpus/literal/class.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/class.txt
@@ -207,6 +207,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "bar"
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (29,2)-(29,5) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/def.txt b/test/prism/snapshots/unparser/corpus/literal/def.txt
index 13d1794421..1c8c461a8e 100644
--- a/test/prism/snapshots/unparser/corpus/literal/def.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/def.txt
@@ -80,6 +80,7 @@
│ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
│ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -177,6 +178,7 @@
│ │ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
│ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (11,0)-(11,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -204,6 +206,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar, :baz]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (21,0)-(21,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (21,7)-(21,8) = "("
@@ -217,6 +220,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (24,0)-(24,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -242,6 +246,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (27,0)-(27,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -309,6 +314,7 @@
│ │ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
│ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (31,0)-(31,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -357,6 +363,7 @@
│ │ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
│ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (39,0)-(39,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -408,6 +415,7 @@
│ │ ├── ensure_clause: ∅
│ │ └── end_keyword_loc: (49,0)-(49,3) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (45,0)-(45,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -436,6 +444,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (51,0)-(51,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (51,7)-(51,8) = "("
@@ -466,6 +475,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar, :baz]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (55,0)-(55,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (55,7)-(55,8) = "("
@@ -501,6 +511,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (59,0)-(59,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (59,7)-(59,8) = "("
@@ -544,6 +555,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (63,0)-(63,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (63,7)-(63,8) = "("
@@ -576,6 +588,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (66,0)-(66,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (66,7)-(66,8) = "("
@@ -610,6 +623,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar, :baz]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (70,0)-(70,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (70,7)-(70,8) = "("
@@ -637,6 +651,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (74,0)-(74,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (74,7)-(74,8) = "("
@@ -672,6 +687,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (77,0)-(77,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (77,7)-(77,8) = "("
@@ -707,6 +723,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (80,0)-(80,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (80,7)-(80,8) = "("
@@ -744,6 +761,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:*]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (83,0)-(83,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (83,7)-(83,8) = "("
@@ -774,6 +792,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (87,0)-(87,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (87,7)-(87,8) = "("
@@ -806,6 +825,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar, :baz]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (91,0)-(91,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (91,7)-(91,8) = "("
@@ -849,6 +869,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:baz, :bor]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (95,0)-(95,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (95,7)-(95,8) = "("
@@ -896,6 +917,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:baz, :bor, :block]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (99,0)-(99,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (99,7)-(99,8) = "("
@@ -934,6 +956,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar, :baz, :bor]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (103,0)-(103,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (103,7)-(103,8) = "("
@@ -971,6 +994,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:block]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (107,0)-(107,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (107,7)-(107,8) = "("
@@ -1003,6 +1027,7 @@
│ │ ├── name: :bar
│ │ └── depth: 0
│ ├── locals: [:bar, :block]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (111,0)-(111,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (111,7)-(111,8) = "("
@@ -1038,6 +1063,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (115,0)-(115,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1073,6 +1099,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (120,0)-(120,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (120,5)-(120,6) = "("
@@ -1107,6 +1134,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:bar, :baz]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (123,0)-(123,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (123,7)-(123,8) = "("
@@ -1142,6 +1170,7 @@
│ │ │ └── unescaped: "\n"
│ │ └── closing_loc: (129,0)-(130,0) = " HEREDOC\n"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (126,0)-(126,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -1163,6 +1192,7 @@
│ ├── closing_loc: (133,4)-(133,5) = ")"
│ └── unescaped: ""
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (132,0)-(132,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/defs.txt b/test/prism/snapshots/unparser/corpus/literal/defs.txt
index 52cd344710..3dd422c51a 100644
--- a/test/prism/snapshots/unparser/corpus/literal/defs.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/defs.txt
@@ -11,6 +11,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: (1,8)-(1,9) = "."
│ ├── lparen_loc: ∅
@@ -37,6 +38,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (4,0)-(4,3) = "def"
│ ├── operator_loc: (4,8)-(4,9) = "."
│ ├── lparen_loc: ∅
@@ -73,6 +75,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (8,0)-(8,3) = "def"
│ ├── operator_loc: (8,8)-(8,9) = "."
│ ├── lparen_loc: ∅
@@ -100,6 +103,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (13,0)-(13,3) = "def"
│ ├── operator_loc: (13,7)-(13,8) = "."
│ ├── lparen_loc: ∅
@@ -123,6 +127,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (17,9)-(18,1))
│ │ │ │ ├── locals: [:bar]
+ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ ├── parameters:
│ │ │ │ │ @ BlockParametersNode (location: (17,11)-(17,16))
│ │ │ │ │ ├── parameters:
@@ -160,6 +165,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (17,0)-(17,3) = "def"
│ ├── operator_loc: (18,2)-(18,3) = "."
│ ├── lparen_loc: ∅
@@ -204,6 +210,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (22,0)-(22,3) = "def"
│ ├── operator_loc: (22,12)-(22,13) = "."
│ ├── lparen_loc: ∅
@@ -251,6 +258,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (26,0)-(26,3) = "def"
│ ├── operator_loc: (26,18)-(26,19) = "."
│ ├── lparen_loc: ∅
@@ -288,6 +296,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (30,0)-(30,3) = "def"
│ ├── operator_loc: (30,14)-(30,15) = "."
│ ├── lparen_loc: ∅
@@ -315,6 +324,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (34,0)-(34,3) = "def"
│ ├── operator_loc: (34,7)-(34,8) = "."
│ ├── lparen_loc: ∅
@@ -350,6 +360,7 @@
│ ├── block: ∅
│ └── flags: variable_call
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (38,0)-(38,3) = "def"
├── operator_loc: (38,7)-(38,8) = "."
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/dstr.txt b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
index 33391fe56e..6bcdd0ce62 100644
--- a/test/prism/snapshots/unparser/corpus/literal/dstr.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
@@ -317,6 +317,7 @@
├── block:
│ @ BlockNode (location: (34,16)-(37,1))
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (34,18)-(34,21))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/unparser/corpus/literal/if.txt b/test/prism/snapshots/unparser/corpus/literal/if.txt
index 4cd56d5a6b..dcf15b406a 100644
--- a/test/prism/snapshots/unparser/corpus/literal/if.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/if.txt
@@ -231,6 +231,7 @@
│ ├── block:
│ │ @ BlockNode (location: (31,7)-(33,1))
│ │ ├── locals: [:pair]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (31,9)-(31,15))
│ │ │ ├── parameters:
diff --git a/test/prism/snapshots/unparser/corpus/literal/lambda.txt b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
index a8fb22d80f..97b4cfcfe6 100644
--- a/test/prism/snapshots/unparser/corpus/literal/lambda.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
@@ -14,6 +14,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,7)-(2,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,7)-(1,8) = "{"
@@ -30,6 +31,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,7)-(5,1))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (3,9)-(3,15))
│ │ │ ├── parameters:
@@ -59,6 +61,7 @@
│ └── flags: ∅
├── @ LambdaNode (location: (6,0)-(7,1))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (6,0)-(6,2) = "->"
│ ├── opening_loc: (6,5)-(6,6) = "{"
│ ├── closing_loc: (7,0)-(7,1) = "}"
@@ -71,6 +74,7 @@
│ └── body: ∅
├── @ LambdaNode (location: (8,0)-(9,1))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (8,0)-(8,2) = "->"
│ ├── opening_loc: (8,6)-(8,7) = "{"
│ ├── closing_loc: (9,0)-(9,1) = "}"
@@ -93,6 +97,7 @@
│ └── body: ∅
├── @ LambdaNode (location: (10,0)-(11,1))
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── operator_loc: (10,0)-(10,2) = "->"
│ ├── opening_loc: (10,9)-(10,10) = "{"
│ ├── closing_loc: (11,0)-(11,1) = "}"
@@ -117,6 +122,7 @@
│ └── body: ∅
└── @ LambdaNode (location: (12,0)-(13,1))
├── locals: [:a, :b, :c]
+ ├── locals_body_index: 3
├── operator_loc: (12,0)-(12,2) = "->"
├── opening_loc: (12,12)-(12,13) = "{"
├── closing_loc: (13,0)-(13,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/literal.txt b/test/prism/snapshots/unparser/corpus/literal/literal.txt
index aa36dd7e35..e019b65229 100644
--- a/test/prism/snapshots/unparser/corpus/literal/literal.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/literal.txt
@@ -1052,6 +1052,7 @@
│ ├── block:
│ │ @ BlockNode (location: (83,4)-(86,1))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (84,2)-(85,7))
diff --git a/test/prism/snapshots/unparser/corpus/literal/module.txt b/test/prism/snapshots/unparser/corpus/literal/module.txt
index 830f127074..a417284cad 100644
--- a/test/prism/snapshots/unparser/corpus/literal/module.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/module.txt
@@ -96,6 +96,7 @@
│ │ ├── closing_loc: ∅
│ │ └── unescaped: "bar"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (13,2)-(13,5) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/send.txt b/test/prism/snapshots/unparser/corpus/literal/send.txt
index 469b3dae4b..c372f967bb 100644
--- a/test/prism/snapshots/unparser/corpus/literal/send.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/send.txt
@@ -161,6 +161,7 @@
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── def_keyword_loc: (16,6)-(16,9) = "def"
│ │ │ │ │ ├── operator_loc: ∅
│ │ │ │ │ ├── lparen_loc: ∅
@@ -268,6 +269,7 @@
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
│ │ ├── operator_loc: (25,8)-(25,9) = "."
│ │ ├── lparen_loc: ∅
@@ -291,6 +293,7 @@
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
@@ -370,6 +373,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (33,5)-(34,1))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (33,5)-(33,6) = "{"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/27.txt b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
index 066702897b..3d1763e9b4 100644
--- a/test/prism/snapshots/unparser/corpus/literal/since/27.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
@@ -5,6 +5,7 @@
└── body: (length: 2)
├── @ LambdaNode (location: (1,0)-(3,1))
│ ├── locals: [:_1, :_2]
+ │ ├── locals_body_index: 2
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,3)-(1,4) = "{"
│ ├── closing_loc: (3,0)-(3,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/31.txt b/test/prism/snapshots/unparser/corpus/literal/since/31.txt
index 0572d6faa9..6756860cde 100644
--- a/test/prism/snapshots/unparser/corpus/literal/since/31.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/since/31.txt
@@ -37,6 +37,7 @@
│ │ │ └── operator_loc: (2,6)-(2,7) = "&"
│ │ └── flags: ∅
│ ├── locals: [:&]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -79,6 +80,7 @@
│ │ └── operator_loc: (6,6)-(6,7) = "&"
│ └── flags: ∅
├── locals: [:a, :&]
+ ├── locals_body_index: 2
├── def_keyword_loc: (5,0)-(5,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (5,7)-(5,8) = "("
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/32.txt b/test/prism/snapshots/unparser/corpus/literal/since/32.txt
index 8aeab646c8..24ba7fb851 100644
--- a/test/prism/snapshots/unparser/corpus/literal/since/32.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/since/32.txt
@@ -47,6 +47,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:argument, :**]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -95,6 +96,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:argument, :*]
+ ├── locals_body_index: 2
├── def_keyword_loc: (5,0)-(5,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (5,7)-(5,8) = "("
diff --git a/test/prism/snapshots/unparser/corpus/literal/super.txt b/test/prism/snapshots/unparser/corpus/literal/super.txt
index 8175d3504a..8bc734749b 100644
--- a/test/prism/snapshots/unparser/corpus/literal/super.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/super.txt
@@ -127,6 +127,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (7,8)-(9,1))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body:
│ │ │ │ │ @ StatementsNode (location: (8,2)-(8,5))
@@ -151,6 +152,7 @@
│ └── block:
│ @ BlockNode (location: (10,6)-(12,1))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (11,2)-(11,5))
@@ -188,6 +190,7 @@
│ └── block:
│ @ BlockNode (location: (13,9)-(15,1))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (14,2)-(14,5))
@@ -212,6 +215,7 @@
│ └── block:
│ @ BlockNode (location: (16,8)-(18,1))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (17,2)-(17,5))
@@ -259,6 +263,7 @@
└── block:
@ BlockNode (location: (19,12)-(21,1))
├── locals: []
+ ├── locals_body_index: 0
├── parameters: ∅
├── body:
│ @ StatementsNode (location: (20,2)-(20,5))
diff --git a/test/prism/snapshots/unparser/corpus/literal/while.txt b/test/prism/snapshots/unparser/corpus/literal/while.txt
index 7bcf111cef..c5221a0a18 100644
--- a/test/prism/snapshots/unparser/corpus/literal/while.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/while.txt
@@ -23,6 +23,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (2,6)-(6,3))
│ │ │ ├── locals: [:bar, :foo]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── parameters:
│ │ │ │ @ BlockParametersNode (location: (2,8)-(2,13))
│ │ │ │ ├── parameters:
@@ -133,6 +134,7 @@
│ │ │ └── operator_loc: (10,6)-(10,7) = "="
│ │ └── flags: ∅
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (9,0)-(9,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -280,6 +282,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (28,7)-(32,3))
│ │ │ ├── locals: [:baz, :foo]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── parameters:
│ │ │ │ @ BlockParametersNode (location: (28,9)-(28,14))
│ │ │ │ ├── parameters:
@@ -358,6 +361,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (36,7)-(40,3))
│ │ │ ├── locals: [:foo]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── parameters:
│ │ │ │ @ BlockParametersNode (location: (36,9)-(36,14))
│ │ │ │ ├── parameters:
@@ -626,6 +630,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (61,11)-(62,1))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (61,11)-(61,12) = "{"
@@ -679,6 +684,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (70,11)-(71,1))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (70,11)-(70,12) = "{"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/block.txt b/test/prism/snapshots/unparser/corpus/semantic/block.txt
index f3d5440a59..94f03c9746 100644
--- a/test/prism/snapshots/unparser/corpus/semantic/block.txt
+++ b/test/prism/snapshots/unparser/corpus/semantic/block.txt
@@ -14,6 +14,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,4)-(2,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,4)-(1,6) = "do"
@@ -30,6 +31,7 @@
│ ├── block:
│ │ @ BlockNode (location: (4,4)-(6,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ BeginNode (location: (5,0)-(6,3))
@@ -60,6 +62,7 @@
│ ├── block:
│ │ @ BlockNode (location: (8,4)-(11,3))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (9,2)-(10,5))
@@ -85,6 +88,7 @@
│ ├── block:
│ │ @ BlockNode (location: (13,4)-(14,3))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (13,7)-(13,10))
│ │ │ ├── parameters:
@@ -125,6 +129,7 @@
│ ├── block:
│ │ @ BlockNode (location: (16,12)-(20,3))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (16,15)-(16,18))
│ │ │ ├── parameters:
@@ -170,6 +175,7 @@
├── block:
│ @ BlockNode (location: (22,12)-(26,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (25,2)-(25,3))
diff --git a/test/prism/snapshots/unparser/corpus/semantic/def.txt b/test/prism/snapshots/unparser/corpus/semantic/def.txt
index fe66152a28..952c486c88 100644
--- a/test/prism/snapshots/unparser/corpus/semantic/def.txt
+++ b/test/prism/snapshots/unparser/corpus/semantic/def.txt
@@ -51,6 +51,7 @@
│ │ ├── opening_loc: (2,2)-(2,3) = "("
│ │ └── closing_loc: (2,8)-(2,9) = ")"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -82,6 +83,7 @@
│ @ ConstantReadNode (location: (6,11)-(6,20))
│ └── name: :Exception
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (5,0)-(5,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/semantic/while.txt b/test/prism/snapshots/unparser/corpus/semantic/while.txt
index 6339a0208a..50427884dc 100644
--- a/test/prism/snapshots/unparser/corpus/semantic/while.txt
+++ b/test/prism/snapshots/unparser/corpus/semantic/while.txt
@@ -18,6 +18,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,11)-(1,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,11)-(1,12) = "{"
@@ -52,6 +53,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (3,9)-(3,11))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (3,9)-(3,10) = "{"
@@ -126,6 +128,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (9,15)-(9,18))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (9,15)-(9,16) = "{"
@@ -197,6 +200,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (15,18)-(18,3))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body:
│ │ │ │ @ StatementsNode (location: (17,2)-(17,3))
diff --git a/test/prism/snapshots/while.txt b/test/prism/snapshots/while.txt
index 3d74f777b6..ded1c8b09b 100644
--- a/test/prism/snapshots/while.txt
+++ b/test/prism/snapshots/while.txt
@@ -131,6 +131,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (13,27)-(13,33))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (13,27)-(13,29) = "do"
@@ -143,6 +144,7 @@
│ │ │ └── block: ∅
│ │ ├── body: ∅
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── def_keyword_loc: (13,6)-(13,9) = "def"
│ │ ├── operator_loc: (13,14)-(13,15) = "."
│ │ ├── lparen_loc: ∅
@@ -187,6 +189,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (15,24)-(15,30))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (15,24)-(15,26) = "do"
@@ -226,6 +229,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (17,25)-(17,31))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (17,25)-(17,27) = "do"
@@ -268,6 +272,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (19,29)-(19,35))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (19,29)-(19,31) = "do"
@@ -305,12 +310,14 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (21,20)-(21,26))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (21,20)-(21,22) = "do"
│ │ │ │ └── closing_loc: (21,23)-(21,26) = "end"
│ │ │ └── flags: ∅
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (21,6)-(21,9) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/anonymous_blockarg.txt b/test/prism/snapshots/whitequark/anonymous_blockarg.txt
index 639684a4e9..368a12bb89 100644
--- a/test/prism/snapshots/whitequark/anonymous_blockarg.txt
+++ b/test/prism/snapshots/whitequark/anonymous_blockarg.txt
@@ -37,6 +37,7 @@
│ │ └── operator_loc: (1,16)-(1,17) = "&"
│ └── flags: ∅
├── locals: [:&]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/arg.txt b/test/prism/snapshots/whitequark/arg.txt
index d87f10db23..8e3cd2ec69 100644
--- a/test/prism/snapshots/whitequark/arg.txt
+++ b/test/prism/snapshots/whitequark/arg.txt
@@ -20,6 +20,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,5)-(1,6) = "("
@@ -45,6 +46,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:foo, :bar]
+ ├── locals_body_index: 2
├── def_keyword_loc: (3,0)-(3,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (3,5)-(3,6) = "("
diff --git a/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt b/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt
index 4db92126d7..11a3bcc986 100644
--- a/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt
+++ b/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt
@@ -22,6 +22,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:_]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -47,6 +48,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:_a]
+ ├── locals_body_index: 1
├── def_keyword_loc: (3,0)-(3,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (3,7)-(3,8) = "("
diff --git a/test/prism/snapshots/whitequark/arg_label.txt b/test/prism/snapshots/whitequark/arg_label.txt
index 1f04f6d5f1..2ca884cfca 100644
--- a/test/prism/snapshots/whitequark/arg_label.txt
+++ b/test/prism/snapshots/whitequark/arg_label.txt
@@ -30,6 +30,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -63,6 +64,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (4,0)-(4,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (4,7)-(4,8) = "("
@@ -80,6 +82,7 @@
├── block:
│ @ BlockNode (location: (6,2)-(6,12))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters:
│ │ @ BlockParametersNode (location: (6,4)-(6,6))
│ │ ├── parameters: ∅
diff --git a/test/prism/snapshots/whitequark/arg_scope.txt b/test/prism/snapshots/whitequark/arg_scope.txt
index cb08a16a4c..91f486cc59 100644
--- a/test/prism/snapshots/whitequark/arg_scope.txt
+++ b/test/prism/snapshots/whitequark/arg_scope.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,6)-(1,13))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,7)-(1,11))
│ │ ├── parameters: ∅
diff --git a/test/prism/snapshots/whitequark/args.txt b/test/prism/snapshots/whitequark/args.txt
index 5c593ddc7b..3346517743 100644
--- a/test/prism/snapshots/whitequark/args.txt
+++ b/test/prism/snapshots/whitequark/args.txt
@@ -22,6 +22,7 @@
│ │ └── operator_loc: (1,6)-(1,7) = "&"
│ ├── body: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -57,6 +58,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (3,6)-(3,7) = "("
@@ -87,6 +89,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (5,0)-(5,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (5,6)-(5,7) = "("
@@ -119,6 +122,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:p]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (7,6)-(7,7) = "("
@@ -151,6 +155,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:r]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (9,0)-(9,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (9,6)-(9,7) = "("
@@ -185,6 +190,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:r, :p]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (11,0)-(11,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (11,6)-(11,7) = "("
@@ -217,6 +223,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (13,0)-(13,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (13,6)-(13,7) = "("
@@ -251,6 +258,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a, :p]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (15,0)-(15,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (15,6)-(15,7) = "("
@@ -285,6 +293,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a, :r]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (17,0)-(17,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (17,6)-(17,7) = "("
@@ -321,6 +330,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a, :r, :p]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (19,0)-(19,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (19,6)-(19,7) = "("
@@ -352,6 +362,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a, :a1]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (21,0)-(21,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (21,6)-(21,7) = "("
@@ -383,6 +394,7 @@
│ │ └── operator_loc: (23,15)-(23,16) = "&"
│ ├── body: ∅
│ ├── locals: [:foo, :b]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (23,0)-(23,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (23,6)-(23,7) = "("
@@ -424,6 +436,7 @@
│ │ └── operator_loc: (25,30)-(25,31) = "&"
│ ├── body: ∅
│ ├── locals: [:foo, :bar, :baz, :b]
+ │ ├── locals_body_index: 4
│ ├── def_keyword_loc: (25,0)-(25,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (25,6)-(25,7) = "("
@@ -453,6 +466,7 @@
│ │ └── operator_loc: (27,13)-(27,14) = "&"
│ ├── body: ∅
│ ├── locals: [:baz, :b]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (27,0)-(27,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -482,6 +496,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:*, :**]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (29,0)-(29,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -511,6 +526,7 @@
│ │ └── operator_loc: (31,10)-(31,11) = "&"
│ ├── body: ∅
│ ├── locals: [:r, :b]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (31,0)-(31,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -542,6 +558,7 @@
│ │ └── operator_loc: (33,13)-(33,14) = "&"
│ ├── body: ∅
│ ├── locals: [:r, :p, :b]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (33,0)-(33,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -555,6 +572,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (35,0)-(35,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -582,6 +600,7 @@
│ │ └── operator_loc: (37,9)-(37,10) = "&"
│ ├── body: ∅
│ ├── locals: [:a, :b]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (37,0)-(37,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -613,6 +632,7 @@
│ │ └── operator_loc: (39,13)-(39,14) = "&"
│ ├── body: ∅
│ ├── locals: [:a, :r, :b]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (39,0)-(39,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -646,6 +666,7 @@
│ │ └── operator_loc: (41,16)-(41,17) = "&"
│ ├── body: ∅
│ ├── locals: [:a, :r, :p, :b]
+ │ ├── locals_body_index: 4
│ ├── def_keyword_loc: (41,0)-(41,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -680,6 +701,7 @@
│ │ └── operator_loc: (43,14)-(43,15) = "&"
│ ├── body: ∅
│ ├── locals: [:a, :o, :b]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (43,0)-(43,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -718,6 +740,7 @@
│ │ └── operator_loc: (45,18)-(45,19) = "&"
│ ├── body: ∅
│ ├── locals: [:a, :o, :r, :b]
+ │ ├── locals_body_index: 4
│ ├── def_keyword_loc: (45,0)-(45,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -758,6 +781,7 @@
│ │ └── operator_loc: (47,21)-(47,22) = "&"
│ ├── body: ∅
│ ├── locals: [:a, :o, :r, :p, :b]
+ │ ├── locals_body_index: 5
│ ├── def_keyword_loc: (47,0)-(47,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -794,6 +818,7 @@
│ │ └── operator_loc: (49,17)-(49,18) = "&"
│ ├── body: ∅
│ ├── locals: [:a, :o, :p, :b]
+ │ ├── locals_body_index: 4
│ ├── def_keyword_loc: (49,0)-(49,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -818,6 +843,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (51,0)-(51,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -845,6 +871,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (54,0)-(54,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -877,6 +904,7 @@
│ │ └── operator_loc: (57,11)-(57,12) = "&"
│ ├── body: ∅
│ ├── locals: [:o, :b]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (57,0)-(57,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -913,6 +941,7 @@
│ │ └── operator_loc: (59,15)-(59,16) = "&"
│ ├── body: ∅
│ ├── locals: [:o, :r, :b]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (59,0)-(59,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -951,6 +980,7 @@
│ │ └── operator_loc: (61,18)-(61,19) = "&"
│ ├── body: ∅
│ ├── locals: [:o, :r, :p, :b]
+ │ ├── locals_body_index: 4
│ ├── def_keyword_loc: (61,0)-(61,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -985,6 +1015,7 @@
│ └── operator_loc: (63,14)-(63,15) = "&"
├── body: ∅
├── locals: [:o, :p, :b]
+ ├── locals_body_index: 3
├── def_keyword_loc: (63,0)-(63,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/begin_cmdarg.txt b/test/prism/snapshots/whitequark/begin_cmdarg.txt
index 696be9e2f8..1794cad2b7 100644
--- a/test/prism/snapshots/whitequark/begin_cmdarg.txt
+++ b/test/prism/snapshots/whitequark/begin_cmdarg.txt
@@ -30,6 +30,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (1,16)-(1,24))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body:
│ │ │ │ │ @ StatementsNode (location: (1,19)-(1,20))
diff --git a/test/prism/snapshots/whitequark/blockarg.txt b/test/prism/snapshots/whitequark/blockarg.txt
index ce1c33a0f0..ce3bb106b5 100644
--- a/test/prism/snapshots/whitequark/blockarg.txt
+++ b/test/prism/snapshots/whitequark/blockarg.txt
@@ -22,6 +22,7 @@
│ └── operator_loc: (1,6)-(1,7) = "&"
├── body: ∅
├── locals: [:block]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/blockargs.txt b/test/prism/snapshots/whitequark/blockargs.txt
index 73f8278918..76ff9a6eaa 100644
--- a/test/prism/snapshots/whitequark/blockargs.txt
+++ b/test/prism/snapshots/whitequark/blockargs.txt
@@ -14,6 +14,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,1)-(1,5))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,1)-(1,2) = "{"
@@ -30,6 +31,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,1)-(3,8))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (3,3)-(3,6))
│ │ │ ├── parameters: ∅
@@ -51,6 +53,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,1)-(5,9))
│ │ ├── locals: [:b]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (5,3)-(5,7))
│ │ │ ├── parameters:
@@ -84,6 +87,7 @@
│ ├── block:
│ │ @ BlockNode (location: (7,1)-(7,16))
│ │ ├── locals: [:baz, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (7,3)-(7,14))
│ │ │ ├── parameters:
@@ -121,6 +125,7 @@
│ ├── block:
│ │ @ BlockNode (location: (9,1)-(9,12))
│ │ ├── locals: [:b]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (9,3)-(9,10))
│ │ │ ├── parameters:
@@ -158,6 +163,7 @@
│ ├── block:
│ │ @ BlockNode (location: (11,1)-(11,16))
│ │ ├── locals: [:r, :p, :b]
+ │ │ ├── locals_body_index: 3
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (11,3)-(11,14))
│ │ │ ├── parameters:
@@ -197,6 +203,7 @@
│ ├── block:
│ │ @ BlockNode (location: (13,1)-(13,13))
│ │ ├── locals: [:s, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (13,3)-(13,11))
│ │ │ ├── parameters:
@@ -234,6 +241,7 @@
│ ├── block:
│ │ @ BlockNode (location: (15,1)-(15,9))
│ │ ├── locals: [:s]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (15,3)-(15,7))
│ │ │ ├── parameters:
@@ -267,6 +275,7 @@
│ ├── block:
│ │ @ BlockNode (location: (17,1)-(17,8))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (17,3)-(17,6))
│ │ │ ├── parameters:
@@ -300,6 +309,7 @@
│ ├── block:
│ │ @ BlockNode (location: (19,1)-(21,3))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (19,3)-(21,1))
│ │ │ ├── parameters: ∅
@@ -323,6 +333,7 @@
│ ├── block:
│ │ @ BlockNode (location: (23,1)-(23,9))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (23,3)-(23,7))
│ │ │ ├── parameters: ∅
@@ -346,6 +357,7 @@
│ ├── block:
│ │ @ BlockNode (location: (25,1)-(25,12))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (25,3)-(25,10))
│ │ │ ├── parameters:
@@ -381,6 +393,7 @@
│ ├── block:
│ │ @ BlockNode (location: (27,1)-(27,15))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (27,3)-(27,13))
│ │ │ ├── parameters:
@@ -420,6 +433,7 @@
│ ├── block:
│ │ @ BlockNode (location: (29,1)-(29,19))
│ │ ├── locals: [:a, :r, :p, :b]
+ │ │ ├── locals_body_index: 4
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (29,3)-(29,17))
│ │ │ ├── parameters:
@@ -461,6 +475,7 @@
│ ├── block:
│ │ @ BlockNode (location: (31,1)-(31,16))
│ │ ├── locals: [:a, :s, :b]
+ │ │ ├── locals_body_index: 3
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (31,3)-(31,14))
│ │ │ ├── parameters:
@@ -500,6 +515,7 @@
│ ├── block:
│ │ @ BlockNode (location: (33,1)-(33,12))
│ │ ├── locals: [:a, :s]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (33,3)-(33,10))
│ │ │ ├── parameters:
@@ -535,6 +551,7 @@
│ ├── block:
│ │ @ BlockNode (location: (35,1)-(35,11))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (35,3)-(35,9))
│ │ │ ├── parameters:
@@ -570,6 +587,7 @@
│ ├── block:
│ │ @ BlockNode (location: (37,1)-(37,12))
│ │ ├── locals: [:a, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (37,3)-(37,10))
│ │ │ ├── parameters:
@@ -604,6 +622,7 @@
│ ├── block:
│ │ @ BlockNode (location: (39,1)-(39,11))
│ │ ├── locals: [:a, :c]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (39,3)-(39,9))
│ │ │ ├── parameters:
@@ -637,6 +656,7 @@
│ ├── block:
│ │ @ BlockNode (location: (41,1)-(41,17))
│ │ ├── locals: [:a, :o, :b]
+ │ │ ├── locals_body_index: 3
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (41,3)-(41,15))
│ │ │ ├── parameters:
@@ -679,6 +699,7 @@
│ ├── block:
│ │ @ BlockNode (location: (43,1)-(43,24))
│ │ ├── locals: [:a, :o, :r, :p, :b]
+ │ │ ├── locals_body_index: 5
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (43,3)-(43,22))
│ │ │ ├── parameters:
@@ -727,6 +748,7 @@
│ ├── block:
│ │ @ BlockNode (location: (45,1)-(45,27))
│ │ ├── locals: [:a, :o, :o1, :r, :b]
+ │ │ ├── locals_body_index: 5
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (45,3)-(45,25))
│ │ │ ├── parameters:
@@ -780,6 +802,7 @@
│ ├── block:
│ │ @ BlockNode (location: (47,1)-(47,20))
│ │ ├── locals: [:a, :o, :p, :b]
+ │ │ ├── locals_body_index: 4
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (47,3)-(47,18))
│ │ │ ├── parameters:
@@ -824,6 +847,7 @@
│ ├── block:
│ │ @ BlockNode (location: (49,1)-(49,9))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (49,3)-(49,7))
│ │ │ ├── parameters:
@@ -856,6 +880,7 @@
│ ├── block:
│ │ @ BlockNode (location: (51,1)-(51,8))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (51,3)-(51,6))
│ │ │ ├── parameters:
@@ -887,6 +912,7 @@
│ ├── block:
│ │ @ BlockNode (location: (53,1)-(53,8))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (53,3)-(53,6))
│ │ │ ├── parameters:
@@ -918,6 +944,7 @@
│ ├── block:
│ │ @ BlockNode (location: (55,1)-(55,8))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (55,3)-(55,6))
│ │ │ ├── parameters:
@@ -949,6 +976,7 @@
│ ├── block:
│ │ @ BlockNode (location: (57,1)-(57,17))
│ │ ├── locals: [:foo, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (57,3)-(57,15))
│ │ │ ├── parameters:
@@ -988,6 +1016,7 @@
│ ├── block:
│ │ @ BlockNode (location: (59,1)-(59,32))
│ │ ├── locals: [:foo, :bar, :baz, :b]
+ │ │ ├── locals_body_index: 4
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (59,3)-(59,30))
│ │ │ ├── parameters:
@@ -1037,6 +1066,7 @@
│ ├── block:
│ │ @ BlockNode (location: (61,1)-(61,11))
│ │ ├── locals: [:foo]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (61,3)-(61,9))
│ │ │ ├── parameters:
@@ -1069,6 +1099,7 @@
│ ├── block:
│ │ @ BlockNode (location: (63,1)-(63,14))
│ │ ├── locals: [:o, :b]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (63,3)-(63,12))
│ │ │ ├── parameters:
@@ -1109,6 +1140,7 @@
│ ├── block:
│ │ @ BlockNode (location: (65,1)-(65,18))
│ │ ├── locals: [:o, :r, :b]
+ │ │ ├── locals_body_index: 3
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (65,3)-(65,16))
│ │ │ ├── parameters:
@@ -1153,6 +1185,7 @@
│ ├── block:
│ │ @ BlockNode (location: (67,1)-(67,21))
│ │ ├── locals: [:o, :r, :p, :b]
+ │ │ ├── locals_body_index: 4
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (67,3)-(67,19))
│ │ │ ├── parameters:
@@ -1199,6 +1232,7 @@
│ ├── block:
│ │ @ BlockNode (location: (69,1)-(69,17))
│ │ ├── locals: [:o, :p, :b]
+ │ │ ├── locals_body_index: 3
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (69,3)-(69,15))
│ │ │ ├── parameters:
@@ -1241,6 +1275,7 @@
├── block:
│ @ BlockNode (location: (71,1)-(71,7))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters:
│ │ @ BlockParametersNode (location: (71,3)-(71,5))
│ │ ├── parameters: ∅
diff --git a/test/prism/snapshots/whitequark/break_block.txt b/test/prism/snapshots/whitequark/break_block.txt
index d6d6347eda..d615edd53f 100644
--- a/test/prism/snapshots/whitequark/break_block.txt
+++ b/test/prism/snapshots/whitequark/break_block.txt
@@ -31,6 +31,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,14)-(1,20))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_435.txt b/test/prism/snapshots/whitequark/bug_435.txt
index fd7380e15d..afce74425e 100644
--- a/test/prism/snapshots/whitequark/bug_435.txt
+++ b/test/prism/snapshots/whitequark/bug_435.txt
@@ -13,6 +13,7 @@
│ │ └── body: (length: 1)
│ │ └── @ LambdaNode (location: (1,3)-(1,12))
│ │ ├── locals: [:foo]
+ │ │ ├── locals_body_index: 1
│ │ ├── operator_loc: (1,3)-(1,5) = "->"
│ │ ├── opening_loc: (1,10)-(1,11) = "{"
│ │ ├── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/whitequark/bug_447.txt b/test/prism/snapshots/whitequark/bug_447.txt
index a056bd2ce3..b274662f9e 100644
--- a/test/prism/snapshots/whitequark/bug_447.txt
+++ b/test/prism/snapshots/whitequark/bug_447.txt
@@ -22,6 +22,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,5)-(1,11))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,5)-(1,7) = "do"
@@ -48,6 +49,7 @@
├── block:
│ @ BlockNode (location: (3,8)-(3,14))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (3,8)-(3,10) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_452.txt b/test/prism/snapshots/whitequark/bug_452.txt
index 435181b643..32b3ff8d80 100644
--- a/test/prism/snapshots/whitequark/bug_452.txt
+++ b/test/prism/snapshots/whitequark/bug_452.txt
@@ -55,6 +55,7 @@
├── block:
│ @ BlockNode (location: (1,30)-(1,37))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,30)-(1,32) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_466.txt b/test/prism/snapshots/whitequark/bug_466.txt
index 2b4af5d72c..37ff674bb9 100644
--- a/test/prism/snapshots/whitequark/bug_466.txt
+++ b/test/prism/snapshots/whitequark/bug_466.txt
@@ -60,6 +60,7 @@
├── block:
│ @ BlockNode (location: (1,20)-(1,27))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,20)-(1,22) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_481.txt b/test/prism/snapshots/whitequark/bug_481.txt
index dbd7de7a0c..c1ad0662f2 100644
--- a/test/prism/snapshots/whitequark/bug_481.txt
+++ b/test/prism/snapshots/whitequark/bug_481.txt
@@ -19,6 +19,7 @@
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
│ │ │ ├── operator_loc: ∅
│ │ │ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -42,6 +43,7 @@
├── block:
│ @ BlockNode (location: (1,22)-(1,28))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,22)-(1,24) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt b/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt
index 94c39e2021..4f4e7cad95 100644
--- a/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt
+++ b/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt
@@ -23,6 +23,7 @@
├── block:
│ @ BlockNode (location: (1,11)-(1,17))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,11)-(1,13) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_cmdarg.txt b/test/prism/snapshots/whitequark/bug_cmdarg.txt
index 93eafdb3a3..630d784b81 100644
--- a/test/prism/snapshots/whitequark/bug_cmdarg.txt
+++ b/test/prism/snapshots/whitequark/bug_cmdarg.txt
@@ -72,6 +72,7 @@
│ │ ├── value:
│ │ │ @ LambdaNode (location: (5,5)-(5,26))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (5,5)-(5,7) = "->"
│ │ │ ├── opening_loc: (5,8)-(5,10) = "do"
│ │ │ ├── closing_loc: (5,23)-(5,26) = "end"
@@ -90,6 +91,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (5,16)-(5,22))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (5,16)-(5,18) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt b/test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt
index 1b45d0132b..27d57492ab 100644
--- a/test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt
+++ b/test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt
@@ -10,6 +10,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt b/test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt
index 65bb6e8668..08ad0eb2ec 100644
--- a/test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt
@@ -32,12 +32,14 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (1,23)-(1,29))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (1,23)-(1,25) = "do"
│ │ │ │ └── closing_loc: (1,26)-(1,29) = "end"
│ │ │ └── flags: ∅
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (1,4)-(1,7) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt b/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt
index 42600a495a..4637487196 100644
--- a/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt
@@ -27,6 +27,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (1,10)-(1,16))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (1,10)-(1,12) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt b/test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt
index 2604e721bc..f04e3314f8 100644
--- a/test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt
@@ -39,6 +39,7 @@
│ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ @ BlockNode (location: (1,19)-(1,25))
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ ├── opening_loc: (1,19)-(1,21) = "do"
@@ -64,6 +65,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (1,35)-(1,41))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ ├── opening_loc: (1,35)-(1,37) = "do"
@@ -105,6 +107,7 @@
│ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ @ BlockNode (location: (3,17)-(3,23))
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ ├── opening_loc: (3,17)-(3,19) = "do"
@@ -130,6 +133,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (3,33)-(3,39))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ ├── opening_loc: (3,33)-(3,35) = "do"
@@ -177,6 +181,7 @@
│ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ @ BlockNode (location: (5,20)-(5,26))
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ ├── opening_loc: (5,20)-(5,22) = "do"
@@ -202,6 +207,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (5,36)-(5,42))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ ├── opening_loc: (5,36)-(5,38) = "do"
@@ -249,6 +255,7 @@
│ │ │ │ │ │ ├── block:
│ │ │ │ │ │ │ @ BlockNode (location: (7,17)-(7,23))
│ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ │ ├── opening_loc: (7,17)-(7,19) = "do"
@@ -274,6 +281,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (7,33)-(7,39))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ ├── opening_loc: (7,33)-(7,35) = "do"
@@ -315,6 +323,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (9,14)-(9,20))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ ├── opening_loc: (9,14)-(9,16) = "do"
@@ -332,6 +341,7 @@
│ │ │ │ │ ├── block:
│ │ │ │ │ │ @ BlockNode (location: (9,29)-(9,35))
│ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ │ ├── body: ∅
│ │ │ │ │ │ ├── opening_loc: (9,29)-(9,31) = "do"
@@ -357,6 +367,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (9,45)-(9,51))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (9,45)-(9,47) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_heredoc_do.txt b/test/prism/snapshots/whitequark/bug_heredoc_do.txt
index ccf2fb56fc..b6683f2676 100644
--- a/test/prism/snapshots/whitequark/bug_heredoc_do.txt
+++ b/test/prism/snapshots/whitequark/bug_heredoc_do.txt
@@ -23,6 +23,7 @@
├── block:
│ @ BlockNode (location: (1,11)-(3,3))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,11)-(1,13) = "do"
diff --git a/test/prism/snapshots/whitequark/bug_lambda_leakage.txt b/test/prism/snapshots/whitequark/bug_lambda_leakage.txt
index 2fd9d0fc0b..d9b6e30304 100644
--- a/test/prism/snapshots/whitequark/bug_lambda_leakage.txt
+++ b/test/prism/snapshots/whitequark/bug_lambda_leakage.txt
@@ -5,6 +5,7 @@
└── body: (length: 2)
├── @ LambdaNode (location: (1,0)-(1,12))
│ ├── locals: [:scope]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,10)-(1,11) = "{"
│ ├── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/whitequark/class_definition_in_while_cond.txt b/test/prism/snapshots/whitequark/class_definition_in_while_cond.txt
index cf5806d0a2..25a86f62e8 100644
--- a/test/prism/snapshots/whitequark/class_definition_in_while_cond.txt
+++ b/test/prism/snapshots/whitequark/class_definition_in_while_cond.txt
@@ -32,6 +32,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (1,29)-(1,35))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (1,29)-(1,31) = "do"
@@ -70,6 +71,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (3,25)-(3,31))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (3,25)-(3,27) = "do"
@@ -114,6 +116,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (5,24)-(5,30))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (5,24)-(5,26) = "do"
@@ -155,6 +158,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (7,21)-(7,27))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (7,21)-(7,23) = "do"
diff --git a/test/prism/snapshots/whitequark/const_op_asgn.txt b/test/prism/snapshots/whitequark/const_op_asgn.txt
index fc6533ccd0..b2292fcc85 100644
--- a/test/prism/snapshots/whitequark/const_op_asgn.txt
+++ b/test/prism/snapshots/whitequark/const_op_asgn.txt
@@ -60,6 +60,7 @@
│ │ @ IntegerNode (location: (7,15)-(7,16))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -88,6 +89,7 @@
│ @ IntegerNode (location: (9,19)-(9,20))
│ └── flags: decimal
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (9,0)-(9,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/def.txt b/test/prism/snapshots/whitequark/def.txt
index d5e1139c4d..ac91bcf067 100644
--- a/test/prism/snapshots/whitequark/def.txt
+++ b/test/prism/snapshots/whitequark/def.txt
@@ -10,6 +10,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -23,6 +24,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -36,6 +38,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (5,0)-(5,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -49,6 +52,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -62,6 +66,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (9,0)-(9,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -75,6 +80,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (11,0)-(11,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/defs.txt b/test/prism/snapshots/whitequark/defs.txt
index 7dde68282f..1c0bad523f 100644
--- a/test/prism/snapshots/whitequark/defs.txt
+++ b/test/prism/snapshots/whitequark/defs.txt
@@ -24,6 +24,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: (1,9)-(1,10) = "."
│ ├── lparen_loc: ∅
@@ -39,6 +40,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: (3,10)-(3,11) = "."
│ ├── lparen_loc: ∅
@@ -54,6 +56,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (5,0)-(5,3) = "def"
│ ├── operator_loc: (5,10)-(5,12) = "::"
│ ├── lparen_loc: ∅
@@ -68,6 +71,7 @@
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: (7,8)-(7,9) = "."
│ ├── lparen_loc: ∅
@@ -82,6 +86,7 @@
├── parameters: ∅
├── body: ∅
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (9,0)-(9,3) = "def"
├── operator_loc: (9,8)-(9,10) = "::"
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/endless_comparison_method.txt b/test/prism/snapshots/whitequark/endless_comparison_method.txt
index 9e6dd4e0a0..fcf721823a 100644
--- a/test/prism/snapshots/whitequark/endless_comparison_method.txt
+++ b/test/prism/snapshots/whitequark/endless_comparison_method.txt
@@ -32,6 +32,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:other]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,6)-(1,7) = "("
@@ -67,6 +68,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:other]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (3,6)-(3,7) = "("
@@ -102,6 +104,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:other]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (5,0)-(5,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (5,6)-(5,7) = "("
@@ -137,6 +140,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:other]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (7,6)-(7,7) = "("
@@ -172,6 +176,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: [:other]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (9,0)-(9,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (9,7)-(9,8) = "("
@@ -207,6 +212,7 @@
│ ├── block: ∅
│ └── flags: variable_call
├── locals: [:other]
+ ├── locals_body_index: 1
├── def_keyword_loc: (11,0)-(11,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (11,6)-(11,7) = "("
diff --git a/test/prism/snapshots/whitequark/endless_method.txt b/test/prism/snapshots/whitequark/endless_method.txt
index b0670ad937..c1dc1dc3d0 100644
--- a/test/prism/snapshots/whitequark/endless_method.txt
+++ b/test/prism/snapshots/whitequark/endless_method.txt
@@ -14,6 +14,7 @@
│ │ └── @ IntegerNode (location: (1,12)-(1,14))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -57,6 +58,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (3,7)-(3,8) = "("
@@ -84,6 +86,7 @@
│ │ └── @ IntegerNode (location: (5,16)-(5,18))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (5,0)-(5,3) = "def"
│ ├── operator_loc: (5,7)-(5,8) = "."
│ ├── lparen_loc: (5,11)-(5,12) = "("
@@ -137,6 +140,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:x]
+ ├── locals_body_index: 1
├── def_keyword_loc: (7,0)-(7,3) = "def"
├── operator_loc: (7,7)-(7,8) = "."
├── lparen_loc: (7,11)-(7,12) = "("
diff --git a/test/prism/snapshots/whitequark/endless_method_command_syntax.txt b/test/prism/snapshots/whitequark/endless_method_command_syntax.txt
index 4ac9556d36..bf73e06a72 100644
--- a/test/prism/snapshots/whitequark/endless_method_command_syntax.txt
+++ b/test/prism/snapshots/whitequark/endless_method_command_syntax.txt
@@ -31,6 +31,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -65,6 +66,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (3,7)-(3,8) = "("
@@ -106,6 +108,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (5,0)-(5,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (5,7)-(5,8) = "("
@@ -150,6 +153,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: (7,7)-(7,8) = "."
│ ├── lparen_loc: ∅
@@ -194,6 +198,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (9,0)-(9,3) = "def"
│ ├── operator_loc: (9,7)-(9,8) = "."
│ ├── lparen_loc: (9,11)-(9,12) = "("
@@ -245,6 +250,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (11,0)-(11,3) = "def"
│ ├── operator_loc: (11,7)-(11,8) = "."
│ ├── lparen_loc: (11,11)-(11,12) = "("
@@ -312,6 +318,7 @@
│ │ │ └── closing_loc: (13,58)-(13,59) = "}"
│ │ └── closing_loc: (13,59)-(13,60) = "\""
│ ├── locals: [:x]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (13,0)-(13,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (13,11)-(13,12) = "("
@@ -380,6 +387,7 @@
│ │ └── closing_loc: (15,60)-(15,61) = "}"
│ └── closing_loc: (15,61)-(15,62) = "\""
├── locals: [:x]
+ ├── locals_body_index: 1
├── def_keyword_loc: (15,0)-(15,3) = "def"
├── operator_loc: (15,8)-(15,9) = "."
├── lparen_loc: (15,16)-(15,17) = "("
diff --git a/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt b/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt
index 828e642755..1450d6294e 100644
--- a/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt
+++ b/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt
@@ -35,6 +35,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:"..."]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt b/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt
index 8f8e770fa9..ba50d04c7b 100644
--- a/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt
+++ b/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt
@@ -20,6 +20,7 @@
│ │ @ IntegerNode (location: (1,19)-(1,20))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,5)-(1,6) = "("
@@ -44,6 +45,7 @@
│ @ IntegerNode (location: (3,24)-(3,25))
│ └── flags: decimal
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (3,0)-(3,3) = "def"
├── operator_loc: (3,8)-(3,9) = "."
├── lparen_loc: (3,10)-(3,11) = "("
diff --git a/test/prism/snapshots/whitequark/endless_method_without_args.txt b/test/prism/snapshots/whitequark/endless_method_without_args.txt
index b7db96171e..1f02c3f940 100644
--- a/test/prism/snapshots/whitequark/endless_method_without_args.txt
+++ b/test/prism/snapshots/whitequark/endless_method_without_args.txt
@@ -14,6 +14,7 @@
│ │ └── @ IntegerNode (location: (1,10)-(1,12))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -36,6 +37,7 @@
│ │ └── rescue_expression:
│ │ @ NilNode (location: (3,20)-(3,23))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -54,6 +56,7 @@
│ │ └── @ IntegerNode (location: (5,15)-(5,17))
│ │ └── flags: decimal
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (5,0)-(5,3) = "def"
│ ├── operator_loc: (5,8)-(5,9) = "."
│ ├── lparen_loc: ∅
@@ -77,6 +80,7 @@
│ └── rescue_expression:
│ @ NilNode (location: (7,25)-(7,28))
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (7,0)-(7,3) = "def"
├── operator_loc: (7,8)-(7,9) = "."
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/forward_arg.txt b/test/prism/snapshots/whitequark/forward_arg.txt
index 1775f70ace..620237ac49 100644
--- a/test/prism/snapshots/whitequark/forward_arg.txt
+++ b/test/prism/snapshots/whitequark/forward_arg.txt
@@ -35,6 +35,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:"..."]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt b/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt
index 7f823fcf49..81aeed9804 100644
--- a/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt
+++ b/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt
@@ -39,6 +39,7 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: ∅
│ │ ├── locals: [:"..."]
+ │ │ ├── locals_body_index: 1
│ │ ├── def_keyword_loc: (1,1)-(1,4) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
@@ -83,6 +84,7 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: ∅
│ │ ├── locals: [:"..."]
+ │ │ ├── locals_body_index: 1
│ │ ├── def_keyword_loc: (5,1)-(5,4) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
@@ -107,6 +109,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -145,6 +148,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (10,0)-(10,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -185,6 +189,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:a, :"..."]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (12,0)-(12,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -225,6 +230,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:a, :"..."]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (16,0)-(16,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -256,6 +262,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:a, :b, :"..."]
+ │ ├── locals_body_index: 3
│ ├── def_keyword_loc: (18,0)-(18,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -301,6 +308,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:b, :"..."]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (21,0)-(21,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -346,6 +354,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:b, :"..."]
+ │ ├── locals_body_index: 2
│ ├── def_keyword_loc: (25,0)-(25,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -386,6 +395,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:a, :"..."]
+ ├── locals_body_index: 2
├── def_keyword_loc: (27,0)-(27,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (27,7)-(27,8) = "("
diff --git a/test/prism/snapshots/whitequark/forward_args_legacy.txt b/test/prism/snapshots/whitequark/forward_args_legacy.txt
index 05c267a866..e3a4b4e809 100644
--- a/test/prism/snapshots/whitequark/forward_args_legacy.txt
+++ b/test/prism/snapshots/whitequark/forward_args_legacy.txt
@@ -35,6 +35,7 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (1,7)-(1,8) = "("
@@ -57,6 +58,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:"..."]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (3,7)-(3,8) = "("
@@ -91,6 +93,7 @@
│ ├── rparen_loc: (5,23)-(5,24) = ")"
│ └── block: ∅
├── locals: [:"..."]
+ ├── locals_body_index: 1
├── def_keyword_loc: (5,0)-(5,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (5,7)-(5,8) = "("
diff --git a/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt b/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt
index a324e9b916..78e6eef7c3 100644
--- a/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt
+++ b/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt
@@ -47,6 +47,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:argument, :**]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt b/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt
index b73c7231a7..c41213ba03 100644
--- a/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt
+++ b/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt
@@ -45,6 +45,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:argument, :*]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt b/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt
index 151de97b3d..e786fe1837 100644
--- a/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt
+++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt
@@ -42,6 +42,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:**]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt b/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
index caca04ec5a..f3c8e22d47 100644
--- a/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
+++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
@@ -52,6 +52,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:**]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/forwarded_restarg.txt b/test/prism/snapshots/whitequark/forwarded_restarg.txt
index 10de7c587f..5e6d0f7c96 100644
--- a/test/prism/snapshots/whitequark/forwarded_restarg.txt
+++ b/test/prism/snapshots/whitequark/forwarded_restarg.txt
@@ -40,6 +40,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:*]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/kwarg.txt b/test/prism/snapshots/whitequark/kwarg.txt
index 7aef902fad..ad1c1752bf 100644
--- a/test/prism/snapshots/whitequark/kwarg.txt
+++ b/test/prism/snapshots/whitequark/kwarg.txt
@@ -21,6 +21,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:foo]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/kwnilarg.txt b/test/prism/snapshots/whitequark/kwnilarg.txt
index 2b5902db1a..2a5f5f1982 100644
--- a/test/prism/snapshots/whitequark/kwnilarg.txt
+++ b/test/prism/snapshots/whitequark/kwnilarg.txt
@@ -5,6 +5,7 @@
└── body: (length: 3)
├── @ LambdaNode (location: (1,0)-(1,12))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,10)-(1,11) = "{"
│ ├── closing_loc: (1,11)-(1,12) = "}"
@@ -44,6 +45,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: (3,5)-(3,6) = "("
@@ -61,6 +63,7 @@
├── block:
│ @ BlockNode (location: (5,2)-(5,13))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters:
│ │ @ BlockParametersNode (location: (5,4)-(5,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/whitequark/kwoptarg.txt b/test/prism/snapshots/whitequark/kwoptarg.txt
index 40f6d7e487..e1fe137c2f 100644
--- a/test/prism/snapshots/whitequark/kwoptarg.txt
+++ b/test/prism/snapshots/whitequark/kwoptarg.txt
@@ -24,6 +24,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:foo]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
index 05498094b5..645f5939b0 100644
--- a/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
+++ b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
@@ -47,6 +47,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:a, :**]
+ ├── locals_body_index: 2
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/kwrestarg_named.txt b/test/prism/snapshots/whitequark/kwrestarg_named.txt
index 034e260f92..73c73087da 100644
--- a/test/prism/snapshots/whitequark/kwrestarg_named.txt
+++ b/test/prism/snapshots/whitequark/kwrestarg_named.txt
@@ -22,6 +22,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:foo]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt b/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt
index 8de0299ad6..be042c7609 100644
--- a/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt
+++ b/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt
@@ -22,6 +22,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:**]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt b/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt
index 2b85b2980e..4a0b52b075 100644
--- a/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt
+++ b/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt
@@ -28,6 +28,7 @@
├── block:
│ @ BlockNode (location: (1,9)-(1,22))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (1,11)-(1,20))
@@ -43,6 +44,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,13)-(1,20))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,13)-(1,15) = "do"
diff --git a/test/prism/snapshots/whitequark/method_definition_in_while_cond.txt b/test/prism/snapshots/whitequark/method_definition_in_while_cond.txt
index cbb114dd69..93089a9e33 100644
--- a/test/prism/snapshots/whitequark/method_definition_in_while_cond.txt
+++ b/test/prism/snapshots/whitequark/method_definition_in_while_cond.txt
@@ -31,6 +31,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (1,22)-(1,28))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (1,22)-(1,24) = "do"
@@ -43,6 +44,7 @@
│ │ │ └── block: ∅
│ │ ├── body: ∅
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── def_keyword_loc: (1,6)-(1,9) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
@@ -79,12 +81,14 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (3,19)-(3,25))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (3,19)-(3,21) = "do"
│ │ │ │ └── closing_loc: (3,22)-(3,25) = "end"
│ │ │ └── flags: ∅
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── def_keyword_loc: (3,6)-(3,9) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
@@ -127,6 +131,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (5,27)-(5,33))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body: ∅
│ │ │ │ │ ├── opening_loc: (5,27)-(5,29) = "do"
@@ -139,6 +144,7 @@
│ │ │ └── block: ∅
│ │ ├── body: ∅
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── def_keyword_loc: (5,6)-(5,9) = "def"
│ │ ├── operator_loc: (5,14)-(5,15) = "."
│ │ ├── lparen_loc: ∅
@@ -176,12 +182,14 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (7,24)-(7,30))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (7,24)-(7,26) = "do"
│ │ │ └── closing_loc: (7,27)-(7,30) = "end"
│ │ └── flags: ∅
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,6)-(7,9) = "def"
│ ├── operator_loc: (7,14)-(7,15) = "."
│ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/next_block.txt b/test/prism/snapshots/whitequark/next_block.txt
index b49d3dc4a2..b3a0206e65 100644
--- a/test/prism/snapshots/whitequark/next_block.txt
+++ b/test/prism/snapshots/whitequark/next_block.txt
@@ -31,6 +31,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,13)-(1,19))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,13)-(1,15) = "do"
diff --git a/test/prism/snapshots/whitequark/numbered_args_after_27.txt b/test/prism/snapshots/whitequark/numbered_args_after_27.txt
index af8c0afe55..f87c8a4d69 100644
--- a/test/prism/snapshots/whitequark/numbered_args_after_27.txt
+++ b/test/prism/snapshots/whitequark/numbered_args_after_27.txt
@@ -5,6 +5,7 @@
└── body: (length: 4)
├── @ LambdaNode (location: (1,0)-(1,17))
│ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ ├── locals_body_index: 9
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,3)-(1,5) = "do"
│ ├── closing_loc: (1,14)-(1,17) = "end"
@@ -35,6 +36,7 @@
│ └── flags: ∅
├── @ LambdaNode (location: (3,0)-(3,13))
│ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ ├── locals_body_index: 9
│ ├── operator_loc: (3,0)-(3,2) = "->"
│ ├── opening_loc: (3,3)-(3,4) = "{"
│ ├── closing_loc: (3,12)-(3,13) = "}"
@@ -74,6 +76,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,2)-(5,16))
│ │ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ │ ├── locals_body_index: 9
│ │ ├── parameters:
│ │ │ @ NumberedParametersNode (location: (5,2)-(5,16))
│ │ │ └── maximum: 9
@@ -113,6 +116,7 @@
├── block:
│ @ BlockNode (location: (7,2)-(7,13))
│ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ ├── locals_body_index: 9
│ ├── parameters:
│ │ @ NumberedParametersNode (location: (7,2)-(7,13))
│ │ └── maximum: 9
diff --git a/test/prism/snapshots/whitequark/numparam_outside_block.txt b/test/prism/snapshots/whitequark/numparam_outside_block.txt
index 1e7f15942d..fb702cf50d 100644
--- a/test/prism/snapshots/whitequark/numparam_outside_block.txt
+++ b/test/prism/snapshots/whitequark/numparam_outside_block.txt
@@ -85,6 +85,7 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: (7,8)-(7,9) = "."
│ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/optarg.txt b/test/prism/snapshots/whitequark/optarg.txt
index d0bacfdfee..5a192fc360 100644
--- a/test/prism/snapshots/whitequark/optarg.txt
+++ b/test/prism/snapshots/whitequark/optarg.txt
@@ -25,6 +25,7 @@
│ │ └── block: ∅
│ ├── body: ∅
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -60,6 +61,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:foo, :bar]
+ ├── locals_body_index: 2
├── def_keyword_loc: (3,0)-(3,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (3,5)-(3,6) = "("
diff --git a/test/prism/snapshots/whitequark/parser_bug_272.txt b/test/prism/snapshots/whitequark/parser_bug_272.txt
index f8f29f8137..0ed4cd9364 100644
--- a/test/prism/snapshots/whitequark/parser_bug_272.txt
+++ b/test/prism/snapshots/whitequark/parser_bug_272.txt
@@ -19,6 +19,7 @@
├── block:
│ @ BlockNode (location: (1,5)-(1,15))
│ ├── locals: [:c]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (1,8)-(1,11))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/whitequark/parser_bug_490.txt b/test/prism/snapshots/whitequark/parser_bug_490.txt
index 9e4cd2bd15..f33f18623c 100644
--- a/test/prism/snapshots/whitequark/parser_bug_490.txt
+++ b/test/prism/snapshots/whitequark/parser_bug_490.txt
@@ -28,6 +28,7 @@
│ │ │ └── operator_loc: (1,24)-(1,25) = "="
│ │ └── end_keyword_loc: (1,31)-(1,34) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -64,6 +65,7 @@
│ │ │ └── name: :C
│ │ └── end_keyword_loc: (3,36)-(3,39) = "end"
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── def_keyword_loc: (3,0)-(3,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
@@ -98,6 +100,7 @@
│ │ └── name: :M
│ └── end_keyword_loc: (5,37)-(5,40) = "end"
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (5,0)-(5,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/parser_bug_507.txt b/test/prism/snapshots/whitequark/parser_bug_507.txt
index d2a3d3cba8..b8f9c0f83f 100644
--- a/test/prism/snapshots/whitequark/parser_bug_507.txt
+++ b/test/prism/snapshots/whitequark/parser_bug_507.txt
@@ -10,6 +10,7 @@
├── value:
│ @ LambdaNode (location: (1,4)-(1,19))
│ ├── locals: [:args]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (1,4)-(1,6) = "->"
│ ├── opening_loc: (1,13)-(1,15) = "do"
│ ├── closing_loc: (1,16)-(1,19) = "end"
diff --git a/test/prism/snapshots/whitequark/parser_bug_525.txt b/test/prism/snapshots/whitequark/parser_bug_525.txt
index f875dc8116..6be12beeff 100644
--- a/test/prism/snapshots/whitequark/parser_bug_525.txt
+++ b/test/prism/snapshots/whitequark/parser_bug_525.txt
@@ -38,6 +38,7 @@
├── block:
│ @ BlockNode (location: (1,12)-(1,32))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (1,16)-(1,27))
@@ -53,6 +54,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,21)-(1,27))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,21)-(1,23) = "do"
diff --git a/test/prism/snapshots/whitequark/parser_bug_604.txt b/test/prism/snapshots/whitequark/parser_bug_604.txt
index 12a05c31cb..bf643b63fd 100644
--- a/test/prism/snapshots/whitequark/parser_bug_604.txt
+++ b/test/prism/snapshots/whitequark/parser_bug_604.txt
@@ -50,6 +50,7 @@
├── block:
│ @ BlockNode (location: (1,8)-(1,14))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,8)-(1,10) = "do"
diff --git a/test/prism/snapshots/whitequark/parser_bug_645.txt b/test/prism/snapshots/whitequark/parser_bug_645.txt
index 4eee6234c1..16b1e171d2 100644
--- a/test/prism/snapshots/whitequark/parser_bug_645.txt
+++ b/test/prism/snapshots/whitequark/parser_bug_645.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,14))
├── locals: [:arg]
+ ├── locals_body_index: 1
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,12)-(1,13) = "{"
├── closing_loc: (1,13)-(1,14) = "}"
diff --git a/test/prism/snapshots/whitequark/procarg0.txt b/test/prism/snapshots/whitequark/procarg0.txt
index 62eaaca68f..2b2756f15d 100644
--- a/test/prism/snapshots/whitequark/procarg0.txt
+++ b/test/prism/snapshots/whitequark/procarg0.txt
@@ -14,6 +14,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,2)-(1,18))
│ │ ├── locals: [:foo, :bar]
+ │ │ ├── locals_body_index: 2
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
│ │ │ ├── parameters:
@@ -53,6 +54,7 @@
├── block:
│ @ BlockNode (location: (3,2)-(3,11))
│ ├── locals: [:foo]
+ │ ├── locals_body_index: 1
│ ├── parameters:
│ │ @ BlockParametersNode (location: (3,4)-(3,9))
│ │ ├── parameters:
diff --git a/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt b/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt
index 72b6842f42..1b46b0f258 100644
--- a/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt
+++ b/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,17))
├── locals: []
+ ├── locals_body_index: 0
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,3)-(1,5) = "do"
├── closing_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/whitequark/rescue_without_begin_end.txt b/test/prism/snapshots/whitequark/rescue_without_begin_end.txt
index c997d99d46..76d1bf821c 100644
--- a/test/prism/snapshots/whitequark/rescue_without_begin_end.txt
+++ b/test/prism/snapshots/whitequark/rescue_without_begin_end.txt
@@ -14,6 +14,7 @@
├── block:
│ @ BlockNode (location: (1,5)-(1,30))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ BeginNode (location: (1,9)-(1,30))
diff --git a/test/prism/snapshots/whitequark/restarg_named.txt b/test/prism/snapshots/whitequark/restarg_named.txt
index 3255609cdd..b61f1fb929 100644
--- a/test/prism/snapshots/whitequark/restarg_named.txt
+++ b/test/prism/snapshots/whitequark/restarg_named.txt
@@ -22,6 +22,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:foo]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/restarg_unnamed.txt b/test/prism/snapshots/whitequark/restarg_unnamed.txt
index d22ad86509..0879ffa3ee 100644
--- a/test/prism/snapshots/whitequark/restarg_unnamed.txt
+++ b/test/prism/snapshots/whitequark/restarg_unnamed.txt
@@ -22,6 +22,7 @@
│ └── block: ∅
├── body: ∅
├── locals: [:*]
+ ├── locals_body_index: 1
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,5)-(1,6) = "("
diff --git a/test/prism/snapshots/whitequark/return_block.txt b/test/prism/snapshots/whitequark/return_block.txt
index f963bedff1..45e5116060 100644
--- a/test/prism/snapshots/whitequark/return_block.txt
+++ b/test/prism/snapshots/whitequark/return_block.txt
@@ -32,6 +32,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,15)-(1,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,15)-(1,17) = "do"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_10653.txt b/test/prism/snapshots/whitequark/ruby_bug_10653.txt
index 35a3e966bd..57c5dfc940 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_10653.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_10653.txt
@@ -22,6 +22,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,14)-(1,20))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
@@ -44,6 +45,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (1,27)-(1,33))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (1,27)-(1,29) = "do"
@@ -70,6 +72,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (3,14)-(3,16))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (3,14)-(3,15) = "{"
@@ -92,6 +95,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (3,23)-(3,25))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (3,23)-(3,24) = "{"
@@ -120,6 +124,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,13)-(5,27))
│ │ ├── locals: [:n]
+ │ │ ├── locals_body_index: 1
│ │ ├── parameters:
│ │ │ @ BlockParametersNode (location: (5,16)-(5,19))
│ │ │ ├── parameters:
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11107.txt b/test/prism/snapshots/whitequark/ruby_bug_11107.txt
index 1d8e922a1f..fe6d76b872 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_11107.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_11107.txt
@@ -14,6 +14,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (1,2)-(1,24))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ ├── opening_loc: (1,7)-(1,9) = "do"
│ │ ├── closing_loc: (1,21)-(1,24) = "end"
@@ -37,6 +38,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,14)-(1,20))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11380.txt b/test/prism/snapshots/whitequark/ruby_bug_11380.txt
index 6f74ac0d6f..cc309e074c 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_11380.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_11380.txt
@@ -14,6 +14,7 @@
│ ├── arguments: (length: 2)
│ │ ├── @ LambdaNode (location: (1,2)-(1,15))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ │ ├── opening_loc: (1,5)-(1,6) = "{"
│ │ │ ├── closing_loc: (1,14)-(1,15) = "}"
@@ -44,6 +45,7 @@
├── block:
│ @ BlockNode (location: (1,22)-(1,28))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,22)-(1,24) = "do"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11873.txt b/test/prism/snapshots/whitequark/ruby_bug_11873.txt
index d094841587..76f37dc5ee 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_11873.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873.txt
@@ -59,6 +59,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,14)-(1,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,14)-(1,16) = "do"
@@ -120,6 +121,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,14)-(3,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (3,14)-(3,16) = "do"
@@ -181,6 +183,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,15)-(5,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (5,15)-(5,17) = "do"
@@ -242,6 +245,7 @@
│ ├── block:
│ │ @ BlockNode (location: (7,15)-(7,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (7,15)-(7,17) = "do"
@@ -303,6 +307,7 @@
│ ├── block:
│ │ @ BlockNode (location: (9,15)-(9,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (9,15)-(9,17) = "do"
@@ -364,6 +369,7 @@
│ ├── block:
│ │ @ BlockNode (location: (11,16)-(11,22))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (11,16)-(11,18) = "do"
@@ -389,6 +395,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (13,3)-(13,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (13,4)-(13,7))
@@ -430,6 +437,7 @@
│ ├── block:
│ │ @ BlockNode (location: (13,14)-(13,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (13,14)-(13,16) = "do"
@@ -455,6 +463,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (15,3)-(15,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (15,4)-(15,7))
@@ -496,6 +505,7 @@
│ ├── block:
│ │ @ BlockNode (location: (15,14)-(15,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (15,14)-(15,16) = "do"
@@ -521,6 +531,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (17,3)-(17,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (17,4)-(17,7))
@@ -562,6 +573,7 @@
│ ├── block:
│ │ @ BlockNode (location: (17,15)-(17,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (17,15)-(17,17) = "do"
@@ -587,6 +599,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (19,3)-(19,9))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (19,4)-(19,8))
@@ -628,6 +641,7 @@
│ ├── block:
│ │ @ BlockNode (location: (19,15)-(19,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (19,15)-(19,17) = "do"
@@ -653,6 +667,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (21,3)-(21,9))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (21,4)-(21,8))
@@ -694,6 +709,7 @@
│ ├── block:
│ │ @ BlockNode (location: (21,15)-(21,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (21,15)-(21,17) = "do"
@@ -719,6 +735,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (23,3)-(23,9))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body:
│ │ │ │ │ @ StatementsNode (location: (23,4)-(23,8))
@@ -760,6 +777,7 @@
├── block:
│ @ BlockNode (location: (23,16)-(23,22))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (23,16)-(23,18) = "do"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt b/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt
index 77da1d947c..6692f5b2af 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt
@@ -55,6 +55,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,12)-(1,18))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,12)-(1,14) = "do"
@@ -111,6 +112,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,14)-(3,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (3,14)-(3,16) = "do"
@@ -169,6 +171,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,15)-(5,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (5,15)-(5,17) = "do"
@@ -227,6 +230,7 @@
│ ├── block:
│ │ @ BlockNode (location: (7,15)-(7,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (7,15)-(7,17) = "do"
@@ -287,6 +291,7 @@
│ ├── block:
│ │ @ BlockNode (location: (9,13)-(9,19))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (9,13)-(9,15) = "do"
@@ -344,6 +349,7 @@
│ ├── block:
│ │ @ BlockNode (location: (11,13)-(11,19))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (11,13)-(11,15) = "do"
@@ -400,6 +406,7 @@
│ ├── block:
│ │ @ BlockNode (location: (13,15)-(13,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (13,15)-(13,17) = "do"
@@ -458,6 +465,7 @@
│ ├── block:
│ │ @ BlockNode (location: (15,16)-(15,22))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (15,16)-(15,18) = "do"
@@ -516,6 +524,7 @@
│ ├── block:
│ │ @ BlockNode (location: (17,16)-(17,22))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (17,16)-(17,18) = "do"
@@ -576,6 +585,7 @@
│ ├── block:
│ │ @ BlockNode (location: (19,14)-(19,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (19,14)-(19,16) = "do"
@@ -601,6 +611,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (21,3)-(21,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (21,4)-(21,7))
@@ -638,6 +649,7 @@
│ ├── block:
│ │ @ BlockNode (location: (21,12)-(21,18))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (21,12)-(21,14) = "do"
@@ -663,6 +675,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (23,3)-(23,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (23,4)-(23,7))
@@ -699,6 +712,7 @@
│ ├── block:
│ │ @ BlockNode (location: (23,14)-(23,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (23,14)-(23,16) = "do"
@@ -724,6 +738,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (25,3)-(25,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (25,4)-(25,7))
@@ -762,6 +777,7 @@
│ ├── block:
│ │ @ BlockNode (location: (25,15)-(25,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (25,15)-(25,17) = "do"
@@ -787,6 +803,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (27,3)-(27,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (27,4)-(27,7))
@@ -825,6 +842,7 @@
│ ├── block:
│ │ @ BlockNode (location: (27,15)-(27,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (27,15)-(27,17) = "do"
@@ -850,6 +868,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (29,3)-(29,8))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (29,4)-(29,7))
@@ -890,6 +909,7 @@
│ ├── block:
│ │ @ BlockNode (location: (29,13)-(29,19))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (29,13)-(29,15) = "do"
@@ -915,6 +935,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (31,3)-(31,9))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (31,4)-(31,8))
@@ -952,6 +973,7 @@
│ ├── block:
│ │ @ BlockNode (location: (31,13)-(31,19))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (31,13)-(31,15) = "do"
@@ -977,6 +999,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (33,3)-(33,9))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (33,4)-(33,8))
@@ -1013,6 +1036,7 @@
│ ├── block:
│ │ @ BlockNode (location: (33,15)-(33,21))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (33,15)-(33,17) = "do"
@@ -1038,6 +1062,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (35,3)-(35,9))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (35,4)-(35,8))
@@ -1076,6 +1101,7 @@
│ ├── block:
│ │ @ BlockNode (location: (35,16)-(35,22))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (35,16)-(35,18) = "do"
@@ -1101,6 +1127,7 @@
│ │ │ │ ├── block:
│ │ │ │ │ @ BlockNode (location: (37,3)-(37,9))
│ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ │ ├── parameters: ∅
│ │ │ │ │ ├── body:
│ │ │ │ │ │ @ StatementsNode (location: (37,4)-(37,8))
@@ -1139,6 +1166,7 @@
│ ├── block:
│ │ @ BlockNode (location: (37,16)-(37,22))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (37,16)-(37,18) = "do"
@@ -1164,6 +1192,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (39,3)-(39,9))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body:
│ │ │ │ │ @ StatementsNode (location: (39,4)-(39,8))
@@ -1204,6 +1233,7 @@
├── block:
│ @ BlockNode (location: (39,14)-(39,20))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (39,14)-(39,16) = "do"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt b/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt
index 6f052e5e6f..2676fa70d9 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt
@@ -23,6 +23,7 @@
│ │ │ ├── block:
│ │ │ │ @ BlockNode (location: (1,3)-(1,13))
│ │ │ │ ├── locals: []
+ │ │ │ │ ├── locals_body_index: 0
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body:
│ │ │ │ │ @ StatementsNode (location: (1,4)-(1,12))
@@ -91,6 +92,7 @@
├── block:
│ @ BlockNode (location: (1,19)-(1,25))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,19)-(1,21) = "do"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_12073.txt b/test/prism/snapshots/whitequark/ruby_bug_12073.txt
index 6c6e335117..dc83733f19 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_12073.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_12073.txt
@@ -83,6 +83,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:raise]
+ ├── locals_body_index: 1
├── def_keyword_loc: (3,0)-(3,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/ruby_bug_13547.txt b/test/prism/snapshots/whitequark/ruby_bug_13547.txt
index becb34f0bb..86b8da6c02 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_13547.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_13547.txt
@@ -24,6 +24,7 @@
├── block:
│ @ BlockNode (location: (1,7)-(1,9))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,7)-(1,8) = "{"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_14690.txt b/test/prism/snapshots/whitequark/ruby_bug_14690.txt
index bccfa5d878..12814dbebc 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_14690.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_14690.txt
@@ -21,6 +21,7 @@
├── block:
│ @ BlockNode (location: (1,7)-(1,23))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (1,9)-(1,21))
@@ -49,6 +50,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,14)-(1,21))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_15789.txt b/test/prism/snapshots/whitequark/ruby_bug_15789.txt
index ec7cd2a739..097b06b9fb 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_15789.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_15789.txt
@@ -14,6 +14,7 @@
│ │ ├── arguments: (length: 1)
│ │ │ └── @ LambdaNode (location: (1,2)-(1,20))
│ │ │ ├── locals: [:a]
+ │ │ │ ├── locals_body_index: 1
│ │ │ ├── operator_loc: (1,2)-(1,4) = "->"
│ │ │ ├── opening_loc: (1,17)-(1,18) = "{"
│ │ │ ├── closing_loc: (1,19)-(1,20) = "}"
@@ -30,6 +31,7 @@
│ │ │ │ │ │ └── value:
│ │ │ │ │ │ @ LambdaNode (location: (1,9)-(1,15))
│ │ │ │ │ │ ├── locals: [:_1]
+ │ │ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ │ │ ├── operator_loc: (1,9)-(1,11) = "->"
│ │ │ │ │ │ ├── opening_loc: (1,11)-(1,12) = "{"
│ │ │ │ │ │ ├── closing_loc: (1,14)-(1,15) = "}"
@@ -71,6 +73,7 @@
│ ├── arguments: (length: 1)
│ │ └── @ LambdaNode (location: (3,2)-(3,19))
│ │ ├── locals: [:a]
+ │ │ ├── locals_body_index: 1
│ │ ├── operator_loc: (3,2)-(3,4) = "->"
│ │ ├── opening_loc: (3,16)-(3,17) = "{"
│ │ ├── closing_loc: (3,18)-(3,19) = "}"
@@ -89,6 +92,7 @@
│ │ │ │ │ └── value:
│ │ │ │ │ @ LambdaNode (location: (3,8)-(3,14))
│ │ │ │ │ ├── locals: [:_1]
+ │ │ │ │ │ ├── locals_body_index: 1
│ │ │ │ │ ├── operator_loc: (3,8)-(3,10) = "->"
│ │ │ │ │ ├── opening_loc: (3,10)-(3,11) = "{"
│ │ │ │ │ ├── closing_loc: (3,13)-(3,14) = "}"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_9669.txt b/test/prism/snapshots/whitequark/ruby_bug_9669.txt
index 1ba582a1d9..a533ea6fad 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_9669.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_9669.txt
@@ -26,6 +26,7 @@
│ │ ├── keyword_loc: (2,0)-(2,6) = "return"
│ │ └── arguments: ∅
│ ├── locals: [:b]
+ │ ├── locals_body_index: 1
│ ├── def_keyword_loc: (1,0)-(1,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
diff --git a/test/prism/snapshots/whitequark/send_block_chain_cmd.txt b/test/prism/snapshots/whitequark/send_block_chain_cmd.txt
index 40e59aa278..be905d2766 100644
--- a/test/prism/snapshots/whitequark/send_block_chain_cmd.txt
+++ b/test/prism/snapshots/whitequark/send_block_chain_cmd.txt
@@ -21,6 +21,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (1,7)-(1,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,7)-(1,9) = "do"
@@ -65,6 +66,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (3,7)-(3,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (3,7)-(3,9) = "do"
@@ -92,6 +94,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,22)-(3,28))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (3,22)-(3,24) = "do"
@@ -115,6 +118,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (5,7)-(5,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (5,7)-(5,9) = "do"
@@ -129,6 +133,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,18)-(5,20))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (5,18)-(5,19) = "{"
@@ -152,6 +157,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (7,7)-(7,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (7,7)-(7,9) = "do"
@@ -196,6 +202,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (9,7)-(9,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (9,7)-(9,9) = "do"
@@ -223,6 +230,7 @@
│ ├── block:
│ │ @ BlockNode (location: (9,23)-(9,25))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (9,23)-(9,24) = "{"
@@ -246,6 +254,7 @@
│ │ ├── block:
│ │ │ @ BlockNode (location: (11,7)-(11,13))
│ │ │ ├── locals: []
+ │ │ │ ├── locals_body_index: 0
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (11,7)-(11,9) = "do"
@@ -290,6 +299,7 @@
│ ├── block:
│ │ @ BlockNode (location: (13,7)-(13,13))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (13,7)-(13,9) = "do"
diff --git a/test/prism/snapshots/whitequark/send_block_conditional.txt b/test/prism/snapshots/whitequark/send_block_conditional.txt
index ed736996b5..342fa4c98c 100644
--- a/test/prism/snapshots/whitequark/send_block_conditional.txt
+++ b/test/prism/snapshots/whitequark/send_block_conditional.txt
@@ -24,6 +24,7 @@
├── block:
│ @ BlockNode (location: (1,9)-(1,11))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,9)-(1,10) = "{"
diff --git a/test/prism/snapshots/whitequark/send_lambda.txt b/test/prism/snapshots/whitequark/send_lambda.txt
index b39992d868..5b0aa38d3d 100644
--- a/test/prism/snapshots/whitequark/send_lambda.txt
+++ b/test/prism/snapshots/whitequark/send_lambda.txt
@@ -5,6 +5,7 @@
└── body: (length: 3)
├── @ LambdaNode (location: (1,0)-(1,8))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,5)-(1,6) = "{"
│ ├── closing_loc: (1,7)-(1,8) = "}"
@@ -29,6 +30,7 @@
│ └── body: ∅
├── @ LambdaNode (location: (3,0)-(3,9))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── operator_loc: (3,0)-(3,2) = "->"
│ ├── opening_loc: (3,3)-(3,5) = "do"
│ ├── closing_loc: (3,6)-(3,9) = "end"
@@ -36,6 +38,7 @@
│ └── body: ∅
└── @ LambdaNode (location: (5,0)-(5,5))
├── locals: []
+ ├── locals_body_index: 0
├── operator_loc: (5,0)-(5,2) = "->"
├── opening_loc: (5,2)-(5,3) = "{"
├── closing_loc: (5,4)-(5,5) = "}"
diff --git a/test/prism/snapshots/whitequark/send_lambda_args.txt b/test/prism/snapshots/whitequark/send_lambda_args.txt
index 0e5dd9a7c0..e5ca1e2ee7 100644
--- a/test/prism/snapshots/whitequark/send_lambda_args.txt
+++ b/test/prism/snapshots/whitequark/send_lambda_args.txt
@@ -5,6 +5,7 @@
└── body: (length: 2)
├── @ LambdaNode (location: (1,0)-(1,10))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,7)-(1,8) = "{"
│ ├── closing_loc: (1,9)-(1,10) = "}"
@@ -27,6 +28,7 @@
│ └── body: ∅
└── @ LambdaNode (location: (3,0)-(3,9))
├── locals: [:a]
+ ├── locals_body_index: 1
├── operator_loc: (3,0)-(3,2) = "->"
├── opening_loc: (3,6)-(3,7) = "{"
├── closing_loc: (3,8)-(3,9) = "}"
diff --git a/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt b/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt
index 913c9a9bb0..b97b8647ab 100644
--- a/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt
+++ b/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt
@@ -5,6 +5,7 @@
└── body: (length: 2)
├── @ LambdaNode (location: (1,0)-(1,11))
│ ├── locals: [:a]
+ │ ├── locals_body_index: 1
│ ├── operator_loc: (1,0)-(1,2) = "->"
│ ├── opening_loc: (1,8)-(1,9) = "{"
│ ├── closing_loc: (1,10)-(1,11) = "}"
@@ -31,6 +32,7 @@
│ └── body: ∅
└── @ LambdaNode (location: (3,0)-(3,9))
├── locals: [:a]
+ ├── locals_body_index: 1
├── operator_loc: (3,0)-(3,2) = "->"
├── opening_loc: (3,6)-(3,7) = "{"
├── closing_loc: (3,8)-(3,9) = "}"
diff --git a/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt b/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt
index 2e1160427c..388988b573 100644
--- a/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt
+++ b/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,19))
├── locals: [:a, :foo, :bar]
+ ├── locals_body_index: 3
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,16)-(1,17) = "{"
├── closing_loc: (1,18)-(1,19) = "}"
diff --git a/test/prism/snapshots/whitequark/send_lambda_legacy.txt b/test/prism/snapshots/whitequark/send_lambda_legacy.txt
index 3a64e941b6..bf05f2267a 100644
--- a/test/prism/snapshots/whitequark/send_lambda_legacy.txt
+++ b/test/prism/snapshots/whitequark/send_lambda_legacy.txt
@@ -5,6 +5,7 @@
└── body: (length: 1)
└── @ LambdaNode (location: (1,0)-(1,5))
├── locals: []
+ ├── locals_body_index: 0
├── operator_loc: (1,0)-(1,2) = "->"
├── opening_loc: (1,2)-(1,3) = "{"
├── closing_loc: (1,4)-(1,5) = "}"
diff --git a/test/prism/snapshots/whitequark/send_self_block.txt b/test/prism/snapshots/whitequark/send_self_block.txt
index 7bbee61474..ced9119179 100644
--- a/test/prism/snapshots/whitequark/send_self_block.txt
+++ b/test/prism/snapshots/whitequark/send_self_block.txt
@@ -14,6 +14,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,4)-(1,10))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,4)-(1,6) = "do"
@@ -30,6 +31,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,4)-(3,7))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (3,4)-(3,5) = "{"
@@ -46,6 +48,7 @@
│ ├── block:
│ │ @ BlockNode (location: (5,6)-(5,9))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (5,6)-(5,7) = "{"
@@ -67,6 +70,7 @@
├── block:
│ @ BlockNode (location: (7,7)-(7,10))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (7,7)-(7,8) = "{"
diff --git a/test/prism/snapshots/whitequark/space_args_arg_block.txt b/test/prism/snapshots/whitequark/space_args_arg_block.txt
index b870fc66d7..f0fe516ca2 100644
--- a/test/prism/snapshots/whitequark/space_args_arg_block.txt
+++ b/test/prism/snapshots/whitequark/space_args_arg_block.txt
@@ -35,6 +35,7 @@
│ ├── block:
│ │ @ BlockNode (location: (1,12)-(1,14))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,12)-(1,13) = "{"
@@ -72,6 +73,7 @@
│ ├── block:
│ │ @ BlockNode (location: (3,13)-(3,15))
│ │ ├── locals: []
+ │ │ ├── locals_body_index: 0
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (3,13)-(3,14) = "{"
@@ -99,6 +101,7 @@
├── block:
│ @ BlockNode (location: (5,8)-(5,10))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (5,8)-(5,9) = "{"
diff --git a/test/prism/snapshots/whitequark/space_args_block.txt b/test/prism/snapshots/whitequark/space_args_block.txt
index 28fcecc97f..a90c1acc59 100644
--- a/test/prism/snapshots/whitequark/space_args_block.txt
+++ b/test/prism/snapshots/whitequark/space_args_block.txt
@@ -21,6 +21,7 @@
├── block:
│ @ BlockNode (location: (1,7)-(1,9))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,7)-(1,8) = "{"
diff --git a/test/prism/snapshots/whitequark/super_block.txt b/test/prism/snapshots/whitequark/super_block.txt
index 124dd22c53..5ba13580d6 100644
--- a/test/prism/snapshots/whitequark/super_block.txt
+++ b/test/prism/snapshots/whitequark/super_block.txt
@@ -7,6 +7,7 @@
│ └── block:
│ @ BlockNode (location: (1,6)-(1,12))
│ ├── locals: []
+ │ ├── locals_body_index: 0
│ ├── parameters: ∅
│ ├── body: ∅
│ ├── opening_loc: (1,6)-(1,8) = "do"
@@ -42,6 +43,7 @@
└── block:
@ BlockNode (location: (3,15)-(3,21))
├── locals: []
+ ├── locals_body_index: 0
├── parameters: ∅
├── body: ∅
├── opening_loc: (3,15)-(3,17) = "do"
diff --git a/test/prism/snapshots/whitequark/trailing_forward_arg.txt b/test/prism/snapshots/whitequark/trailing_forward_arg.txt
index e51eea4685..ddca7304b8 100644
--- a/test/prism/snapshots/whitequark/trailing_forward_arg.txt
+++ b/test/prism/snapshots/whitequark/trailing_forward_arg.txt
@@ -44,6 +44,7 @@
│ ├── block: ∅
│ └── flags: ∅
├── locals: [:a, :b, :"..."]
+ ├── locals_body_index: 3
├── def_keyword_loc: (1,0)-(1,3) = "def"
├── operator_loc: ∅
├── lparen_loc: (1,7)-(1,8) = "("
diff --git a/test/prism/snapshots/whitequark/var_op_asgn.txt b/test/prism/snapshots/whitequark/var_op_asgn.txt
index 7160141b07..c4d20d2ec0 100644
--- a/test/prism/snapshots/whitequark/var_op_asgn.txt
+++ b/test/prism/snapshots/whitequark/var_op_asgn.txt
@@ -45,6 +45,7 @@
│ │ └── flags: decimal
│ └── operator: :|
├── locals: []
+ ├── locals_body_index: 0
├── def_keyword_loc: (7,0)-(7,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅