aboutsummaryrefslogtreecommitdiffstats
path: root/test/prism
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism')
-rw-r--r--test/prism/bom_test.rb59
-rw-r--r--test/prism/comments_test.rb113
-rw-r--r--test/prism/compiler_test.rb30
-rw-r--r--test/prism/desugar_compiler_test.rb86
-rw-r--r--test/prism/dispatcher_test.rb46
-rw-r--r--test/prism/encoding_test.rb106
-rw-r--r--test/prism/errors_test.rb1374
-rw-r--r--test/prism/fixtures/alias.txt23
-rw-r--r--test/prism/fixtures/arithmetic.txt13
-rw-r--r--test/prism/fixtures/arrays.txt82
-rw-r--r--test/prism/fixtures/begin_ensure.txt21
-rw-r--r--test/prism/fixtures/begin_rescue.txt79
-rw-r--r--test/prism/fixtures/blocks.txt54
-rw-r--r--test/prism/fixtures/boolean_operators.txt5
-rw-r--r--test/prism/fixtures/booleans.txt3
-rw-r--r--test/prism/fixtures/break.txt25
-rw-r--r--test/prism/fixtures/case.txt32
-rw-r--r--test/prism/fixtures/classes.txt35
-rw-r--r--test/prism/fixtures/comments.txt24
-rw-r--r--test/prism/fixtures/constants.txt184
-rw-r--r--test/prism/fixtures/dash_heredocs.txt63
-rw-r--r--test/prism/fixtures/defined.txt7
-rw-r--r--test/prism/fixtures/dos_endings.txt20
-rw-r--r--test/prism/fixtures/embdoc_no_newline_at_end.txt2
-rw-r--r--test/prism/fixtures/endless_methods.txt5
-rw-r--r--test/prism/fixtures/endless_range_in_conditional.txt3
-rw-r--r--test/prism/fixtures/for.txt19
-rw-r--r--test/prism/fixtures/global_variables.txt93
-rw-r--r--test/prism/fixtures/hashes.txt26
-rw-r--r--test/prism/fixtures/heredoc_with_escaped_newline_at_start.txt7
-rw-r--r--test/prism/fixtures/heredoc_with_trailing_newline.txt2
-rw-r--r--test/prism/fixtures/heredocs_nested.txt9
-rw-r--r--test/prism/fixtures/heredocs_with_ignored_newlines.txt14
-rw-r--r--test/prism/fixtures/heredocs_with_ignored_newlines_and_non_empty.txt4
-rw-r--r--test/prism/fixtures/if.txt42
-rw-r--r--test/prism/fixtures/indented_file_end.txt4
-rw-r--r--test/prism/fixtures/integer_operations.txt63
-rw-r--r--test/prism/fixtures/keyword_method_names.txt29
-rw-r--r--test/prism/fixtures/keywords.txt11
-rw-r--r--test/prism/fixtures/lambda.txt11
-rw-r--r--test/prism/fixtures/method_calls.txt147
-rw-r--r--test/prism/fixtures/methods.txt168
-rw-r--r--test/prism/fixtures/modules.txt18
-rw-r--r--test/prism/fixtures/newline_terminated.txtbin0 -> 212 bytes
-rw-r--r--test/prism/fixtures/next.txt24
-rw-r--r--test/prism/fixtures/nils.txt13
-rw-r--r--test/prism/fixtures/non_alphanumeric_methods.txt105
-rw-r--r--test/prism/fixtures/not.txt37
-rw-r--r--test/prism/fixtures/numbers.txt63
-rw-r--r--test/prism/fixtures/patterns.txt192
-rw-r--r--test/prism/fixtures/procs.txt27
-rw-r--r--test/prism/fixtures/range_begin_open_exclusive.txt1
-rw-r--r--test/prism/fixtures/range_begin_open_inclusive.txt1
-rw-r--r--test/prism/fixtures/range_end_open_exclusive.txt1
-rw-r--r--test/prism/fixtures/range_end_open_inclusive.txt1
-rw-r--r--test/prism/fixtures/ranges.txt17
-rw-r--r--test/prism/fixtures/regex.txt30
-rw-r--r--test/prism/fixtures/rescue.txt31
-rw-r--r--test/prism/fixtures/return.txt24
-rw-r--r--test/prism/fixtures/seattlerb/BEGIN.txt1
-rw-r--r--test/prism/fixtures/seattlerb/README.rdoc113
-rw-r--r--test/prism/fixtures/seattlerb/TestRubyParserShared.txt92
-rw-r--r--test/prism/fixtures/seattlerb/__ENCODING__.txt1
-rw-r--r--test/prism/fixtures/seattlerb/alias_gvar_backref.txt1
-rw-r--r--test/prism/fixtures/seattlerb/alias_resword.txt1
-rw-r--r--test/prism/fixtures/seattlerb/and_multi.txt3
-rw-r--r--test/prism/fixtures/seattlerb/aref_args_assocs.txt1
-rw-r--r--test/prism/fixtures/seattlerb/aref_args_lit_assocs.txt1
-rw-r--r--test/prism/fixtures/seattlerb/args_kw_block.txt1
-rw-r--r--test/prism/fixtures/seattlerb/array_line_breaks.txt4
-rw-r--r--test/prism/fixtures/seattlerb/array_lits_trailing_calls.txt3
-rw-r--r--test/prism/fixtures/seattlerb/assoc__bare.txt1
-rw-r--r--test/prism/fixtures/seattlerb/assoc_label.txt1
-rw-r--r--test/prism/fixtures/seattlerb/attr_asgn_colon_id.txt1
-rw-r--r--test/prism/fixtures/seattlerb/attrasgn_array_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/attrasgn_array_lhs.txt1
-rw-r--r--test/prism/fixtures/seattlerb/attrasgn_primary_dot_constant.txt1
-rw-r--r--test/prism/fixtures/seattlerb/backticks_interpolation_line.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bang_eq.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bdot2.txt3
-rw-r--r--test/prism/fixtures/seattlerb/bdot3.txt3
-rw-r--r--test/prism/fixtures/seattlerb/begin_ensure_no_bodies.txt3
-rw-r--r--test/prism/fixtures/seattlerb/begin_rescue_else_ensure_bodies.txt9
-rw-r--r--test/prism/fixtures/seattlerb/begin_rescue_else_ensure_no_bodies.txt9
-rw-r--r--test/prism/fixtures/seattlerb/begin_rescue_ensure_no_bodies.txt4
-rw-r--r--test/prism/fixtures/seattlerb/block_arg__bare.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_kwsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_opt_arg_block.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_opt_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_opt_splat_arg_block_omfg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_optional.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_scope.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_scope2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_arg_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_args_kwargs.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_args_no_kwargs.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_args_opt1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_args_opt2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_args_opt2_2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_args_opt3.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_break.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_call_defn_call_block_call.txt4
-rw-r--r--test/prism/fixtures/seattlerb/block_call_dot_op2_brace_block.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_call_dot_op2_cmd_args_do_block.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_call_operation_colon.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_call_operation_dot.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_call_paren_call_block_call.txt2
-rw-r--r--test/prism/fixtures/seattlerb/block_command_operation_colon.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_command_operation_dot.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_decomp_anon_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_decomp_arg_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_decomp_arg_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_decomp_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_kw.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_kw__required.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_kwarg_lvar.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_kwarg_lvar_multiple.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_next.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_opt_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_opt_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_opt_splat_arg_block_omfg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_optarg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_paren_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_reg_optarg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_return.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_scope.txt1
-rw-r--r--test/prism/fixtures/seattlerb/block_splat_reg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug169.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug179.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug190.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug191.txt3
-rw-r--r--test/prism/fixtures/seattlerb/bug202.txt2
-rw-r--r--test/prism/fixtures/seattlerb/bug236.txt3
-rw-r--r--test/prism/fixtures/seattlerb/bug290.txt3
-rw-r--r--test/prism/fixtures/seattlerb/bug_187.txt3
-rw-r--r--test/prism/fixtures/seattlerb/bug_215.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_249.txt4
-rw-r--r--test/prism/fixtures/seattlerb/bug_and.txt4
-rw-r--r--test/prism/fixtures/seattlerb/bug_args__19.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_args_masgn.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_args_masgn2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_args_masgn_outer_parens__19.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_call_arglist_parens.txt11
-rw-r--r--test/prism/fixtures/seattlerb/bug_case_when_regexp.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_cond_pct.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_hash_args.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_hash_args_trailing_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_hash_interp_array.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_masgn_right.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_not_parens.txt1
-rw-r--r--test/prism/fixtures/seattlerb/bug_op_asgn_rescue.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_and.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_arg_assoc.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_arg_assoc_kwsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_arg_kwsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_args_assoc_quoted.txt5
-rw-r--r--test/prism/fixtures/seattlerb/call_args_assoc_trailing_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_args_command.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_array_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_array_block_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_array_lambda_block_call.txt2
-rw-r--r--test/prism/fixtures/seattlerb/call_array_lit_inline_hash.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_assoc.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_assoc_new.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_assoc_new_if_multiline.txt5
-rw-r--r--test/prism/fixtures/seattlerb/call_assoc_trailing_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_bang_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_bang_squiggle.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_begin_call_block_call.txt3
-rw-r--r--test/prism/fixtures/seattlerb/call_block_arg_named.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_carat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_colon2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_colon_parens.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_div.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_dot_parens.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_env.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_eq3.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_gt.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_kwsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_leading_dots.txt3
-rw-r--r--test/prism/fixtures/seattlerb/call_leading_dots_comment.txt4
-rw-r--r--test/prism/fixtures/seattlerb/call_lt.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_lte.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_not.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_pipe.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_rshift.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_self_brackets.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_spaceship.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_stabby_do_end_with_block.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_stabby_with_braces_block.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_star.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_star2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_trailing_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/call_trailing_dots.txt3
-rw-r--r--test/prism/fixtures/seattlerb/call_unary_bang.txt1
-rw-r--r--test/prism/fixtures/seattlerb/case_in.txt111
-rw-r--r--test/prism/fixtures/seattlerb/case_in_31.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_37.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_42.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_42_2.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_47.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_67.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_86.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_86_2.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_array_pat_const.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_array_pat_const2.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_array_pat_paren_assign.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_const.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_else.txt7
-rw-r--r--test/prism/fixtures/seattlerb/case_in_find.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_find_array.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_hash_pat.txt5
-rw-r--r--test/prism/fixtures/seattlerb/case_in_hash_pat_assign.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_hash_pat_paren_assign.txt4
-rw-r--r--test/prism/fixtures/seattlerb/case_in_hash_pat_paren_true.txt5
-rw-r--r--test/prism/fixtures/seattlerb/case_in_hash_pat_rest.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_hash_pat_rest_solo.txt3
-rw-r--r--test/prism/fixtures/seattlerb/case_in_if_unless_post_mod.txt6
-rw-r--r--test/prism/fixtures/seattlerb/case_in_multiple.txt6
-rw-r--r--test/prism/fixtures/seattlerb/case_in_or.txt5
-rw-r--r--test/prism/fixtures/seattlerb/class_comments.txt9
-rw-r--r--test/prism/fixtures/seattlerb/cond_unary_minus.txt1
-rw-r--r--test/prism/fixtures/seattlerb/const_2_op_asgn_or2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/const_3_op_asgn_or.txt1
-rw-r--r--test/prism/fixtures/seattlerb/const_op_asgn_and1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/const_op_asgn_and2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/const_op_asgn_or.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dasgn_icky2.txt8
-rw-r--r--test/prism/fixtures/seattlerb/defined_eh_parens.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_arg_asplat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_arg_forward_args.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_args_forward_args.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_comments.txt5
-rw-r--r--test/prism/fixtures/seattlerb/defn_endless_command.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_endless_command_rescue.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_forward_args.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_forward_args__no_parens.txt3
-rw-r--r--test/prism/fixtures/seattlerb/defn_kwarg_env.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_kwarg_kwarg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_kwarg_kwsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_kwarg_kwsplat_anon.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_kwarg_lvar.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_kwarg_no_parens.txt2
-rw-r--r--test/prism/fixtures/seattlerb/defn_kwarg_val.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_no_kwargs.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_oneliner.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_oneliner_eq2.txt3
-rw-r--r--test/prism/fixtures/seattlerb/defn_oneliner_noargs.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_oneliner_noargs_parentheses.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_oneliner_rescue.txt13
-rw-r--r--test/prism/fixtures/seattlerb/defn_opt_last_arg.txt2
-rw-r--r--test/prism/fixtures/seattlerb/defn_opt_reg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_opt_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_powarg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_reg_opt_reg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defn_unary_not.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defns_reserved.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defs_as_arg_with_do_block_inside.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defs_comments.txt5
-rw-r--r--test/prism/fixtures/seattlerb/defs_endless_command.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defs_endless_command_rescue.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defs_kwarg.txt2
-rw-r--r--test/prism/fixtures/seattlerb/defs_oneliner.txt1
-rw-r--r--test/prism/fixtures/seattlerb/defs_oneliner_eq2.txt3
-rw-r--r--test/prism/fixtures/seattlerb/defs_oneliner_rescue.txt13
-rw-r--r--test/prism/fixtures/seattlerb/difficult0_.txt4
-rw-r--r--test/prism/fixtures/seattlerb/difficult1_line_numbers.txt13
-rw-r--r--test/prism/fixtures/seattlerb/difficult1_line_numbers2.txt8
-rw-r--r--test/prism/fixtures/seattlerb/difficult2_.txt2
-rw-r--r--test/prism/fixtures/seattlerb/difficult3_.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3_2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3_3.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3_4.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3_5.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3__10.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3__11.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3__12.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3__6.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3__7.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3__8.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult3__9.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult4__leading_dots.txt2
-rw-r--r--test/prism/fixtures/seattlerb/difficult4__leading_dots2.txt2
-rw-r--r--test/prism/fixtures/seattlerb/difficult6_.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult6__7.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult6__8.txt1
-rw-r--r--test/prism/fixtures/seattlerb/difficult7_.txt5
-rw-r--r--test/prism/fixtures/seattlerb/do_bug.txt4
-rw-r--r--test/prism/fixtures/seattlerb/do_lambda.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dot2_nil__26.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dot3_nil__26.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dstr_evstr.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dstr_evstr_empty_end.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dstr_lex_state.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dstr_str.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dsym_esc_to_sym.txt1
-rw-r--r--test/prism/fixtures/seattlerb/dsym_to_sym.txt3
-rw-r--r--test/prism/fixtures/seattlerb/eq_begin_line_numbers.txt6
-rw-r--r--test/prism/fixtures/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt3
-rw-r--r--test/prism/fixtures/seattlerb/evstr_evstr.txt1
-rw-r--r--test/prism/fixtures/seattlerb/evstr_str.txt1
-rw-r--r--test/prism/fixtures/seattlerb/expr_not_bang.txt1
-rw-r--r--test/prism/fixtures/seattlerb/f_kw.txt1
-rw-r--r--test/prism/fixtures/seattlerb/f_kw__required.txt1
-rw-r--r--test/prism/fixtures/seattlerb/flip2_env_lvar.txt1
-rw-r--r--test/prism/fixtures/seattlerb/float_with_if_modifier.txt1
-rw-r--r--test/prism/fixtures/seattlerb/heredoc__backslash_dos_format.txt5
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_backslash_nl.txt8
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_bad_hex_escape.txt3
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_bad_oct_escape.txt5
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_comma_arg.txt7
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_lineno.txt7
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_nested.txt7
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly.txt7
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt4
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_blank_lines.txt7
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_empty.txt2
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_interp.txt5
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_no_indent.txt3
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_tabs.txt6
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_tabs_extra.txt6
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_squiggly_visually_blank_lines.txt7
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_trailing_slash_continued_call.txt4
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_unicode.txt4
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes.txt5
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes_windows.txt5
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt4
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns.txt5
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns_windows.txt5
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt4
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt4
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_not_global_interpolation.txt3
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns.txt6
-rw-r--r--test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns_windows.txt6
-rw-r--r--test/prism/fixtures/seattlerb/if_elsif.txt1
-rw-r--r--test/prism/fixtures/seattlerb/if_symbol.txt1
-rw-r--r--test/prism/fixtures/seattlerb/in_expr_no_case.txt1
-rw-r--r--test/prism/fixtures/seattlerb/index_0.txt1
-rw-r--r--test/prism/fixtures/seattlerb/index_0_opasgn.txt1
-rw-r--r--test/prism/fixtures/seattlerb/integer_with_if_modifier.txt1
-rw-r--r--test/prism/fixtures/seattlerb/interpolated_symbol_array_line_breaks.txt5
-rw-r--r--test/prism/fixtures/seattlerb/interpolated_word_array_line_breaks.txt5
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_10_1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_10_2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_11_1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_11_2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_2__19.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_3.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_4.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_5.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_6.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_7_1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_7_2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_8_1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_8_2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_9_1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_args_9_2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_kwarg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/iter_kwarg_kwsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/label_vs_string.txt2
-rw-r--r--test/prism/fixtures/seattlerb/lambda_do_vs_brace.txt7
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_arg_rescue_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_call_bracket_rescue_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_call_nobracket_rescue_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_command.txt1
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_env.txt1
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_ivar_env.txt1
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_lasgn_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/lasgn_middle_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/magic_encoding_comment.txt4
-rw-r--r--test/prism/fixtures/seattlerb/masgn_anon_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_arg_colon_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_arg_ident.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_arg_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_colon2.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_colon3.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_double_paren.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_lhs_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_paren.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_splat_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_splat_arg_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_star.txt1
-rw-r--r--test/prism/fixtures/seattlerb/masgn_var_star_var.txt1
-rw-r--r--test/prism/fixtures/seattlerb/messy_op_asgn_lineno.txt1
-rw-r--r--test/prism/fixtures/seattlerb/method_call_assoc_trailing_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/method_call_trailing_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_back_anonsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_back_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_front_anonsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_front_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_keyword.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_mid_anonsplat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_mid_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/mlhs_rescue.txt1
-rw-r--r--test/prism/fixtures/seattlerb/module_comments.txt10
-rw-r--r--test/prism/fixtures/seattlerb/multiline_hash_declaration.txt8
-rw-r--r--test/prism/fixtures/seattlerb/non_interpolated_symbol_array_line_breaks.txt5
-rw-r--r--test/prism/fixtures/seattlerb/non_interpolated_word_array_line_breaks.txt5
-rw-r--r--test/prism/fixtures/seattlerb/op_asgn_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/op_asgn_dot_ident_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/op_asgn_index_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/op_asgn_primary_colon_const_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier1.txt1
-rw-r--r--test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/op_asgn_val_dot_ident_command_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/parse_def_special_name.txt1
-rw-r--r--test/prism/fixtures/seattlerb/parse_if_not_canonical.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_if_not_noncanonical.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_block.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_block_inline_comment.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_block_inline_comment_leading_newlines.txt7
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_block_inline_multiline_comment.txt4
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_call_ivar_line_break_paren.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_call_no_args.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_defn_complex.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_defn_no_parens.txt6
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_defn_no_parens_args.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_dot2.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_dot2_open.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_dot3.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_dot3_open.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_dstr_escaped_newline.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_dstr_soft_newline.txt4
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_evstr_after_break.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_hash_lit.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_heredoc.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_heredoc_evstr.txt4
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_heredoc_hardnewline.txt7
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_heredoc_regexp_chars.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_iter_call_no_parens.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_iter_call_parens.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_multiline_str.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_multiline_str_literal_n.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_newlines.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_op_asgn.txt4
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_postexe.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_preexe.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_rescue.txt8
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_return.txt6
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_str_with_newline_escape.txt1
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_to_ary.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_line_trailing_newlines.txt2
-rw-r--r--test/prism/fixtures/seattlerb/parse_opt_call_args_assocs_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/parse_opt_call_args_lit_comma.txt1
-rw-r--r--test/prism/fixtures/seattlerb/parse_pattern_019.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_pattern_044.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_pattern_051.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_pattern_058.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_pattern_058_2.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_pattern_069.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_pattern_076.txt5
-rw-r--r--test/prism/fixtures/seattlerb/parse_until_not_canonical.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_until_not_noncanonical.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_while_not_canonical.txt3
-rw-r--r--test/prism/fixtures/seattlerb/parse_while_not_noncanonical.txt3
-rw-r--r--test/prism/fixtures/seattlerb/pctW_lineno.txt5
-rw-r--r--test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt2
-rw-r--r--test/prism/fixtures/seattlerb/pct_nl.txt3
-rw-r--r--test/prism/fixtures/seattlerb/pct_w_heredoc_interp_nested.txt4
-rw-r--r--test/prism/fixtures/seattlerb/pipe_semicolon.txt1
-rw-r--r--test/prism/fixtures/seattlerb/pipe_space.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qWords_space.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qsymbols.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qsymbols_empty.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qsymbols_empty_space.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qsymbols_interp.txt1
-rw-r--r--test/prism/fixtures/seattlerb/quoted_symbol_hash_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/quoted_symbol_keys.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qw_escape.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qw_escape_term.txt1
-rw-r--r--test/prism/fixtures/seattlerb/qwords_empty.txt1
-rw-r--r--test/prism/fixtures/seattlerb/read_escape_unicode_curlies.txt1
-rw-r--r--test/prism/fixtures/seattlerb/read_escape_unicode_h4.txt1
-rw-r--r--test/prism/fixtures/seattlerb/regexp.txt9
-rw-r--r--test/prism/fixtures/seattlerb/regexp_esc_C_slash.txt1
-rw-r--r--test/prism/fixtures/seattlerb/regexp_esc_u.txt1
-rw-r--r--test/prism/fixtures/seattlerb/regexp_escape_extended.txt1
-rw-r--r--test/prism/fixtures/seattlerb/regexp_unicode_curlies.txt3
-rw-r--r--test/prism/fixtures/seattlerb/required_kwarg_no_value.txt2
-rw-r--r--test/prism/fixtures/seattlerb/rescue_do_end_ensure_result.txt5
-rw-r--r--test/prism/fixtures/seattlerb/rescue_do_end_no_raise.txt9
-rw-r--r--test/prism/fixtures/seattlerb/rescue_do_end_raised.txt5
-rw-r--r--test/prism/fixtures/seattlerb/rescue_do_end_rescued.txt9
-rw-r--r--test/prism/fixtures/seattlerb/rescue_in_block.txt4
-rw-r--r--test/prism/fixtures/seattlerb/rescue_parens.txt1
-rw-r--r--test/prism/fixtures/seattlerb/return_call_assocs.txt11
-rw-r--r--test/prism/fixtures/seattlerb/rhs_asgn.txt1
-rw-r--r--test/prism/fixtures/seattlerb/ruby21_numbers.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_attrasgn.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_attrasgn_constant.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_call.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_call_after_newline.txt2
-rw-r--r--test/prism/fixtures/seattlerb/safe_call_dot_parens.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_call_newline.txt2
-rw-r--r--test/prism/fixtures/seattlerb/safe_call_operator.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_call_rhs_newline.txt2
-rw-r--r--test/prism/fixtures/seattlerb/safe_calls.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_op_asgn.txt1
-rw-r--r--test/prism/fixtures/seattlerb/safe_op_asgn2.txt2
-rw-r--r--test/prism/fixtures/seattlerb/slashy_newlines_within_string.txt7
-rw-r--r--test/prism/fixtures/seattlerb/stabby_arg_no_paren.txt1
-rw-r--r--test/prism/fixtures/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/stabby_block_iter_call.txt4
-rw-r--r--test/prism/fixtures/seattlerb/stabby_block_iter_call_no_target_with_arg.txt4
-rw-r--r--test/prism/fixtures/seattlerb/stabby_block_kw.txt1
-rw-r--r--test/prism/fixtures/seattlerb/stabby_block_kw__required.txt1
-rw-r--r--test/prism/fixtures/seattlerb/stabby_proc_scope.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_backslashes.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_double_double_escaped_newline.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_double_escaped_newline.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_double_newline.txt2
-rw-r--r--test/prism/fixtures/seattlerb/str_evstr.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_evstr_escape.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_heredoc_interp.txt5
-rw-r--r--test/prism/fixtures/seattlerb/str_interp_ternary_or_label.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_lit_concat_bad_encodings.txt2
-rw-r--r--test/prism/fixtures/seattlerb/str_newline_hash_line_number.txt2
-rw-r--r--test/prism/fixtures/seattlerb/str_pct_Q_nested.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_pct_nested_nested.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_pct_q.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_single_double_escaped_newline.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_single_escaped_newline.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_single_newline.txt2
-rw-r--r--test/prism/fixtures/seattlerb/str_str.txt1
-rw-r--r--test/prism/fixtures/seattlerb/str_str_str.txt1
-rw-r--r--test/prism/fixtures/seattlerb/super_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/symbol_empty.txt1
-rw-r--r--test/prism/fixtures/seattlerb/symbol_list.txt1
-rw-r--r--test/prism/fixtures/seattlerb/symbols.txt1
-rw-r--r--test/prism/fixtures/seattlerb/symbols_empty.txt1
-rw-r--r--test/prism/fixtures/seattlerb/symbols_empty_space.txt1
-rw-r--r--test/prism/fixtures/seattlerb/symbols_interp.txt1
-rw-r--r--test/prism/fixtures/seattlerb/thingy.txt3
-rw-r--r--test/prism/fixtures/seattlerb/uminus_float.txt1
-rw-r--r--test/prism/fixtures/seattlerb/unary_minus.txt1
-rw-r--r--test/prism/fixtures/seattlerb/unary_plus.txt1
-rw-r--r--test/prism/fixtures/seattlerb/unary_plus_on_literal.txt1
-rw-r--r--test/prism/fixtures/seattlerb/unary_tilde.txt1
-rw-r--r--test/prism/fixtures/seattlerb/utf8_bom.txt3
-rw-r--r--test/prism/fixtures/seattlerb/when_splat.txt1
-rw-r--r--test/prism/fixtures/seattlerb/words_interp.txt1
-rw-r--r--test/prism/fixtures/seattlerb/yield_arg.txt1
-rw-r--r--test/prism/fixtures/seattlerb/yield_call_assocs.txt11
-rw-r--r--test/prism/fixtures/seattlerb/yield_empty_parens.txt1
-rw-r--r--test/prism/fixtures/single_quote_heredocs.txt3
-rw-r--r--test/prism/fixtures/spanning_heredoc.txt51
-rw-r--r--test/prism/fixtures/strings.txt105
-rw-r--r--test/prism/fixtures/super.txt7
-rw-r--r--test/prism/fixtures/symbols.txt93
-rw-r--r--test/prism/fixtures/ternary_operator.txt15
-rw-r--r--test/prism/fixtures/tilde_heredocs.txt91
-rw-r--r--test/prism/fixtures/undef.txt17
-rw-r--r--test/prism/fixtures/unescaping.txt9
-rw-r--r--test/prism/fixtures/unless.txt14
-rw-r--r--test/prism/fixtures/unparser/LICENSE20
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/alias.txt2
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/assignment.txt53
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/block.txt96
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/case.txt37
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/class.txt35
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/control.txt15
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/def.txt134
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/defined.txt3
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/defs.txt40
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/dstr.txt37
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/empty.txt0
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/empty_begin.txt1
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/flipflop.txt6
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/for.txt12
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/hookexe.txt7
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/if.txt36
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/kwbegin.txt80
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/lambda.txt13
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/literal.txt91
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/module.txt16
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/opasgn.txt24
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/pattern.txt41
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/pragma.txt4
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/range.txt4
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/rescue.txt3
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/send.txt84
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/since/27.txt4
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/since/30.txt4
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/since/31.txt7
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/since/32.txt7
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/singletons.txt4
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/super.txt21
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/unary.txt8
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/undef.txt2
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/variables.txt10
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/while.txt73
-rw-r--r--test/prism/fixtures/unparser/corpus/literal/yield.txt3
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/and.txt8
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/block.txt26
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/def.txt7
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/dstr.txt127
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/kwbegin.txt42
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/literal.txt14
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/send.txt6
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/undef.txt2
-rw-r--r--test/prism/fixtures/unparser/corpus/semantic/while.txt25
-rw-r--r--test/prism/fixtures/until.txt11
-rw-r--r--test/prism/fixtures/variables.txt46
-rw-r--r--test/prism/fixtures/while.txt19
-rw-r--r--test/prism/fixtures/whitequark/LICENSE25
-rw-r--r--test/prism/fixtures/whitequark/__ENCODING__.txt1
-rw-r--r--test/prism/fixtures/whitequark/__ENCODING___legacy_.txt1
-rw-r--r--test/prism/fixtures/whitequark/alias.txt1
-rw-r--r--test/prism/fixtures/whitequark/alias_gvar.txt3
-rw-r--r--test/prism/fixtures/whitequark/ambiuous_quoted_label_in_ternary_operator.txt1
-rw-r--r--test/prism/fixtures/whitequark/and.txt3
-rw-r--r--test/prism/fixtures/whitequark/and_asgn.txt3
-rw-r--r--test/prism/fixtures/whitequark/and_or_masgn.txt3
-rw-r--r--test/prism/fixtures/whitequark/anonymous_blockarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/arg.txt3
-rw-r--r--test/prism/fixtures/whitequark/arg_duplicate_ignored.txt3
-rw-r--r--test/prism/fixtures/whitequark/arg_label.txt6
-rw-r--r--test/prism/fixtures/whitequark/arg_scope.txt1
-rw-r--r--test/prism/fixtures/whitequark/args.txt63
-rw-r--r--test/prism/fixtures/whitequark/args_args_assocs.txt3
-rw-r--r--test/prism/fixtures/whitequark/args_args_assocs_comma.txt1
-rw-r--r--test/prism/fixtures/whitequark/args_args_comma.txt1
-rw-r--r--test/prism/fixtures/whitequark/args_args_star.txt3
-rw-r--r--test/prism/fixtures/whitequark/args_assocs.txt11
-rw-r--r--test/prism/fixtures/whitequark/args_assocs_comma.txt1
-rw-r--r--test/prism/fixtures/whitequark/args_assocs_legacy.txt11
-rw-r--r--test/prism/fixtures/whitequark/args_block_pass.txt1
-rw-r--r--test/prism/fixtures/whitequark/args_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/args_star.txt3
-rw-r--r--test/prism/fixtures/whitequark/array_assocs.txt3
-rw-r--r--test/prism/fixtures/whitequark/array_plain.txt1
-rw-r--r--test/prism/fixtures/whitequark/array_splat.txt5
-rw-r--r--test/prism/fixtures/whitequark/array_symbols.txt1
-rw-r--r--test/prism/fixtures/whitequark/array_symbols_empty.txt3
-rw-r--r--test/prism/fixtures/whitequark/array_symbols_interp.txt3
-rw-r--r--test/prism/fixtures/whitequark/array_words.txt1
-rw-r--r--test/prism/fixtures/whitequark/array_words_empty.txt3
-rw-r--r--test/prism/fixtures/whitequark/array_words_interp.txt3
-rw-r--r--test/prism/fixtures/whitequark/asgn_cmd.txt3
-rw-r--r--test/prism/fixtures/whitequark/asgn_mrhs.txt5
-rw-r--r--test/prism/fixtures/whitequark/back_ref.txt1
-rw-r--r--test/prism/fixtures/whitequark/bang.txt1
-rw-r--r--test/prism/fixtures/whitequark/bang_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/begin_cmdarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/beginless_erange_after_newline.txt2
-rw-r--r--test/prism/fixtures/whitequark/beginless_irange_after_newline.txt2
-rw-r--r--test/prism/fixtures/whitequark/beginless_range.txt3
-rw-r--r--test/prism/fixtures/whitequark/blockarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/blockargs.txt71
-rw-r--r--test/prism/fixtures/whitequark/break.txt7
-rw-r--r--test/prism/fixtures/whitequark/break_block.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_435.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_447.txt3
-rw-r--r--test/prism/fixtures/whitequark/bug_452.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_466.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_473.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_480.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_481.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_ascii_8bit_in_literal.txt2
-rw-r--r--test/prism/fixtures/whitequark/bug_cmd_string_lookahead.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_cmdarg.txt5
-rw-r--r--test/prism/fixtures/whitequark/bug_def_no_paren_eql_begin.txt4
-rw-r--r--test/prism/fixtures/whitequark/bug_do_block_in_call_args.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_do_block_in_cmdarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_do_block_in_hash_brace.txt9
-rw-r--r--test/prism/fixtures/whitequark/bug_heredoc_do.txt3
-rw-r--r--test/prism/fixtures/whitequark/bug_interp_single.txt3
-rw-r--r--test/prism/fixtures/whitequark/bug_lambda_leakage.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_regex_verification.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_rescue_empty_else.txt1
-rw-r--r--test/prism/fixtures/whitequark/bug_while_not_parens_do.txt1
-rw-r--r--test/prism/fixtures/whitequark/case_cond.txt1
-rw-r--r--test/prism/fixtures/whitequark/case_cond_else.txt1
-rw-r--r--test/prism/fixtures/whitequark/case_expr.txt1
-rw-r--r--test/prism/fixtures/whitequark/case_expr_else.txt1
-rw-r--r--test/prism/fixtures/whitequark/casgn_scoped.txt1
-rw-r--r--test/prism/fixtures/whitequark/casgn_toplevel.txt1
-rw-r--r--test/prism/fixtures/whitequark/casgn_unscoped.txt1
-rw-r--r--test/prism/fixtures/whitequark/character.txt1
-rw-r--r--test/prism/fixtures/whitequark/class.txt3
-rw-r--r--test/prism/fixtures/whitequark/class_definition_in_while_cond.txt7
-rw-r--r--test/prism/fixtures/whitequark/class_super.txt1
-rw-r--r--test/prism/fixtures/whitequark/class_super_label.txt1
-rw-r--r--test/prism/fixtures/whitequark/comments_before_leading_dot__27.txt19
-rw-r--r--test/prism/fixtures/whitequark/complex.txt7
-rw-r--r--test/prism/fixtures/whitequark/cond_begin.txt1
-rw-r--r--test/prism/fixtures/whitequark/cond_begin_masgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/cond_eflipflop.txt3
-rw-r--r--test/prism/fixtures/whitequark/cond_iflipflop.txt3
-rw-r--r--test/prism/fixtures/whitequark/cond_match_current_line.txt3
-rw-r--r--test/prism/fixtures/whitequark/const_op_asgn.txt9
-rw-r--r--test/prism/fixtures/whitequark/const_scoped.txt1
-rw-r--r--test/prism/fixtures/whitequark/const_toplevel.txt1
-rw-r--r--test/prism/fixtures/whitequark/const_unscoped.txt1
-rw-r--r--test/prism/fixtures/whitequark/cpath.txt3
-rw-r--r--test/prism/fixtures/whitequark/cvar.txt1
-rw-r--r--test/prism/fixtures/whitequark/cvasgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/dedenting_heredoc.txt75
-rw-r--r--test/prism/fixtures/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt4
-rw-r--r--test/prism/fixtures/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt4
-rw-r--r--test/prism/fixtures/whitequark/def.txt11
-rw-r--r--test/prism/fixtures/whitequark/defined.txt5
-rw-r--r--test/prism/fixtures/whitequark/defs.txt9
-rw-r--r--test/prism/fixtures/whitequark/empty_stmt.txt1
-rw-r--r--test/prism/fixtures/whitequark/endless_comparison_method.txt11
-rw-r--r--test/prism/fixtures/whitequark/endless_method.txt7
-rw-r--r--test/prism/fixtures/whitequark/endless_method_command_syntax.txt15
-rw-r--r--test/prism/fixtures/whitequark/endless_method_forwarded_args_legacy.txt1
-rw-r--r--test/prism/fixtures/whitequark/endless_method_with_rescue_mod.txt3
-rw-r--r--test/prism/fixtures/whitequark/endless_method_without_args.txt7
-rw-r--r--test/prism/fixtures/whitequark/ensure.txt1
-rw-r--r--test/prism/fixtures/whitequark/ensure_empty.txt1
-rw-r--r--test/prism/fixtures/whitequark/false.txt1
-rw-r--r--test/prism/fixtures/whitequark/float.txt3
-rw-r--r--test/prism/fixtures/whitequark/for.txt3
-rw-r--r--test/prism/fixtures/whitequark/for_mlhs.txt1
-rw-r--r--test/prism/fixtures/whitequark/forward_arg.txt1
-rw-r--r--test/prism/fixtures/whitequark/forward_arg_with_open_args.txt27
-rw-r--r--test/prism/fixtures/whitequark/forward_args_legacy.txt5
-rw-r--r--test/prism/fixtures/whitequark/forwarded_argument_with_kwrestarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/forwarded_argument_with_restarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/forwarded_kwrestarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/forwarded_restarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/gvar.txt1
-rw-r--r--test/prism/fixtures/whitequark/gvasgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/hash_empty.txt1
-rw-r--r--test/prism/fixtures/whitequark/hash_hashrocket.txt3
-rw-r--r--test/prism/fixtures/whitequark/hash_kwsplat.txt1
-rw-r--r--test/prism/fixtures/whitequark/hash_label.txt1
-rw-r--r--test/prism/fixtures/whitequark/hash_label_end.txt5
-rw-r--r--test/prism/fixtures/whitequark/hash_pair_value_omission.txt5
-rw-r--r--test/prism/fixtures/whitequark/heredoc.txt14
-rw-r--r--test/prism/fixtures/whitequark/if.txt3
-rw-r--r--test/prism/fixtures/whitequark/if_else.txt3
-rw-r--r--test/prism/fixtures/whitequark/if_elsif.txt1
-rw-r--r--test/prism/fixtures/whitequark/if_masgn__24.txt1
-rw-r--r--test/prism/fixtures/whitequark/if_mod.txt1
-rw-r--r--test/prism/fixtures/whitequark/if_nl_then.txt2
-rw-r--r--test/prism/fixtures/whitequark/if_while_after_class__since_32.txt7
-rw-r--r--test/prism/fixtures/whitequark/int.txt5
-rw-r--r--test/prism/fixtures/whitequark/int___LINE__.txt1
-rw-r--r--test/prism/fixtures/whitequark/interp_digit_var.txt87
-rw-r--r--test/prism/fixtures/whitequark/ivar.txt1
-rw-r--r--test/prism/fixtures/whitequark/ivasgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/keyword_argument_omission.txt1
-rw-r--r--test/prism/fixtures/whitequark/kwarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/kwbegin_compstmt.txt1
-rw-r--r--test/prism/fixtures/whitequark/kwnilarg.txt5
-rw-r--r--test/prism/fixtures/whitequark/kwoptarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt1
-rw-r--r--test/prism/fixtures/whitequark/kwrestarg_named.txt1
-rw-r--r--test/prism/fixtures/whitequark/kwrestarg_unnamed.txt1
-rw-r--r--test/prism/fixtures/whitequark/lbrace_arg_after_command_args.txt1
-rw-r--r--test/prism/fixtures/whitequark/lparenarg_after_lvar__since_25.txt3
-rw-r--r--test/prism/fixtures/whitequark/lvar.txt1
-rw-r--r--test/prism/fixtures/whitequark/lvar_injecting_match.txt1
-rw-r--r--test/prism/fixtures/whitequark/lvasgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/masgn.txt5
-rw-r--r--test/prism/fixtures/whitequark/masgn_attr.txt5
-rw-r--r--test/prism/fixtures/whitequark/masgn_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/masgn_const.txt3
-rw-r--r--test/prism/fixtures/whitequark/masgn_nested.txt3
-rw-r--r--test/prism/fixtures/whitequark/masgn_splat.txt19
-rw-r--r--test/prism/fixtures/whitequark/method_definition_in_while_cond.txt7
-rw-r--r--test/prism/fixtures/whitequark/module.txt1
-rw-r--r--test/prism/fixtures/whitequark/multiple_pattern_matches.txt5
-rw-r--r--test/prism/fixtures/whitequark/newline_in_hash_argument.txt14
-rw-r--r--test/prism/fixtures/whitequark/next.txt7
-rw-r--r--test/prism/fixtures/whitequark/next_block.txt1
-rw-r--r--test/prism/fixtures/whitequark/nil.txt1
-rw-r--r--test/prism/fixtures/whitequark/nil_expression.txt3
-rw-r--r--test/prism/fixtures/whitequark/non_lvar_injecting_match.txt1
-rw-r--r--test/prism/fixtures/whitequark/not.txt5
-rw-r--r--test/prism/fixtures/whitequark/not_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/not_masgn__24.txt1
-rw-r--r--test/prism/fixtures/whitequark/nth_ref.txt1
-rw-r--r--test/prism/fixtures/whitequark/numbered_args_after_27.txt7
-rw-r--r--test/prism/fixtures/whitequark/numparam_outside_block.txt9
-rw-r--r--test/prism/fixtures/whitequark/op_asgn.txt5
-rw-r--r--test/prism/fixtures/whitequark/op_asgn_cmd.txt7
-rw-r--r--test/prism/fixtures/whitequark/op_asgn_index.txt1
-rw-r--r--test/prism/fixtures/whitequark/op_asgn_index_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/optarg.txt3
-rw-r--r--test/prism/fixtures/whitequark/or.txt3
-rw-r--r--test/prism/fixtures/whitequark/or_asgn.txt3
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_272.txt1
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_490.txt5
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_507.txt1
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_518.txt2
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_525.txt1
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_604.txt1
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_640.txt4
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_645.txt1
-rw-r--r--test/prism/fixtures/whitequark/parser_bug_830.txt1
-rw-r--r--test/prism/fixtures/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt3
-rw-r--r--test/prism/fixtures/whitequark/parser_slash_slash_n_escaping_in_literals.txt62
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching__FILE__LINE_literals.txt4
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_blank_else.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_else.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_single_line.txt3
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt11
-rw-r--r--test/prism/fixtures/whitequark/postexe.txt1
-rw-r--r--test/prism/fixtures/whitequark/preexe.txt1
-rw-r--r--test/prism/fixtures/whitequark/procarg0.txt3
-rw-r--r--test/prism/fixtures/whitequark/range_exclusive.txt1
-rw-r--r--test/prism/fixtures/whitequark/range_inclusive.txt1
-rw-r--r--test/prism/fixtures/whitequark/rational.txt3
-rw-r--r--test/prism/fixtures/whitequark/redo.txt1
-rw-r--r--test/prism/fixtures/whitequark/regex_interp.txt1
-rw-r--r--test/prism/fixtures/whitequark/regex_plain.txt1
-rw-r--r--test/prism/fixtures/whitequark/resbody_list.txt1
-rw-r--r--test/prism/fixtures/whitequark/resbody_list_mrhs.txt1
-rw-r--r--test/prism/fixtures/whitequark/resbody_list_var.txt1
-rw-r--r--test/prism/fixtures/whitequark/resbody_var.txt3
-rw-r--r--test/prism/fixtures/whitequark/rescue.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_else.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_else_ensure.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_ensure.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_in_lambda_block.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_mod.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_mod_asgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_mod_masgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_mod_op_assign.txt1
-rw-r--r--test/prism/fixtures/whitequark/rescue_without_begin_end.txt1
-rw-r--r--test/prism/fixtures/whitequark/restarg_named.txt1
-rw-r--r--test/prism/fixtures/whitequark/restarg_unnamed.txt1
-rw-r--r--test/prism/fixtures/whitequark/retry.txt1
-rw-r--r--test/prism/fixtures/whitequark/return.txt7
-rw-r--r--test/prism/fixtures/whitequark/return_block.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_10279.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_10653.txt5
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_11107.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_11380.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_11873.txt23
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_11873_a.txt39
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_11873_b.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_11989.txt3
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_11990.txt3
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_12073.txt3
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_12402.txt27
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_12669.txt7
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_12686.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_13547.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_14690.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_15789.txt3
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_9669.txt8
-rw-r--r--test/prism/fixtures/whitequark/sclass.txt1
-rw-r--r--test/prism/fixtures/whitequark/self.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_attr_asgn.txt7
-rw-r--r--test/prism/fixtures/whitequark/send_attr_asgn_conditional.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_binary_op.txt41
-rw-r--r--test/prism/fixtures/whitequark/send_block_chain_cmd.txt13
-rw-r--r--test/prism/fixtures/whitequark/send_block_conditional.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_call.txt3
-rw-r--r--test/prism/fixtures/whitequark/send_conditional.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_index.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_index_asgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_index_asgn_legacy.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_index_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_index_legacy.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_lambda.txt5
-rw-r--r--test/prism/fixtures/whitequark/send_lambda_args.txt3
-rw-r--r--test/prism/fixtures/whitequark/send_lambda_args_noparen.txt3
-rw-r--r--test/prism/fixtures/whitequark/send_lambda_args_shadow.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_lambda_legacy.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_op_asgn_conditional.txt1
-rw-r--r--test/prism/fixtures/whitequark/send_plain.txt5
-rw-r--r--test/prism/fixtures/whitequark/send_plain_cmd.txt5
-rw-r--r--test/prism/fixtures/whitequark/send_self.txt5
-rw-r--r--test/prism/fixtures/whitequark/send_self_block.txt7
-rw-r--r--test/prism/fixtures/whitequark/send_unary_op.txt5
-rw-r--r--test/prism/fixtures/whitequark/slash_newline_in_heredocs.txt13
-rw-r--r--test/prism/fixtures/whitequark/space_args_arg.txt1
-rw-r--r--test/prism/fixtures/whitequark/space_args_arg_block.txt5
-rw-r--r--test/prism/fixtures/whitequark/space_args_arg_call.txt1
-rw-r--r--test/prism/fixtures/whitequark/space_args_arg_newline.txt2
-rw-r--r--test/prism/fixtures/whitequark/space_args_block.txt1
-rw-r--r--test/prism/fixtures/whitequark/space_args_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/string___FILE__.txt1
-rw-r--r--test/prism/fixtures/whitequark/string_concat.txt1
-rw-r--r--test/prism/fixtures/whitequark/string_dvar.txt1
-rw-r--r--test/prism/fixtures/whitequark/string_interp.txt1
-rw-r--r--test/prism/fixtures/whitequark/string_plain.txt3
-rw-r--r--test/prism/fixtures/whitequark/super.txt5
-rw-r--r--test/prism/fixtures/whitequark/super_block.txt3
-rw-r--r--test/prism/fixtures/whitequark/symbol_interp.txt1
-rw-r--r--test/prism/fixtures/whitequark/symbol_plain.txt3
-rw-r--r--test/prism/fixtures/whitequark/ternary.txt1
-rw-r--r--test/prism/fixtures/whitequark/ternary_ambiguous_symbol.txt1
-rw-r--r--test/prism/fixtures/whitequark/trailing_forward_arg.txt1
-rw-r--r--test/prism/fixtures/whitequark/true.txt1
-rw-r--r--test/prism/fixtures/whitequark/unary_num_pow_precedence.txt5
-rw-r--r--test/prism/fixtures/whitequark/undef.txt1
-rw-r--r--test/prism/fixtures/whitequark/unless.txt3
-rw-r--r--test/prism/fixtures/whitequark/unless_else.txt3
-rw-r--r--test/prism/fixtures/whitequark/unless_mod.txt1
-rw-r--r--test/prism/fixtures/whitequark/until.txt3
-rw-r--r--test/prism/fixtures/whitequark/until_mod.txt1
-rw-r--r--test/prism/fixtures/whitequark/until_post.txt1
-rw-r--r--test/prism/fixtures/whitequark/var_and_asgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/var_op_asgn.txt7
-rw-r--r--test/prism/fixtures/whitequark/var_op_asgn_cmd.txt1
-rw-r--r--test/prism/fixtures/whitequark/var_or_asgn.txt1
-rw-r--r--test/prism/fixtures/whitequark/when_multi.txt1
-rw-r--r--test/prism/fixtures/whitequark/when_splat.txt1
-rw-r--r--test/prism/fixtures/whitequark/when_then.txt1
-rw-r--r--test/prism/fixtures/whitequark/while.txt3
-rw-r--r--test/prism/fixtures/whitequark/while_mod.txt1
-rw-r--r--test/prism/fixtures/whitequark/while_post.txt1
-rw-r--r--test/prism/fixtures/whitequark/xstring_interp.txt1
-rw-r--r--test/prism/fixtures/whitequark/xstring_plain.txt1
-rw-r--r--test/prism/fixtures/whitequark/yield.txt7
-rw-r--r--test/prism/fixtures/whitequark/zsuper.txt1
-rw-r--r--test/prism/fixtures/xstring.txt7
-rw-r--r--test/prism/fixtures/yield.txt7
-rw-r--r--test/prism/fuzzer_test.rb61
-rw-r--r--test/prism/heredoc_dedent_test.rb22
-rw-r--r--test/prism/iseq_test.rb337
-rw-r--r--test/prism/library_symbols_test.rb103
-rw-r--r--test/prism/locals_test.rb109
-rw-r--r--test/prism/location_test.rb870
-rw-r--r--test/prism/memsize_test.rb17
-rw-r--r--test/prism/newline_test.rb91
-rw-r--r--test/prism/parse_serialize_test.rb38
-rw-r--r--test/prism/parse_test.rb230
-rw-r--r--test/prism/pattern_test.rb132
-rw-r--r--test/prism/regexp_test.rb251
-rw-r--r--test/prism/ripper_compat_test.rb21
-rw-r--r--test/prism/ruby_api_test.rb64
-rw-r--r--test/prism/snapshots/alias.txt173
-rw-r--r--test/prism/snapshots/arithmetic.txt245
-rw-r--r--test/prism/snapshots/arrays.txt873
-rw-r--r--test/prism/snapshots/begin_ensure.txt249
-rw-r--r--test/prism/snapshots/begin_rescue.txt699
-rw-r--r--test/prism/snapshots/blocks.txt750
-rw-r--r--test/prism/snapshots/boolean_operators.txt54
-rw-r--r--test/prism/snapshots/booleans.txt7
-rw-r--r--test/prism/snapshots/break.txt207
-rw-r--r--test/prism/snapshots/case.txt265
-rw-r--r--test/prism/snapshots/classes.txt355
-rw-r--r--test/prism/snapshots/comments.txt145
-rw-r--r--test/prism/snapshots/constants.txt1225
-rw-r--r--test/prism/snapshots/dash_heredocs.txt251
-rw-r--r--test/prism/snapshots/defined.txt73
-rw-r--r--test/prism/snapshots/dos_endings.txt93
-rw-r--r--test/prism/snapshots/embdoc_no_newline_at_end.txt5
-rw-r--r--test/prism/snapshots/endless_methods.txt100
-rw-r--r--test/prism/snapshots/endless_range_in_conditional.txt46
-rw-r--r--test/prism/snapshots/for.txt172
-rw-r--r--test/prism/snapshots/global_variables.txt164
-rw-r--r--test/prism/snapshots/hashes.txt355
-rw-r--r--test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt65
-rw-r--r--test/prism/snapshots/heredoc_with_trailing_newline.txt11
-rw-r--r--test/prism/snapshots/heredocs_nested.txt33
-rw-r--r--test/prism/snapshots/heredocs_with_ignored_newlines.txt17
-rw-r--r--test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt11
-rw-r--r--test/prism/snapshots/if.txt429
-rw-r--r--test/prism/snapshots/indented_file_end.txt18
-rw-r--r--test/prism/snapshots/integer_operations.txt539
-rw-r--r--test/prism/snapshots/keyword_method_names.txt170
-rw-r--r--test/prism/snapshots/keywords.txt12
-rw-r--r--test/prism/snapshots/lambda.txt194
-rw-r--r--test/prism/snapshots/method_calls.txt2171
-rw-r--r--test/prism/snapshots/methods.txt1642
-rw-r--r--test/prism/snapshots/modules.txt179
-rw-r--r--test/prism/snapshots/newline_terminated.txt107
-rw-r--r--test/prism/snapshots/next.txt123
-rw-r--r--test/prism/snapshots/nils.txt32
-rw-r--r--test/prism/snapshots/non_alphanumeric_methods.txt501
-rw-r--r--test/prism/snapshots/not.txt351
-rw-r--r--test/prism/snapshots/numbers.txt102
-rw-r--r--test/prism/snapshots/patterns.txt4501
-rw-r--r--test/prism/snapshots/procs.txt375
-rw-r--r--test/prism/snapshots/range_begin_open_exclusive.txt12
-rw-r--r--test/prism/snapshots/range_begin_open_inclusive.txt12
-rw-r--r--test/prism/snapshots/range_end_open_exclusive.txt12
-rw-r--r--test/prism/snapshots/range_end_open_inclusive.txt12
-rw-r--r--test/prism/snapshots/ranges.txt160
-rw-r--r--test/prism/snapshots/regex.txt209
-rw-r--r--test/prism/snapshots/rescue.txt378
-rw-r--r--test/prism/snapshots/return.txt128
-rw-r--r--test/prism/snapshots/seattlerb/BEGIN.txt14
-rw-r--r--test/prism/snapshots/seattlerb/TestRubyParserShared.txt332
-rw-r--r--test/prism/snapshots/seattlerb/__ENCODING__.txt6
-rw-r--r--test/prism/snapshots/seattlerb/alias_gvar_backref.txt12
-rw-r--r--test/prism/snapshots/seattlerb/alias_resword.txt19
-rw-r--r--test/prism/snapshots/seattlerb/and_multi.txt26
-rw-r--r--test/prism/snapshots/seattlerb/aref_args_assocs.txt19
-rw-r--r--test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt21
-rw-r--r--test/prism/snapshots/seattlerb/args_kw_block.txt36
-rw-r--r--test/prism/snapshots/seattlerb/array_line_breaks.txt23
-rw-r--r--test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt33
-rw-r--r--test/prism/snapshots/seattlerb/assoc__bare.txt30
-rw-r--r--test/prism/snapshots/seattlerb/assoc_label.txt30
-rw-r--r--test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt21
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_array_arg.txt37
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt76
-rw-r--r--test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt29
-rw-r--r--test/prism/snapshots/seattlerb/backticks_interpolation_line.txt37
-rw-r--r--test/prism/snapshots/seattlerb/bang_eq.txt21
-rw-r--r--test/prism/snapshots/seattlerb/bdot2.txt37
-rw-r--r--test/prism/snapshots/seattlerb/bdot3.txt37
-rw-r--r--test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt16
-rw-r--r--test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt43
-rw-r--r--test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt27
-rw-r--r--test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt23
-rw-r--r--test/prism/snapshots/seattlerb/block_arg__bare.txt30
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_kwsplat.txt38
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt49
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat.txt47
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt53
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_optional.txt41
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope.txt38
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_scope2.txt40
-rw-r--r--test/prism/snapshots/seattlerb/block_arg_splat_arg.txt42
-rw-r--r--test/prism/snapshots/seattlerb/block_args_kwargs.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_args_no_kwargs.txt37
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt1.txt55
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2.txt48
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt2_2.txt65
-rw-r--r--test/prism/snapshots/seattlerb/block_args_opt3.txt72
-rw-r--r--test/prism/snapshots/seattlerb/block_break.txt53
-rw-r--r--test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt78
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt98
-rw-r--r--test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt110
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_colon.txt53
-rw-r--r--test/prism/snapshots/seattlerb/block_call_operation_dot.txt53
-rw-r--r--test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt59
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_colon.txt45
-rw-r--r--test/prism/snapshots/seattlerb/block_command_operation_dot.txt45
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt47
-rw-r--r--test/prism/snapshots/seattlerb/block_decomp_splat.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_kw.txt40
-rw-r--r--test/prism/snapshots/seattlerb/block_kw__required.txt38
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar.txt48
-rw-r--r--test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt57
-rw-r--r--test/prism/snapshots/seattlerb/block_next.txt53
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_arg.txt43
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat.txt45
-rw-r--r--test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt51
-rw-r--r--test/prism/snapshots/seattlerb/block_optarg.txt44
-rw-r--r--test/prism/snapshots/seattlerb/block_paren_splat.txt45
-rw-r--r--test/prism/snapshots/seattlerb/block_reg_optarg.txt46
-rw-r--r--test/prism/snapshots/seattlerb/block_return.txt53
-rw-r--r--test/prism/snapshots/seattlerb/block_scope.txt28
-rw-r--r--test/prism/snapshots/seattlerb/block_splat_reg.txt40
-rw-r--r--test/prism/snapshots/seattlerb/bug169.txt27
-rw-r--r--test/prism/snapshots/seattlerb/bug179.txt27
-rw-r--r--test/prism/snapshots/seattlerb/bug190.txt11
-rw-r--r--test/prism/snapshots/seattlerb/bug191.txt85
-rw-r--r--test/prism/snapshots/seattlerb/bug202.txt20
-rw-r--r--test/prism/snapshots/seattlerb/bug236.txt71
-rw-r--r--test/prism/snapshots/seattlerb/bug290.txt24
-rw-r--r--test/prism/snapshots/seattlerb/bug_187.txt58
-rw-r--r--test/prism/snapshots/seattlerb/bug_215.txt13
-rw-r--r--test/prism/snapshots/seattlerb/bug_249.txt83
-rw-r--r--test/prism/snapshots/seattlerb/bug_and.txt20
-rw-r--r--test/prism/snapshots/seattlerb/bug_args__19.txt54
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn.txt44
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn2.txt50
-rw-r--r--test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt48
-rw-r--r--test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt101
-rw-r--r--test/prism/snapshots/seattlerb/bug_case_when_regexp.txt26
-rw-r--r--test/prism/snapshots/seattlerb/bug_comma.txt39
-rw-r--r--test/prism/snapshots/seattlerb/bug_cond_pct.txt21
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args.txt34
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt34
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_interp_array.txt25
-rw-r--r--test/prism/snapshots/seattlerb/bug_masgn_right.txt44
-rw-r--r--test/prism/snapshots/seattlerb/bug_not_parens.txt25
-rw-r--r--test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt26
-rw-r--r--test/prism/snapshots/seattlerb/call_and.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_assoc.txt29
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt37
-rw-r--r--test/prism/snapshots/seattlerb/call_arg_kwsplat.txt34
-rw-r--r--test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt95
-rw-r--r--test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt29
-rw-r--r--test/prism/snapshots/seattlerb/call_args_command.txt51
-rw-r--r--test/prism/snapshots/seattlerb/call_array_arg.txt33
-rw-r--r--test/prism/snapshots/seattlerb/call_array_block_call.txt38
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt39
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt39
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc.txt27
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new.txt30
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt51
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt27
-rw-r--r--test/prism/snapshots/seattlerb/call_bang_command_call.txt39
-rw-r--r--test/prism/snapshots/seattlerb/call_bang_squiggle.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_begin_call_block_call.txt52
-rw-r--r--test/prism/snapshots/seattlerb/call_block_arg_named.txt28
-rw-r--r--test/prism/snapshots/seattlerb/call_carat.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_colon2.txt17
-rw-r--r--test/prism/snapshots/seattlerb/call_colon_parens.txt17
-rw-r--r--test/prism/snapshots/seattlerb/call_div.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_dot_parens.txt17
-rw-r--r--test/prism/snapshots/seattlerb/call_env.txt25
-rw-r--r--test/prism/snapshots/seattlerb/call_eq3.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_gt.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_kwsplat.txt24
-rw-r--r--test/prism/snapshots/seattlerb/call_leading_dots.txt35
-rw-r--r--test/prism/snapshots/seattlerb/call_leading_dots_comment.txt35
-rw-r--r--test/prism/snapshots/seattlerb/call_lt.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_lte.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_not.txt17
-rw-r--r--test/prism/snapshots/seattlerb/call_pipe.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_rshift.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_self_brackets.txt20
-rw-r--r--test/prism/snapshots/seattlerb/call_spaceship.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt38
-rw-r--r--test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt38
-rw-r--r--test/prism/snapshots/seattlerb/call_star.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_star2.txt21
-rw-r--r--test/prism/snapshots/seattlerb/call_trailing_comma.txt19
-rw-r--r--test/prism/snapshots/seattlerb/call_trailing_dots.txt35
-rw-r--r--test/prism/snapshots/seattlerb/call_unary_bang.txt17
-rw-r--r--test/prism/snapshots/seattlerb/case_in.txt892
-rw-r--r--test/prism/snapshots/seattlerb/case_in_31.txt46
-rw-r--r--test/prism/snapshots/seattlerb/case_in_37.txt55
-rw-r--r--test/prism/snapshots/seattlerb/case_in_42.txt42
-rw-r--r--test/prism/snapshots/seattlerb/case_in_42_2.txt39
-rw-r--r--test/prism/snapshots/seattlerb/case_in_47.txt48
-rw-r--r--test/prism/snapshots/seattlerb/case_in_67.txt31
-rw-r--r--test/prism/snapshots/seattlerb/case_in_86.txt49
-rw-r--r--test/prism/snapshots/seattlerb/case_in_86_2.txt49
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_const.txt40
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt46
-rw-r--r--test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt46
-rw-r--r--test/prism/snapshots/seattlerb/case_in_const.txt27
-rw-r--r--test/prism/snapshots/seattlerb/case_in_else.txt38
-rw-r--r--test/prism/snapshots/seattlerb/case_in_find.txt45
-rw-r--r--test/prism/snapshots/seattlerb/case_in_find_array.txt42
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat.txt64
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt76
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt47
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt44
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt52
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt40
-rw-r--r--test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt62
-rw-r--r--test/prism/snapshots/seattlerb/case_in_multiple.txt56
-rw-r--r--test/prism/snapshots/seattlerb/case_in_or.txt36
-rw-r--r--test/prism/snapshots/seattlerb/class_comments.txt31
-rw-r--r--test/prism/snapshots/seattlerb/cond_unary_minus.txt13
-rw-r--r--test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt23
-rw-r--r--test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt17
-rw-r--r--test/prism/snapshots/seattlerb/const_op_asgn_and1.txt18
-rw-r--r--test/prism/snapshots/seattlerb/const_op_asgn_and2.txt17
-rw-r--r--test/prism/snapshots/seattlerb/const_op_asgn_or.txt19
-rw-r--r--test/prism/snapshots/seattlerb/dasgn_icky2.txt61
-rw-r--r--test/prism/snapshots/seattlerb/defined_eh_parens.txt12
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/defn_arg_forward_args.txt47
-rw-r--r--test/prism/snapshots/seattlerb/defn_args_forward_args.txt56
-rw-r--r--test/prism/snapshots/seattlerb/defn_comments.txt18
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command.txt34
-rw-r--r--test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt40
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args.txt42
-rw-r--r--test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt42
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_env.txt52
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt40
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt36
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt36
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt40
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt32
-rw-r--r--test/prism/snapshots/seattlerb/defn_kwarg_val.txt34
-rw-r--r--test/prism/snapshots/seattlerb/defn_no_kwargs.txt29
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner.txt45
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt45
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt30
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt30
-rw-r--r--test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt152
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_last_arg.txt32
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_reg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt39
-rw-r--r--test/prism/snapshots/seattlerb/defn_powarg.txt30
-rw-r--r--test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt40
-rw-r--r--test/prism/snapshots/seattlerb/defn_splat_arg.txt32
-rw-r--r--test/prism/snapshots/seattlerb/defn_unary_not.txt21
-rw-r--r--test/prism/snapshots/seattlerb/defns_reserved.txt19
-rw-r--r--test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt59
-rw-r--r--test/prism/snapshots/seattlerb/defs_comments.txt19
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command.txt44
-rw-r--r--test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt50
-rw-r--r--test/prism/snapshots/seattlerb/defs_kwarg.txt33
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner.txt46
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt46
-rw-r--r--test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt155
-rw-r--r--test/prism/snapshots/seattlerb/difficult0_.txt69
-rw-r--r--test/prism/snapshots/seattlerb/difficult1_line_numbers.txt242
-rw-r--r--test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt73
-rw-r--r--test/prism/snapshots/seattlerb/difficult2_.txt66
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_.txt47
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_2.txt40
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_3.txt44
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_4.txt37
-rw-r--r--test/prism/snapshots/seattlerb/difficult3_5.txt47
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__10.txt47
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__11.txt43
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__12.txt45
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__6.txt49
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__7.txt45
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__8.txt47
-rw-r--r--test/prism/snapshots/seattlerb/difficult3__9.txt45
-rw-r--r--test/prism/snapshots/seattlerb/difficult4__leading_dots.txt25
-rw-r--r--test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt14
-rw-r--r--test/prism/snapshots/seattlerb/difficult6_.txt57
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__7.txt53
-rw-r--r--test/prism/snapshots/seattlerb/difficult6__8.txt53
-rw-r--r--test/prism/snapshots/seattlerb/difficult7_.txt90
-rw-r--r--test/prism/snapshots/seattlerb/do_bug.txt60
-rw-r--r--test/prism/snapshots/seattlerb/do_lambda.txt17
-rw-r--r--test/prism/snapshots/seattlerb/dot2_nil__26.txt20
-rw-r--r--test/prism/snapshots/seattlerb/dot3_nil__26.txt20
-rw-r--r--test/prism/snapshots/seattlerb/dstr_evstr.txt37
-rw-r--r--test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt25
-rw-r--r--test/prism/snapshots/seattlerb/dstr_lex_state.txt32
-rw-r--r--test/prism/snapshots/seattlerb/dstr_str.txt27
-rw-r--r--test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt10
-rw-r--r--test/prism/snapshots/seattlerb/dsym_to_sym.txt33
-rw-r--r--test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt9
-rw-r--r--test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt48
-rw-r--r--test/prism/snapshots/seattlerb/evstr_evstr.txt41
-rw-r--r--test/prism/snapshots/seattlerb/evstr_str.txt31
-rw-r--r--test/prism/snapshots/seattlerb/expr_not_bang.txt37
-rw-r--r--test/prism/snapshots/seattlerb/f_kw.txt32
-rw-r--r--test/prism/snapshots/seattlerb/f_kw__required.txt30
-rw-r--r--test/prism/snapshots/seattlerb/flip2_env_lvar.txt36
-rw-r--r--test/prism/snapshots/seattlerb/float_with_if_modifier.txt15
-rw-r--r--test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_comma_arg.txt25
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_lineno.txt25
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_nested.txt39
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt65
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt35
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt17
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt21
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_unicode.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt26
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt26
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt11
-rw-r--r--test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt11
-rw-r--r--test/prism/snapshots/seattlerb/if_elsif.txt21
-rw-r--r--test/prism/snapshots/seattlerb/if_symbol.txt28
-rw-r--r--test/prism/snapshots/seattlerb/in_expr_no_case.txt17
-rw-r--r--test/prism/snapshots/seattlerb/index_0.txt37
-rw-r--r--test/prism/snapshots/seattlerb/index_0_opasgn.txt38
-rw-r--r--test/prism/snapshots/seattlerb/integer_with_if_modifier.txt16
-rw-r--r--test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt21
-rw-r--r--test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt23
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_1.txt38
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_1.txt47
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_10_2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_1.txt49
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_11_2.txt53
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_2__19.txt42
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_3.txt46
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_4.txt42
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_5.txt40
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_6.txt45
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_1.txt45
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_7_2.txt49
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_1.txt47
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_8_2.txt51
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_1.txt43
-rw-r--r--test/prism/snapshots/seattlerb/iter_args_9_2.txt47
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg.txt40
-rw-r--r--test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt44
-rw-r--r--test/prism/snapshots/seattlerb/label_vs_string.txt33
-rw-r--r--test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt91
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt19
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt31
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt31
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_command.txt35
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_env.txt13
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_ivar_env.txt12
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt31
-rw-r--r--test/prism/snapshots/seattlerb/lasgn_middle_splat.txt48
-rw-r--r--test/prism/snapshots/seattlerb/magic_encoding_comment.txt45
-rw-r--r--test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt31
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt44
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_ident.txt44
-rw-r--r--test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt33
-rw-r--r--test/prism/snapshots/seattlerb/masgn_colon2.txt38
-rw-r--r--test/prism/snapshots/seattlerb/masgn_colon3.txt31
-rw-r--r--test/prism/snapshots/seattlerb/masgn_command_call.txt41
-rw-r--r--test/prism/snapshots/seattlerb/masgn_double_paren.txt31
-rw-r--r--test/prism/snapshots/seattlerb/masgn_lhs_splat.txt27
-rw-r--r--test/prism/snapshots/seattlerb/masgn_paren.txt37
-rw-r--r--test/prism/snapshots/seattlerb/masgn_splat_arg.txt34
-rw-r--r--test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt37
-rw-r--r--test/prism/snapshots/seattlerb/masgn_star.txt16
-rw-r--r--test/prism/snapshots/seattlerb/masgn_var_star_var.txt30
-rw-r--r--test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt58
-rw-r--r--test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt37
-rw-r--r--test/prism/snapshots/seattlerb/method_call_trailing_comma.txt29
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt33
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_back_splat.txt36
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt37
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_front_splat.txt40
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_keyword.txt29
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt42
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_mid_splat.txt45
-rw-r--r--test/prism/snapshots/seattlerb/mlhs_rescue.txt33
-rw-r--r--test/prism/snapshots/seattlerb/module_comments.txt29
-rw-r--r--test/prism/snapshots/seattlerb/multiline_hash_declaration.txt86
-rw-r--r--test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt21
-rw-r--r--test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt23
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_command_call.txt35
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt33
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt50
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt40
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt22
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt42
-rw-r--r--test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt41
-rw-r--r--test/prism/snapshots/seattlerb/parse_def_special_name.txt18
-rw-r--r--test/prism/snapshots/seattlerb/parse_if_not_canonical.txt61
-rw-r--r--test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt61
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block.txt28
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt35
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt35
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt35
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt19
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt19
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_call_no_args.txt58
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_complex.txt62
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt31
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt28
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot2.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot2_open.txt37
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot3.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dot3_open.txt37
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt20
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt20
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt34
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_hash_lit.txt20
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc.txt42
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt37
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt32
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt70
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt70
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_multiline_str.txt13
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt13
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_newlines.txt6
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_op_asgn.txt32
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_postexe.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_preexe.txt22
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_rescue.txt62
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_return.txt36
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt24
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_to_ary.txt37
-rw-r--r--test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt25
-rw-r--r--test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt29
-rw-r--r--test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt21
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_019.txt30
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_044.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_051.txt40
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058.txt64
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058_2.txt58
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_069.txt44
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_076.txt54
-rw-r--r--test/prism/snapshots/seattlerb/parse_until_not_canonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_while_not_canonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt49
-rw-r--r--test/prism/snapshots/seattlerb/pctW_lineno.txt51
-rw-r--r--test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt11
-rw-r--r--test/prism/snapshots/seattlerb/pct_nl.txt17
-rw-r--r--test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt49
-rw-r--r--test/prism/snapshots/seattlerb/pipe_semicolon.txt38
-rw-r--r--test/prism/snapshots/seattlerb/pipe_space.txt36
-rw-r--r--test/prism/snapshots/seattlerb/qWords_space.txt9
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols.txt24
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_empty.txt9
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_empty_space.txt9
-rw-r--r--test/prism/snapshots/seattlerb/qsymbols_interp.txt51
-rw-r--r--test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt32
-rw-r--r--test/prism/snapshots/seattlerb/quoted_symbol_keys.txt23
-rw-r--r--test/prism/snapshots/seattlerb/qw_escape.txt11
-rw-r--r--test/prism/snapshots/seattlerb/qw_escape_term.txt11
-rw-r--r--test/prism/snapshots/seattlerb/qwords_empty.txt9
-rw-r--r--test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt11
-rw-r--r--test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp.txt35
-rw-r--r--test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp_esc_u.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp_escape_extended.txt11
-rw-r--r--test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt17
-rw-r--r--test/prism/snapshots/seattlerb/required_kwarg_no_value.txt34
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt56
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt71
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_raised.txt51
-rw-r--r--test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt76
-rw-r--r--test/prism/snapshots/seattlerb/rescue_in_block.txt47
-rw-r--r--test/prism/snapshots/seattlerb/rescue_parens.txt47
-rw-r--r--test/prism/snapshots/seattlerb/return_call_assocs.txt181
-rw-r--r--test/prism/snapshots/seattlerb/rhs_asgn.txt14
-rw-r--r--test/prism/snapshots/seattlerb/ruby21_numbers.txt23
-rw-r--r--test/prism/snapshots/seattlerb/safe_attrasgn.txt29
-rw-r--r--test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt29
-rw-r--r--test/prism/snapshots/seattlerb/safe_call.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_after_newline.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_dot_parens.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_newline.txt25
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_operator.txt29
-rw-r--r--test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt31
-rw-r--r--test/prism/snapshots/seattlerb/safe_calls.txt39
-rw-r--r--test/prism/snapshots/seattlerb/safe_op_asgn.txt42
-rw-r--r--test/prism/snapshots/seattlerb/safe_op_asgn2.txt37
-rw-r--r--test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt55
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt27
-rw-r--r--test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt44
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call.txt57
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt51
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw.txt31
-rw-r--r--test/prism/snapshots/seattlerb/stabby_block_kw__required.txt29
-rw-r--r--test/prism/snapshots/seattlerb/stabby_proc_scope.txt29
-rw-r--r--test/prism/snapshots/seattlerb/str_backslashes.txt23
-rw-r--r--test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt33
-rw-r--r--test/prism/snapshots/seattlerb/str_double_escaped_newline.txt33
-rw-r--r--test/prism/snapshots/seattlerb/str_double_newline.txt33
-rw-r--r--test/prism/snapshots/seattlerb/str_evstr.txt31
-rw-r--r--test/prism/snapshots/seattlerb/str_evstr_escape.txt37
-rw-r--r--test/prism/snapshots/seattlerb/str_heredoc_interp.txt31
-rw-r--r--test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt101
-rw-r--r--test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt20
-rw-r--r--test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt13
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_Q_nested.txt37
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_nested_nested.txt39
-rw-r--r--test/prism/snapshots/seattlerb/str_pct_q.txt11
-rw-r--r--test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt33
-rw-r--r--test/prism/snapshots/seattlerb/str_single_escaped_newline.txt33
-rw-r--r--test/prism/snapshots/seattlerb/str_single_newline.txt33
-rw-r--r--test/prism/snapshots/seattlerb/str_str.txt27
-rw-r--r--test/prism/snapshots/seattlerb/str_str_str.txt33
-rw-r--r--test/prism/snapshots/seattlerb/super_arg.txt15
-rw-r--r--test/prism/snapshots/seattlerb/symbol_empty.txt10
-rw-r--r--test/prism/snapshots/seattlerb/symbol_list.txt49
-rw-r--r--test/prism/snapshots/seattlerb/symbols.txt24
-rw-r--r--test/prism/snapshots/seattlerb/symbols_empty.txt9
-rw-r--r--test/prism/snapshots/seattlerb/symbols_empty_space.txt9
-rw-r--r--test/prism/snapshots/seattlerb/symbols_interp.txt24
-rw-r--r--test/prism/snapshots/seattlerb/thingy.txt53
-rw-r--r--test/prism/snapshots/seattlerb/uminus_float.txt6
-rw-r--r--test/prism/snapshots/seattlerb/unary_minus.txt25
-rw-r--r--test/prism/snapshots/seattlerb/unary_plus.txt25
-rw-r--r--test/prism/snapshots/seattlerb/unary_plus_on_literal.txt20
-rw-r--r--test/prism/snapshots/seattlerb/unary_tilde.txt25
-rw-r--r--test/prism/snapshots/seattlerb/utf8_bom.txt19
-rw-r--r--test/prism/snapshots/seattlerb/when_splat.txt38
-rw-r--r--test/prism/snapshots/seattlerb/words_interp.txt27
-rw-r--r--test/prism/snapshots/seattlerb/yield_arg.txt14
-rw-r--r--test/prism/snapshots/seattlerb/yield_call_assocs.txt193
-rw-r--r--test/prism/snapshots/seattlerb/yield_empty_parens.txt10
-rw-r--r--test/prism/snapshots/single_quote_heredocs.txt11
-rw-r--r--test/prism/snapshots/spanning_heredoc.txt301
-rw-r--r--test/prism/snapshots/strings.txt516
-rw-r--r--test/prism/snapshots/super.txt37
-rw-r--r--test/prism/snapshots/symbols.txt398
-rw-r--r--test/prism/snapshots/ternary_operator.txt285
-rw-r--r--test/prism/snapshots/tilde_heredocs.txt209
-rw-r--r--test/prism/snapshots/undef.txt105
-rw-r--r--test/prism/snapshots/unescaping.txt33
-rw-r--r--test/prism/snapshots/unless.txt122
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/alias.txt27
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/assignment.txt999
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/block.txt1366
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/case.txt429
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/class.txt231
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/control.txt129
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/def.txt1170
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defined.txt50
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defs.txt357
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/dstr.txt333
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/empty.txt5
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/empty_begin.txt9
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/flipflop.txt183
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/for.txt166
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/hookexe.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/if.txt268
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/kwbegin.txt489
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/lambda.txt143
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/literal.txt1108
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/module.txt105
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/opasgn.txt519
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/pattern.txt426
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/pragma.txt19
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/range.txt49
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/rescue.txt99
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/send.txt2117
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/27.txt45
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/30.txt83
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/31.txt87
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/32.txt101
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/singletons.txt9
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/super.txt271
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/unary.txt245
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/undef.txt26
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/variables.txt52
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/while.txt696
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/yield.txt54
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/and.txt233
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/block.txt187
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/def.txt89
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/dstr.txt547
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt259
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/literal.txt92
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/send.txt157
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/undef.txt26
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/while.txt276
-rw-r--r--test/prism/snapshots/until.txt103
-rw-r--r--test/prism/snapshots/variables.txt322
-rw-r--r--test/prism/snapshots/while.txt283
-rw-r--r--test/prism/snapshots/whitequark/__ENCODING__.txt6
-rw-r--r--test/prism/snapshots/whitequark/__ENCODING___legacy_.txt6
-rw-r--r--test/prism/snapshots/whitequark/alias.txt19
-rw-r--r--test/prism/snapshots/whitequark/alias_gvar.txt20
-rw-r--r--test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt58
-rw-r--r--test/prism/snapshots/whitequark/and.txt53
-rw-r--r--test/prism/snapshots/whitequark/and_asgn.txt59
-rw-r--r--test/prism/snapshots/whitequark/and_or_masgn.txt89
-rw-r--r--test/prism/snapshots/whitequark/anonymous_blockarg.txt45
-rw-r--r--test/prism/snapshots/whitequark/arg.txt53
-rw-r--r--test/prism/snapshots/whitequark/arg_duplicate_ignored.txt55
-rw-r--r--test/prism/snapshots/whitequark/arg_label.txt109
-rw-r--r--test/prism/snapshots/whitequark/arg_scope.txt33
-rw-r--r--test/prism/snapshots/whitequark/args.txt972
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs.txt88
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs_comma.txt50
-rw-r--r--test/prism/snapshots/whitequark/args_args_comma.txt37
-rw-r--r--test/prism/snapshots/whitequark/args_args_star.txt88
-rw-r--r--test/prism/snapshots/whitequark/args_assocs.txt171
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_comma.txt40
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_legacy.txt171
-rw-r--r--test/prism/snapshots/whitequark/args_block_pass.txt28
-rw-r--r--test/prism/snapshots/whitequark/args_cmd.txt39
-rw-r--r--test/prism/snapshots/whitequark/args_star.txt68
-rw-r--r--test/prism/snapshots/whitequark/array_assocs.txt35
-rw-r--r--test/prism/snapshots/whitequark/array_plain.txt13
-rw-r--r--test/prism/snapshots/whitequark/array_splat.txt62
-rw-r--r--test/prism/snapshots/whitequark/array_symbols.txt19
-rw-r--r--test/prism/snapshots/whitequark/array_symbols_empty.txt13
-rw-r--r--test/prism/snapshots/whitequark/array_symbols_interp.txt64
-rw-r--r--test/prism/snapshots/whitequark/array_words.txt21
-rw-r--r--test/prism/snapshots/whitequark/array_words_empty.txt13
-rw-r--r--test/prism/snapshots/whitequark/array_words_interp.txt76
-rw-r--r--test/prism/snapshots/whitequark/asgn_cmd.txt53
-rw-r--r--test/prism/snapshots/whitequark/asgn_mrhs.txt83
-rw-r--r--test/prism/snapshots/whitequark/back_ref.txt6
-rw-r--r--test/prism/snapshots/whitequark/bang.txt25
-rw-r--r--test/prism/snapshots/whitequark/bang_cmd.txt37
-rw-r--r--test/prism/snapshots/whitequark/begin_cmdarg.txt48
-rw-r--r--test/prism/snapshots/whitequark/beginless_erange_after_newline.txt22
-rw-r--r--test/prism/snapshots/whitequark/beginless_irange_after_newline.txt22
-rw-r--r--test/prism/snapshots/whitequark/beginless_range.txt19
-rw-r--r--test/prism/snapshots/whitequark/blockarg.txt30
-rw-r--r--test/prism/snapshots/whitequark/blockargs.txt1260
-rw-r--r--test/prism/snapshots/whitequark/break.txt53
-rw-r--r--test/prism/snapshots/whitequark/break_block.txt38
-rw-r--r--test/prism/snapshots/whitequark/bug_435.txt37
-rw-r--r--test/prism/snapshots/whitequark/bug_447.txt51
-rw-r--r--test/prism/snapshots/whitequark/bug_452.txt61
-rw-r--r--test/prism/snapshots/whitequark/bug_466.txt65
-rw-r--r--test/prism/snapshots/whitequark/bug_473.txt31
-rw-r--r--test/prism/snapshots/whitequark/bug_480.txt35
-rw-r--r--test/prism/snapshots/whitequark/bug_481.txt48
-rw-r--r--test/prism/snapshots/whitequark/bug_ascii_8bit_in_literal.txt11
-rw-r--r--test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt29
-rw-r--r--test/prism/snapshots/whitequark/bug_cmdarg.txt99
-rw-r--r--test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt18
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt49
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt39
-rw-r--r--test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt365
-rw-r--r--test/prism/snapshots/whitequark/bug_heredoc_do.txt29
-rw-r--r--test/prism/snapshots/whitequark/bug_interp_single.txt33
-rw-r--r--test/prism/snapshots/whitequark/bug_lambda_leakage.txt37
-rw-r--r--test/prism/snapshots/whitequark/bug_regex_verification.txt11
-rw-r--r--test/prism/snapshots/whitequark/bug_rescue_empty_else.txt25
-rw-r--r--test/prism/snapshots/whitequark/bug_while_not_parens_do.txt28
-rw-r--r--test/prism/snapshots/whitequark/case_cond.txt33
-rw-r--r--test/prism/snapshots/whitequark/case_cond_else.txt45
-rw-r--r--test/prism/snapshots/whitequark/case_expr.txt43
-rw-r--r--test/prism/snapshots/whitequark/case_expr_else.txt59
-rw-r--r--test/prism/snapshots/whitequark/casgn_scoped.txt19
-rw-r--r--test/prism/snapshots/whitequark/casgn_toplevel.txt17
-rw-r--r--test/prism/snapshots/whitequark/casgn_unscoped.txt12
-rw-r--r--test/prism/snapshots/whitequark/character.txt11
-rw-r--r--test/prism/snapshots/whitequark/class.txt27
-rw-r--r--test/prism/snapshots/whitequark/class_definition_in_while_cond.txt171
-rw-r--r--test/prism/snapshots/whitequark/class_super.txt18
-rw-r--r--test/prism/snapshots/whitequark/class_super_label.txt33
-rw-r--r--test/prism/snapshots/whitequark/comments_before_leading_dot__27.txt85
-rw-r--r--test/prism/snapshots/whitequark/complex.txt23
-rw-r--r--test/prism/snapshots/whitequark/cond_begin.txt39
-rw-r--r--test/prism/snapshots/whitequark/cond_begin_masgn.txt49
-rw-r--r--test/prism/snapshots/whitequark/cond_eflipflop.txt77
-rw-r--r--test/prism/snapshots/whitequark/cond_iflipflop.txt77
-rw-r--r--test/prism/snapshots/whitequark/cond_match_current_line.txt33
-rw-r--r--test/prism/snapshots/whitequark/const_op_asgn.txt96
-rw-r--r--test/prism/snapshots/whitequark/const_scoped.txt13
-rw-r--r--test/prism/snapshots/whitequark/const_toplevel.txt11
-rw-r--r--test/prism/snapshots/whitequark/const_unscoped.txt7
-rw-r--r--test/prism/snapshots/whitequark/cpath.txt33
-rw-r--r--test/prism/snapshots/whitequark/cvar.txt7
-rw-r--r--test/prism/snapshots/whitequark/cvasgn.txt12
-rw-r--r--test/prism/snapshots/whitequark/dedenting_heredoc.txt367
-rw-r--r--test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt11
-rw-r--r--test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt11
-rw-r--r--test/prism/snapshots/whitequark/def.txt83
-rw-r--r--test/prism/snapshots/whitequark/defined.txt42
-rw-r--r--test/prism/snapshots/whitequark/defs.txt90
-rw-r--r--test/prism/snapshots/whitequark/empty_stmt.txt5
-rw-r--r--test/prism/snapshots/whitequark/endless_comparison_method.txt215
-rw-r--r--test/prism/snapshots/whitequark/endless_method.txt143
-rw-r--r--test/prism/snapshots/whitequark/endless_method_command_syntax.txt380
-rw-r--r--test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt42
-rw-r--r--test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt52
-rw-r--r--test/prism/snapshots/whitequark/endless_method_without_args.txt85
-rw-r--r--test/prism/snapshots/whitequark/ensure.txt40
-rw-r--r--test/prism/snapshots/whitequark/ensure_empty.txt16
-rw-r--r--test/prism/snapshots/whitequark/false.txt6
-rw-r--r--test/prism/snapshots/whitequark/float.txt7
-rw-r--r--test/prism/snapshots/whitequark/for.txt81
-rw-r--r--test/prism/snapshots/whitequark/for_mlhs.txt53
-rw-r--r--test/prism/snapshots/whitequark/forward_arg.txt42
-rw-r--r--test/prism/snapshots/whitequark/forward_arg_with_open_args.txt386
-rw-r--r--test/prism/snapshots/whitequark/forward_args_legacy.txt97
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt54
-rw-r--r--test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt52
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg.txt49
-rw-r--r--test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt59
-rw-r--r--test/prism/snapshots/whitequark/forwarded_restarg.txt47
-rw-r--r--test/prism/snapshots/whitequark/gvar.txt7
-rw-r--r--test/prism/snapshots/whitequark/gvasgn.txt12
-rw-r--r--test/prism/snapshots/whitequark/hash_empty.txt9
-rw-r--r--test/prism/snapshots/whitequark/hash_hashrocket.txt44
-rw-r--r--test/prism/snapshots/whitequark/hash_kwsplat.txt33
-rw-r--r--test/prism/snapshots/whitequark/hash_label.txt20
-rw-r--r--test/prism/snapshots/whitequark/hash_label_end.txt92
-rw-r--r--test/prism/snapshots/whitequark/hash_pair_value_omission.txt93
-rw-r--r--test/prism/snapshots/whitequark/heredoc.txt22
-rw-r--r--test/prism/snapshots/whitequark/if.txt61
-rw-r--r--test/prism/snapshots/whitequark/if_else.txt93
-rw-r--r--test/prism/snapshots/whitequark/if_elsif.txt61
-rw-r--r--test/prism/snapshots/whitequark/if_masgn__24.txt39
-rw-r--r--test/prism/snapshots/whitequark/if_mod.txt33
-rw-r--r--test/prism/snapshots/whitequark/if_nl_then.txt33
-rw-r--r--test/prism/snapshots/whitequark/if_while_after_class__since_32.txt115
-rw-r--r--test/prism/snapshots/whitequark/int.txt11
-rw-r--r--test/prism/snapshots/whitequark/int___LINE__.txt6
-rw-r--r--test/prism/snapshots/whitequark/interp_digit_var.txt249
-rw-r--r--test/prism/snapshots/whitequark/ivar.txt7
-rw-r--r--test/prism/snapshots/whitequark/ivasgn.txt12
-rw-r--r--test/prism/snapshots/whitequark/keyword_argument_omission.txt61
-rw-r--r--test/prism/snapshots/whitequark/kwarg.txt30
-rw-r--r--test/prism/snapshots/whitequark/kwbegin_compstmt.txt34
-rw-r--r--test/prism/snapshots/whitequark/kwnilarg.txt84
-rw-r--r--test/prism/snapshots/whitequark/kwoptarg.txt32
-rw-r--r--test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt54
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_named.txt30
-rw-r--r--test/prism/snapshots/whitequark/kwrestarg_unnamed.txt30
-rw-r--r--test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt52
-rw-r--r--test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt63
-rw-r--r--test/prism/snapshots/whitequark/lvar.txt15
-rw-r--r--test/prism/snapshots/whitequark/lvar_injecting_match.txt35
-rw-r--r--test/prism/snapshots/whitequark/lvasgn.txt16
-rw-r--r--test/prism/snapshots/whitequark/masgn.txt68
-rw-r--r--test/prism/snapshots/whitequark/masgn_attr.txt88
-rw-r--r--test/prism/snapshots/whitequark/masgn_cmd.txt32
-rw-r--r--test/prism/snapshots/whitequark/masgn_const.txt42
-rw-r--r--test/prism/snapshots/whitequark/masgn_nested.txt60
-rw-r--r--test/prism/snapshots/whitequark/masgn_splat.txt270
-rw-r--r--test/prism/snapshots/whitequark/method_definition_in_while_cond.txt197
-rw-r--r--test/prism/snapshots/whitequark/module.txt14
-rw-r--r--test/prism/snapshots/whitequark/multiple_pattern_matches.txt141
-rw-r--r--test/prism/snapshots/whitequark/newline_in_hash_argument.txt141
-rw-r--r--test/prism/snapshots/whitequark/next.txt53
-rw-r--r--test/prism/snapshots/whitequark/next_block.txt38
-rw-r--r--test/prism/snapshots/whitequark/nil.txt6
-rw-r--r--test/prism/snapshots/whitequark/nil_expression.txt16
-rw-r--r--test/prism/snapshots/whitequark/non_lvar_injecting_match.txt42
-rw-r--r--test/prism/snapshots/whitequark/not.txt55
-rw-r--r--test/prism/snapshots/whitequark/not_cmd.txt37
-rw-r--r--test/prism/snapshots/whitequark/not_masgn__24.txt43
-rw-r--r--test/prism/snapshots/whitequark/nth_ref.txt7
-rw-r--r--test/prism/snapshots/whitequark/numbered_args_after_27.txt131
-rw-r--r--test/prism/snapshots/whitequark/numparam_outside_block.txt114
-rw-r--r--test/prism/snapshots/whitequark/op_asgn.txt80
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_cmd.txt183
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_index.txt36
-rw-r--r--test/prism/snapshots/whitequark/op_asgn_index_cmd.txt56
-rw-r--r--test/prism/snapshots/whitequark/optarg.txt68
-rw-r--r--test/prism/snapshots/whitequark/or.txt53
-rw-r--r--test/prism/snapshots/whitequark/or_asgn.txt59
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_272.txt40
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_490.txt106
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_507.txt35
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_518.txt18
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_525.txt62
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_604.txt55
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_640.txt11
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_645.txt34
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_830.txt11
-rw-r--r--test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt19
-rw-r--r--test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt127
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt49
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_blank_else.txt28
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_else.txt32
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_single_line.txt43
-rw-r--r--test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt221
-rw-r--r--test/prism/snapshots/whitequark/postexe.txt14
-rw-r--r--test/prism/snapshots/whitequark/preexe.txt14
-rw-r--r--test/prism/snapshots/whitequark/procarg0.txt73
-rw-r--r--test/prism/snapshots/whitequark/range_exclusive.txt14
-rw-r--r--test/prism/snapshots/whitequark/range_inclusive.txt14
-rw-r--r--test/prism/snapshots/whitequark/rational.txt12
-rw-r--r--test/prism/snapshots/whitequark/redo.txt6
-rw-r--r--test/prism/snapshots/whitequark/regex_interp.txt38
-rw-r--r--test/prism/snapshots/whitequark/regex_plain.txt11
-rw-r--r--test/prism/snapshots/whitequark/resbody_list.txt45
-rw-r--r--test/prism/snapshots/whitequark/resbody_list_mrhs.txt55
-rw-r--r--test/prism/snapshots/whitequark/resbody_list_var.txt56
-rw-r--r--test/prism/snapshots/whitequark/resbody_var.txt86
-rw-r--r--test/prism/snapshots/whitequark/rescue.txt43
-rw-r--r--test/prism/snapshots/whitequark/rescue_else.txt59
-rw-r--r--test/prism/snapshots/whitequark/rescue_else_ensure.txt75
-rw-r--r--test/prism/snapshots/whitequark/rescue_ensure.txt59
-rw-r--r--test/prism/snapshots/whitequark/rescue_in_lambda_block.txt26
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod.txt29
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod_asgn.txt35
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod_masgn.txt39
-rw-r--r--test/prism/snapshots/whitequark/rescue_mod_op_assign.txt36
-rw-r--r--test/prism/snapshots/whitequark/rescue_without_begin_end.txt59
-rw-r--r--test/prism/snapshots/whitequark/restarg_named.txt30
-rw-r--r--test/prism/snapshots/whitequark/restarg_unnamed.txt30
-rw-r--r--test/prism/snapshots/whitequark/retry.txt6
-rw-r--r--test/prism/snapshots/whitequark/return.txt53
-rw-r--r--test/prism/snapshots/whitequark/return_block.txt38
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_10279.txt29
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_10653.txt166
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11107.txt47
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11380.txt50
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873.txt737
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_a.txt1161
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11873_b.txt95
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11989.txt23
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11990.txt32
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12073.txt89
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12402.txt571
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12669.txt125
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12686.txt38
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_13547.txt31
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_14690.txt57
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_15789.txt112
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_9669.txt56
-rw-r--r--test/prism/snapshots/whitequark/sclass.txt25
-rw-r--r--test/prism/snapshots/whitequark/self.txt6
-rw-r--r--test/prism/snapshots/whitequark/send_attr_asgn.txt99
-rw-r--r--test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt29
-rw-r--r--test/prism/snapshots/whitequark/send_binary_op.txt509
-rw-r--r--test/prism/snapshots/whitequark/send_block_chain_cmd.txt305
-rw-r--r--test/prism/snapshots/whitequark/send_block_conditional.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_call.txt53
-rw-r--r--test/prism/snapshots/whitequark/send_conditional.txt25
-rw-r--r--test/prism/snapshots/whitequark/send_index.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_index_asgn.txt33
-rw-r--r--test/prism/snapshots/whitequark/send_index_asgn_legacy.txt33
-rw-r--r--test/prism/snapshots/whitequark/send_index_cmd.txt49
-rw-r--r--test/prism/snapshots/whitequark/send_index_legacy.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_lambda.txt43
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args.txt49
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_noparen.txt55
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_args_shadow.txt31
-rw-r--r--test/prism/snapshots/whitequark/send_lambda_legacy.txt12
-rw-r--r--test/prism/snapshots/whitequark/send_op_asgn_conditional.txt29
-rw-r--r--test/prism/snapshots/whitequark/send_plain.txt65
-rw-r--r--test/prism/snapshots/whitequark/send_plain_cmd.txt101
-rw-r--r--test/prism/snapshots/whitequark/send_self.txt39
-rw-r--r--test/prism/snapshots/whitequark/send_self_block.txt73
-rw-r--r--test/prism/snapshots/whitequark/send_unary_op.txt65
-rw-r--r--test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt17
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg.txt25
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_block.txt103
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_call.txt35
-rw-r--r--test/prism/snapshots/whitequark/space_args_arg_newline.txt25
-rw-r--r--test/prism/snapshots/whitequark/space_args_block.txt27
-rw-r--r--test/prism/snapshots/whitequark/space_args_cmd.txt45
-rw-r--r--test/prism/snapshots/whitequark/string___FILE__.txt7
-rw-r--r--test/prism/snapshots/whitequark/string_concat.txt29
-rw-r--r--test/prism/snapshots/whitequark/string_dvar.txt36
-rw-r--r--test/prism/snapshots/whitequark/string_interp.txt37
-rw-r--r--test/prism/snapshots/whitequark/string_plain.txt17
-rw-r--r--test/prism/snapshots/whitequark/super.txt47
-rw-r--r--test/prism/snapshots/whitequark/super_block.txt47
-rw-r--r--test/prism/snapshots/whitequark/symbol_interp.txt37
-rw-r--r--test/prism/snapshots/whitequark/symbol_plain.txt15
-rw-r--r--test/prism/snapshots/whitequark/ternary.txt33
-rw-r--r--test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt48
-rw-r--r--test/prism/snapshots/whitequark/trailing_forward_arg.txt51
-rw-r--r--test/prism/snapshots/whitequark/true.txt6
-rw-r--r--test/prism/snapshots/whitequark/unary_num_pow_precedence.txt71
-rw-r--r--test/prism/snapshots/whitequark/undef.txt36
-rw-r--r--test/prism/snapshots/whitequark/unless.txt61
-rw-r--r--test/prism/snapshots/whitequark/unless_else.txt93
-rw-r--r--test/prism/snapshots/whitequark/unless_mod.txt33
-rw-r--r--test/prism/snapshots/whitequark/until.txt61
-rw-r--r--test/prism/snapshots/whitequark/until_mod.txt33
-rw-r--r--test/prism/snapshots/whitequark/until_post.txt42
-rw-r--r--test/prism/snapshots/whitequark/var_and_asgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/var_op_asgn.txt53
-rw-r--r--test/prism/snapshots/whitequark/var_op_asgn_cmd.txt27
-rw-r--r--test/prism/snapshots/whitequark/var_or_asgn.txt13
-rw-r--r--test/prism/snapshots/whitequark/when_multi.txt49
-rw-r--r--test/prism/snapshots/whitequark/when_splat.txt69
-rw-r--r--test/prism/snapshots/whitequark/when_then.txt43
-rw-r--r--test/prism/snapshots/whitequark/while.txt61
-rw-r--r--test/prism/snapshots/whitequark/while_mod.txt33
-rw-r--r--test/prism/snapshots/whitequark/while_post.txt42
-rw-r--r--test/prism/snapshots/whitequark/xstring_interp.txt37
-rw-r--r--test/prism/snapshots/whitequark/xstring_plain.txt10
-rw-r--r--test/prism/snapshots/whitequark/yield.txt49
-rw-r--r--test/prism/snapshots/whitequark/zsuper.txt7
-rw-r--r--test/prism/snapshots/xstring.txt52
-rw-r--r--test/prism/snapshots/yield.txt37
-rw-r--r--test/prism/test_helper.rb91
-rw-r--r--test/prism/unescape_test.rb165
-rw-r--r--test/prism/version_test.rb11
1849 files changed, 87894 insertions, 0 deletions
diff --git a/test/prism/bom_test.rb b/test/prism/bom_test.rb
new file mode 100644
index 0000000000..3a4e04a900
--- /dev/null
+++ b/test/prism/bom_test.rb
@@ -0,0 +1,59 @@
+# frozen_string_literal: true
+
+# Don't bother checking this on these engines, this is such a specific Ripper
+# test.
+return if RUBY_ENGINE == "jruby" || RUBY_ENGINE == "truffleruby"
+
+require_relative "test_helper"
+
+module YARP
+ class BOMTest < TestCase
+ def test_ident
+ assert_bom("foo")
+ end
+
+ def test_back_reference
+ assert_bom("$+")
+ end
+
+ def test_instance_variable
+ assert_bom("@foo")
+ end
+
+ def test_class_variable
+ assert_bom("@@foo")
+ end
+
+ def test_global_variable
+ assert_bom("$foo")
+ end
+
+ def test_numbered_reference
+ assert_bom("$1")
+ end
+
+ def test_percents
+ assert_bom("%i[]")
+ assert_bom("%r[]")
+ assert_bom("%s[]")
+ assert_bom("%q{}")
+ assert_bom("%w[]")
+ assert_bom("%x[]")
+ assert_bom("%I[]")
+ assert_bom("%W[]")
+ assert_bom("%Q{}")
+ end
+
+ def test_string
+ assert_bom("\"\"")
+ assert_bom("''")
+ end
+
+ private
+
+ def assert_bom(source)
+ bommed = "\xEF\xBB\xBF#{source}"
+ assert_equal YARP.lex_ripper(bommed), YARP.lex_compat(bommed).value
+ end
+ end
+end
diff --git a/test/prism/comments_test.rb b/test/prism/comments_test.rb
new file mode 100644
index 0000000000..b7aadc0768
--- /dev/null
+++ b/test/prism/comments_test.rb
@@ -0,0 +1,113 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class CommentsTest < TestCase
+ def test_comment_inline
+ source = "# comment"
+
+ assert_comment source, :inline, [0, 9, 1, 1, 0, 9]
+ assert_equal [0], Debug.newlines(source)
+ end
+
+ def test_comment_inline_def
+ source = <<~RUBY
+ def foo
+ # a comment
+ end
+ RUBY
+
+ assert_comment source, :inline, [10, 21, 2, 2, 2, 13]
+ end
+
+ def test_comment___END__
+ source = <<~RUBY
+ __END__
+ comment
+ RUBY
+
+ assert_comment source, :__END__, [0, 16, 1, 2, 0, 0]
+ end
+
+ def test_comment___END__crlf
+ source = "__END__\r\ncomment\r\n"
+
+ assert_comment source, :__END__, [0, 18, 1, 2, 0, 0]
+ end
+
+ def test_comment_embedded_document
+ source = <<~RUBY
+ =begin
+ comment
+ =end
+ RUBY
+
+ assert_comment source, :embdoc, [0, 20, 1, 3, 0, 0]
+ end
+
+ def test_comment_embedded_document_with_content_on_same_line
+ source = <<~RUBY
+ =begin other stuff
+ =end
+ RUBY
+
+ assert_comment source, :embdoc, [0, 24, 1, 2, 0, 0]
+ end
+
+ def test_attaching_comments
+ source = <<~RUBY
+ # Foo class
+ class Foo
+ # bar method
+ def bar
+ # baz invocation
+ baz
+ end # bar end
+ end # Foo end
+ RUBY
+
+ result = YARP.parse(source)
+ result.attach_comments!
+ tree = result.value
+ class_node = tree.statements.body.first
+ method_node = class_node.body.body.first
+ call_node = method_node.body.body.first
+
+ assert_equal("# Foo class\n# Foo end", class_node.location.comments.map { |c| c.location.slice }.join("\n"))
+ assert_equal("# bar method\n# bar end", method_node.location.comments.map { |c| c.location.slice }.join("\n"))
+ assert_equal("# baz invocation", call_node.location.comments.map { |c| c.location.slice }.join("\n"))
+ end
+
+ private
+
+ def assert_comment(source, type, locations)
+ start_offset, end_offset, start_line, end_line, start_column, end_column = locations
+ expected = {
+ start_offset: start_offset,
+ end_offset: end_offset,
+ start_line: start_line,
+ end_line: end_line,
+ start_column: start_column,
+ end_column: end_column
+ }
+
+ result = YARP.parse(source)
+ assert result.errors.empty?, result.errors.map(&:message).join("\n")
+ assert_equal type, result.comments.first.type
+
+ first_comment_location = result.comments.first.location
+
+ actual = {
+ start_offset: first_comment_location.start_offset,
+ end_offset: first_comment_location.end_offset,
+ start_line: first_comment_location.start_line,
+ end_line: first_comment_location.end_line,
+ start_column: first_comment_location.start_column,
+ end_column: first_comment_location.end_column
+ }
+
+ assert_equal expected, actual
+ end
+ end
+end
diff --git a/test/prism/compiler_test.rb b/test/prism/compiler_test.rb
new file mode 100644
index 0000000000..141e183469
--- /dev/null
+++ b/test/prism/compiler_test.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class CompilerTest < TestCase
+ class SExpressions < YARP::Compiler
+ def visit_arguments_node(node)
+ [:arguments, super]
+ end
+
+ def visit_call_node(node)
+ [:call, super]
+ end
+
+ def visit_integer_node(node)
+ [:integer]
+ end
+
+ def visit_program_node(node)
+ [:program, super]
+ end
+ end
+
+ def test_compiler
+ expected = [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]]
+ assert_equal expected, YARP.parse("1 + 2").value.accept(SExpressions.new)
+ end
+ end
+end
diff --git a/test/prism/desugar_compiler_test.rb b/test/prism/desugar_compiler_test.rb
new file mode 100644
index 0000000000..8d2b207fed
--- /dev/null
+++ b/test/prism/desugar_compiler_test.rb
@@ -0,0 +1,86 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class DesugarCompilerTest < TestCase
+ def test_and_write
+ assert_desugars("(AndNode (ClassVariableReadNode) (ClassVariableWriteNode (CallNode)))", "@@foo &&= bar")
+ assert_not_desugared("Foo::Bar &&= baz", "Desugaring would execute Foo twice or need temporary variables")
+ assert_desugars("(AndNode (ConstantReadNode) (ConstantWriteNode (CallNode)))", "Foo &&= bar")
+ assert_desugars("(AndNode (GlobalVariableReadNode) (GlobalVariableWriteNode (CallNode)))", "$foo &&= bar")
+ assert_desugars("(AndNode (InstanceVariableReadNode) (InstanceVariableWriteNode (CallNode)))", "@foo &&= bar")
+ assert_desugars("(AndNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo &&= bar")
+ assert_desugars("(AndNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo = 1; foo &&= bar")
+ end
+
+ def test_or_write
+ assert_desugars("(IfNode (DefinedNode (ClassVariableReadNode)) (StatementsNode (ClassVariableReadNode)) (ElseNode (StatementsNode (ClassVariableWriteNode (CallNode)))))", "@@foo ||= bar")
+ assert_not_desugared("Foo::Bar ||= baz", "Desugaring would execute Foo twice or need temporary variables")
+ assert_desugars("(IfNode (DefinedNode (ConstantReadNode)) (StatementsNode (ConstantReadNode)) (ElseNode (StatementsNode (ConstantWriteNode (CallNode)))))", "Foo ||= bar")
+ assert_desugars("(IfNode (DefinedNode (GlobalVariableReadNode)) (StatementsNode (GlobalVariableReadNode)) (ElseNode (StatementsNode (GlobalVariableWriteNode (CallNode)))))", "$foo ||= bar")
+ assert_desugars("(OrNode (InstanceVariableReadNode) (InstanceVariableWriteNode (CallNode)))", "@foo ||= bar")
+ assert_desugars("(OrNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo ||= bar")
+ assert_desugars("(OrNode (LocalVariableReadNode) (LocalVariableWriteNode (CallNode)))", "foo = 1; foo ||= bar")
+ end
+
+ def test_operator_write
+ assert_desugars("(ClassVariableWriteNode (CallNode (ClassVariableReadNode) (ArgumentsNode (CallNode))))", "@@foo += bar")
+ assert_not_desugared("Foo::Bar += baz", "Desugaring would execute Foo twice or need temporary variables")
+ assert_desugars("(ConstantWriteNode (CallNode (ConstantReadNode) (ArgumentsNode (CallNode))))", "Foo += bar")
+ assert_desugars("(GlobalVariableWriteNode (CallNode (GlobalVariableReadNode) (ArgumentsNode (CallNode))))", "$foo += bar")
+ assert_desugars("(InstanceVariableWriteNode (CallNode (InstanceVariableReadNode) (ArgumentsNode (CallNode))))", "@foo += bar")
+ assert_desugars("(LocalVariableWriteNode (CallNode (LocalVariableReadNode) (ArgumentsNode (CallNode))))", "foo += bar")
+ assert_desugars("(LocalVariableWriteNode (CallNode (LocalVariableReadNode) (ArgumentsNode (CallNode))))", "foo = 1; foo += bar")
+ end
+
+ private
+
+ def ast_inspect(node)
+ parts = [node.class.name.split("::").last]
+
+ node.deconstruct_keys(nil).each do |_, value|
+ case value
+ when Node
+ parts << ast_inspect(value)
+ when Array
+ parts.concat(value.map { |element| ast_inspect(element) })
+ end
+ end
+
+ "(#{parts.join(" ")})"
+ end
+
+ # Ensure every node is only present once in the AST.
+ # If the same node is present twice it would most likely indicate it is executed twice, which is invalid semantically.
+ # This also acts as a sanity check that Node#child_nodes returns only nodes or nil (which caught a couple bugs).
+ class EnsureEveryNodeOnceInAST < Visitor
+ def initialize
+ @all_nodes = {}.compare_by_identity
+ end
+
+ def visit(node)
+ if node
+ if @all_nodes.include?(node)
+ raise "#{node.inspect} is present multiple times in the desugared AST and likely executed multiple times"
+ else
+ @all_nodes[node] = true
+ end
+ end
+ super(node)
+ end
+ end
+
+ def assert_desugars(expected, source)
+ ast = YARP.parse(source).value.accept(DesugarCompiler.new)
+ assert_equal expected, ast_inspect(ast.statements.body.last)
+
+ ast.accept(EnsureEveryNodeOnceInAST.new)
+ end
+
+ def assert_not_desugared(source, reason)
+ ast = YARP.parse(source).value
+ assert_equal_nodes(ast, ast.accept(DesugarCompiler.new))
+ end
+ end
+end
diff --git a/test/prism/dispatcher_test.rb b/test/prism/dispatcher_test.rb
new file mode 100644
index 0000000000..e67562e2da
--- /dev/null
+++ b/test/prism/dispatcher_test.rb
@@ -0,0 +1,46 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class DispatcherTest < TestCase
+ class TestListener
+ attr_reader :events_received
+
+ def initialize
+ @events_received = []
+ end
+
+ def on_call_node_enter(node)
+ events_received << :on_call_node_enter
+ end
+
+ def on_call_node_leave(node)
+ events_received << :on_call_node_leave
+ end
+
+ def on_integer_node_enter(node)
+ events_received << :on_integer_node_enter
+ end
+ end
+
+ def test_dispatching_events
+ listener = TestListener.new
+ dispatcher = Dispatcher.new
+ dispatcher.register(listener, :on_call_node_enter, :on_call_node_leave, :on_integer_node_enter)
+
+ root = YARP.parse(<<~RUBY).value
+ def foo
+ something(1, 2, 3)
+ end
+ RUBY
+
+ dispatcher.dispatch(root)
+ assert_equal([:on_call_node_enter, :on_integer_node_enter, :on_integer_node_enter, :on_integer_node_enter, :on_call_node_leave], listener.events_received)
+
+ listener.events_received.clear
+ dispatcher.dispatch_once(root.statements.body.first.body.body.first)
+ assert_equal([:on_call_node_enter, :on_call_node_leave], listener.events_received)
+ end
+ end
+end
diff --git a/test/prism/encoding_test.rb b/test/prism/encoding_test.rb
new file mode 100644
index 0000000000..8427bddcbe
--- /dev/null
+++ b/test/prism/encoding_test.rb
@@ -0,0 +1,106 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class EncodingTest < TestCase
+ %w[
+ ascii
+ ascii-8bit
+ big5
+ binary
+ euc-jp
+ gbk
+ iso-8859-1
+ iso-8859-2
+ iso-8859-3
+ iso-8859-4
+ iso-8859-5
+ iso-8859-6
+ iso-8859-7
+ iso-8859-8
+ iso-8859-9
+ iso-8859-10
+ iso-8859-11
+ iso-8859-13
+ iso-8859-14
+ iso-8859-15
+ iso-8859-16
+ koi8-r
+ shift_jis
+ sjis
+ us-ascii
+ utf-8
+ utf8-mac
+ windows-31j
+ windows-1251
+ windows-1252
+ CP1251
+ CP1252
+ ].each do |encoding|
+ define_method "test_encoding_#{encoding}" do
+ result = YARP.parse("# encoding: #{encoding}\nident")
+ actual = result.value.statements.body.first.name.encoding
+ assert_equal Encoding.find(encoding), actual
+ end
+ end
+
+ def test_coding
+ result = YARP.parse("# coding: utf-8\nident")
+ actual = result.value.statements.body.first.name.encoding
+ assert_equal Encoding.find("utf-8"), actual
+ end
+
+ def test_coding_with_whitespace
+ result = YARP.parse("# coding \t \r \v : \t \v \r ascii-8bit \nident")
+ actual = result.value.statements.body.first.name.encoding
+ assert_equal Encoding.find("ascii-8bit"), actual
+ end
+
+
+ def test_emacs_style
+ result = YARP.parse("# -*- coding: utf-8 -*-\nident")
+ actual = result.value.statements.body.first.name.encoding
+ assert_equal Encoding.find("utf-8"), actual
+ end
+
+ # This test may be a little confusing. Basically when we use our strpbrk, it
+ # takes into account the encoding of the file.
+ def test_strpbrk_multibyte
+ result = YARP.parse(<<~RUBY)
+ # encoding: Shift_JIS
+ %w[\x81\x5c]
+ RUBY
+
+ assert(result.errors.empty?)
+ assert_equal(
+ (+"\x81\x5c").force_encoding(Encoding::Shift_JIS),
+ result.value.statements.body.first.elements.first.unescaped
+ )
+ end
+
+ def test_utf_8_variations
+ %w[
+ utf-8-unix
+ utf-8-dos
+ utf-8-mac
+ utf-8-*
+ ].each do |encoding|
+ result = YARP.parse("# coding: #{encoding}\nident")
+ actual = result.value.statements.body.first.name.encoding
+ assert_equal Encoding.find("utf-8"), actual
+ end
+ end
+
+ def test_first_lexed_token
+ encoding = YARP.lex("# encoding: ascii-8bit").value[0][0].value.encoding
+ assert_equal Encoding.find("ascii-8bit"), encoding
+ end
+
+ def test_slice_encoding
+ slice = YARP.parse("# encoding: Shift_JIS\nア").value.slice
+ assert_equal (+"ア").force_encoding(Encoding::SHIFT_JIS), slice
+ assert_equal Encoding::SHIFT_JIS, slice.encoding
+ end
+ end
+end
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb
new file mode 100644
index 0000000000..2b3c8f5c89
--- /dev/null
+++ b/test/prism/errors_test.rb
@@ -0,0 +1,1374 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class ErrorsTest < TestCase
+ include DSL
+
+ def test_constant_path_with_invalid_token_after
+ assert_error_messages "A::$b", [
+ "Expected a constant after the `::` operator",
+ "Expected a newline or semicolon after the statement"
+ ]
+ end
+
+ def test_module_name_recoverable
+ expected = ModuleNode(
+ [],
+ Location(),
+ ConstantReadNode(:Parent),
+ StatementsNode(
+ [ModuleNode([], Location(), MissingNode(), nil, Location(), :"")]
+ ),
+ Location(),
+ :Parent
+ )
+
+ assert_errors expected, "module Parent module end", [
+ ["Expected a constant name after `module`", 20..20]
+ ]
+ end
+
+ def test_for_loops_index_missing
+ expected = ForNode(
+ MissingNode(),
+ expression("1..10"),
+ StatementsNode([expression("i")]),
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "for in 1..10\ni\nend", [
+ ["Expected an index after `for`", 0..3]
+ ]
+ end
+
+ def test_for_loops_only_end
+ expected = ForNode(
+ MissingNode(),
+ MissingNode(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "for end", [
+ ["Expected an index after `for`", 0..3],
+ ["Expected an `in` after the index in a `for` statement", 3..3],
+ ["Expected a collection after the `in` in a `for` statement", 3..3]
+ ]
+ end
+
+ def test_pre_execution_missing_brace
+ expected = PreExecutionNode(
+ StatementsNode([expression("1")]),
+ Location(),
+ Location(),
+ Location()
+ )
+
+ assert_errors expected, "BEGIN 1 }", [
+ ["Expected a `{` after `BEGIN`", 5..5]
+ ]
+ end
+
+ def test_pre_execution_context
+ expected = PreExecutionNode(
+ StatementsNode([
+ CallNode(
+ expression("1"),
+ nil,
+ Location(),
+ nil,
+ ArgumentsNode([MissingNode()]),
+ nil,
+ nil,
+ 0,
+ "+"
+ )
+ ]),
+ Location(),
+ Location(),
+ Location()
+ )
+
+ assert_errors expected, "BEGIN { 1 + }", [
+ ["Expected an expression after the operator", 11..11]
+ ]
+ end
+
+ def test_unterminated_embdoc
+ assert_errors expression("1"), "1\n=begin\n", [
+ ["Could not find a terminator for the embedded document", 2..9]
+ ]
+ end
+
+ def test_unterminated_i_list
+ assert_errors expression("%i["), "%i[", [
+ ["Expected a closing delimiter for the `%i` list", 3..3]
+ ]
+ end
+
+ def test_unterminated_w_list
+ assert_errors expression("%w["), "%w[", [
+ ["Expected a closing delimiter for the `%w` list", 3..3]
+ ]
+ end
+
+ def test_unterminated_W_list
+ assert_errors expression("%W["), "%W[", [
+ ["Expected a closing delimiter for the `%W` list", 3..3]
+ ]
+ end
+
+ def test_unterminated_regular_expression
+ assert_errors expression("/hello"), "/hello", [
+ ["Expected a closing delimiter for the regular expression", 1..1]
+ ]
+ end
+
+ def test_unterminated_regular_expression_with_heredoc
+ source = "<<-END + /b\nEND\n"
+
+ assert_errors expression(source), source, [
+ ["Expected a closing delimiter for the regular expression", 10..10]
+ ]
+ end
+
+ def test_unterminated_xstring
+ assert_errors expression("`hello"), "`hello", [
+ ["Expected a closing delimiter for the `%x` or backtick string", 1..1]
+ ]
+ end
+
+ def test_unterminated_string
+ assert_errors expression('"hello'), '"hello', [
+ ["Expected a closing delimiter for the interpolated string", 1..1]
+ ]
+ end
+
+ def test_incomplete_instance_var_string
+ assert_errors expression('%@#@@#'), '%@#@@#', [
+ ["Incomplete instance variable", 4..5],
+ ["Expected a newline or semicolon after the statement", 4..4]
+ ]
+ end
+
+ def test_unterminated_s_symbol
+ assert_errors expression("%s[abc"), "%s[abc", [
+ ["Expected a closing delimiter for the dynamic symbol", 3..3]
+ ]
+ end
+
+ def test_unterminated_parenthesized_expression
+ assert_errors expression('(1 + 2'), '(1 + 2', [
+ ["Expected a newline or semicolon after the statement", 6..6],
+ ["Cannot parse the expression", 6..6],
+ ["Expected a matching `)`", 6..6]
+ ]
+ end
+
+ def test_missing_terminator_in_parentheses
+ assert_error_messages "(0 0)", [
+ "Expected a newline or semicolon after the statement"
+ ]
+ end
+
+ def test_unterminated_argument_expression
+ assert_errors expression('a %'), 'a %', [
+ ["Invalid `%` token", 2..3],
+ ["Expected an expression after the operator", 3..3],
+ ]
+ end
+
+ def test_unterminated_interpolated_symbol
+ assert_error_messages ":\"#", [
+ "Expected a closing delimiter for the interpolated symbol"
+ ]
+ end
+
+ def test_cr_without_lf_in_percent_expression
+ assert_errors expression("%\r"), "%\r", [
+ ["Invalid `%` token", 0..2],
+ ]
+ end
+
+ def test_1_2_3
+ assert_errors expression("(1, 2, 3)"), "(1, 2, 3)", [
+ ["Expected a newline or semicolon after the statement", 2..2],
+ ["Cannot parse the expression", 2..2],
+ ["Expected a matching `)`", 2..2],
+ ["Expected a newline or semicolon after the statement", 2..2],
+ ["Cannot parse the expression", 2..2],
+ ["Expected a newline or semicolon after the statement", 5..5],
+ ["Cannot parse the expression", 5..5],
+ ["Expected a newline or semicolon after the statement", 8..8],
+ ["Cannot parse the expression", 8..8]
+ ]
+ end
+
+ def test_return_1_2_3
+ assert_error_messages "return(1, 2, 3)", [
+ "Expected a newline or semicolon after the statement",
+ "Cannot parse the expression",
+ "Expected a matching `)`",
+ "Expected a newline or semicolon after the statement",
+ "Cannot parse the expression"
+ ]
+ end
+
+ def test_return_1
+ assert_errors expression("return 1,;"), "return 1,;", [
+ ["Expected an argument", 9..9]
+ ]
+ end
+
+ def test_next_1_2_3
+ assert_errors expression("next(1, 2, 3)"), "next(1, 2, 3)", [
+ ["Expected a newline or semicolon after the statement", 6..6],
+ ["Cannot parse the expression", 6..6],
+ ["Expected a matching `)`", 6..6],
+ ["Expected a newline or semicolon after the statement", 12..12],
+ ["Cannot parse the expression", 12..12]
+ ]
+ end
+
+ def test_next_1
+ assert_errors expression("next 1,;"), "next 1,;", [
+ ["Expected an argument", 7..7]
+ ]
+ end
+
+ def test_break_1_2_3
+ assert_errors expression("break(1, 2, 3)"), "break(1, 2, 3)", [
+ ["Expected a newline or semicolon after the statement", 7..7],
+ ["Cannot parse the expression", 7..7],
+ ["Expected a matching `)`", 7..7],
+ ["Expected a newline or semicolon after the statement", 13..13],
+ ["Cannot parse the expression", 13..13]
+ ]
+ end
+
+ def test_break_1
+ assert_errors expression("break 1,;"), "break 1,;", [
+ ["Expected an argument", 8..8]
+ ]
+ end
+
+ def test_argument_forwarding_when_parent_is_not_forwarding
+ assert_errors expression('def a(x, y, z); b(...); end'), 'def a(x, y, z); b(...); end', [
+ ["Unexpected `...` when the parent method is not forwarding", 18..21]
+ ]
+ end
+
+ def test_argument_forwarding_only_effects_its_own_internals
+ assert_errors expression('def a(...); b(...); end; def c(x, y, z); b(...); end'),
+ 'def a(...); b(...); end; def c(x, y, z); b(...); end', [
+ ["Unexpected `...` when the parent method is not forwarding", 43..46]
+ ]
+ end
+
+ def test_top_level_constant_with_downcased_identifier
+ assert_error_messages "::foo", [
+ "Expected a constant after the `::` operator",
+ "Expected a newline or semicolon after the statement"
+ ]
+ end
+
+ def test_top_level_constant_starting_with_downcased_identifier
+ assert_error_messages "::foo::A", [
+ "Expected a constant after the `::` operator",
+ "Expected a newline or semicolon after the statement"
+ ]
+ end
+
+ def test_aliasing_global_variable_with_non_global_variable
+ assert_errors expression("alias $a b"), "alias $a b", [
+ ["Invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable", 9..10]
+ ]
+ end
+
+ def test_aliasing_non_global_variable_with_global_variable
+ assert_errors expression("alias a $b"), "alias a $b", [
+ ["Invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable", 8..10]
+ ]
+ end
+
+ def test_aliasing_global_variable_with_global_number_variable
+ assert_errors expression("alias $a $1"), "alias $a $1", [
+ ["Invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable", 9..11]
+ ]
+ end
+
+ def test_def_with_expression_receiver_and_no_identifier
+ assert_errors expression("def (a); end"), "def (a); end", [
+ ["Expected a `.` or `::` after the receiver in a method definition", 7..7],
+ ["Expected a method name", 7..7]
+ ]
+ end
+
+ def test_def_with_multiple_statements_receiver
+ assert_errors expression("def (\na\nb\n).c; end"), "def (\na\nb\n).c; end", [
+ ["Expected a matching `)`", 7..7],
+ ["Expected a `.` or `::` after the receiver in a method definition", 7..7],
+ ["Expected a method name", 7..7],
+ ["Cannot parse the expression", 10..10],
+ ["Cannot parse the expression", 11..11]
+ ]
+ end
+
+ def test_def_with_empty_expression_receiver
+ assert_errors expression("def ().a; end"), "def ().a; end", [
+ ["Expected a receiver for the method definition", 5..5]
+ ]
+ end
+
+ def test_block_beginning_with_brace_and_ending_with_end
+ assert_error_messages "x.each { x end", [
+ "Expected a newline or semicolon after the statement",
+ "Cannot parse the expression",
+ "Cannot parse the expression",
+ "Expected a block beginning with `{` to end with `}`"
+ ]
+ end
+
+ def test_double_splat_followed_by_splat_argument
+ expected = CallNode(
+ nil,
+ nil,
+ Location(),
+ Location(),
+ ArgumentsNode([
+ KeywordHashNode([AssocSplatNode(expression("kwargs"), Location())]),
+ SplatNode(Location(), expression("args"))
+ ]),
+ Location(),
+ nil,
+ 0,
+ "a"
+ )
+
+ assert_errors expected, "a(**kwargs, *args)", [
+ ["Unexpected `*` splat argument after a `**` keyword splat argument", 12..17]
+ ]
+ end
+
+ def test_arguments_after_block
+ expected = CallNode(
+ nil,
+ nil,
+ Location(),
+ Location(),
+ ArgumentsNode([expression("foo")]),
+ Location(),
+ BlockArgumentNode(expression("block"), Location()),
+ 0,
+ "a"
+ )
+
+ assert_errors expected, "a(&block, foo)", [
+ ["Unexpected argument after a block argument", 10..13]
+ ]
+ end
+
+ def test_arguments_binding_power_for_and
+ assert_error_messages "foo(*bar and baz)", [
+ "Expected a `)` to close the arguments",
+ "Expected a newline or semicolon after the statement",
+ "Cannot parse the expression"
+ ]
+ end
+
+ def test_splat_argument_after_keyword_argument
+ expected = CallNode(
+ nil,
+ nil,
+ Location(),
+ Location(),
+ ArgumentsNode([
+ KeywordHashNode(
+ [AssocNode(
+ SymbolNode(nil, Location(), Location(), "foo"),
+ expression("bar"),
+ nil
+ )]
+ ),
+ SplatNode(Location(), expression("args"))
+ ]),
+ Location(),
+ nil,
+ 0,
+ "a"
+ )
+
+ assert_errors expected, "a(foo: bar, *args)", [
+ ["Unexpected `*` splat argument after a `**` keyword splat argument", 12..17]
+ ]
+ end
+
+ def test_module_definition_in_method_body
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ nil,
+ StatementsNode([ModuleNode([], Location(), ConstantReadNode(:A), nil, Location(), :A)]),
+ [],
+ Location(),
+ nil,
+ nil,
+ nil,
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo;module A;end;end", [
+ ["Unexpected module definition in a method body", 8..14]
+ ]
+ end
+
+ def test_module_definition_in_method_body_within_block
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ nil,
+ StatementsNode(
+ [CallNode(
+ nil,
+ nil,
+ Location(),
+ nil,
+ nil,
+ nil,
+ BlockNode(
+ [],
+ nil,
+ StatementsNode([ModuleNode([], Location(), ConstantReadNode(:Foo), nil, Location(), :Foo)]),
+ Location(),
+ Location()
+ ),
+ 0,
+ "bar"
+ )]
+ ),
+ [],
+ Location(),
+ nil,
+ nil,
+ nil,
+ nil,
+ Location()
+ )
+
+ assert_errors expected, <<~RUBY, [["Unexpected module definition in a method body", 21..27]]
+ def foo
+ bar do
+ module Foo;end
+ end
+ end
+ RUBY
+ end
+
+ def test_class_definition_in_method_body
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ nil,
+ StatementsNode(
+ [ClassNode(
+ [],
+ Location(),
+ ConstantReadNode(:A),
+ nil,
+ nil,
+ nil,
+ Location(),
+ :A
+ )]
+ ),
+ [],
+ Location(),
+ nil,
+ nil,
+ nil,
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo;class A;end;end", [
+ ["Unexpected class definition in a method body", 8..13]
+ ]
+ end
+
+ def test_bad_arguments
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([
+ RequiredParameterNode(:A),
+ RequiredParameterNode(:@a),
+ RequiredParameterNode(:$A),
+ RequiredParameterNode(:@@a),
+ ], [], nil, [], [], nil, nil),
+ nil,
+ [:A, :@a, :$A, :@@a],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(A, @a, $A, @@a);end", [
+ ["Invalid formal argument; formal argument cannot be a constant", 8..9],
+ ["Invalid formal argument; formal argument cannot be an instance variable", 11..13],
+ ["Invalid formal argument; formal argument cannot be a global variable", 15..17],
+ ["Invalid formal argument; formal argument cannot be a class variable", 19..22],
+ ]
+ end
+
+ def test_cannot_assign_to_a_reserved_numbered_parameter
+ expected = BeginNode(
+ Location(),
+ StatementsNode([
+ LocalVariableWriteNode(:_1, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_2, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_3, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_4, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_5, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_6, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_7, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_8, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_9, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()),
+ LocalVariableWriteNode(:_10, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location())
+ ]),
+ nil,
+ nil,
+ nil,
+ Location()
+ )
+ source = <<~RUBY
+ begin
+ _1=:a;_2=:a;_3=:a;_4=:a;_5=:a
+ _6=:a;_7=:a;_8=:a;_9=:a;_10=:a
+ end
+ RUBY
+ assert_errors expected, source, [
+ ["Token reserved for a numbered parameter", 8..10],
+ ["Token reserved for a numbered parameter", 14..16],
+ ["Token reserved for a numbered parameter", 20..22],
+ ["Token reserved for a numbered parameter", 26..28],
+ ["Token reserved for a numbered parameter", 32..34],
+ ["Token reserved for a numbered parameter", 40..42],
+ ["Token reserved for a numbered parameter", 46..48],
+ ["Token reserved for a numbered parameter", 52..54],
+ ["Token reserved for a numbered parameter", 58..60],
+ ]
+ end
+
+ def test_do_not_allow_trailing_commas_in_method_parameters
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [RequiredParameterNode(:a), RequiredParameterNode(:b), RequiredParameterNode(:c)],
+ [],
+ nil,
+ [],
+ [],
+ nil,
+ nil
+ ),
+ nil,
+ [:a, :b, :c],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,c,);end", [
+ ["Unexpected `,` in parameters", 13..14]
+ ]
+ end
+
+ def test_do_not_allow_trailing_commas_in_lambda_parameters
+ expected = LambdaNode(
+ [:a, :b],
+ Location(),
+ Location(),
+ Location(),
+ BlockParametersNode(
+ ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b)], [], nil, [], [], nil, nil),
+ [],
+ Location(),
+ Location()
+ ),
+ nil
+ )
+ assert_errors expected, "-> (a, b, ) {}", [
+ ["Unexpected `,` in parameters", 8..9]
+ ]
+ end
+
+ def test_do_not_allow_multiple_codepoints_in_a_single_character_literal
+ expected = StringNode(0, Location(), Location(), nil, "\u0001\u0002")
+
+ assert_errors expected, '?\u{0001 0002}', [
+ ["Invalid Unicode escape sequence; multiple codepoints are not allowed in a character literal", 9..12]
+ ]
+ end
+
+ def test_invalid_hex_escape
+ assert_errors expression('"\\xx"'), '"\\xx"', [
+ ["Invalid hexadecimal escape sequence", 1..3],
+ ]
+ end
+
+ def test_do_not_allow_more_than_6_hexadecimal_digits_in_u_Unicode_character_notation
+ expected = StringNode(0, Location(), Location(), Location(), "\u0001")
+
+ assert_errors expected, '"\u{0000001}"', [
+ ["Invalid Unicode escape sequence; maximum length is 6 digits", 4..11],
+ ]
+ end
+
+ def test_do_not_allow_characters_other_than_0_9_a_f_and_A_F_in_u_Unicode_character_notation
+ expected = StringNode(0, Location(), Location(), Location(), "\u0000z}")
+
+ assert_errors expected, '"\u{000z}"', [
+ ["Invalid Unicode escape sequence", 7..7],
+ ]
+ end
+
+ def test_unterminated_unicode_brackets_should_be_a_syntax_error
+ assert_errors expression('?\\u{3'), '?\\u{3', [
+ ["Invalid Unicode escape sequence; needs closing `}`", 1..5],
+ ]
+ end
+
+ def test_method_parameters_after_block
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [RequiredParameterNode(:a)],
+ [],
+ nil,
+ BlockParameterNode(:block, Location(), Location())
+ ),
+ nil,
+ [:block, :a],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+ assert_errors expected, "def foo(&block, a)\nend", [
+ ["Unexpected parameter order", 16..17]
+ ]
+ end
+
+ def test_method_with_arguments_after_anonymous_block
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([], [], nil, [RequiredParameterNode(:a)], [], nil, BlockParameterNode(nil, nil, Location())),
+ nil,
+ [:&, :a],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(&, a)\nend", [
+ ["Unexpected parameter order", 11..12]
+ ]
+ end
+
+ def test_method_parameters_after_arguments_forwarding
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [RequiredParameterNode(:a)],
+ [],
+ ForwardingParameterNode(),
+ nil
+ ),
+ nil,
+ [:"...", :a],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+ assert_errors expected, "def foo(..., a)\nend", [
+ ["Unexpected parameter order", 13..14]
+ ]
+ end
+
+ def test_keywords_parameters_before_required_parameters
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [RequiredParameterNode(:a)],
+ [KeywordParameterNode(:b, Location(), nil)],
+ nil,
+ nil
+ ),
+ nil,
+ [:b, :a],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+ assert_errors expected, "def foo(b:, a)\nend", [
+ ["Unexpected parameter order", 12..13]
+ ]
+ end
+
+ def test_rest_keywords_parameters_before_required_parameters
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [],
+ [KeywordParameterNode(:b, Location(), nil)],
+ KeywordRestParameterNode(:rest, Location(), Location()),
+ nil
+ ),
+ nil,
+ [:rest, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(**rest, b:)\nend", [
+ ["Unexpected parameter order", 16..18]
+ ]
+ end
+
+ def test_double_arguments_forwarding
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil),
+ nil,
+ [:"..."],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(..., ...)\nend", [
+ ["Unexpected parameter order", 13..16]
+ ]
+ end
+
+ def test_multiple_error_in_parameters_order
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [RequiredParameterNode(:a)],
+ [KeywordParameterNode(:b, Location(), nil)],
+ KeywordRestParameterNode(:args, Location(), Location()),
+ nil
+ ),
+ nil,
+ [:args, :a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(**args, a, b:)\nend", [
+ ["Unexpected parameter order", 16..17],
+ ["Unexpected parameter order", 19..21]
+ ]
+ end
+
+ def test_switching_to_optional_arguments_twice
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [RequiredParameterNode(:a)],
+ [KeywordParameterNode(:b, Location(), nil)],
+ KeywordRestParameterNode(:args, Location(), Location()),
+ nil
+ ),
+ nil,
+ [:args, :a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location(),
+ )
+
+ assert_errors expected, "def foo(**args, a, b:)\nend", [
+ ["Unexpected parameter order", 16..17],
+ ["Unexpected parameter order", 19..21]
+ ]
+ end
+
+ def test_switching_to_named_arguments_twice
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [],
+ [],
+ nil,
+ [RequiredParameterNode(:a)],
+ [KeywordParameterNode(:b, Location(), nil)],
+ KeywordRestParameterNode(:args, Location(), Location()),
+ nil
+ ),
+ nil,
+ [:args, :a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location(),
+ )
+
+ assert_errors expected, "def foo(**args, a, b:)\nend", [
+ ["Unexpected parameter order", 16..17],
+ ["Unexpected parameter order", 19..21]
+ ]
+ end
+
+ def test_returning_to_optional_parameters_multiple_times
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode(
+ [RequiredParameterNode(:a)],
+ [
+ OptionalParameterNode(:b, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL)),
+ OptionalParameterNode(:d, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL))
+ ],
+ nil,
+ [RequiredParameterNode(:c), RequiredParameterNode(:e)],
+ [],
+ nil,
+ nil
+ ),
+ nil,
+ [:a, :b, :c, :d, :e],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location(),
+ )
+
+ assert_errors expected, "def foo(a, b = 1, c, d = 2, e)\nend", [
+ ["Unexpected parameter order", 23..24]
+ ]
+ end
+
+ def test_case_without_when_clauses_errors_on_else_clause
+ expected = CaseNode(
+ SymbolNode(Location(), Location(), nil, "a"),
+ [],
+ ElseNode(Location(), nil, Location()),
+ Location(),
+ Location()
+ )
+
+ assert_errors expected, "case :a\nelse\nend", [
+ ["Expected a `when` or `in` clause after `case`", 0..4]
+ ]
+ end
+
+ def test_case_without_clauses
+ expected = CaseNode(
+ SymbolNode(Location(), Location(), nil, "a"),
+ [],
+ nil,
+ Location(),
+ Location()
+ )
+
+ assert_errors expected, "case :a\nend", [
+ ["Expected a `when` or `in` clause after `case`", 0..4]
+ ]
+ end
+
+ def test_setter_method_cannot_be_defined_in_an_endless_method_definition
+ expected = DefNode(
+ :a=,
+ Location(),
+ nil,
+ nil,
+ StatementsNode([IntegerNode(IntegerBaseFlags::DECIMAL)]),
+ [],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ Location(),
+ nil
+ )
+
+ assert_errors expected, "def a=() = 42", [
+ ["Invalid method name; a setter method cannot be defined in an endless method definition", 4..6]
+ ]
+ end
+
+ def test_do_not_allow_forward_arguments_in_lambda_literals
+ expected = LambdaNode(
+ [:"..."],
+ Location(),
+ Location(),
+ Location(),
+ BlockParametersNode(ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil), [], Location(), Location()),
+ nil
+ )
+
+ assert_errors expected, "->(...) {}", [
+ ["Unexpected `...` when the parent method is not forwarding", 3..6]
+ ]
+ end
+
+ def test_do_not_allow_forward_arguments_in_blocks
+ expected = CallNode(
+ nil,
+ nil,
+ Location(),
+ nil,
+ nil,
+ nil,
+ BlockNode(
+ [:"..."],
+ BlockParametersNode(ParametersNode([], [], nil, [], [], ForwardingParameterNode(), nil), [], Location(), Location()),
+ nil,
+ Location(),
+ Location()
+ ),
+ 0,
+ "a"
+ )
+
+ assert_errors expected, "a {|...|}", [
+ ["Unexpected `...` when the parent method is not forwarding", 4..7]
+ ]
+ end
+
+ def test_dont_allow_return_inside_class_body
+ expected = ClassNode(
+ [],
+ Location(),
+ ConstantReadNode(:A),
+ nil,
+ nil,
+ StatementsNode([ReturnNode(Location(), nil)]),
+ Location(),
+ :A
+ )
+
+ assert_errors expected, "class A; return; end", [
+ ["Invalid `return` in a class or module body", 15..16]
+ ]
+ end
+
+ def test_dont_allow_return_inside_module_body
+ expected = ModuleNode(
+ [],
+ Location(),
+ ConstantReadNode(:A),
+ StatementsNode([ReturnNode(Location(), nil)]),
+ Location(),
+ :A
+ )
+
+ assert_errors expected, "module A; return; end", [
+ ["Invalid `return` in a class or module body", 16..17]
+ ]
+ end
+
+ def test_dont_allow_setting_to_back_and_nth_reference
+ expected = BeginNode(
+ Location(),
+ StatementsNode([
+ GlobalVariableWriteNode(:$+, Location(), NilNode(), Location()),
+ GlobalVariableWriteNode(:$1466, Location(), NilNode(), Location())
+ ]),
+ nil,
+ nil,
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "begin\n$+ = nil\n$1466 = nil\nend", [
+ ["Immutable variable as a write target", 6..8],
+ ["Immutable variable as a write target", 15..20]
+ ]
+ end
+
+ def test_duplicated_parameter_names
+ # For some reason, Ripper reports no error for Ruby 3.0 when you have
+ # duplicated parameter names for positional parameters.
+ unless RUBY_VERSION < "3.1.0"
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b), RequiredParameterNode(:a)], [], nil, [], [], nil, nil),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,a);end", [
+ ["Repeated parameter name", 12..13]
+ ]
+ end
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b)], [], RestParameterNode(:a, Location(), Location()), [], [], nil, nil),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,*a);end", [
+ ["Repeated parameter name", 13..14]
+ ]
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b)], [], nil, [], [], KeywordRestParameterNode(:a, Location(), Location()), nil),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,**a);end", [
+ ["Repeated parameter name", 14..15]
+ ]
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([RequiredParameterNode(:a), RequiredParameterNode(:b)], [], nil, [], [], nil, BlockParameterNode(:a, Location(), Location())),
+ nil,
+ [:a, :b],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a,b,&a);end", [
+ ["Repeated parameter name", 13..14]
+ ]
+
+ expected = DefNode(
+ :foo,
+ Location(),
+ nil,
+ ParametersNode([], [OptionalParameterNode(:a, Location(), Location(), IntegerNode(IntegerBaseFlags::DECIMAL))], RestParameterNode(:c, Location(), Location()), [RequiredParameterNode(:b)], [], nil, nil),
+ nil,
+ [:a, :b, :c],
+ Location(),
+ nil,
+ Location(),
+ Location(),
+ nil,
+ Location()
+ )
+
+ assert_errors expected, "def foo(a = 1,b,*c);end", [["Unexpected parameter `*`", 16..17]]
+ end
+
+ def test_invalid_message_name
+ result = YARP.parse("+.@foo,+=foo")
+ assert_equal "", result.value.statements.body.first.write_name
+ end
+
+ def test_invalid_operator_write_fcall
+ source = "foo! += 1"
+ assert_errors expression(source), source, [
+ ["Unexpected write target", 0..4]
+ ]
+ end
+
+ def test_invalid_operator_write_dot
+ source = "foo.+= 1"
+ assert_errors expression(source), source, [
+ ["Unexpected write target", 5..6]
+ ]
+ end
+
+ def test_unterminated_global_variable
+ assert_errors expression("$"), "$", [
+ ["Invalid global variable", 0..1]
+ ]
+ end
+
+ def test_invalid_global_variable_write
+ assert_errors expression("$',"), "$',", [
+ ["Immutable variable as a write target", 0..2],
+ ["Unexpected write target", 0..3]
+ ]
+ end
+
+ def test_invalid_multi_target
+ error_messages = ["Unexpected write target"]
+ immutable = "Immutable variable as a write target"
+
+ assert_error_messages "foo,", error_messages
+ assert_error_messages "foo = 1; foo,", error_messages
+ assert_error_messages "foo.bar,", error_messages
+ assert_error_messages "*foo,", error_messages
+ assert_error_messages "@foo,", error_messages
+ assert_error_messages "@@foo,", error_messages
+ assert_error_messages "$foo,", error_messages
+ assert_error_messages "$1,", [immutable, *error_messages]
+ assert_error_messages "$+,", [immutable, *error_messages]
+ assert_error_messages "Foo,", error_messages
+ assert_error_messages "::Foo,", error_messages
+ assert_error_messages "Foo::Foo,", error_messages
+ assert_error_messages "Foo::foo,", error_messages
+ assert_error_messages "foo[foo],", error_messages
+ assert_error_messages "(foo, bar)", error_messages
+ end
+
+ def test_call_with_block_and_write
+ source = "foo {} &&= 1"
+ assert_errors expression(source), source, [
+ ["Unexpected write target", 0..6],
+ ["Unexpected operator after a call with a block", 7..10]
+ ]
+ end
+
+ def test_call_with_block_or_write
+ source = "foo {} ||= 1"
+ assert_errors expression(source), source, [
+ ["Unexpected write target", 0..6],
+ ["Unexpected operator after a call with a block", 7..10]
+ ]
+ end
+
+ def test_call_with_block_operator_write
+ source = "foo {} += 1"
+ assert_errors expression(source), source, [
+ ["Unexpected write target", 0..6],
+ ["Unexpected operator after a call with a block", 7..9]
+ ]
+ end
+
+ def test_writing_numbered_parameter
+ assert_errors expression("-> { _1 = 0 }"), "-> { _1 = 0 }", [
+ ["Token reserved for a numbered parameter", 5..7]
+ ]
+ end
+
+ def test_targeting_numbered_parameter
+ assert_errors expression("-> { _1, = 0 }"), "-> { _1, = 0 }", [
+ ["Token reserved for a numbered parameter", 5..7]
+ ]
+ end
+
+ def test_double_scope_numbered_parameters
+ source = "-> { _1 + -> { _2 } }"
+ errors = [["Numbered parameter is already used in outer scope", 15..17]]
+
+ assert_errors expression(source), source, errors, compare_ripper: false
+ end
+
+ def test_invalid_number_underscores
+ error_messages = ["Invalid underscore placement in number"]
+
+ assert_error_messages "1__1", error_messages
+ assert_error_messages "0b1__1", error_messages
+ assert_error_messages "0o1__1", error_messages
+ assert_error_messages "01__1", error_messages
+ assert_error_messages "0d1__1", error_messages
+ assert_error_messages "0x1__1", error_messages
+
+ assert_error_messages "1_1_", error_messages
+ assert_error_messages "0b1_1_", error_messages
+ assert_error_messages "0o1_1_", error_messages
+ assert_error_messages "01_1_", error_messages
+ assert_error_messages "0d1_1_", error_messages
+ assert_error_messages "0x1_1_", error_messages
+ end
+
+ def test_alnum_delimiters
+ error_messages = ["Invalid `%` token"]
+
+ assert_error_messages "%qXfooX", error_messages
+ assert_error_messages "%QXfooX", error_messages
+ assert_error_messages "%wXfooX", error_messages
+ assert_error_messages "%WxfooX", error_messages
+ assert_error_messages "%iXfooX", error_messages
+ assert_error_messages "%IXfooX", error_messages
+ assert_error_messages "%xXfooX", error_messages
+ assert_error_messages "%rXfooX", error_messages
+ assert_error_messages "%sXfooX", error_messages
+ end
+
+ def test_begin_at_toplevel
+ source = "def foo; BEGIN {}; end"
+ assert_errors expression(source), source, [
+ ["BEGIN is permitted only at toplevel", 9..14],
+ ]
+ end
+
+ def test_numbered_parameters_in_block_arguments
+ source = "foo { |_1| }"
+ assert_errors expression(source), source, [
+ ["Token reserved for a numbered parameter", 7..9],
+ ]
+ end
+
+ def test_conditional_predicate_closed
+ source = "if 0 0; end\nunless 0 0; end"
+ assert_errors expression(source), source, [
+ ["Expected `then` or `;` or '\n" + "'", 5..6],
+ ["Expected `then` or `;` or '\n" + "'", 21..22],
+ ]
+ end
+
+ def test_parameter_name_ending_with_bang_or_question_mark
+ source = "def foo(x!,y?); end"
+ errors = [
+ ["Unexpected name for a parameter", 8..10],
+ ["Unexpected name for a parameter", 11..13]
+ ]
+ assert_errors expression(source), source, errors, compare_ripper: false
+ end
+
+ def test_class_name
+ source = "class 0.X end"
+ assert_errors expression(source), source, [
+ ["Expected a constant name after `class`", 6..9],
+ ]
+ end
+
+ def test_loop_conditional_is_closed
+ source = "while 0 0; foo; end; until 0 0; foo; end"
+ assert_errors expression(source), source, [
+ ["Expected a predicate expression for the `while` statement", 7..7],
+ ["Expected a predicate expression for the `until` statement", 28..28],
+ ]
+ end
+
+ private
+
+ def assert_errors(expected, source, errors, compare_ripper: RUBY_ENGINE == "ruby")
+ # Ripper behaves differently on JRuby/TruffleRuby, so only check this on CRuby
+ assert_nil Ripper.sexp_raw(source) if compare_ripper
+
+ result = YARP.parse(source)
+ node = result.value.statements.body.last
+
+ assert_equal_nodes(expected, node, compare_location: false)
+ assert_equal(errors, result.errors.map { |e| [e.message, e.location.start_offset..e.location.end_offset] })
+ end
+
+ def assert_error_messages(source, errors, compare_ripper: RUBY_ENGINE == "ruby")
+ assert_nil Ripper.sexp_raw(source) if compare_ripper
+ result = YARP.parse(source)
+ assert_equal(errors, result.errors.map(&:message))
+ end
+
+ def expression(source)
+ YARP.parse(source).value.statements.body.last
+ end
+ end
+end
diff --git a/test/prism/fixtures/alias.txt b/test/prism/fixtures/alias.txt
new file mode 100644
index 0000000000..376dacd7cc
--- /dev/null
+++ b/test/prism/fixtures/alias.txt
@@ -0,0 +1,23 @@
+alias :foo :bar
+
+alias %s[abc] %s[def]
+
+alias :'abc' :'def'
+
+alias :"abc#{1}" :'def'
+
+alias $a $'
+
+alias foo bar
+
+alias $foo $bar
+
+alias foo if
+
+alias foo <=>
+
+alias :== :eql?
+
+alias A B
+
+alias :A :B
diff --git a/test/prism/fixtures/arithmetic.txt b/test/prism/fixtures/arithmetic.txt
new file mode 100644
index 0000000000..b1e1267b95
--- /dev/null
+++ b/test/prism/fixtures/arithmetic.txt
@@ -0,0 +1,13 @@
+foo !bar
+
+-foo*bar
+
++foo**bar
+
+foo ~bar
+
+foo << bar << baz
+
+-1**2
+
+-1.zero?
diff --git a/test/prism/fixtures/arrays.txt b/test/prism/fixtures/arrays.txt
new file mode 100644
index 0000000000..057a73abf6
--- /dev/null
+++ b/test/prism/fixtures/arrays.txt
@@ -0,0 +1,82 @@
+[*a]
+
+foo[bar, baz] = 1, 2, 3
+
+[a: [:b, :c]]
+
+
+
+[:a, :b,
+:c,1,
+
+
+
+:d,
+]
+
+
+[:a, :b,
+:c,1,
+
+
+
+:d
+
+
+]
+
+[foo => bar]
+
+foo[bar][baz] = qux
+
+foo[bar][baz]
+
+[
+]
+
+foo[bar, baz]
+
+foo[bar, baz] = qux
+
+foo[0], bar[0] = 1, 2
+
+foo[bar[baz] = qux]
+
+foo[bar]
+
+foo[bar] = baz
+
+[**{}]
+
+[**kw]
+
+[1, **kw]
+
+[1, **kw, **{}, **kw]
+
+[
+ foo => bar,
+]
+
+
+%i#one two three#
+
+%w#one two three#
+
+%x#one two three#
+
+
+%i@one two three@
+
+%w@one two three@
+
+%x@one two three@
+
+
+%i{one two three}
+
+%w{one two three}
+
+%x{one two three}
+
+%w[\C:]
diff --git a/test/prism/fixtures/begin_ensure.txt b/test/prism/fixtures/begin_ensure.txt
new file mode 100644
index 0000000000..6cfb627453
--- /dev/null
+++ b/test/prism/fixtures/begin_ensure.txt
@@ -0,0 +1,21 @@
+begin
+a
+ensure
+b
+end
+
+begin; a; ensure; b; end
+
+begin a
+ ensure b
+ end
+
+begin a; ensure b; end
+
+begin begin:s.l begin ensure Module.new do
+ begin
+ break
+ ensure Module.new do
+ end
+ end
+end end end end
diff --git a/test/prism/fixtures/begin_rescue.txt b/test/prism/fixtures/begin_rescue.txt
new file mode 100644
index 0000000000..0a56fbef9f
--- /dev/null
+++ b/test/prism/fixtures/begin_rescue.txt
@@ -0,0 +1,79 @@
+begin; a; rescue; b; else; c; end
+
+begin; a; rescue; b; else; c; ensure; d; end
+
+begin
+a
+end
+
+begin; a; end
+
+begin a
+ end
+
+begin a; end
+
+begin
+a
+rescue
+b
+rescue
+c
+rescue
+d
+end
+
+begin
+ a
+rescue Exception => ex
+ b
+rescue AnotherException, OneMoreException => ex
+ c
+end
+
+begin
+ a
+rescue Exception => ex
+ b
+ensure
+ b
+end
+
+%!abc!
+
+begin
+a
+rescue
+b
+end
+
+begin;a;rescue;b;end
+
+begin
+a;rescue
+b;end
+
+begin
+a
+rescue Exception
+b
+end
+
+begin
+a
+rescue Exception, CustomException
+b
+end
+
+begin
+ a
+rescue Exception, CustomException => ex
+ b
+end
+
+begin
+ a
+rescue Exception => ex
+ b
+end
+
diff --git a/test/prism/fixtures/blocks.txt b/test/prism/fixtures/blocks.txt
new file mode 100644
index 0000000000..e33d95c150
--- /dev/null
+++ b/test/prism/fixtures/blocks.txt
@@ -0,0 +1,54 @@
+foo[bar] { baz }
+
+foo[bar] do
+baz
+end
+
+x.reduce(0) { |x, memo| memo += x }
+
+foo do end
+
+foo bar, (baz do end)
+
+foo bar do end
+
+foo bar baz do end
+
+foo do |a = b[1]|
+end
+
+foo do
+rescue
+end
+
+foo do
+ bar do
+ baz do
+ end
+ end
+end
+
+foo[bar] { baz }
+
+foo { |x, y = 2, z:| x }
+
+foo { |x| }
+
+fork = 1
+fork do |a|
+end
+
+fork { |a| }
+
+C do
+end
+
+C {}
+
+foo lambda { |
+ a: 1,
+ b: 2
+ |
+}
+
+foo do |bar,| end
diff --git a/test/prism/fixtures/boolean_operators.txt b/test/prism/fixtures/boolean_operators.txt
new file mode 100644
index 0000000000..dd0b9c9f01
--- /dev/null
+++ b/test/prism/fixtures/boolean_operators.txt
@@ -0,0 +1,5 @@
+a &&= b
+
+a += b
+
+a ||= b
diff --git a/test/prism/fixtures/booleans.txt b/test/prism/fixtures/booleans.txt
new file mode 100644
index 0000000000..d9417254b6
--- /dev/null
+++ b/test/prism/fixtures/booleans.txt
@@ -0,0 +1,3 @@
+false
+
+true
diff --git a/test/prism/fixtures/break.txt b/test/prism/fixtures/break.txt
new file mode 100644
index 0000000000..61859d8a8a
--- /dev/null
+++ b/test/prism/fixtures/break.txt
@@ -0,0 +1,25 @@
+break
+
+break (1), (2), (3)
+
+break 1
+
+break 1, 2,
+3
+
+break 1, 2, 3
+
+break [1, 2, 3]
+
+break(
+ 1
+ 2
+)
+
+break()
+
+break(1)
+
+foo { break 42 } == 42
+
+foo { |a| break } == 42
diff --git a/test/prism/fixtures/case.txt b/test/prism/fixtures/case.txt
new file mode 100644
index 0000000000..1b720bc5ac
--- /dev/null
+++ b/test/prism/fixtures/case.txt
@@ -0,0 +1,32 @@
+case :hi
+when :hi
+end
+
+case true; when true; puts :hi; when false; puts :bye; end
+
+case; when *foo; end
+
+case :hi
+when :hi
+else
+:b
+end
+
+case this; when FooBar, BazBonk; end
+
+case
+when foo == bar
+end
+
+case
+when a
+else
+ # empty
+end
+
+case type;
+ ;when :b;
+ ; else;
+ end
+
+case ;;;;;;;; when 1; end
diff --git a/test/prism/fixtures/classes.txt b/test/prism/fixtures/classes.txt
new file mode 100644
index 0000000000..056cb00e82
--- /dev/null
+++ b/test/prism/fixtures/classes.txt
@@ -0,0 +1,35 @@
+class A a = 1 end
+
+class A; ensure; end
+
+class A; rescue; else; ensure; end
+
+class A < B
+a = 1
+end
+
+class << not foo
+end
+
+class A; class << self; ensure; end; end
+
+class A; class << self; rescue; else; ensure; end; end
+
+class << foo.bar
+end
+
+class << foo.bar;end
+
+class << self
+end
+
+class << self;end
+
+class << self
+1 + 2
+end
+
+class << self;1 + 2;end
+
+class A < B[1]
+end
diff --git a/test/prism/fixtures/comments.txt b/test/prism/fixtures/comments.txt
new file mode 100644
index 0000000000..9bd853e927
--- /dev/null
+++ b/test/prism/fixtures/comments.txt
@@ -0,0 +1,24 @@
+a
+ # Comment
+b
+
+c # Comment
+d
+
+e
+# Comment
+ .f
+
+g
+ # Comment
+.h
+
+i # Comment
+.j
+
+k # Comment
+ .l
+
+m
+ # Comment
+ &.n
diff --git a/test/prism/fixtures/constants.txt b/test/prism/fixtures/constants.txt
new file mode 100644
index 0000000000..d86f8d3402
--- /dev/null
+++ b/test/prism/fixtures/constants.txt
@@ -0,0 +1,184 @@
+A::B
+
+A::B::C
+
+a::B
+
+A::B = 1
+
+A = 1
+
+ABC
+
+Foo 1
+
+Foo *bar
+
+Foo **bar
+
+Foo &bar
+
+Foo::Bar *baz
+
+Foo::Bar **baz
+
+Foo::Bar &baz
+
+::A::foo
+
+::A = 1
+
+::A::B = 1
+
+::A::B
+
+::A
+
+A::false
+
+A::B::true
+
+A::&
+
+A::`
+
+A::!
+
+A::!=
+
+A::^
+
+A::==
+
+A::===
+
+A::=~
+
+A::>
+
+A::>=
+
+A::>>
+
+A::<<
+
+A::\
+#
+C
+
+A::alias
+
+A::and
+
+A::begin
+
+A::BEGIN
+
+A::break
+
+A::class
+
+A::def
+
+A::defined
+
+A::do
+
+A::else
+
+A::elsif
+
+A::end
+
+A::END
+
+A::ensure
+
+A::false
+
+A::for
+
+A::if
+
+A::in
+
+A::next
+
+A::nil
+
+A::not
+
+A::or
+
+A::redo
+
+A::rescue
+
+A::retry
+
+A::return
+
+A::self
+
+A::super
+
+A::then
+
+A::true
+
+A::undef
+
+A::unless
+
+A::until
+
+A::when
+
+A::while
+
+A::yield
+
+A::__ENCODING__
+
+A::__FILE__
+
+A::__LINE__
+
+A::<
+
+A::<=>
+
+A::<<
+
+A::-
+
+A::%
+
+A::%i
+
+A::%w
+
+A::%x
+
+A::%I
+
+A::%W
+
+A::|
+
+A::+
+
+A::/
+
+A::*
+
+A::**
+
+A::~
+
+A::_::
+C
+
+A::_..
+
+A::__END__
diff --git a/test/prism/fixtures/dash_heredocs.txt b/test/prism/fixtures/dash_heredocs.txt
new file mode 100644
index 0000000000..3e663fae63
--- /dev/null
+++ b/test/prism/fixtures/dash_heredocs.txt
@@ -0,0 +1,63 @@
+<<-EOF
+ a
+EOF
+
+<<-FIRST + <<-SECOND
+ a
+FIRST
+ b
+SECOND
+
+<<-`EOF`
+ a
+#{b}
+EOF
+
+<<-EOF #comment
+ a
+EOF
+
+<<-EOF
+ a
+ b
+ EOF
+
+<<-"EOF"
+ a
+#{b}
+EOF
+
+<<-EOF
+ a
+#{b}
+EOF
+
+%#abc#
+
+<<-EOF
+ a
+ b
+EOF
+
+<<-''
+
+
+<<-'EOF'
+ a #{1}
+EOF
+
+<<-A + <<-B
+ a
+A
+ b
+ #{2
+ }
+B
+
+<<-A + <<-B
+ a
+A
+ b
+ #{
+ 2}
+B
diff --git a/test/prism/fixtures/defined.txt b/test/prism/fixtures/defined.txt
new file mode 100644
index 0000000000..9cf153a853
--- /dev/null
+++ b/test/prism/fixtures/defined.txt
@@ -0,0 +1,7 @@
+defined? 1 and defined? 2
+
+defined?(x %= 2)
+
+defined?(foo and bar)
+
+defined? 1
diff --git a/test/prism/fixtures/dos_endings.txt b/test/prism/fixtures/dos_endings.txt
new file mode 100644
index 0000000000..c105522fa1
--- /dev/null
+++ b/test/prism/fixtures/dos_endings.txt
@@ -0,0 +1,20 @@
+puts "hi"\
+ "there"
+
+%I{a\
+b}
+
+<<-E
+ 1 \
+ 2
+ 3
+E
+
+x = %
+
+
+
+a = foo(<<~EOF.chop)
+
+ baz
+ EOF
diff --git a/test/prism/fixtures/embdoc_no_newline_at_end.txt b/test/prism/fixtures/embdoc_no_newline_at_end.txt
new file mode 100644
index 0000000000..7dc2e32d73
--- /dev/null
+++ b/test/prism/fixtures/embdoc_no_newline_at_end.txt
@@ -0,0 +1,2 @@
+=begin
+=end \ No newline at end of file
diff --git a/test/prism/fixtures/endless_methods.txt b/test/prism/fixtures/endless_methods.txt
new file mode 100644
index 0000000000..8c2f2a30cc
--- /dev/null
+++ b/test/prism/fixtures/endless_methods.txt
@@ -0,0 +1,5 @@
+def foo = 1
+
+def bar = A ""
+
+def method = 1 + 2 + 3
diff --git a/test/prism/fixtures/endless_range_in_conditional.txt b/test/prism/fixtures/endless_range_in_conditional.txt
new file mode 100644
index 0000000000..6048008584
--- /dev/null
+++ b/test/prism/fixtures/endless_range_in_conditional.txt
@@ -0,0 +1,3 @@
+if 1..2 ; end
+if ..1 ; end
+if 1.. ; end
diff --git a/test/prism/fixtures/for.txt b/test/prism/fixtures/for.txt
new file mode 100644
index 0000000000..b6eb2cb24f
--- /dev/null
+++ b/test/prism/fixtures/for.txt
@@ -0,0 +1,19 @@
+for i in 1..10
+i
+end
+
+for i in 1..10; i; end
+
+for i,j in 1..10
+i
+end
+
+for i,j,k in 1..10
+i
+end
+
+for i in 1..10 do
+i
+end
+
+for i in 1..10; i; end
diff --git a/test/prism/fixtures/global_variables.txt b/test/prism/fixtures/global_variables.txt
new file mode 100644
index 0000000000..3dc52722a0
--- /dev/null
+++ b/test/prism/fixtures/global_variables.txt
@@ -0,0 +1,93 @@
+$global_variable
+
+$_
+
+$-w
+
+$LOAD_PATH
+
+$stdin
+
+$stdout
+
+$stderr
+
+$!
+
+$?
+
+$~
+
+$&
+
+$`
+
+$'
+
+$+
+
+$:
+
+$;
+
+$,
+
+$DEBUG
+
+$FILENAME
+
+$0
+
+$-0
+
+$LOADED_FEATURES
+
+$VERBOSE
+
+$-K
+
+:$global_variable
+
+:$_
+
+:$-w
+
+:$LOAD_PATH
+
+:$stdin
+
+:$stdout
+
+:$stderr
+
+:$!
+
+:$?
+
+:$~
+
+:$&
+
+:$`
+
+:$'
+
+:$+
+
+:$:
+
+:$;
+
+:$DEBUG
+
+:$FILENAME
+
+:$0
+
+:$-0
+
+:$LOADED_FEATURES
+
+:$VERBOSE
+
+:$-K
diff --git a/test/prism/fixtures/hashes.txt b/test/prism/fixtures/hashes.txt
new file mode 100644
index 0000000000..443b2359c6
--- /dev/null
+++ b/test/prism/fixtures/hashes.txt
@@ -0,0 +1,26 @@
+{}
+
+{
+}
+
+{ a => b, c => d }
+
+{ a => b, **c }
+
+{
+ a: b,
+ c: d
+
+
+
+ }
+
+{ a: b, c: d, **e, f: g }
+
+{ "a": !b? }
+
+a = 1
+tap do
+ b = 1
+ { a:, b:, c:, D: }
+end
diff --git a/test/prism/fixtures/heredoc_with_escaped_newline_at_start.txt b/test/prism/fixtures/heredoc_with_escaped_newline_at_start.txt
new file mode 100644
index 0000000000..81f314e0b3
--- /dev/null
+++ b/test/prism/fixtures/heredoc_with_escaped_newline_at_start.txt
@@ -0,0 +1,7 @@
+<<-TARGET.gsub /^\s{/, ''\
+TARGET
+
+
+<<-TARGET.gsub /^\s{/, ''\
+TARGET
+
diff --git a/test/prism/fixtures/heredoc_with_trailing_newline.txt b/test/prism/fixtures/heredoc_with_trailing_newline.txt
new file mode 100644
index 0000000000..13771bf3ac
--- /dev/null
+++ b/test/prism/fixtures/heredoc_with_trailing_newline.txt
@@ -0,0 +1,2 @@
+<<-END
+END \ No newline at end of file
diff --git a/test/prism/fixtures/heredocs_nested.txt b/test/prism/fixtures/heredocs_nested.txt
new file mode 100644
index 0000000000..eef7206d69
--- /dev/null
+++ b/test/prism/fixtures/heredocs_nested.txt
@@ -0,0 +1,9 @@
+<<~RUBY
+pre
+#{
+<<RUBY
+ hello
+RUBY
+}
+post
+RUBY
diff --git a/test/prism/fixtures/heredocs_with_ignored_newlines.txt b/test/prism/fixtures/heredocs_with_ignored_newlines.txt
new file mode 100644
index 0000000000..8e12546ec7
--- /dev/null
+++ b/test/prism/fixtures/heredocs_with_ignored_newlines.txt
@@ -0,0 +1,14 @@
+<<-HERE\
+HERE
+
+<<~THERE\
+ way over
+ <<HERE
+ not here
+ HERE
+
+ <<~BUT\
+ but
+ BUT
+ there
+THERE
diff --git a/test/prism/fixtures/heredocs_with_ignored_newlines_and_non_empty.txt b/test/prism/fixtures/heredocs_with_ignored_newlines_and_non_empty.txt
new file mode 100644
index 0000000000..aeacbd8126
--- /dev/null
+++ b/test/prism/fixtures/heredocs_with_ignored_newlines_and_non_empty.txt
@@ -0,0 +1,4 @@
+<<-EOE
+ some
+ heredocs
+EOE \ No newline at end of file
diff --git a/test/prism/fixtures/if.txt b/test/prism/fixtures/if.txt
new file mode 100644
index 0000000000..c5281a6693
--- /dev/null
+++ b/test/prism/fixtures/if.txt
@@ -0,0 +1,42 @@
+if true; 1; end
+
+if true
+1 else 2 end
+
+if true then true elsif false then false elsif nil then nil else self end
+
+1 if true
+
+break if true
+
+next if true
+
+return if true
+
+if exit_loop then break 42 end
+
+if foo
+then bar
+end
+
+a if b if c
+
+if true
+ a b:
+else
+end
+
+if type in 1
+elsif type in B
+end
+
+if 1
+ lambda do |_|
+ end
+elsif 2
+ lambda do |_|
+ end
+else
+ lambda do |_|
+ end
+end
diff --git a/test/prism/fixtures/indented_file_end.txt b/test/prism/fixtures/indented_file_end.txt
new file mode 100644
index 0000000000..5a96dcacf7
--- /dev/null
+++ b/test/prism/fixtures/indented_file_end.txt
@@ -0,0 +1,4 @@
+ def hi
+
+ end # hi there
+ \ No newline at end of file
diff --git a/test/prism/fixtures/integer_operations.txt b/test/prism/fixtures/integer_operations.txt
new file mode 100644
index 0000000000..37163acf30
--- /dev/null
+++ b/test/prism/fixtures/integer_operations.txt
@@ -0,0 +1,63 @@
+!1
+
+~1
+
+1 != 2
+
+1 !~ 2
+
+1 % 2
+
+1 & 2
+
+1 * 2
+
+1**2
+
+1 + 2
+
+1 - 2
+
+1 / 2
+
+1/2/3
+
+1 < 2
+
+1 << 2
+
+1 <= 2
+
+1 <=> 2
+
+1 == 2
+
+1 === 2
+
+1 =~ 2
+
+1 > 2
+
+1 >= 2
+
+1 >> 2
+
+1 ^ 2
+
+1 | 2
+
+1 && 2
+
+1 and 2
+
+1 * 2 ** 3
+
+1 * 2 + 3
+
+1 or 2
+
+1 || 2
+
+1 + 2 * 3
+
+(1 + 1)
diff --git a/test/prism/fixtures/keyword_method_names.txt b/test/prism/fixtures/keyword_method_names.txt
new file mode 100644
index 0000000000..9154469441
--- /dev/null
+++ b/test/prism/fixtures/keyword_method_names.txt
@@ -0,0 +1,29 @@
+def def
+end
+
+def self.ensure
+end
+
+private def foo
+ bar do
+ end
+end
+
+def m(a, **nil)
+end
+
+def __ENCODING__.a
+end
+
+%{abc}
+
+%"abc"
+
+def __FILE__.a
+end
+
+def __LINE__.a
+end
+
+def nil::a
+end
diff --git a/test/prism/fixtures/keywords.txt b/test/prism/fixtures/keywords.txt
new file mode 100644
index 0000000000..90cdfb41c7
--- /dev/null
+++ b/test/prism/fixtures/keywords.txt
@@ -0,0 +1,11 @@
+redo
+
+retry
+
+self
+
+__ENCODING__
+
+__FILE__
+
+__LINE__
diff --git a/test/prism/fixtures/lambda.txt b/test/prism/fixtures/lambda.txt
new file mode 100644
index 0000000000..5c21eafb24
--- /dev/null
+++ b/test/prism/fixtures/lambda.txt
@@ -0,0 +1,11 @@
+->(
+ foo
+) {}
+
+->(x: "b#{a}") { }
+
+->(a: b * 3) {}
+
+-> foo = bar do end
+
+-> foo: bar do end
diff --git a/test/prism/fixtures/method_calls.txt b/test/prism/fixtures/method_calls.txt
new file mode 100644
index 0000000000..5d82abef2e
--- /dev/null
+++ b/test/prism/fixtures/method_calls.txt
@@ -0,0 +1,147 @@
+foo.bar %{baz}
+
+a.b(c, d)
+
+a.b()
+
+foo
+ .bar
+ &.baz
+
+a!
+
+a.()
+
+a.(1, 2, 3)
+
+a::b
+
+a::b c
+
+foo.bar = 1
+
+a?
+
+a(&block)
+
+a(**kwargs)
+
+a.b.c
+
+a(b, c)
+
+a()
+
+a(*args)
+
+a b, c
+
+a.b c, d
+
+foo.foo, bar.bar = 1, 2
+
+a&.b
+
+a&.()
+
+a&.b(c)
+
+a&.b()
+
+foo :a, :b if bar? or baz and qux
+
+foo(:a,
+
+ :b
+)
+
+foo(*rest)
+
+foo(:a, :h => [:x, :y], :a => :b, &:bar)
+
+hi 123, { :there => :friend, **{}, whatup: :dog }
+
+foo :a, b: true do |a, b| puts a end
+
+hi there: :friend
+
+hi :there => :friend, **{}, whatup: :dog
+
+hi(:there => :friend, **{}, whatup: :dog)
+
+foo({ a: true, b: false, }, &:block)
+
+hi :there => :friend
+
+foo(:a,
+:b,
+)
+
+foo(
+:a,
+b: :c,
+)
+
+foo &:block
+
+foo a: true, b: false, &:block
+
+some_func 1, kwarg: 2
+
+Kernel.Integer(10)
+
+x.each { }
+
+foo.map { $& }
+
+A::B::C :foo
+
+A::B::C(:foo)
+
+A::B::C(:foo) { }
+
+foo("a": -1)
+
+foo bar: { baz: qux do end }
+
+foo bar: { **kw do end }
+
+foo "#{bar.map do "baz" end}" do end
+
+foo class Bar baz do end end
+
+foo module Bar baz do end end
+
+foo [baz do end]
+
+p begin 1.times do 1 end end
+
+foo :a,
+ if x
+ bar do |a|
+ a
+ end
+ end
+
+foo :a,
+ while x
+ bar do |a|
+ a
+ end
+ end,
+ until x
+ baz do
+ end
+ end
+
+{} + A {}
+
+{} + A { |a| a }
+
+A {} + A {}
+
+lst << A {}
+
+"#{ join (" ") }"
+
+"#{(v)}"
diff --git a/test/prism/fixtures/methods.txt b/test/prism/fixtures/methods.txt
new file mode 100644
index 0000000000..ac561363f8
--- /dev/null
+++ b/test/prism/fixtures/methods.txt
@@ -0,0 +1,168 @@
+def foo((bar, baz))
+end
+
+def foo((bar, baz), optional = 1, (bin, bag))
+end
+
+
+def a; ensure; end
+
+def (b).a
+end
+
+def (a)::b
+end
+
+def false.a
+end
+
+def a(...)
+end
+
+def $var.a
+end
+
+def a.b
+end
+
+def @var.a
+end
+
+def a b:; end
+
+%,abc,
+
+def a(b:)
+end
+
+def a(**b)
+end
+
+def a(**)
+end
+
+a = 1; def a
+end
+
+def a b, c, d
+end
+
+def nil.a
+end
+
+def a b:, c: 1
+end
+
+def a(b:, c: 1)
+end
+
+def a(b:
+ 1, c:)
+end
+
+%.abc.
+
+def a b = 1, c = 2
+end
+
+def a()
+end
+
+def a b, c = 2
+end
+
+def a b
+end
+
+def a; rescue; else; ensure; end
+
+def a *b
+end
+
+def a(*)
+end
+
+def a
+b = 1
+end
+
+def self.a
+end
+
+def true.a
+end
+
+def a
+end
+
+def hi
+return :hi if true
+:bye
+end
+
+def foo = 1
+def bar = 2
+
+def foo(bar) = 123
+
+def foo = 123
+
+def a(*); b(*); end
+
+def a(...); b(...); end
+
+def a(...); b(1, 2, ...); end
+
+def (c = b).a
+end
+
+def a &b
+end
+
+def a(&)
+end
+
+def @@var.a
+end
+
+def (a = b).C
+end
+
+def self.Array_function; end
+
+Const = 1; def Const.a
+end
+
+def a(...); "foo#{b(...)}"; end
+
+def foo
+ {}.merge **bar, **baz, **qux
+end
+
+def bar(a: (1...10))
+end
+
+def bar(a: (...10))
+end
+
+def bar(a: (1...))
+end
+
+def bar(a = (1...10))
+end
+
+def bar(a = (...10))
+end
+
+def bar(a = (1...))
+end
+
+def method(a)
+ item >> a {}
+end
+
+def foo(_a, _a, b, c)
+end
+
+foo = 1
+def foo.bar; end
diff --git a/test/prism/fixtures/modules.txt b/test/prism/fixtures/modules.txt
new file mode 100644
index 0000000000..76bd9bea43
--- /dev/null
+++ b/test/prism/fixtures/modules.txt
@@ -0,0 +1,18 @@
+module A a = 1 end
+
+%Q{aaa #{bbb} ccc}
+
+module m::M
+end
+
+module A
+ x = 1; rescue; end
+
+module ::A
+end
+
+module A[]::B
+end
+
+module A[1]::B
+end
diff --git a/test/prism/fixtures/newline_terminated.txt b/test/prism/fixtures/newline_terminated.txt
new file mode 100644
index 0000000000..12f3bda229
--- /dev/null
+++ b/test/prism/fixtures/newline_terminated.txt
Binary files differ
diff --git a/test/prism/fixtures/next.txt b/test/prism/fixtures/next.txt
new file mode 100644
index 0000000000..476f17ffe3
--- /dev/null
+++ b/test/prism/fixtures/next.txt
@@ -0,0 +1,24 @@
+next
+
+next (1), (2), (3)
+
+next 1
+
+next 1, 2,
+3
+
+next 1, 2, 3
+
+next [1, 2, 3]
+
+next(
+ 1
+ 2
+)
+
+next
+1
+
+next()
+
+next(1)
diff --git a/test/prism/fixtures/nils.txt b/test/prism/fixtures/nils.txt
new file mode 100644
index 0000000000..8084db2534
--- /dev/null
+++ b/test/prism/fixtures/nils.txt
@@ -0,0 +1,13 @@
+nil
+
+()
+
+(
+;
+;
+)
+
+END { 1 }
+
+BEGIN { 1 }
+
diff --git a/test/prism/fixtures/non_alphanumeric_methods.txt b/test/prism/fixtures/non_alphanumeric_methods.txt
new file mode 100644
index 0000000000..1da3fd852b
--- /dev/null
+++ b/test/prism/fixtures/non_alphanumeric_methods.txt
@@ -0,0 +1,105 @@
+def !
+end
+
+def !=
+end
+
+def !~
+end
+
+def %
+end
+
+def self.+
+end
+
+def &
+end
+
+def *
+end
+
+def **
+end
+
+%|abc|
+
+def + **b
+end
+
+def +()
+end
+
+def + b
+end
+
+def self.+
+end
+
+def +
+end
+
+def +@
+end
+
+def -
+end
+
+def a.-;end
+
+def -@
+end
+
+def /
+end
+
+def <
+end
+
+def <<
+end
+
+def <=
+end
+
+def <=>
+end
+
+def ==
+end
+
+def ===
+end
+
+def =~
+end
+
+def >
+end
+
+def >=
+end
+
+def >>
+end
+
+def []
+end
+
+def []=
+end
+
+def ^
+end
+
+def `
+end
+
+def self.`
+end
+
+def |
+end
+
+def ~
+end
diff --git a/test/prism/fixtures/not.txt b/test/prism/fixtures/not.txt
new file mode 100644
index 0000000000..520b34fa37
--- /dev/null
+++ b/test/prism/fixtures/not.txt
@@ -0,0 +1,37 @@
+not foo and not bar
+
+not(foo and bar)
+
+not foo
+
+not foo and not
+ bar
+
+
+not foo and
+ not
+ bar
+
+
+not foo and
+ not
+
+
+ bar
+
+not(foo
+
+
+)
+
+not(
+
+
+foo
+
+
+ )
+
+not foo .. bar
+
+not (foo .. bar)
diff --git a/test/prism/fixtures/numbers.txt b/test/prism/fixtures/numbers.txt
new file mode 100644
index 0000000000..3c8bf07805
--- /dev/null
+++ b/test/prism/fixtures/numbers.txt
@@ -0,0 +1,63 @@
+0
+
+1
+
+1.0
+
+2
+
+0b0
+
+0b1
+
+0b10
+
+0d0
+
+0d1
+
+0d2
+
+00
+
+01
+
+02
+
+0o0
+
+0o1
+
+0o2
+
+0x0
+
+0x1
+
+0x2
+
+1i
+
+1r
+
+-1
+
+1ri
+
+1.2ri
+
+-1ri
+
+-1.2ri
+
+0o1r
+
+0o1i
+
+0o1ri
+
+0d1r
+
+0d1i
+
+0b1ri
diff --git a/test/prism/fixtures/patterns.txt b/test/prism/fixtures/patterns.txt
new file mode 100644
index 0000000000..e0c5f303cb
--- /dev/null
+++ b/test/prism/fixtures/patterns.txt
@@ -0,0 +1,192 @@
+foo => bar
+foo => 1
+foo => 1.0
+foo => 1i
+foo => 1r
+foo => :foo
+foo => %s[foo]
+foo => :"foo"
+foo => /foo/
+foo => `foo`
+foo => %x[foo]
+foo => %i[foo]
+foo => %I[foo]
+foo => %w[foo]
+foo => %W[foo]
+foo => %q[foo]
+foo => %Q[foo]
+foo => "foo"
+foo => nil
+foo => self
+foo => true
+foo => false
+foo => __FILE__
+foo => __LINE__
+foo => __ENCODING__
+foo => -> { bar }
+
+foo => 1 .. 1
+foo => 1.0 .. 1.0
+foo => 1i .. 1i
+foo => 1r .. 1r
+foo => :foo .. :foo
+foo => %s[foo] .. %s[foo]
+foo => :"foo" .. :"foo"
+foo => /foo/ .. /foo/
+foo => `foo` .. `foo`
+foo => %x[foo] .. %x[foo]
+foo => %i[foo] .. %i[foo]
+foo => %I[foo] .. %I[foo]
+foo => %w[foo] .. %w[foo]
+foo => %W[foo] .. %W[foo]
+foo => %q[foo] .. %q[foo]
+foo => %Q[foo] .. %Q[foo]
+foo => "foo" .. "foo"
+foo => nil .. nil
+foo => self .. self
+foo => true .. true
+foo => false .. false
+foo => __FILE__ .. __FILE__
+foo => __LINE__ .. __LINE__
+foo => __ENCODING__ .. __ENCODING__
+foo => -> { bar } .. -> { bar }
+
+foo => ^bar
+foo => ^@bar
+foo => ^@@bar
+foo => ^$bar
+
+foo => ^(1)
+foo => ^(nil)
+foo => ^("bar" + "baz")
+
+foo => Foo
+foo => Foo::Bar::Baz
+foo => ::Foo
+foo => ::Foo::Bar::Baz
+
+foo => Foo()
+foo => Foo(1)
+foo => Foo(1, 2, 3)
+foo => Foo(bar)
+foo => Foo(*bar, baz)
+foo => Foo(bar, *baz)
+foo => Foo(*bar, baz, *qux)
+
+foo => Foo[]
+foo => Foo[1]
+foo => Foo[1, 2, 3]
+foo => Foo[Foo[]]
+foo => Foo[bar]
+foo => Foo[*bar, baz]
+foo => Foo[bar, *baz]
+foo => Foo[*bar, baz, *qux]
+
+foo => *bar
+foo => *bar, baz, qux
+foo => bar, *baz, qux
+foo => bar, baz, *qux
+foo => *bar, baz, *qux
+
+foo => []
+foo => [[[[[]]]]]
+
+foo => [*bar]
+foo => [*bar, baz, qux]
+foo => [bar, *baz, qux]
+foo => [bar, baz, *qux]
+foo => [*bar, baz, *qux]
+
+foo in bar
+foo in 1
+foo in 1.0
+foo in 1i
+foo in 1r
+foo in :foo
+foo in %s[foo]
+foo in :"foo"
+foo in /foo/
+foo in `foo`
+foo in %x[foo]
+foo in %i[foo]
+foo in %I[foo]
+foo in %w[foo]
+foo in %W[foo]
+foo in %q[foo]
+foo in %Q[foo]
+foo in "foo"
+foo in nil
+foo in self
+foo in true
+foo in false
+foo in __FILE__
+foo in __LINE__
+foo in __ENCODING__
+foo in -> { bar }
+
+case foo; in bar then end
+case foo; in 1 then end
+case foo; in 1.0 then end
+case foo; in 1i then end
+case foo; in 1r then end
+case foo; in :foo then end
+case foo; in %s[foo] then end
+case foo; in :"foo" then end
+case foo; in /foo/ then end
+case foo; in `foo` then end
+case foo; in %x[foo] then end
+case foo; in %i[foo] then end
+case foo; in %I[foo] then end
+case foo; in %w[foo] then end
+case foo; in %W[foo] then end
+case foo; in %q[foo] then end
+case foo; in %Q[foo] then end
+case foo; in "foo" then end
+case foo; in nil then end
+case foo; in self then end
+case foo; in true then end
+case foo; in false then end
+case foo; in __FILE__ then end
+case foo; in __LINE__ then end
+case foo; in __ENCODING__ then end
+case foo; in -> { bar } then end
+
+case foo; in bar if baz then end
+case foo; in 1 if baz then end
+case foo; in 1.0 if baz then end
+case foo; in 1i if baz then end
+case foo; in 1r if baz then end
+case foo; in :foo if baz then end
+case foo; in %s[foo] if baz then end
+case foo; in :"foo" if baz then end
+case foo; in /foo/ if baz then end
+case foo; in `foo` if baz then end
+case foo; in %x[foo] if baz then end
+case foo; in %i[foo] if baz then end
+case foo; in %I[foo] if baz then end
+case foo; in %w[foo] if baz then end
+case foo; in %W[foo] if baz then end
+case foo; in %q[foo] if baz then end
+case foo; in %Q[foo] if baz then end
+case foo; in "foo" if baz then end
+case foo; in nil if baz then end
+case foo; in self if baz then end
+case foo; in true if baz then end
+case foo; in false if baz then end
+case foo; in __FILE__ if baz then end
+case foo; in __LINE__ if baz then end
+case foo; in __ENCODING__ if baz then end
+case foo; in -> { bar } if baz then end
+
+if a in []
+end
+
+a => [
+ b
+]
+
+foo in A[
+ bar: B[
+ value: a
+ ]
+]
diff --git a/test/prism/fixtures/procs.txt b/test/prism/fixtures/procs.txt
new file mode 100644
index 0000000000..7ffb11e78a
--- /dev/null
+++ b/test/prism/fixtures/procs.txt
@@ -0,0 +1,27 @@
+-> (a; b, c, d) { b }
+
+-> do
+ensure
+end
+
+-> do
+rescue
+else
+ensure
+end
+
+-> { foo }
+
+-> do; foo; end
+
+-> a, b = 1, c:, d:, &e { a }
+
+-> (a, b = 1, *c, d:, e:, **f, &g) { a }
+
+-> (a, b = 1, *c, d:, e:, **f, &g) do
+ a
+end
+
+-> (a) { -> b { a * b } }
+
+-> ((a, b), *c) { }
diff --git a/test/prism/fixtures/range_begin_open_exclusive.txt b/test/prism/fixtures/range_begin_open_exclusive.txt
new file mode 100644
index 0000000000..3b12672b4f
--- /dev/null
+++ b/test/prism/fixtures/range_begin_open_exclusive.txt
@@ -0,0 +1 @@
+...2
diff --git a/test/prism/fixtures/range_begin_open_inclusive.txt b/test/prism/fixtures/range_begin_open_inclusive.txt
new file mode 100644
index 0000000000..052f45900b
--- /dev/null
+++ b/test/prism/fixtures/range_begin_open_inclusive.txt
@@ -0,0 +1 @@
+..2
diff --git a/test/prism/fixtures/range_end_open_exclusive.txt b/test/prism/fixtures/range_end_open_exclusive.txt
new file mode 100644
index 0000000000..2ffd68afdb
--- /dev/null
+++ b/test/prism/fixtures/range_end_open_exclusive.txt
@@ -0,0 +1 @@
+2...
diff --git a/test/prism/fixtures/range_end_open_inclusive.txt b/test/prism/fixtures/range_end_open_inclusive.txt
new file mode 100644
index 0000000000..48445391f6
--- /dev/null
+++ b/test/prism/fixtures/range_end_open_inclusive.txt
@@ -0,0 +1 @@
+2..
diff --git a/test/prism/fixtures/ranges.txt b/test/prism/fixtures/ranges.txt
new file mode 100644
index 0000000000..55c0ade965
--- /dev/null
+++ b/test/prism/fixtures/ranges.txt
@@ -0,0 +1,17 @@
+(...2)
+
+(..2)
+
+1...2
+
+foo[...2]
+
+{ foo: ...bar }
+
+(1...)
+
+1..2
+
+{ foo: ..bar }
+
+(1..)
diff --git a/test/prism/fixtures/regex.txt b/test/prism/fixtures/regex.txt
new file mode 100644
index 0000000000..1e917e7de7
--- /dev/null
+++ b/test/prism/fixtures/regex.txt
@@ -0,0 +1,30 @@
+foo /bar/
+
+%r{abc}i
+
+/a\b/
+
+/aaa #$bbb/
+
+/aaa #{bbb} ccc/
+
+[/(?<foo>bar)/ =~ baz, foo]
+
+/abc/i
+
+%r/[a-z$._?][\w$.?#@~]*:/i
+
+%r/([a-z$._?][\w$.?#@~]*)(\s+)(equ)/i
+
+%r/[a-z$._?][\w$.?#@~]*/i
+
+%r(
+(?:[\w#$%_']|\(\)|\(,\)|\[\]|[0-9])*
+ (?:[\w#$%_']+)
+)
+
+/(?#\))/ =~ "hi"
+
+%r#pound#
+
+/aaa #{bbb}/o
diff --git a/test/prism/fixtures/rescue.txt b/test/prism/fixtures/rescue.txt
new file mode 100644
index 0000000000..0d26fd2523
--- /dev/null
+++ b/test/prism/fixtures/rescue.txt
@@ -0,0 +1,31 @@
+foo rescue nil
+
+foo rescue
+nil
+
+break rescue nil
+
+next rescue nil
+
+return rescue nil
+
+foo rescue nil || 1
+
+foo rescue nil ? 1 : 2
+
+begin; a; rescue *b; end
+
+foo do |x|
+ bar(y) rescue ArgumentError fail "baz"
+end
+
+if a = foo rescue nil
+ bar
+end
+
+def some_method = other_method 42 rescue nil
+
+def a
+ a b:
+rescue
+end
diff --git a/test/prism/fixtures/return.txt b/test/prism/fixtures/return.txt
new file mode 100644
index 0000000000..a8b5b95fab
--- /dev/null
+++ b/test/prism/fixtures/return.txt
@@ -0,0 +1,24 @@
+return
+
+return (1), (2), (3)
+
+return *1
+
+return 1
+
+return 1, 2,
+3
+
+return 1, 2, 3
+
+return [1, 2, 3]
+
+return(
+ 1
+ 2
+)
+
+return()
+
+return(1)
+
diff --git a/test/prism/fixtures/seattlerb/BEGIN.txt b/test/prism/fixtures/seattlerb/BEGIN.txt
new file mode 100644
index 0000000000..bed5755901
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/BEGIN.txt
@@ -0,0 +1 @@
+BEGIN { 42 }
diff --git a/test/prism/fixtures/seattlerb/README.rdoc b/test/prism/fixtures/seattlerb/README.rdoc
new file mode 100644
index 0000000000..649e4e4c2f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/README.rdoc
@@ -0,0 +1,113 @@
+= ruby_parser
+
+home :: https://github.com/seattlerb/ruby_parser
+bugs :: https://github.com/seattlerb/ruby_parser/issues
+rdoc :: http://docs.seattlerb.org/ruby_parser
+
+== DESCRIPTION:
+
+ruby_parser (RP) is a ruby parser written in pure ruby (utilizing
+racc--which does by default use a C extension). It outputs
+s-expressions which can be manipulated and converted back to ruby via
+the ruby2ruby gem.
+
+As an example:
+
+ def conditional1 arg1
+ return 1 if arg1 == 0
+ return 0
+ end
+
+becomes:
+
+ s(:defn, :conditional1, s(:args, :arg1),
+ s(:if,
+ s(:call, s(:lvar, :arg1), :==, s(:lit, 0)),
+ s(:return, s(:lit, 1)),
+ nil),
+ s(:return, s(:lit, 0)))
+
+Tested against 801,039 files from the latest of all rubygems (as of 2013-05):
+
+* 1.8 parser is at 99.9739% accuracy, 3.651 sigma
+* 1.9 parser is at 99.9940% accuracy, 4.013 sigma
+* 2.0 parser is at 99.9939% accuracy, 4.008 sigma
+* 2.6 parser is at 99.9972% accuracy, 4.191 sigma
+* 3.0 parser has a 100% parse rate.
+ * Tested against 2,672,412 unique ruby files across 167k gems.
+ * As do all the others now, basically.
+
+== FEATURES/PROBLEMS:
+
+* Pure ruby, no compiles.
+* Includes preceding comment data for defn/defs/class/module nodes!
+* Incredibly simple interface.
+* Output is 100% equivalent to ParseTree.
+ * Can utilize PT's SexpProcessor and UnifiedRuby for language processing.
+* Known Issue: Speed is now pretty good, but can always improve:
+ * RP parses a corpus of 3702 files in 125s (avg 108 Kb/s)
+ * MRI+PT parsed the same in 67.38s (avg 200.89 Kb/s)
+* Known Issue: Code is much better, but still has a long way to go.
+* Known Issue: Totally awesome.
+* Known Issue: line number values can be slightly off. Parsing LR sucks.
+
+== SYNOPSIS:
+
+ RubyParser.new.parse "1+1"
+ # => s(:call, s(:lit, 1), :+, s(:lit, 1))
+
+You can also use Ruby19Parser, Ruby18Parser, or RubyParser.for_current_ruby:
+
+ RubyParser.for_current_ruby.parse "1+1"
+ # => s(:call, s(:lit, 1), :+, s(:lit, 1))
+
+== DEVELOPER NOTES:
+
+To add a new version:
+
+* New parser should be generated from lib/ruby[3]_parser.yy.
+* Extend lib/ruby[3]_parser.yy with new class name.
+* Add new version number to V2/V3 in Rakefile for rule creation.
+* Add new `ruby_parse "x.y.z"` line to Rakefile for rake compare (line ~300).
+* Require generated parser in lib/ruby_parser.rb.
+* Add new V## = ::Ruby##Parser; end to ruby_parser.rb (bottom of file).
+* Add empty TestRubyParserShared##Plus module and TestRubyParserV## to test/test_ruby_parser.rb.
+* Extend Manifest.txt with generated file names.
+* Add new version number to sexp_processor's pt_testcase.rb in all_versions
+
+Until all of these are done, you won't have a clean test run.
+
+== REQUIREMENTS:
+
+* ruby. woot.
+* sexp_processor for Sexp and SexpProcessor classes, and testing.
+* racc full package for parser development (compiling .y to .rb).
+
+== INSTALL:
+
+* sudo gem install ruby_parser
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) Ryan Davis, seattle.rb
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/test/prism/fixtures/seattlerb/TestRubyParserShared.txt b/test/prism/fixtures/seattlerb/TestRubyParserShared.txt
new file mode 100644
index 0000000000..c55b3e1f70
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/TestRubyParserShared.txt
@@ -0,0 +1,92 @@
+%I[
+
+
+]
+
+%I[
+line2
+line3
+]
+
+%W[
+
+
+]
+
+%W[
+line2
+line3
+]
+
+%i[
+
+
+]
+
+%i[
+line2
+line3
+]
+
+%r[
+
+
+]
+
+%w[
+
+
+]
+
+%w[
+line2
+line3
+]
+
+[
+:line2,
+:line3
+]
+
+class X # line 1
+ def self.y(a, # line 2
+ b) # line 3
+ a + b # line 4
+ end # line 5
+end # line 6
+
+
+class X # line 1
+ class Y # line 2
+ Z = 42 # line 3
+ end # line 4
+end # line 5
+
+
+class X # line 1
+ def y(a, # line 2
+ b) # line 3
+ a + b # line 4
+ end # line 5
+end # line 6
+
+
+module X
+ X = [
+ :line3,
+ :line4,
+ ]
+end
+
+
+module X # line 1
+ module Y # line 2
+ Z = 42 # line 3
+ end # line 4
+end # line 5
+
+
+x(
+:line2,
+:line3
+)
diff --git a/test/prism/fixtures/seattlerb/__ENCODING__.txt b/test/prism/fixtures/seattlerb/__ENCODING__.txt
new file mode 100644
index 0000000000..d6debf2f92
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/__ENCODING__.txt
@@ -0,0 +1 @@
+__ENCODING__
diff --git a/test/prism/fixtures/seattlerb/alias_gvar_backref.txt b/test/prism/fixtures/seattlerb/alias_gvar_backref.txt
new file mode 100644
index 0000000000..016bd94fe0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/alias_gvar_backref.txt
@@ -0,0 +1 @@
+alias $MATCH $&
diff --git a/test/prism/fixtures/seattlerb/alias_resword.txt b/test/prism/fixtures/seattlerb/alias_resword.txt
new file mode 100644
index 0000000000..63e782614b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/alias_resword.txt
@@ -0,0 +1 @@
+alias in out
diff --git a/test/prism/fixtures/seattlerb/and_multi.txt b/test/prism/fixtures/seattlerb/and_multi.txt
new file mode 100644
index 0000000000..8902086cac
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/and_multi.txt
@@ -0,0 +1,3 @@
+true and
+not false and
+true
diff --git a/test/prism/fixtures/seattlerb/aref_args_assocs.txt b/test/prism/fixtures/seattlerb/aref_args_assocs.txt
new file mode 100644
index 0000000000..3244eebafc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/aref_args_assocs.txt
@@ -0,0 +1 @@
+[1 => 2]
diff --git a/test/prism/fixtures/seattlerb/aref_args_lit_assocs.txt b/test/prism/fixtures/seattlerb/aref_args_lit_assocs.txt
new file mode 100644
index 0000000000..0b6ffa7e2c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/aref_args_lit_assocs.txt
@@ -0,0 +1 @@
+[1, 2 => 3]
diff --git a/test/prism/fixtures/seattlerb/args_kw_block.txt b/test/prism/fixtures/seattlerb/args_kw_block.txt
new file mode 100644
index 0000000000..cb6ab39852
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/args_kw_block.txt
@@ -0,0 +1 @@
+def f(a: 1, &b); end
diff --git a/test/prism/fixtures/seattlerb/array_line_breaks.txt b/test/prism/fixtures/seattlerb/array_line_breaks.txt
new file mode 100644
index 0000000000..be9f2d9cb8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/array_line_breaks.txt
@@ -0,0 +1,4 @@
+[
+'a',
+'b']
+1
diff --git a/test/prism/fixtures/seattlerb/array_lits_trailing_calls.txt b/test/prism/fixtures/seattlerb/array_lits_trailing_calls.txt
new file mode 100644
index 0000000000..868384a407
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/array_lits_trailing_calls.txt
@@ -0,0 +1,3 @@
+%w[].b
+
+[].b
diff --git a/test/prism/fixtures/seattlerb/assoc__bare.txt b/test/prism/fixtures/seattlerb/assoc__bare.txt
new file mode 100644
index 0000000000..96c2940f31
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/assoc__bare.txt
@@ -0,0 +1 @@
+{ y: }
diff --git a/test/prism/fixtures/seattlerb/assoc_label.txt b/test/prism/fixtures/seattlerb/assoc_label.txt
new file mode 100644
index 0000000000..372dc75031
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/assoc_label.txt
@@ -0,0 +1 @@
+a(b:1)
diff --git a/test/prism/fixtures/seattlerb/attr_asgn_colon_id.txt b/test/prism/fixtures/seattlerb/attr_asgn_colon_id.txt
new file mode 100644
index 0000000000..f63c2f5dcb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/attr_asgn_colon_id.txt
@@ -0,0 +1 @@
+A::b = 1
diff --git a/test/prism/fixtures/seattlerb/attrasgn_array_arg.txt b/test/prism/fixtures/seattlerb/attrasgn_array_arg.txt
new file mode 100644
index 0000000000..db9e2db063
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/attrasgn_array_arg.txt
@@ -0,0 +1 @@
+a[[1, 2]] = 3
diff --git a/test/prism/fixtures/seattlerb/attrasgn_array_lhs.txt b/test/prism/fixtures/seattlerb/attrasgn_array_lhs.txt
new file mode 100644
index 0000000000..0b8e31632d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/attrasgn_array_lhs.txt
@@ -0,0 +1 @@
+[1, 2, 3, 4][from .. to] = ["a", "b", "c"]
diff --git a/test/prism/fixtures/seattlerb/attrasgn_primary_dot_constant.txt b/test/prism/fixtures/seattlerb/attrasgn_primary_dot_constant.txt
new file mode 100644
index 0000000000..380a718963
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/attrasgn_primary_dot_constant.txt
@@ -0,0 +1 @@
+a.B = 1
diff --git a/test/prism/fixtures/seattlerb/backticks_interpolation_line.txt b/test/prism/fixtures/seattlerb/backticks_interpolation_line.txt
new file mode 100644
index 0000000000..b3ba31c72a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/backticks_interpolation_line.txt
@@ -0,0 +1 @@
+x `#{y}`
diff --git a/test/prism/fixtures/seattlerb/bang_eq.txt b/test/prism/fixtures/seattlerb/bang_eq.txt
new file mode 100644
index 0000000000..0283460e46
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bang_eq.txt
@@ -0,0 +1 @@
+1 != 2
diff --git a/test/prism/fixtures/seattlerb/bdot2.txt b/test/prism/fixtures/seattlerb/bdot2.txt
new file mode 100644
index 0000000000..4fb2692299
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bdot2.txt
@@ -0,0 +1,3 @@
+..10
+; ..a
+; c
diff --git a/test/prism/fixtures/seattlerb/bdot3.txt b/test/prism/fixtures/seattlerb/bdot3.txt
new file mode 100644
index 0000000000..8079cf9872
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bdot3.txt
@@ -0,0 +1,3 @@
+...10
+; ...a
+; c
diff --git a/test/prism/fixtures/seattlerb/begin_ensure_no_bodies.txt b/test/prism/fixtures/seattlerb/begin_ensure_no_bodies.txt
new file mode 100644
index 0000000000..51dde02ea3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/begin_ensure_no_bodies.txt
@@ -0,0 +1,3 @@
+begin
+ensure
+end
diff --git a/test/prism/fixtures/seattlerb/begin_rescue_else_ensure_bodies.txt b/test/prism/fixtures/seattlerb/begin_rescue_else_ensure_bodies.txt
new file mode 100644
index 0000000000..ae6e2c3636
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/begin_rescue_else_ensure_bodies.txt
@@ -0,0 +1,9 @@
+begin
+ 1
+rescue
+ 2
+else
+ 3
+ensure
+ 4
+end
diff --git a/test/prism/fixtures/seattlerb/begin_rescue_else_ensure_no_bodies.txt b/test/prism/fixtures/seattlerb/begin_rescue_else_ensure_no_bodies.txt
new file mode 100644
index 0000000000..456d9a5d6e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/begin_rescue_else_ensure_no_bodies.txt
@@ -0,0 +1,9 @@
+begin
+
+rescue
+
+else
+
+ensure
+
+end
diff --git a/test/prism/fixtures/seattlerb/begin_rescue_ensure_no_bodies.txt b/test/prism/fixtures/seattlerb/begin_rescue_ensure_no_bodies.txt
new file mode 100644
index 0000000000..896e3c030a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/begin_rescue_ensure_no_bodies.txt
@@ -0,0 +1,4 @@
+begin
+rescue
+ensure
+end
diff --git a/test/prism/fixtures/seattlerb/block_arg__bare.txt b/test/prism/fixtures/seattlerb/block_arg__bare.txt
new file mode 100644
index 0000000000..6454b00345
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg__bare.txt
@@ -0,0 +1 @@
+def x(&); end
diff --git a/test/prism/fixtures/seattlerb/block_arg_kwsplat.txt b/test/prism/fixtures/seattlerb/block_arg_kwsplat.txt
new file mode 100644
index 0000000000..a9c255cc66
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_kwsplat.txt
@@ -0,0 +1 @@
+a { |**b| }
diff --git a/test/prism/fixtures/seattlerb/block_arg_opt_arg_block.txt b/test/prism/fixtures/seattlerb/block_arg_opt_arg_block.txt
new file mode 100644
index 0000000000..14cb02c68e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_opt_arg_block.txt
@@ -0,0 +1 @@
+a { |b, c=1, d, &e| }
diff --git a/test/prism/fixtures/seattlerb/block_arg_opt_splat.txt b/test/prism/fixtures/seattlerb/block_arg_opt_splat.txt
new file mode 100644
index 0000000000..a077ae1f34
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_opt_splat.txt
@@ -0,0 +1 @@
+a { |b, c = 1, *d| }
diff --git a/test/prism/fixtures/seattlerb/block_arg_opt_splat_arg_block_omfg.txt b/test/prism/fixtures/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
new file mode 100644
index 0000000000..5016a7c6b9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
@@ -0,0 +1 @@
+a { |b, c=1, *d, e, &f| }
diff --git a/test/prism/fixtures/seattlerb/block_arg_optional.txt b/test/prism/fixtures/seattlerb/block_arg_optional.txt
new file mode 100644
index 0000000000..966afc5640
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_optional.txt
@@ -0,0 +1 @@
+a { |b = 1| }
diff --git a/test/prism/fixtures/seattlerb/block_arg_scope.txt b/test/prism/fixtures/seattlerb/block_arg_scope.txt
new file mode 100644
index 0000000000..2362e08559
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_scope.txt
@@ -0,0 +1 @@
+a { |b; c| }
diff --git a/test/prism/fixtures/seattlerb/block_arg_scope2.txt b/test/prism/fixtures/seattlerb/block_arg_scope2.txt
new file mode 100644
index 0000000000..f7222dc7b1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_scope2.txt
@@ -0,0 +1 @@
+a {|b; c, d| }
diff --git a/test/prism/fixtures/seattlerb/block_arg_splat_arg.txt b/test/prism/fixtures/seattlerb/block_arg_splat_arg.txt
new file mode 100644
index 0000000000..d7c31aae6b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_arg_splat_arg.txt
@@ -0,0 +1 @@
+a { |b, *c, d| }
diff --git a/test/prism/fixtures/seattlerb/block_args_kwargs.txt b/test/prism/fixtures/seattlerb/block_args_kwargs.txt
new file mode 100644
index 0000000000..467b577a7e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_args_kwargs.txt
@@ -0,0 +1 @@
+f { |**kwargs| kwargs }
diff --git a/test/prism/fixtures/seattlerb/block_args_no_kwargs.txt b/test/prism/fixtures/seattlerb/block_args_no_kwargs.txt
new file mode 100644
index 0000000000..5c9bfa3a62
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_args_no_kwargs.txt
@@ -0,0 +1 @@
+f { |**nil| }
diff --git a/test/prism/fixtures/seattlerb/block_args_opt1.txt b/test/prism/fixtures/seattlerb/block_args_opt1.txt
new file mode 100644
index 0000000000..372689e36a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_args_opt1.txt
@@ -0,0 +1 @@
+f { |a, b = 42| [a, b] }
diff --git a/test/prism/fixtures/seattlerb/block_args_opt2.txt b/test/prism/fixtures/seattlerb/block_args_opt2.txt
new file mode 100644
index 0000000000..10d0746646
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_args_opt2.txt
@@ -0,0 +1 @@
+a { | b=1, c=2 | }
diff --git a/test/prism/fixtures/seattlerb/block_args_opt2_2.txt b/test/prism/fixtures/seattlerb/block_args_opt2_2.txt
new file mode 100644
index 0000000000..563a9bf915
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_args_opt2_2.txt
@@ -0,0 +1 @@
+f { |a, b = 42, c = 24| [a, b, c] }
diff --git a/test/prism/fixtures/seattlerb/block_args_opt3.txt b/test/prism/fixtures/seattlerb/block_args_opt3.txt
new file mode 100644
index 0000000000..bb5a7c8458
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_args_opt3.txt
@@ -0,0 +1 @@
+f { |a, b = 42, c = 24, &d| [a, b, c, d] }
diff --git a/test/prism/fixtures/seattlerb/block_break.txt b/test/prism/fixtures/seattlerb/block_break.txt
new file mode 100644
index 0000000000..35eabee187
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_break.txt
@@ -0,0 +1 @@
+break foo arg do |bar| end
diff --git a/test/prism/fixtures/seattlerb/block_call_defn_call_block_call.txt b/test/prism/fixtures/seattlerb/block_call_defn_call_block_call.txt
new file mode 100644
index 0000000000..ff1b3a4c9f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_call_defn_call_block_call.txt
@@ -0,0 +1,4 @@
+a def b(c)
+ d
+ end
+ e.f do end
diff --git a/test/prism/fixtures/seattlerb/block_call_dot_op2_brace_block.txt b/test/prism/fixtures/seattlerb/block_call_dot_op2_brace_block.txt
new file mode 100644
index 0000000000..63da9ee7af
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_call_dot_op2_brace_block.txt
@@ -0,0 +1 @@
+a.b c() do d end.e do |f| g end
diff --git a/test/prism/fixtures/seattlerb/block_call_dot_op2_cmd_args_do_block.txt b/test/prism/fixtures/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
new file mode 100644
index 0000000000..24e7d0f1f1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
@@ -0,0 +1 @@
+a.b c() do d end.e f do |g| h end
diff --git a/test/prism/fixtures/seattlerb/block_call_operation_colon.txt b/test/prism/fixtures/seattlerb/block_call_operation_colon.txt
new file mode 100644
index 0000000000..593b9e1bc0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_call_operation_colon.txt
@@ -0,0 +1 @@
+a.b c do end::d
diff --git a/test/prism/fixtures/seattlerb/block_call_operation_dot.txt b/test/prism/fixtures/seattlerb/block_call_operation_dot.txt
new file mode 100644
index 0000000000..20b8e4fcb8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_call_operation_dot.txt
@@ -0,0 +1 @@
+a.b c do end.d
diff --git a/test/prism/fixtures/seattlerb/block_call_paren_call_block_call.txt b/test/prism/fixtures/seattlerb/block_call_paren_call_block_call.txt
new file mode 100644
index 0000000000..7f8be95100
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_call_paren_call_block_call.txt
@@ -0,0 +1,2 @@
+a (b)
+c.d do end
diff --git a/test/prism/fixtures/seattlerb/block_command_operation_colon.txt b/test/prism/fixtures/seattlerb/block_command_operation_colon.txt
new file mode 100644
index 0000000000..db221ad496
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_command_operation_colon.txt
@@ -0,0 +1 @@
+a :b do end::c :d
diff --git a/test/prism/fixtures/seattlerb/block_command_operation_dot.txt b/test/prism/fixtures/seattlerb/block_command_operation_dot.txt
new file mode 100644
index 0000000000..56b71677e8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_command_operation_dot.txt
@@ -0,0 +1 @@
+a :b do end.c :d
diff --git a/test/prism/fixtures/seattlerb/block_decomp_anon_splat_arg.txt b/test/prism/fixtures/seattlerb/block_decomp_anon_splat_arg.txt
new file mode 100644
index 0000000000..96f5d5d2ec
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_decomp_anon_splat_arg.txt
@@ -0,0 +1 @@
+f { |(*, a)| }
diff --git a/test/prism/fixtures/seattlerb/block_decomp_arg_splat.txt b/test/prism/fixtures/seattlerb/block_decomp_arg_splat.txt
new file mode 100644
index 0000000000..f8db3874de
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_decomp_arg_splat.txt
@@ -0,0 +1 @@
+a { |(b, *)| }
diff --git a/test/prism/fixtures/seattlerb/block_decomp_arg_splat_arg.txt b/test/prism/fixtures/seattlerb/block_decomp_arg_splat_arg.txt
new file mode 100644
index 0000000000..e64f4e8c3d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_decomp_arg_splat_arg.txt
@@ -0,0 +1 @@
+f { |(a, *b, c)| }
diff --git a/test/prism/fixtures/seattlerb/block_decomp_splat.txt b/test/prism/fixtures/seattlerb/block_decomp_splat.txt
new file mode 100644
index 0000000000..970f00a626
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_decomp_splat.txt
@@ -0,0 +1 @@
+f { |(*a)| }
diff --git a/test/prism/fixtures/seattlerb/block_kw.txt b/test/prism/fixtures/seattlerb/block_kw.txt
new file mode 100644
index 0000000000..bacfd32e80
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_kw.txt
@@ -0,0 +1 @@
+blah { |k:42| }
diff --git a/test/prism/fixtures/seattlerb/block_kw__required.txt b/test/prism/fixtures/seattlerb/block_kw__required.txt
new file mode 100644
index 0000000000..b84ab97037
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_kw__required.txt
@@ -0,0 +1 @@
+blah do |k:| end
diff --git a/test/prism/fixtures/seattlerb/block_kwarg_lvar.txt b/test/prism/fixtures/seattlerb/block_kwarg_lvar.txt
new file mode 100644
index 0000000000..390b9195e0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_kwarg_lvar.txt
@@ -0,0 +1 @@
+bl { |kw: :val| kw }
diff --git a/test/prism/fixtures/seattlerb/block_kwarg_lvar_multiple.txt b/test/prism/fixtures/seattlerb/block_kwarg_lvar_multiple.txt
new file mode 100644
index 0000000000..df3e4afde8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_kwarg_lvar_multiple.txt
@@ -0,0 +1 @@
+bl { |kw: :val, kw2: :val2 | kw }
diff --git a/test/prism/fixtures/seattlerb/block_next.txt b/test/prism/fixtures/seattlerb/block_next.txt
new file mode 100644
index 0000000000..760fcbf809
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_next.txt
@@ -0,0 +1 @@
+next foo arg do |bar| end
diff --git a/test/prism/fixtures/seattlerb/block_opt_arg.txt b/test/prism/fixtures/seattlerb/block_opt_arg.txt
new file mode 100644
index 0000000000..5e312fdf41
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_opt_arg.txt
@@ -0,0 +1 @@
+a { |b=1, c| }
diff --git a/test/prism/fixtures/seattlerb/block_opt_splat.txt b/test/prism/fixtures/seattlerb/block_opt_splat.txt
new file mode 100644
index 0000000000..772a3fc412
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_opt_splat.txt
@@ -0,0 +1 @@
+a { |b = 1, *c| }
diff --git a/test/prism/fixtures/seattlerb/block_opt_splat_arg_block_omfg.txt b/test/prism/fixtures/seattlerb/block_opt_splat_arg_block_omfg.txt
new file mode 100644
index 0000000000..76466f9d54
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_opt_splat_arg_block_omfg.txt
@@ -0,0 +1 @@
+a { |b=1, *c, d, &e| }
diff --git a/test/prism/fixtures/seattlerb/block_optarg.txt b/test/prism/fixtures/seattlerb/block_optarg.txt
new file mode 100644
index 0000000000..a471554da1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_optarg.txt
@@ -0,0 +1 @@
+a { |b = :c| }
diff --git a/test/prism/fixtures/seattlerb/block_paren_splat.txt b/test/prism/fixtures/seattlerb/block_paren_splat.txt
new file mode 100644
index 0000000000..3dd4bba1ed
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_paren_splat.txt
@@ -0,0 +1 @@
+a { |(b, *c)| }
diff --git a/test/prism/fixtures/seattlerb/block_reg_optarg.txt b/test/prism/fixtures/seattlerb/block_reg_optarg.txt
new file mode 100644
index 0000000000..c024651f78
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_reg_optarg.txt
@@ -0,0 +1 @@
+a { |b, c = :d| }
diff --git a/test/prism/fixtures/seattlerb/block_return.txt b/test/prism/fixtures/seattlerb/block_return.txt
new file mode 100644
index 0000000000..f30ba71d8f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_return.txt
@@ -0,0 +1 @@
+return foo arg do |bar| end
diff --git a/test/prism/fixtures/seattlerb/block_scope.txt b/test/prism/fixtures/seattlerb/block_scope.txt
new file mode 100644
index 0000000000..7a83d8ab87
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_scope.txt
@@ -0,0 +1 @@
+a { |;b| }
diff --git a/test/prism/fixtures/seattlerb/block_splat_reg.txt b/test/prism/fixtures/seattlerb/block_splat_reg.txt
new file mode 100644
index 0000000000..58f0619e5d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/block_splat_reg.txt
@@ -0,0 +1 @@
+a { |*b, c| }
diff --git a/test/prism/fixtures/seattlerb/bug169.txt b/test/prism/fixtures/seattlerb/bug169.txt
new file mode 100644
index 0000000000..db2e5ace5e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug169.txt
@@ -0,0 +1 @@
+m () {}
diff --git a/test/prism/fixtures/seattlerb/bug179.txt b/test/prism/fixtures/seattlerb/bug179.txt
new file mode 100644
index 0000000000..02ae07a3be
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug179.txt
@@ -0,0 +1 @@
+p ()..nil
diff --git a/test/prism/fixtures/seattlerb/bug190.txt b/test/prism/fixtures/seattlerb/bug190.txt
new file mode 100644
index 0000000000..861b2d305f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug190.txt
@@ -0,0 +1 @@
+%r'\''
diff --git a/test/prism/fixtures/seattlerb/bug191.txt b/test/prism/fixtures/seattlerb/bug191.txt
new file mode 100644
index 0000000000..03f7fd1228
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug191.txt
@@ -0,0 +1,3 @@
+a ? "": b
+
+a ? '': b
diff --git a/test/prism/fixtures/seattlerb/bug202.txt b/test/prism/fixtures/seattlerb/bug202.txt
new file mode 100644
index 0000000000..a3b06ffdfc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug202.txt
@@ -0,0 +1,2 @@
+$测试 = 1
+测试 = 1
diff --git a/test/prism/fixtures/seattlerb/bug236.txt b/test/prism/fixtures/seattlerb/bug236.txt
new file mode 100644
index 0000000000..cefe1eb058
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug236.txt
@@ -0,0 +1,3 @@
+x{|a,|}
+
+x{|a|}
diff --git a/test/prism/fixtures/seattlerb/bug290.txt b/test/prism/fixtures/seattlerb/bug290.txt
new file mode 100644
index 0000000000..dbcd28cd48
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug290.txt
@@ -0,0 +1,3 @@
+begin
+ foo
+end
diff --git a/test/prism/fixtures/seattlerb/bug_187.txt b/test/prism/fixtures/seattlerb/bug_187.txt
new file mode 100644
index 0000000000..1e1ecd8202
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_187.txt
@@ -0,0 +1,3 @@
+private def f
+a.b do end
+end
diff --git a/test/prism/fixtures/seattlerb/bug_215.txt b/test/prism/fixtures/seattlerb/bug_215.txt
new file mode 100644
index 0000000000..f0d09ba5ff
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_215.txt
@@ -0,0 +1 @@
+undef %s(foo)
diff --git a/test/prism/fixtures/seattlerb/bug_249.txt b/test/prism/fixtures/seattlerb/bug_249.txt
new file mode 100644
index 0000000000..ccccdf5326
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_249.txt
@@ -0,0 +1,4 @@
+mount (Class.new do
+def initialize
+end
+ end).new, :at => 'endpoint'
diff --git a/test/prism/fixtures/seattlerb/bug_and.txt b/test/prism/fixtures/seattlerb/bug_and.txt
new file mode 100644
index 0000000000..6243359a9e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_and.txt
@@ -0,0 +1,4 @@
+true and
+true
+
+true and []
diff --git a/test/prism/fixtures/seattlerb/bug_args__19.txt b/test/prism/fixtures/seattlerb/bug_args__19.txt
new file mode 100644
index 0000000000..08466554fd
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_args__19.txt
@@ -0,0 +1 @@
+f { |(a, b)| d }
diff --git a/test/prism/fixtures/seattlerb/bug_args_masgn.txt b/test/prism/fixtures/seattlerb/bug_args_masgn.txt
new file mode 100644
index 0000000000..e0a71e9197
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_args_masgn.txt
@@ -0,0 +1 @@
+f { |(a, b), c| }
diff --git a/test/prism/fixtures/seattlerb/bug_args_masgn2.txt b/test/prism/fixtures/seattlerb/bug_args_masgn2.txt
new file mode 100644
index 0000000000..2f12756bfe
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_args_masgn2.txt
@@ -0,0 +1 @@
+f { |((a, b), c), d| }
diff --git a/test/prism/fixtures/seattlerb/bug_args_masgn_outer_parens__19.txt b/test/prism/fixtures/seattlerb/bug_args_masgn_outer_parens__19.txt
new file mode 100644
index 0000000000..a2b0178676
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_args_masgn_outer_parens__19.txt
@@ -0,0 +1 @@
+f { |((k, v), i)| }
diff --git a/test/prism/fixtures/seattlerb/bug_call_arglist_parens.txt b/test/prism/fixtures/seattlerb/bug_call_arglist_parens.txt
new file mode 100644
index 0000000000..4f04368802
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_call_arglist_parens.txt
@@ -0,0 +1,11 @@
+ def f
+ g ( 1), 2
+ end
+
+
+ def f()
+ g (1), 2
+ end
+
+
+g ( 1), 2
diff --git a/test/prism/fixtures/seattlerb/bug_case_when_regexp.txt b/test/prism/fixtures/seattlerb/bug_case_when_regexp.txt
new file mode 100644
index 0000000000..2536696a42
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_case_when_regexp.txt
@@ -0,0 +1 @@
+case :x; when /x/ then end
diff --git a/test/prism/fixtures/seattlerb/bug_comma.txt b/test/prism/fixtures/seattlerb/bug_comma.txt
new file mode 100644
index 0000000000..d86f1ea9dd
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_comma.txt
@@ -0,0 +1 @@
+if test ?d, dir then end
diff --git a/test/prism/fixtures/seattlerb/bug_cond_pct.txt b/test/prism/fixtures/seattlerb/bug_cond_pct.txt
new file mode 100644
index 0000000000..1b4f90058e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_cond_pct.txt
@@ -0,0 +1 @@
+case; when %r%blahblah%; end
diff --git a/test/prism/fixtures/seattlerb/bug_hash_args.txt b/test/prism/fixtures/seattlerb/bug_hash_args.txt
new file mode 100644
index 0000000000..b815f8a666
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_hash_args.txt
@@ -0,0 +1 @@
+foo(:bar, baz: nil)
diff --git a/test/prism/fixtures/seattlerb/bug_hash_args_trailing_comma.txt b/test/prism/fixtures/seattlerb/bug_hash_args_trailing_comma.txt
new file mode 100644
index 0000000000..6057b245a5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_hash_args_trailing_comma.txt
@@ -0,0 +1 @@
+foo(:bar, baz: nil,)
diff --git a/test/prism/fixtures/seattlerb/bug_hash_interp_array.txt b/test/prism/fixtures/seattlerb/bug_hash_interp_array.txt
new file mode 100644
index 0000000000..01fe238056
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_hash_interp_array.txt
@@ -0,0 +1 @@
+{ "#{}": [] }
diff --git a/test/prism/fixtures/seattlerb/bug_masgn_right.txt b/test/prism/fixtures/seattlerb/bug_masgn_right.txt
new file mode 100644
index 0000000000..12ea7b8d62
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_masgn_right.txt
@@ -0,0 +1 @@
+f { |a, (b, c)| }
diff --git a/test/prism/fixtures/seattlerb/bug_not_parens.txt b/test/prism/fixtures/seattlerb/bug_not_parens.txt
new file mode 100644
index 0000000000..8847b7bec6
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_not_parens.txt
@@ -0,0 +1 @@
+not(a)
diff --git a/test/prism/fixtures/seattlerb/bug_op_asgn_rescue.txt b/test/prism/fixtures/seattlerb/bug_op_asgn_rescue.txt
new file mode 100644
index 0000000000..6a0b25cbdc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/bug_op_asgn_rescue.txt
@@ -0,0 +1 @@
+a ||= b rescue nil
diff --git a/test/prism/fixtures/seattlerb/call_and.txt b/test/prism/fixtures/seattlerb/call_and.txt
new file mode 100644
index 0000000000..c17be8f356
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_and.txt
@@ -0,0 +1 @@
+1 & 2
diff --git a/test/prism/fixtures/seattlerb/call_arg_assoc.txt b/test/prism/fixtures/seattlerb/call_arg_assoc.txt
new file mode 100644
index 0000000000..376c299be5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_arg_assoc.txt
@@ -0,0 +1 @@
+f(1, 2=>3)
diff --git a/test/prism/fixtures/seattlerb/call_arg_assoc_kwsplat.txt b/test/prism/fixtures/seattlerb/call_arg_assoc_kwsplat.txt
new file mode 100644
index 0000000000..a4be0fb62c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_arg_assoc_kwsplat.txt
@@ -0,0 +1 @@
+f(1, kw: 2, **3)
diff --git a/test/prism/fixtures/seattlerb/call_arg_kwsplat.txt b/test/prism/fixtures/seattlerb/call_arg_kwsplat.txt
new file mode 100644
index 0000000000..4848fd9e8d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_arg_kwsplat.txt
@@ -0,0 +1 @@
+a(b, **1)
diff --git a/test/prism/fixtures/seattlerb/call_args_assoc_quoted.txt b/test/prism/fixtures/seattlerb/call_args_assoc_quoted.txt
new file mode 100644
index 0000000000..0af2259577
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_args_assoc_quoted.txt
@@ -0,0 +1,5 @@
+x "#{k}":42
+
+x "k":42
+
+x 'k':42
diff --git a/test/prism/fixtures/seattlerb/call_args_assoc_trailing_comma.txt b/test/prism/fixtures/seattlerb/call_args_assoc_trailing_comma.txt
new file mode 100644
index 0000000000..6ad08f3238
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_args_assoc_trailing_comma.txt
@@ -0,0 +1 @@
+f(1, 2=>3,)
diff --git a/test/prism/fixtures/seattlerb/call_args_command.txt b/test/prism/fixtures/seattlerb/call_args_command.txt
new file mode 100644
index 0000000000..dd6df29c7b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_args_command.txt
@@ -0,0 +1 @@
+a.b c.d 1
diff --git a/test/prism/fixtures/seattlerb/call_array_arg.txt b/test/prism/fixtures/seattlerb/call_array_arg.txt
new file mode 100644
index 0000000000..5c724fa328
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_array_arg.txt
@@ -0,0 +1 @@
+1 == [:b, :c]
diff --git a/test/prism/fixtures/seattlerb/call_array_block_call.txt b/test/prism/fixtures/seattlerb/call_array_block_call.txt
new file mode 100644
index 0000000000..6d4c1b276e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_array_block_call.txt
@@ -0,0 +1 @@
+a [ nil, b do end ]
diff --git a/test/prism/fixtures/seattlerb/call_array_lambda_block_call.txt b/test/prism/fixtures/seattlerb/call_array_lambda_block_call.txt
new file mode 100644
index 0000000000..dc5b5807b2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_array_lambda_block_call.txt
@@ -0,0 +1,2 @@
+a [->() {}] do
+end
diff --git a/test/prism/fixtures/seattlerb/call_array_lit_inline_hash.txt b/test/prism/fixtures/seattlerb/call_array_lit_inline_hash.txt
new file mode 100644
index 0000000000..daba00947e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_array_lit_inline_hash.txt
@@ -0,0 +1 @@
+a([:b, :c => 1])
diff --git a/test/prism/fixtures/seattlerb/call_assoc.txt b/test/prism/fixtures/seattlerb/call_assoc.txt
new file mode 100644
index 0000000000..2adc1eee1c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_assoc.txt
@@ -0,0 +1 @@
+f(2=>3)
diff --git a/test/prism/fixtures/seattlerb/call_assoc_new.txt b/test/prism/fixtures/seattlerb/call_assoc_new.txt
new file mode 100644
index 0000000000..b8457bfdfc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_assoc_new.txt
@@ -0,0 +1 @@
+f(a:3)
diff --git a/test/prism/fixtures/seattlerb/call_assoc_new_if_multiline.txt b/test/prism/fixtures/seattlerb/call_assoc_new_if_multiline.txt
new file mode 100644
index 0000000000..fe0a37dabb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_assoc_new_if_multiline.txt
@@ -0,0 +1,5 @@
+a(b: if :c
+1
+else
+2
+end)
diff --git a/test/prism/fixtures/seattlerb/call_assoc_trailing_comma.txt b/test/prism/fixtures/seattlerb/call_assoc_trailing_comma.txt
new file mode 100644
index 0000000000..4d86a4541d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_assoc_trailing_comma.txt
@@ -0,0 +1 @@
+f(1=>2,)
diff --git a/test/prism/fixtures/seattlerb/call_bang_command_call.txt b/test/prism/fixtures/seattlerb/call_bang_command_call.txt
new file mode 100644
index 0000000000..4f3ba4b93c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_bang_command_call.txt
@@ -0,0 +1 @@
+! a.b 1
diff --git a/test/prism/fixtures/seattlerb/call_bang_squiggle.txt b/test/prism/fixtures/seattlerb/call_bang_squiggle.txt
new file mode 100644
index 0000000000..d7039f910a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_bang_squiggle.txt
@@ -0,0 +1 @@
+1 !~ 2
diff --git a/test/prism/fixtures/seattlerb/call_begin_call_block_call.txt b/test/prism/fixtures/seattlerb/call_begin_call_block_call.txt
new file mode 100644
index 0000000000..e9b43491fe
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_begin_call_block_call.txt
@@ -0,0 +1,3 @@
+a begin
+b.c do end
+end
diff --git a/test/prism/fixtures/seattlerb/call_block_arg_named.txt b/test/prism/fixtures/seattlerb/call_block_arg_named.txt
new file mode 100644
index 0000000000..08fea89d11
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_block_arg_named.txt
@@ -0,0 +1 @@
+x(&blk)
diff --git a/test/prism/fixtures/seattlerb/call_carat.txt b/test/prism/fixtures/seattlerb/call_carat.txt
new file mode 100644
index 0000000000..3e88c09837
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_carat.txt
@@ -0,0 +1 @@
+1 ^ 2
diff --git a/test/prism/fixtures/seattlerb/call_colon2.txt b/test/prism/fixtures/seattlerb/call_colon2.txt
new file mode 100644
index 0000000000..47aab7e637
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_colon2.txt
@@ -0,0 +1 @@
+A::b
diff --git a/test/prism/fixtures/seattlerb/call_colon_parens.txt b/test/prism/fixtures/seattlerb/call_colon_parens.txt
new file mode 100644
index 0000000000..51ed4df11b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_colon_parens.txt
@@ -0,0 +1 @@
+1::()
diff --git a/test/prism/fixtures/seattlerb/call_div.txt b/test/prism/fixtures/seattlerb/call_div.txt
new file mode 100644
index 0000000000..85b4d7b0b0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_div.txt
@@ -0,0 +1 @@
+1 / 2
diff --git a/test/prism/fixtures/seattlerb/call_dot_parens.txt b/test/prism/fixtures/seattlerb/call_dot_parens.txt
new file mode 100644
index 0000000000..0270596a07
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_dot_parens.txt
@@ -0,0 +1 @@
+1.()
diff --git a/test/prism/fixtures/seattlerb/call_env.txt b/test/prism/fixtures/seattlerb/call_env.txt
new file mode 100644
index 0000000000..dadc0d3861
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_env.txt
@@ -0,0 +1 @@
+a.happy
diff --git a/test/prism/fixtures/seattlerb/call_eq3.txt b/test/prism/fixtures/seattlerb/call_eq3.txt
new file mode 100644
index 0000000000..6a2fb465cb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_eq3.txt
@@ -0,0 +1 @@
+1 === 2
diff --git a/test/prism/fixtures/seattlerb/call_gt.txt b/test/prism/fixtures/seattlerb/call_gt.txt
new file mode 100644
index 0000000000..9d0a1caa90
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_gt.txt
@@ -0,0 +1 @@
+1 > 2
diff --git a/test/prism/fixtures/seattlerb/call_kwsplat.txt b/test/prism/fixtures/seattlerb/call_kwsplat.txt
new file mode 100644
index 0000000000..eda700c3e1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_kwsplat.txt
@@ -0,0 +1 @@
+a(**1)
diff --git a/test/prism/fixtures/seattlerb/call_leading_dots.txt b/test/prism/fixtures/seattlerb/call_leading_dots.txt
new file mode 100644
index 0000000000..1e7b2e5179
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_leading_dots.txt
@@ -0,0 +1,3 @@
+a
+.b
+.c
diff --git a/test/prism/fixtures/seattlerb/call_leading_dots_comment.txt b/test/prism/fixtures/seattlerb/call_leading_dots_comment.txt
new file mode 100644
index 0000000000..c5deec5642
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_leading_dots_comment.txt
@@ -0,0 +1,4 @@
+a
+.b
+#.c
+.d
diff --git a/test/prism/fixtures/seattlerb/call_lt.txt b/test/prism/fixtures/seattlerb/call_lt.txt
new file mode 100644
index 0000000000..17e69c79b5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_lt.txt
@@ -0,0 +1 @@
+1 < 2
diff --git a/test/prism/fixtures/seattlerb/call_lte.txt b/test/prism/fixtures/seattlerb/call_lte.txt
new file mode 100644
index 0000000000..7574027634
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_lte.txt
@@ -0,0 +1 @@
+1 <= 2
diff --git a/test/prism/fixtures/seattlerb/call_not.txt b/test/prism/fixtures/seattlerb/call_not.txt
new file mode 100644
index 0000000000..51e4742f55
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_not.txt
@@ -0,0 +1 @@
+not 42
diff --git a/test/prism/fixtures/seattlerb/call_pipe.txt b/test/prism/fixtures/seattlerb/call_pipe.txt
new file mode 100644
index 0000000000..1555910665
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_pipe.txt
@@ -0,0 +1 @@
+1 | 2
diff --git a/test/prism/fixtures/seattlerb/call_rshift.txt b/test/prism/fixtures/seattlerb/call_rshift.txt
new file mode 100644
index 0000000000..9ff1def4e0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_rshift.txt
@@ -0,0 +1 @@
+1 >> 2
diff --git a/test/prism/fixtures/seattlerb/call_self_brackets.txt b/test/prism/fixtures/seattlerb/call_self_brackets.txt
new file mode 100644
index 0000000000..6533df2ce0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_self_brackets.txt
@@ -0,0 +1 @@
+self[1]
diff --git a/test/prism/fixtures/seattlerb/call_spaceship.txt b/test/prism/fixtures/seattlerb/call_spaceship.txt
new file mode 100644
index 0000000000..905c3a1c46
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_spaceship.txt
@@ -0,0 +1 @@
+1 <=> 2
diff --git a/test/prism/fixtures/seattlerb/call_stabby_do_end_with_block.txt b/test/prism/fixtures/seattlerb/call_stabby_do_end_with_block.txt
new file mode 100644
index 0000000000..2d1afdad28
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_stabby_do_end_with_block.txt
@@ -0,0 +1 @@
+a -> do 1 end do 2 end
diff --git a/test/prism/fixtures/seattlerb/call_stabby_with_braces_block.txt b/test/prism/fixtures/seattlerb/call_stabby_with_braces_block.txt
new file mode 100644
index 0000000000..0d995a04d1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_stabby_with_braces_block.txt
@@ -0,0 +1 @@
+a -> { 1 } do 2 end
diff --git a/test/prism/fixtures/seattlerb/call_star.txt b/test/prism/fixtures/seattlerb/call_star.txt
new file mode 100644
index 0000000000..096ec022d4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_star.txt
@@ -0,0 +1 @@
+1 * 2
diff --git a/test/prism/fixtures/seattlerb/call_star2.txt b/test/prism/fixtures/seattlerb/call_star2.txt
new file mode 100644
index 0000000000..bef4719d3c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_star2.txt
@@ -0,0 +1 @@
+1 ** 2
diff --git a/test/prism/fixtures/seattlerb/call_trailing_comma.txt b/test/prism/fixtures/seattlerb/call_trailing_comma.txt
new file mode 100644
index 0000000000..e9a3ca35be
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_trailing_comma.txt
@@ -0,0 +1 @@
+f(1,)
diff --git a/test/prism/fixtures/seattlerb/call_trailing_dots.txt b/test/prism/fixtures/seattlerb/call_trailing_dots.txt
new file mode 100644
index 0000000000..960cdbb45f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_trailing_dots.txt
@@ -0,0 +1,3 @@
+a.
+b.
+c
diff --git a/test/prism/fixtures/seattlerb/call_unary_bang.txt b/test/prism/fixtures/seattlerb/call_unary_bang.txt
new file mode 100644
index 0000000000..91f702d4a9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/call_unary_bang.txt
@@ -0,0 +1 @@
+!1
diff --git a/test/prism/fixtures/seattlerb/case_in.txt b/test/prism/fixtures/seattlerb/case_in.txt
new file mode 100644
index 0000000000..0835da0956
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in.txt
@@ -0,0 +1,111 @@
+case :a
+in "b":
+end
+
+case :a
+in %I[a b]
+end
+
+case :a
+in %W[a b]
+end
+
+case :a
+in %i[a b]
+end
+
+case :a
+in %w[a b]
+end
+
+case :a
+in (...10)
+end
+
+case :a
+in (..10)
+end
+
+case :a
+in (1...)
+end
+
+case :a
+in (1...3)
+end
+
+case :a
+in (42)
+end
+
+case :a
+in **nil
+end
+
+case :a
+in /regexp/
+end
+
+case :a
+in :b, *_, :c
+end
+
+case :a
+in :b, [:c]
+end
+
+case :a
+in Symbol()
+end
+
+case :a
+in Symbol(*lhs, x, *rhs)
+end
+
+case :a
+in Symbol[*lhs, x, *rhs]
+end
+
+case :a
+in [->(b) { true }, c]
+end
+
+case :a
+in [:a, b, c, [:d, *e, nil]]
+end
+
+case :a
+in [A, *, B]
+end
+
+case :a
+in [[:b, c], [:d, ^e]]
+end
+
+case :a
+in []
+end
+
+case :a
+in [^(a)]
+end
+
+case :a
+in [^@a, ^$b, ^@@c]
+end
+
+case :a
+in `echo hi`
+end
+
+case :a
+in nil, nil, nil
+end
+
+case :a
+in { "b": }
+end
+
+case :a
+in {}
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_31.txt b/test/prism/fixtures/seattlerb/case_in_31.txt
new file mode 100644
index 0000000000..b9bf25b132
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_31.txt
@@ -0,0 +1,4 @@
+case :a
+in [:b, *c]
+ :d
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_37.txt b/test/prism/fixtures/seattlerb/case_in_37.txt
new file mode 100644
index 0000000000..25b6fb9261
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_37.txt
@@ -0,0 +1,4 @@
+case :a
+in { b: [Hash, *] }
+ :c
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_42.txt b/test/prism/fixtures/seattlerb/case_in_42.txt
new file mode 100644
index 0000000000..bc6a2233f5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_42.txt
@@ -0,0 +1,3 @@
+case :a
+in :b, *_ then nil
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_42_2.txt b/test/prism/fixtures/seattlerb/case_in_42_2.txt
new file mode 100644
index 0000000000..ce4b65a5d0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_42_2.txt
@@ -0,0 +1,3 @@
+case :a
+in A(*list) then nil
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_47.txt b/test/prism/fixtures/seattlerb/case_in_47.txt
new file mode 100644
index 0000000000..60f17ed7ce
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_47.txt
@@ -0,0 +1,4 @@
+case :a
+in [*, :b, :c]
+ :d
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_67.txt b/test/prism/fixtures/seattlerb/case_in_67.txt
new file mode 100644
index 0000000000..c1c55e68c7
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_67.txt
@@ -0,0 +1,3 @@
+case :a
+in 1.. then nil
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_86.txt b/test/prism/fixtures/seattlerb/case_in_86.txt
new file mode 100644
index 0000000000..63ba92e533
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_86.txt
@@ -0,0 +1,3 @@
+case [:a, :b]
+in ::NilClass, * then nil
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_86_2.txt b/test/prism/fixtures/seattlerb/case_in_86_2.txt
new file mode 100644
index 0000000000..4ad16c451a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_86_2.txt
@@ -0,0 +1,3 @@
+case [:a, :b]
+in *, ::NilClass then nil
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_array_pat_const.txt b/test/prism/fixtures/seattlerb/case_in_array_pat_const.txt
new file mode 100644
index 0000000000..8551e48e2c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_array_pat_const.txt
@@ -0,0 +1,4 @@
+case :a
+in B[c]
+ :d
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_array_pat_const2.txt b/test/prism/fixtures/seattlerb/case_in_array_pat_const2.txt
new file mode 100644
index 0000000000..fca423ea61
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_array_pat_const2.txt
@@ -0,0 +1,4 @@
+case :a
+in B::C[d]
+ :e
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_array_pat_paren_assign.txt b/test/prism/fixtures/seattlerb/case_in_array_pat_paren_assign.txt
new file mode 100644
index 0000000000..c56f728337
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_array_pat_paren_assign.txt
@@ -0,0 +1,4 @@
+case :a
+in B(C => d)
+ :d
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_const.txt b/test/prism/fixtures/seattlerb/case_in_const.txt
new file mode 100644
index 0000000000..5b0dcc18e2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_const.txt
@@ -0,0 +1,4 @@
+case Array
+in Class
+ :b
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_else.txt b/test/prism/fixtures/seattlerb/case_in_else.txt
new file mode 100644
index 0000000000..6f096862c5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_else.txt
@@ -0,0 +1,7 @@
+case Array
+in Class
+ :b
+else
+ :c
+end
+
diff --git a/test/prism/fixtures/seattlerb/case_in_find.txt b/test/prism/fixtures/seattlerb/case_in_find.txt
new file mode 100644
index 0000000000..476fcabe11
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_find.txt
@@ -0,0 +1,3 @@
+case :a
+ in *a, :+, *b
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_find_array.txt b/test/prism/fixtures/seattlerb/case_in_find_array.txt
new file mode 100644
index 0000000000..5eb4010b7f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_find_array.txt
@@ -0,0 +1,3 @@
+case :a
+in [*, :b, c, *]
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_hash_pat.txt b/test/prism/fixtures/seattlerb/case_in_hash_pat.txt
new file mode 100644
index 0000000000..cb012e8d99
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_hash_pat.txt
@@ -0,0 +1,5 @@
+case :a
+in { b: 'c', d: "e" } then
+ :f
+end
+
diff --git a/test/prism/fixtures/seattlerb/case_in_hash_pat_assign.txt b/test/prism/fixtures/seattlerb/case_in_hash_pat_assign.txt
new file mode 100644
index 0000000000..58fd59ff9c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_hash_pat_assign.txt
@@ -0,0 +1,4 @@
+case :a
+in { b: Integer => x, d: "e", f: } then
+ :g
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_hash_pat_paren_assign.txt b/test/prism/fixtures/seattlerb/case_in_hash_pat_paren_assign.txt
new file mode 100644
index 0000000000..de3a10740c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_hash_pat_paren_assign.txt
@@ -0,0 +1,4 @@
+case :a
+in B(a: 42)
+ :d
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_hash_pat_paren_true.txt b/test/prism/fixtures/seattlerb/case_in_hash_pat_paren_true.txt
new file mode 100644
index 0000000000..449fd0d4d4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_hash_pat_paren_true.txt
@@ -0,0 +1,5 @@
+case :a
+in b: true then
+ :c
+end
+
diff --git a/test/prism/fixtures/seattlerb/case_in_hash_pat_rest.txt b/test/prism/fixtures/seattlerb/case_in_hash_pat_rest.txt
new file mode 100644
index 0000000000..6f67cb1d10
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_hash_pat_rest.txt
@@ -0,0 +1,3 @@
+case :a
+in b: c, **rest then :d
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_hash_pat_rest_solo.txt b/test/prism/fixtures/seattlerb/case_in_hash_pat_rest_solo.txt
new file mode 100644
index 0000000000..91d0592412
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_hash_pat_rest_solo.txt
@@ -0,0 +1,3 @@
+case :a
+in **rest then :d
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_if_unless_post_mod.txt b/test/prism/fixtures/seattlerb/case_in_if_unless_post_mod.txt
new file mode 100644
index 0000000000..dbe24a5c8a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_if_unless_post_mod.txt
@@ -0,0 +1,6 @@
+case :a
+in A if true
+ :C
+in D unless false
+ :E
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_multiple.txt b/test/prism/fixtures/seattlerb/case_in_multiple.txt
new file mode 100644
index 0000000000..1b6dd06cfe
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_multiple.txt
@@ -0,0 +1,6 @@
+case :a
+in A::B
+ :C
+in D::E
+ :F
+end
diff --git a/test/prism/fixtures/seattlerb/case_in_or.txt b/test/prism/fixtures/seattlerb/case_in_or.txt
new file mode 100644
index 0000000000..875e37749f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/case_in_or.txt
@@ -0,0 +1,5 @@
+case :a
+in B | C
+ :d
+end
+
diff --git a/test/prism/fixtures/seattlerb/class_comments.txt b/test/prism/fixtures/seattlerb/class_comments.txt
new file mode 100644
index 0000000000..9701eca7e5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/class_comments.txt
@@ -0,0 +1,9 @@
+# blah 1
+# blah 2
+
+class X
+ # blah 3
+ def blah
+ # blah 4
+ end
+end
diff --git a/test/prism/fixtures/seattlerb/cond_unary_minus.txt b/test/prism/fixtures/seattlerb/cond_unary_minus.txt
new file mode 100644
index 0000000000..80293115da
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/cond_unary_minus.txt
@@ -0,0 +1 @@
+if -1; end
diff --git a/test/prism/fixtures/seattlerb/const_2_op_asgn_or2.txt b/test/prism/fixtures/seattlerb/const_2_op_asgn_or2.txt
new file mode 100644
index 0000000000..6912c2d76b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/const_2_op_asgn_or2.txt
@@ -0,0 +1 @@
+::X::Y ||= 1
diff --git a/test/prism/fixtures/seattlerb/const_3_op_asgn_or.txt b/test/prism/fixtures/seattlerb/const_3_op_asgn_or.txt
new file mode 100644
index 0000000000..bbcd25a369
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/const_3_op_asgn_or.txt
@@ -0,0 +1 @@
+::X ||= 1
diff --git a/test/prism/fixtures/seattlerb/const_op_asgn_and1.txt b/test/prism/fixtures/seattlerb/const_op_asgn_and1.txt
new file mode 100644
index 0000000000..3964df0ead
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/const_op_asgn_and1.txt
@@ -0,0 +1 @@
+::X &= 1
diff --git a/test/prism/fixtures/seattlerb/const_op_asgn_and2.txt b/test/prism/fixtures/seattlerb/const_op_asgn_and2.txt
new file mode 100644
index 0000000000..1bef4b4154
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/const_op_asgn_and2.txt
@@ -0,0 +1 @@
+::X &&= 1
diff --git a/test/prism/fixtures/seattlerb/const_op_asgn_or.txt b/test/prism/fixtures/seattlerb/const_op_asgn_or.txt
new file mode 100644
index 0000000000..729e425262
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/const_op_asgn_or.txt
@@ -0,0 +1 @@
+X::Y ||= 1
diff --git a/test/prism/fixtures/seattlerb/dasgn_icky2.txt b/test/prism/fixtures/seattlerb/dasgn_icky2.txt
new file mode 100644
index 0000000000..2f50d32304
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dasgn_icky2.txt
@@ -0,0 +1,8 @@
+a do
+ v = nil
+ begin
+ yield
+ rescue Exception => v
+ break
+ end
+end
diff --git a/test/prism/fixtures/seattlerb/defined_eh_parens.txt b/test/prism/fixtures/seattlerb/defined_eh_parens.txt
new file mode 100644
index 0000000000..5ca5d9f4c4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defined_eh_parens.txt
@@ -0,0 +1 @@
+defined?(42)
diff --git a/test/prism/fixtures/seattlerb/defn_arg_asplat_arg.txt b/test/prism/fixtures/seattlerb/defn_arg_asplat_arg.txt
new file mode 100644
index 0000000000..f629a5de60
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_arg_asplat_arg.txt
@@ -0,0 +1 @@
+def call(interp, *, args) end
diff --git a/test/prism/fixtures/seattlerb/defn_arg_forward_args.txt b/test/prism/fixtures/seattlerb/defn_arg_forward_args.txt
new file mode 100644
index 0000000000..500e2e1fe0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_arg_forward_args.txt
@@ -0,0 +1 @@
+def a(x, ...); b(x, ...); end
diff --git a/test/prism/fixtures/seattlerb/defn_args_forward_args.txt b/test/prism/fixtures/seattlerb/defn_args_forward_args.txt
new file mode 100644
index 0000000000..fc1ee138de
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_args_forward_args.txt
@@ -0,0 +1 @@
+def a(x, y, z, ...); b(:get, z, ...); end
diff --git a/test/prism/fixtures/seattlerb/defn_comments.txt b/test/prism/fixtures/seattlerb/defn_comments.txt
new file mode 100644
index 0000000000..04c7ea1a10
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_comments.txt
@@ -0,0 +1,5 @@
+# blah 1
+# blah 2
+
+def blah
+end
diff --git a/test/prism/fixtures/seattlerb/defn_endless_command.txt b/test/prism/fixtures/seattlerb/defn_endless_command.txt
new file mode 100644
index 0000000000..172de2ca6c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_endless_command.txt
@@ -0,0 +1 @@
+def some_method = other_method 42
diff --git a/test/prism/fixtures/seattlerb/defn_endless_command_rescue.txt b/test/prism/fixtures/seattlerb/defn_endless_command_rescue.txt
new file mode 100644
index 0000000000..05ed392e38
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_endless_command_rescue.txt
@@ -0,0 +1 @@
+def some_method = other_method 42 rescue 24
diff --git a/test/prism/fixtures/seattlerb/defn_forward_args.txt b/test/prism/fixtures/seattlerb/defn_forward_args.txt
new file mode 100644
index 0000000000..46ed199875
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_forward_args.txt
@@ -0,0 +1 @@
+def a(...); b(...); end
diff --git a/test/prism/fixtures/seattlerb/defn_forward_args__no_parens.txt b/test/prism/fixtures/seattlerb/defn_forward_args__no_parens.txt
new file mode 100644
index 0000000000..2d34077c93
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_forward_args__no_parens.txt
@@ -0,0 +1,3 @@
+def f ...
+ m(...)
+end
diff --git a/test/prism/fixtures/seattlerb/defn_kwarg_env.txt b/test/prism/fixtures/seattlerb/defn_kwarg_env.txt
new file mode 100644
index 0000000000..b512677195
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_kwarg_env.txt
@@ -0,0 +1 @@
+def test(**testing) test_splat(**testing) end
diff --git a/test/prism/fixtures/seattlerb/defn_kwarg_kwarg.txt b/test/prism/fixtures/seattlerb/defn_kwarg_kwarg.txt
new file mode 100644
index 0000000000..3962d2645c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_kwarg_kwarg.txt
@@ -0,0 +1 @@
+def f(a, b: 1, c: 2) end
diff --git a/test/prism/fixtures/seattlerb/defn_kwarg_kwsplat.txt b/test/prism/fixtures/seattlerb/defn_kwarg_kwsplat.txt
new file mode 100644
index 0000000000..bd39819482
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_kwarg_kwsplat.txt
@@ -0,0 +1 @@
+def a(b: 1, **c) end
diff --git a/test/prism/fixtures/seattlerb/defn_kwarg_kwsplat_anon.txt b/test/prism/fixtures/seattlerb/defn_kwarg_kwsplat_anon.txt
new file mode 100644
index 0000000000..aba71cba07
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_kwarg_kwsplat_anon.txt
@@ -0,0 +1 @@
+def a(b: 1, **) end
diff --git a/test/prism/fixtures/seattlerb/defn_kwarg_lvar.txt b/test/prism/fixtures/seattlerb/defn_kwarg_lvar.txt
new file mode 100644
index 0000000000..9eac108cca
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_kwarg_lvar.txt
@@ -0,0 +1 @@
+def fun(kw: :val); kw; end
diff --git a/test/prism/fixtures/seattlerb/defn_kwarg_no_parens.txt b/test/prism/fixtures/seattlerb/defn_kwarg_no_parens.txt
new file mode 100644
index 0000000000..481457bf0e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_kwarg_no_parens.txt
@@ -0,0 +1,2 @@
+def f a: 1
+end
diff --git a/test/prism/fixtures/seattlerb/defn_kwarg_val.txt b/test/prism/fixtures/seattlerb/defn_kwarg_val.txt
new file mode 100644
index 0000000000..1a2803926f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_kwarg_val.txt
@@ -0,0 +1 @@
+def f(a, b:1) end
diff --git a/test/prism/fixtures/seattlerb/defn_no_kwargs.txt b/test/prism/fixtures/seattlerb/defn_no_kwargs.txt
new file mode 100644
index 0000000000..857ec8debb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_no_kwargs.txt
@@ -0,0 +1 @@
+def x(**nil); end
diff --git a/test/prism/fixtures/seattlerb/defn_oneliner.txt b/test/prism/fixtures/seattlerb/defn_oneliner.txt
new file mode 100644
index 0000000000..4aef08ce46
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_oneliner.txt
@@ -0,0 +1 @@
+def exec(cmd) = system(cmd)
diff --git a/test/prism/fixtures/seattlerb/defn_oneliner_eq2.txt b/test/prism/fixtures/seattlerb/defn_oneliner_eq2.txt
new file mode 100644
index 0000000000..1b1ce27a15
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_oneliner_eq2.txt
@@ -0,0 +1,3 @@
+class X
+ def ==(o) = 42
+end
diff --git a/test/prism/fixtures/seattlerb/defn_oneliner_noargs.txt b/test/prism/fixtures/seattlerb/defn_oneliner_noargs.txt
new file mode 100644
index 0000000000..cb4f76d244
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_oneliner_noargs.txt
@@ -0,0 +1 @@
+def exec = system
diff --git a/test/prism/fixtures/seattlerb/defn_oneliner_noargs_parentheses.txt b/test/prism/fixtures/seattlerb/defn_oneliner_noargs_parentheses.txt
new file mode 100644
index 0000000000..c582e896c1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_oneliner_noargs_parentheses.txt
@@ -0,0 +1 @@
+def exec() = system
diff --git a/test/prism/fixtures/seattlerb/defn_oneliner_rescue.txt b/test/prism/fixtures/seattlerb/defn_oneliner_rescue.txt
new file mode 100644
index 0000000000..ffe2228c9d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_oneliner_rescue.txt
@@ -0,0 +1,13 @@
+def exec(cmd)
+ system(cmd)
+rescue
+ nil
+end
+
+
+def exec(cmd)
+ system(cmd) rescue nil
+end
+
+
+def exec(cmd) = system(cmd) rescue nil
diff --git a/test/prism/fixtures/seattlerb/defn_opt_last_arg.txt b/test/prism/fixtures/seattlerb/defn_opt_last_arg.txt
new file mode 100644
index 0000000000..91500bf137
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_opt_last_arg.txt
@@ -0,0 +1,2 @@
+def m arg = false
+end
diff --git a/test/prism/fixtures/seattlerb/defn_opt_reg.txt b/test/prism/fixtures/seattlerb/defn_opt_reg.txt
new file mode 100644
index 0000000000..c665674bc4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_opt_reg.txt
@@ -0,0 +1 @@
+def f(a=nil, b) end
diff --git a/test/prism/fixtures/seattlerb/defn_opt_splat_arg.txt b/test/prism/fixtures/seattlerb/defn_opt_splat_arg.txt
new file mode 100644
index 0000000000..876398b478
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_opt_splat_arg.txt
@@ -0,0 +1 @@
+def f (a = 1, *b, c) end
diff --git a/test/prism/fixtures/seattlerb/defn_powarg.txt b/test/prism/fixtures/seattlerb/defn_powarg.txt
new file mode 100644
index 0000000000..73415f0db9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_powarg.txt
@@ -0,0 +1 @@
+def f(**opts) end
diff --git a/test/prism/fixtures/seattlerb/defn_reg_opt_reg.txt b/test/prism/fixtures/seattlerb/defn_reg_opt_reg.txt
new file mode 100644
index 0000000000..69f501a38e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_reg_opt_reg.txt
@@ -0,0 +1 @@
+def f(a, b = :c, d) end
diff --git a/test/prism/fixtures/seattlerb/defn_splat_arg.txt b/test/prism/fixtures/seattlerb/defn_splat_arg.txt
new file mode 100644
index 0000000000..a2a84bed30
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_splat_arg.txt
@@ -0,0 +1 @@
+def f(*, a) end
diff --git a/test/prism/fixtures/seattlerb/defn_unary_not.txt b/test/prism/fixtures/seattlerb/defn_unary_not.txt
new file mode 100644
index 0000000000..fb83c84a13
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defn_unary_not.txt
@@ -0,0 +1 @@
+def !@; true; end
diff --git a/test/prism/fixtures/seattlerb/defns_reserved.txt b/test/prism/fixtures/seattlerb/defns_reserved.txt
new file mode 100644
index 0000000000..7de9322f0d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defns_reserved.txt
@@ -0,0 +1 @@
+def self.return; end
diff --git a/test/prism/fixtures/seattlerb/defs_as_arg_with_do_block_inside.txt b/test/prism/fixtures/seattlerb/defs_as_arg_with_do_block_inside.txt
new file mode 100644
index 0000000000..4d493d73dd
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_as_arg_with_do_block_inside.txt
@@ -0,0 +1 @@
+p def self.b; x.y do; end; end
diff --git a/test/prism/fixtures/seattlerb/defs_comments.txt b/test/prism/fixtures/seattlerb/defs_comments.txt
new file mode 100644
index 0000000000..52b9b4a6b3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_comments.txt
@@ -0,0 +1,5 @@
+# blah 1
+# blah 2
+
+def self.blah
+end
diff --git a/test/prism/fixtures/seattlerb/defs_endless_command.txt b/test/prism/fixtures/seattlerb/defs_endless_command.txt
new file mode 100644
index 0000000000..3b605657de
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_endless_command.txt
@@ -0,0 +1 @@
+def x.some_method = other_method 42
diff --git a/test/prism/fixtures/seattlerb/defs_endless_command_rescue.txt b/test/prism/fixtures/seattlerb/defs_endless_command_rescue.txt
new file mode 100644
index 0000000000..6ece366db0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_endless_command_rescue.txt
@@ -0,0 +1 @@
+def x.some_method = other_method 42 rescue 24
diff --git a/test/prism/fixtures/seattlerb/defs_kwarg.txt b/test/prism/fixtures/seattlerb/defs_kwarg.txt
new file mode 100644
index 0000000000..59970a371e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_kwarg.txt
@@ -0,0 +1,2 @@
+def self.a b: 1
+end
diff --git a/test/prism/fixtures/seattlerb/defs_oneliner.txt b/test/prism/fixtures/seattlerb/defs_oneliner.txt
new file mode 100644
index 0000000000..1867edcfbf
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_oneliner.txt
@@ -0,0 +1 @@
+def self.exec(cmd) = system(cmd)
diff --git a/test/prism/fixtures/seattlerb/defs_oneliner_eq2.txt b/test/prism/fixtures/seattlerb/defs_oneliner_eq2.txt
new file mode 100644
index 0000000000..1e55f68bf3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_oneliner_eq2.txt
@@ -0,0 +1,3 @@
+class X
+ def self.==(o) = 42
+end
diff --git a/test/prism/fixtures/seattlerb/defs_oneliner_rescue.txt b/test/prism/fixtures/seattlerb/defs_oneliner_rescue.txt
new file mode 100644
index 0000000000..7a04012b8f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/defs_oneliner_rescue.txt
@@ -0,0 +1,13 @@
+def self.exec(cmd)
+ system(cmd)
+rescue
+ nil
+end
+
+
+def self.exec(cmd)
+ system(cmd) rescue nil
+end
+
+
+def self.exec(cmd) = system(cmd) rescue nil
diff --git a/test/prism/fixtures/seattlerb/difficult0_.txt b/test/prism/fixtures/seattlerb/difficult0_.txt
new file mode 100644
index 0000000000..5c73907cae
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult0_.txt
@@ -0,0 +1,4 @@
+p <<-END+'b
+ a
+ END
+ c'+'d'
diff --git a/test/prism/fixtures/seattlerb/difficult1_line_numbers.txt b/test/prism/fixtures/seattlerb/difficult1_line_numbers.txt
new file mode 100644
index 0000000000..8008127dc9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult1_line_numbers.txt
@@ -0,0 +1,13 @@
+if true
+ p 1
+ a.b 2
+ c.d 3, 4
+ e.f 5
+ g.h 6, 7
+ p(1)
+ a.b(2)
+ c.d(3, 4)
+ e.f(5)
+ g.h(6, 7)
+end
+
diff --git a/test/prism/fixtures/seattlerb/difficult1_line_numbers2.txt b/test/prism/fixtures/seattlerb/difficult1_line_numbers2.txt
new file mode 100644
index 0000000000..1964562416
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult1_line_numbers2.txt
@@ -0,0 +1,8 @@
+if true then
+ p("a")
+ b = 1
+ p b
+ c =1
+end
+a
+
diff --git a/test/prism/fixtures/seattlerb/difficult2_.txt b/test/prism/fixtures/seattlerb/difficult2_.txt
new file mode 100644
index 0000000000..3259097492
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult2_.txt
@@ -0,0 +1,2 @@
+1 ? b('') : 2
+a d: 3
diff --git a/test/prism/fixtures/seattlerb/difficult3_.txt b/test/prism/fixtures/seattlerb/difficult3_.txt
new file mode 100644
index 0000000000..9f95860b82
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3_.txt
@@ -0,0 +1 @@
+f { |a, (b, *c)| }
diff --git a/test/prism/fixtures/seattlerb/difficult3_2.txt b/test/prism/fixtures/seattlerb/difficult3_2.txt
new file mode 100644
index 0000000000..8abfe3f634
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3_2.txt
@@ -0,0 +1 @@
+f { |*a, b| }
diff --git a/test/prism/fixtures/seattlerb/difficult3_3.txt b/test/prism/fixtures/seattlerb/difficult3_3.txt
new file mode 100644
index 0000000000..6f43ab7b1d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3_3.txt
@@ -0,0 +1 @@
+f { |*a, b, &c| }
diff --git a/test/prism/fixtures/seattlerb/difficult3_4.txt b/test/prism/fixtures/seattlerb/difficult3_4.txt
new file mode 100644
index 0000000000..7070e1e964
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3_4.txt
@@ -0,0 +1 @@
+a=b ? true: false
diff --git a/test/prism/fixtures/seattlerb/difficult3_5.txt b/test/prism/fixtures/seattlerb/difficult3_5.txt
new file mode 100644
index 0000000000..6d52692481
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3_5.txt
@@ -0,0 +1 @@
+f ->() { g do end }
diff --git a/test/prism/fixtures/seattlerb/difficult3__10.txt b/test/prism/fixtures/seattlerb/difficult3__10.txt
new file mode 100644
index 0000000000..89974f5114
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3__10.txt
@@ -0,0 +1 @@
+f { |a, (*b, c)| }
diff --git a/test/prism/fixtures/seattlerb/difficult3__11.txt b/test/prism/fixtures/seattlerb/difficult3__11.txt
new file mode 100644
index 0000000000..911d037961
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3__11.txt
@@ -0,0 +1 @@
+f { |a, (*)| }
diff --git a/test/prism/fixtures/seattlerb/difficult3__12.txt b/test/prism/fixtures/seattlerb/difficult3__12.txt
new file mode 100644
index 0000000000..2405a80ec1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3__12.txt
@@ -0,0 +1 @@
+f { |a, (*, b)| }
diff --git a/test/prism/fixtures/seattlerb/difficult3__6.txt b/test/prism/fixtures/seattlerb/difficult3__6.txt
new file mode 100644
index 0000000000..3a45ae86fb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3__6.txt
@@ -0,0 +1 @@
+f { |a, (b, *c, d)| }
diff --git a/test/prism/fixtures/seattlerb/difficult3__7.txt b/test/prism/fixtures/seattlerb/difficult3__7.txt
new file mode 100644
index 0000000000..55272a1fc4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3__7.txt
@@ -0,0 +1 @@
+f { |a, (b, *)| }
diff --git a/test/prism/fixtures/seattlerb/difficult3__8.txt b/test/prism/fixtures/seattlerb/difficult3__8.txt
new file mode 100644
index 0000000000..76740db4ff
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3__8.txt
@@ -0,0 +1 @@
+f { |a, (b, *, c)| }
diff --git a/test/prism/fixtures/seattlerb/difficult3__9.txt b/test/prism/fixtures/seattlerb/difficult3__9.txt
new file mode 100644
index 0000000000..b65f7fd052
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult3__9.txt
@@ -0,0 +1 @@
+f { |a, (*b)| }
diff --git a/test/prism/fixtures/seattlerb/difficult4__leading_dots.txt b/test/prism/fixtures/seattlerb/difficult4__leading_dots.txt
new file mode 100644
index 0000000000..332dc8225c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult4__leading_dots.txt
@@ -0,0 +1,2 @@
+a
+.b
diff --git a/test/prism/fixtures/seattlerb/difficult4__leading_dots2.txt b/test/prism/fixtures/seattlerb/difficult4__leading_dots2.txt
new file mode 100644
index 0000000000..fe73f641fe
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult4__leading_dots2.txt
@@ -0,0 +1,2 @@
+1
+..3
diff --git a/test/prism/fixtures/seattlerb/difficult6_.txt b/test/prism/fixtures/seattlerb/difficult6_.txt
new file mode 100644
index 0000000000..7396a9a76f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult6_.txt
@@ -0,0 +1 @@
+->(a, b=nil) { p [a, b] }
diff --git a/test/prism/fixtures/seattlerb/difficult6__7.txt b/test/prism/fixtures/seattlerb/difficult6__7.txt
new file mode 100644
index 0000000000..048358bbdc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult6__7.txt
@@ -0,0 +1 @@
+a.b (1) {c}
diff --git a/test/prism/fixtures/seattlerb/difficult6__8.txt b/test/prism/fixtures/seattlerb/difficult6__8.txt
new file mode 100644
index 0000000000..ba1cbc235d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult6__8.txt
@@ -0,0 +1 @@
+a::b (1) {c}
diff --git a/test/prism/fixtures/seattlerb/difficult7_.txt b/test/prism/fixtures/seattlerb/difficult7_.txt
new file mode 100644
index 0000000000..112b75c5f2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/difficult7_.txt
@@ -0,0 +1,5 @@
+ {
+ a: lambda { b ? c() : d },
+ e: nil,
+ }
+
diff --git a/test/prism/fixtures/seattlerb/do_bug.txt b/test/prism/fixtures/seattlerb/do_bug.txt
new file mode 100644
index 0000000000..a274e72baf
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/do_bug.txt
@@ -0,0 +1,4 @@
+a 1
+a.b do |c|
+ # do nothing
+end
diff --git a/test/prism/fixtures/seattlerb/do_lambda.txt b/test/prism/fixtures/seattlerb/do_lambda.txt
new file mode 100644
index 0000000000..06d2a38d30
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/do_lambda.txt
@@ -0,0 +1 @@
+->() do end
diff --git a/test/prism/fixtures/seattlerb/dot2_nil__26.txt b/test/prism/fixtures/seattlerb/dot2_nil__26.txt
new file mode 100644
index 0000000000..cc070eb69f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dot2_nil__26.txt
@@ -0,0 +1 @@
+a..
diff --git a/test/prism/fixtures/seattlerb/dot3_nil__26.txt b/test/prism/fixtures/seattlerb/dot3_nil__26.txt
new file mode 100644
index 0000000000..7f4aef7af7
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dot3_nil__26.txt
@@ -0,0 +1 @@
+a...
diff --git a/test/prism/fixtures/seattlerb/dstr_evstr.txt b/test/prism/fixtures/seattlerb/dstr_evstr.txt
new file mode 100644
index 0000000000..5fe4a858c1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dstr_evstr.txt
@@ -0,0 +1 @@
+"#{'a'}#{b}"
diff --git a/test/prism/fixtures/seattlerb/dstr_evstr_empty_end.txt b/test/prism/fixtures/seattlerb/dstr_evstr_empty_end.txt
new file mode 100644
index 0000000000..7a55030fa8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dstr_evstr_empty_end.txt
@@ -0,0 +1 @@
+:"#{field}"
diff --git a/test/prism/fixtures/seattlerb/dstr_lex_state.txt b/test/prism/fixtures/seattlerb/dstr_lex_state.txt
new file mode 100644
index 0000000000..6cac1d8e95
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dstr_lex_state.txt
@@ -0,0 +1 @@
+"#{p:a}"
diff --git a/test/prism/fixtures/seattlerb/dstr_str.txt b/test/prism/fixtures/seattlerb/dstr_str.txt
new file mode 100644
index 0000000000..226ce2b191
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dstr_str.txt
@@ -0,0 +1 @@
+"#{'a'} b"
diff --git a/test/prism/fixtures/seattlerb/dsym_esc_to_sym.txt b/test/prism/fixtures/seattlerb/dsym_esc_to_sym.txt
new file mode 100644
index 0000000000..e5781453c1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dsym_esc_to_sym.txt
@@ -0,0 +1 @@
+:"Variet\303\240"
diff --git a/test/prism/fixtures/seattlerb/dsym_to_sym.txt b/test/prism/fixtures/seattlerb/dsym_to_sym.txt
new file mode 100644
index 0000000000..813c90342c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/dsym_to_sym.txt
@@ -0,0 +1,3 @@
+alias :"<<" :">>"
+
+alias :<< :>>
diff --git a/test/prism/fixtures/seattlerb/eq_begin_line_numbers.txt b/test/prism/fixtures/seattlerb/eq_begin_line_numbers.txt
new file mode 100644
index 0000000000..aae82e1207
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/eq_begin_line_numbers.txt
@@ -0,0 +1,6 @@
+1
+=begin
+comment
+comment
+=end
+2
diff --git a/test/prism/fixtures/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt b/test/prism/fixtures/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt
new file mode 100644
index 0000000000..88ff599e91
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt
@@ -0,0 +1,3 @@
+h[k]=begin
+ 42
+ end
diff --git a/test/prism/fixtures/seattlerb/evstr_evstr.txt b/test/prism/fixtures/seattlerb/evstr_evstr.txt
new file mode 100644
index 0000000000..cf0b5ee873
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/evstr_evstr.txt
@@ -0,0 +1 @@
+"#{a}#{b}"
diff --git a/test/prism/fixtures/seattlerb/evstr_str.txt b/test/prism/fixtures/seattlerb/evstr_str.txt
new file mode 100644
index 0000000000..5746909b19
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/evstr_str.txt
@@ -0,0 +1 @@
+"#{a} b"
diff --git a/test/prism/fixtures/seattlerb/expr_not_bang.txt b/test/prism/fixtures/seattlerb/expr_not_bang.txt
new file mode 100644
index 0000000000..6ed80c76d3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/expr_not_bang.txt
@@ -0,0 +1 @@
+! a b
diff --git a/test/prism/fixtures/seattlerb/f_kw.txt b/test/prism/fixtures/seattlerb/f_kw.txt
new file mode 100644
index 0000000000..4dd42662b8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/f_kw.txt
@@ -0,0 +1 @@
+def x k:42; end
diff --git a/test/prism/fixtures/seattlerb/f_kw__required.txt b/test/prism/fixtures/seattlerb/f_kw__required.txt
new file mode 100644
index 0000000000..2e1e258ff0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/f_kw__required.txt
@@ -0,0 +1 @@
+def x k:; end
diff --git a/test/prism/fixtures/seattlerb/flip2_env_lvar.txt b/test/prism/fixtures/seattlerb/flip2_env_lvar.txt
new file mode 100644
index 0000000000..619b2c915e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/flip2_env_lvar.txt
@@ -0,0 +1 @@
+if a..b then end
diff --git a/test/prism/fixtures/seattlerb/float_with_if_modifier.txt b/test/prism/fixtures/seattlerb/float_with_if_modifier.txt
new file mode 100644
index 0000000000..6a62d4a308
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/float_with_if_modifier.txt
@@ -0,0 +1 @@
+1.0if true
diff --git a/test/prism/fixtures/seattlerb/heredoc__backslash_dos_format.txt b/test/prism/fixtures/seattlerb/heredoc__backslash_dos_format.txt
new file mode 100644
index 0000000000..cfbcb2a11d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc__backslash_dos_format.txt
@@ -0,0 +1,5 @@
+str = <<-XXX
+before\
+after
+XXX
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_backslash_nl.txt b/test/prism/fixtures/seattlerb/heredoc_backslash_nl.txt
new file mode 100644
index 0000000000..0cc5b35fd5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_backslash_nl.txt
@@ -0,0 +1,8 @@
+" why would someone do this? \
+ blah
+"
+
+<<-DESC
+ why would someone do this? \
+ blah
+DESC
diff --git a/test/prism/fixtures/seattlerb/heredoc_bad_hex_escape.txt b/test/prism/fixtures/seattlerb/heredoc_bad_hex_escape.txt
new file mode 100644
index 0000000000..2c386cc6a9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_bad_hex_escape.txt
@@ -0,0 +1,3 @@
+s = <<eos
+a\xE9b
+eos
diff --git a/test/prism/fixtures/seattlerb/heredoc_bad_oct_escape.txt b/test/prism/fixtures/seattlerb/heredoc_bad_oct_escape.txt
new file mode 100644
index 0000000000..235a041e90
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_bad_oct_escape.txt
@@ -0,0 +1,5 @@
+s = <<-EOS
+a\247b
+cöd
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_comma_arg.txt b/test/prism/fixtures/seattlerb/heredoc_comma_arg.txt
new file mode 100644
index 0000000000..c230b12f65
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_comma_arg.txt
@@ -0,0 +1,7 @@
+[" some text
+",]
+
+[<<-FILE,
+ some text
+FILE
+]
diff --git a/test/prism/fixtures/seattlerb/heredoc_lineno.txt b/test/prism/fixtures/seattlerb/heredoc_lineno.txt
new file mode 100644
index 0000000000..73a2e3806b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_lineno.txt
@@ -0,0 +1,7 @@
+c = <<'CCC'
+line2
+line3
+line4
+CCC
+
+d = 42
diff --git a/test/prism/fixtures/seattlerb/heredoc_nested.txt b/test/prism/fixtures/seattlerb/heredoc_nested.txt
new file mode 100644
index 0000000000..508d6d3c05
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_nested.txt
@@ -0,0 +1,7 @@
+[<<A,
+#{<<B}
+b
+B
+a
+A
+0]
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly.txt
new file mode 100644
index 0000000000..e630ff62b4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly.txt
@@ -0,0 +1,7 @@
+a = <<~"EOF"
+ x
+ y
+ z
+ EOF
+
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt
new file mode 100644
index 0000000000..61b62157db
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt
@@ -0,0 +1,4 @@
+a = foo(<<~EOF.chop)
+
+ #{bar}baz
+ EOF
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_blank_lines.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_blank_lines.txt
new file mode 100644
index 0000000000..0d89134c87
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_blank_lines.txt
@@ -0,0 +1,7 @@
+a = <<~EOF
+ x
+
+ z
+EOF
+
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_empty.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_empty.txt
new file mode 100644
index 0000000000..4602d757fb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_empty.txt
@@ -0,0 +1,2 @@
+<<~A
+A
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_interp.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_interp.txt
new file mode 100644
index 0000000000..47ff3c9070
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_interp.txt
@@ -0,0 +1,5 @@
+a = <<~EOF
+ w
+ x#{42} y
+ z
+ EOF
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_no_indent.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_no_indent.txt
new file mode 100644
index 0000000000..7076f6ef71
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_no_indent.txt
@@ -0,0 +1,3 @@
+<<~A
+a
+A
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_tabs.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_tabs.txt
new file mode 100644
index 0000000000..b193f0473b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_tabs.txt
@@ -0,0 +1,6 @@
+a = <<~"EOF"
+ blah blah
+ blah blah
+ EOF
+
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_tabs_extra.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_tabs_extra.txt
new file mode 100644
index 0000000000..5b75dd2b59
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_tabs_extra.txt
@@ -0,0 +1,6 @@
+a = <<~"EOF"
+ blah blah
+ blah blah
+ EOF
+
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_squiggly_visually_blank_lines.txt b/test/prism/fixtures/seattlerb/heredoc_squiggly_visually_blank_lines.txt
new file mode 100644
index 0000000000..3f9198296d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_squiggly_visually_blank_lines.txt
@@ -0,0 +1,7 @@
+a = <<~EOF
+ x
+
+ z
+EOF
+
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_trailing_slash_continued_call.txt b/test/prism/fixtures/seattlerb/heredoc_trailing_slash_continued_call.txt
new file mode 100644
index 0000000000..12c8fac126
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_trailing_slash_continued_call.txt
@@ -0,0 +1,4 @@
+<<END\
+blah
+END
+.strip
diff --git a/test/prism/fixtures/seattlerb/heredoc_unicode.txt b/test/prism/fixtures/seattlerb/heredoc_unicode.txt
new file mode 100644
index 0000000000..216a5cfe24
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_unicode.txt
@@ -0,0 +1,4 @@
+<<OOTPÜT
+.
+OOTPÜT
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes.txt b/test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes.txt
new file mode 100644
index 0000000000..cb4967d154
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes.txt
@@ -0,0 +1,5 @@
+<<EOS
+foo\rbar
+baz\r
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes_windows.txt b/test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes_windows.txt
new file mode 100644
index 0000000000..75ed936b5d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_carriage_return_escapes_windows.txt
@@ -0,0 +1,5 @@
+<<EOS
+foo\rbar
+baz\r
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt b/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
new file mode 100644
index 0000000000..1c58c05cc5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
@@ -0,0 +1,4 @@
+<<'eot'
+body
+eot
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns.txt b/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns.txt
new file mode 100644
index 0000000000..706cb0d5c0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns.txt
@@ -0,0 +1,5 @@
+<<EOS
+foo bar
+baz
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns_windows.txt b/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns_windows.txt
new file mode 100644
index 0000000000..8ed84799b1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_extra_carriage_returns_windows.txt
@@ -0,0 +1,5 @@
+<<EOS
+foo bar
+baz
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt b/test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt
new file mode 100644
index 0000000000..250e606f45
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt
@@ -0,0 +1,4 @@
+<<EOS
+foo\r#@bar
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt b/test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt
new file mode 100644
index 0000000000..12f97aff5e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt
@@ -0,0 +1,4 @@
+<<EOS
+foo\r#@bar
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_not_global_interpolation.txt b/test/prism/fixtures/seattlerb/heredoc_with_not_global_interpolation.txt
new file mode 100644
index 0000000000..f94c2c9e27
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_not_global_interpolation.txt
@@ -0,0 +1,3 @@
+<<-HEREDOC
+#${
+HEREDOC
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns.txt b/test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns.txt
new file mode 100644
index 0000000000..468ba85cf7
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns.txt
@@ -0,0 +1,6 @@
+<<EOS
+
+
+\r
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns_windows.txt b/test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns_windows.txt
new file mode 100644
index 0000000000..e973eff110
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/heredoc_with_only_carriage_returns_windows.txt
@@ -0,0 +1,6 @@
+<<EOS
+
+
+\r
+EOS
+
diff --git a/test/prism/fixtures/seattlerb/if_elsif.txt b/test/prism/fixtures/seattlerb/if_elsif.txt
new file mode 100644
index 0000000000..bc1c0a2b3d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/if_elsif.txt
@@ -0,0 +1 @@
+if 1; elsif 2; end
diff --git a/test/prism/fixtures/seattlerb/if_symbol.txt b/test/prism/fixtures/seattlerb/if_symbol.txt
new file mode 100644
index 0000000000..8d6e958ede
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/if_symbol.txt
@@ -0,0 +1 @@
+if f :x; end
diff --git a/test/prism/fixtures/seattlerb/in_expr_no_case.txt b/test/prism/fixtures/seattlerb/in_expr_no_case.txt
new file mode 100644
index 0000000000..40db7f868b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/in_expr_no_case.txt
@@ -0,0 +1 @@
+'woot' in String
diff --git a/test/prism/fixtures/seattlerb/index_0.txt b/test/prism/fixtures/seattlerb/index_0.txt
new file mode 100644
index 0000000000..050d4566ba
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/index_0.txt
@@ -0,0 +1 @@
+a[] = b
diff --git a/test/prism/fixtures/seattlerb/index_0_opasgn.txt b/test/prism/fixtures/seattlerb/index_0_opasgn.txt
new file mode 100644
index 0000000000..7189f0c3ea
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/index_0_opasgn.txt
@@ -0,0 +1 @@
+a[] += b
diff --git a/test/prism/fixtures/seattlerb/integer_with_if_modifier.txt b/test/prism/fixtures/seattlerb/integer_with_if_modifier.txt
new file mode 100644
index 0000000000..bf2f621e92
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/integer_with_if_modifier.txt
@@ -0,0 +1 @@
+1_234if true
diff --git a/test/prism/fixtures/seattlerb/interpolated_symbol_array_line_breaks.txt b/test/prism/fixtures/seattlerb/interpolated_symbol_array_line_breaks.txt
new file mode 100644
index 0000000000..f4c7cb9662
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/interpolated_symbol_array_line_breaks.txt
@@ -0,0 +1,5 @@
+%I(
+a
+b
+)
+1
diff --git a/test/prism/fixtures/seattlerb/interpolated_word_array_line_breaks.txt b/test/prism/fixtures/seattlerb/interpolated_word_array_line_breaks.txt
new file mode 100644
index 0000000000..d52b4789cf
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/interpolated_word_array_line_breaks.txt
@@ -0,0 +1,5 @@
+%W(
+a
+b
+)
+1
diff --git a/test/prism/fixtures/seattlerb/iter_args_1.txt b/test/prism/fixtures/seattlerb/iter_args_1.txt
new file mode 100644
index 0000000000..c890ef62c3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_1.txt
@@ -0,0 +1 @@
+f { |a,b| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_10_1.txt b/test/prism/fixtures/seattlerb/iter_args_10_1.txt
new file mode 100644
index 0000000000..3f558c5392
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_10_1.txt
@@ -0,0 +1 @@
+f { |a, b = 42, *c| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_10_2.txt b/test/prism/fixtures/seattlerb/iter_args_10_2.txt
new file mode 100644
index 0000000000..4158e79d14
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_10_2.txt
@@ -0,0 +1 @@
+f { |a, b = 42, *c, &d| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_11_1.txt b/test/prism/fixtures/seattlerb/iter_args_11_1.txt
new file mode 100644
index 0000000000..f86175c1a0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_11_1.txt
@@ -0,0 +1 @@
+f { |a, b = 42, *c, d| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_11_2.txt b/test/prism/fixtures/seattlerb/iter_args_11_2.txt
new file mode 100644
index 0000000000..e4b017e44a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_11_2.txt
@@ -0,0 +1 @@
+f { |a, b = 42, *c, d, &e| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_2__19.txt b/test/prism/fixtures/seattlerb/iter_args_2__19.txt
new file mode 100644
index 0000000000..84dd744243
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_2__19.txt
@@ -0,0 +1 @@
+f { |(a, b)| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_3.txt b/test/prism/fixtures/seattlerb/iter_args_3.txt
new file mode 100644
index 0000000000..261968ff13
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_3.txt
@@ -0,0 +1 @@
+f { |a, (b, c), d| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_4.txt b/test/prism/fixtures/seattlerb/iter_args_4.txt
new file mode 100644
index 0000000000..7db4d43ad3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_4.txt
@@ -0,0 +1 @@
+f { |a, *b, c| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_5.txt b/test/prism/fixtures/seattlerb/iter_args_5.txt
new file mode 100644
index 0000000000..088fcdfcc5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_5.txt
@@ -0,0 +1 @@
+f { |a, &b| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_6.txt b/test/prism/fixtures/seattlerb/iter_args_6.txt
new file mode 100644
index 0000000000..e980ec064b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_6.txt
@@ -0,0 +1 @@
+f { |a, b=42, c| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_7_1.txt b/test/prism/fixtures/seattlerb/iter_args_7_1.txt
new file mode 100644
index 0000000000..e1dbf4b312
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_7_1.txt
@@ -0,0 +1 @@
+f { |a = 42, *b| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_7_2.txt b/test/prism/fixtures/seattlerb/iter_args_7_2.txt
new file mode 100644
index 0000000000..e46e78e00e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_7_2.txt
@@ -0,0 +1 @@
+f { |a = 42, *b, &c| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_8_1.txt b/test/prism/fixtures/seattlerb/iter_args_8_1.txt
new file mode 100644
index 0000000000..a0ec82ea5b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_8_1.txt
@@ -0,0 +1 @@
+f { |a = 42, *b, c| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_8_2.txt b/test/prism/fixtures/seattlerb/iter_args_8_2.txt
new file mode 100644
index 0000000000..a1839fe706
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_8_2.txt
@@ -0,0 +1 @@
+f { |a = 42, *b, c, &d| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_9_1.txt b/test/prism/fixtures/seattlerb/iter_args_9_1.txt
new file mode 100644
index 0000000000..13e5b20fe7
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_9_1.txt
@@ -0,0 +1 @@
+f { |a = 42, b| }
diff --git a/test/prism/fixtures/seattlerb/iter_args_9_2.txt b/test/prism/fixtures/seattlerb/iter_args_9_2.txt
new file mode 100644
index 0000000000..83f6e1e029
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_args_9_2.txt
@@ -0,0 +1 @@
+f { |a = 42, b, &c| }
diff --git a/test/prism/fixtures/seattlerb/iter_kwarg.txt b/test/prism/fixtures/seattlerb/iter_kwarg.txt
new file mode 100644
index 0000000000..d4296cad76
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_kwarg.txt
@@ -0,0 +1 @@
+a { |b: 1| }
diff --git a/test/prism/fixtures/seattlerb/iter_kwarg_kwsplat.txt b/test/prism/fixtures/seattlerb/iter_kwarg_kwsplat.txt
new file mode 100644
index 0000000000..dd0ea13a6f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/iter_kwarg_kwsplat.txt
@@ -0,0 +1 @@
+a { |b: 1, **c| }
diff --git a/test/prism/fixtures/seattlerb/label_vs_string.txt b/test/prism/fixtures/seattlerb/label_vs_string.txt
new file mode 100644
index 0000000000..27ba8b64de
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/label_vs_string.txt
@@ -0,0 +1,2 @@
+_buf << ':
+'
diff --git a/test/prism/fixtures/seattlerb/lambda_do_vs_brace.txt b/test/prism/fixtures/seattlerb/lambda_do_vs_brace.txt
new file mode 100644
index 0000000000..bbf663a46a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lambda_do_vs_brace.txt
@@ -0,0 +1,7 @@
+f -> do end
+
+f -> {}
+
+f ->() do end
+
+f ->() {}
diff --git a/test/prism/fixtures/seattlerb/lasgn_arg_rescue_arg.txt b/test/prism/fixtures/seattlerb/lasgn_arg_rescue_arg.txt
new file mode 100644
index 0000000000..0dad496c28
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_arg_rescue_arg.txt
@@ -0,0 +1 @@
+a = 1 rescue 2
diff --git a/test/prism/fixtures/seattlerb/lasgn_call_bracket_rescue_arg.txt b/test/prism/fixtures/seattlerb/lasgn_call_bracket_rescue_arg.txt
new file mode 100644
index 0000000000..3f63c0b748
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_call_bracket_rescue_arg.txt
@@ -0,0 +1 @@
+a = b(1) rescue 2
diff --git a/test/prism/fixtures/seattlerb/lasgn_call_nobracket_rescue_arg.txt b/test/prism/fixtures/seattlerb/lasgn_call_nobracket_rescue_arg.txt
new file mode 100644
index 0000000000..0e86f1587d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_call_nobracket_rescue_arg.txt
@@ -0,0 +1 @@
+a = b 1 rescue 2
diff --git a/test/prism/fixtures/seattlerb/lasgn_command.txt b/test/prism/fixtures/seattlerb/lasgn_command.txt
new file mode 100644
index 0000000000..aca35b880c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_command.txt
@@ -0,0 +1 @@
+a = b.c 1
diff --git a/test/prism/fixtures/seattlerb/lasgn_env.txt b/test/prism/fixtures/seattlerb/lasgn_env.txt
new file mode 100644
index 0000000000..aec10273e5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_env.txt
@@ -0,0 +1 @@
+a = 42
diff --git a/test/prism/fixtures/seattlerb/lasgn_ivar_env.txt b/test/prism/fixtures/seattlerb/lasgn_ivar_env.txt
new file mode 100644
index 0000000000..2fa8471c01
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_ivar_env.txt
@@ -0,0 +1 @@
+@a = 42
diff --git a/test/prism/fixtures/seattlerb/lasgn_lasgn_command_call.txt b/test/prism/fixtures/seattlerb/lasgn_lasgn_command_call.txt
new file mode 100644
index 0000000000..5147131852
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_lasgn_command_call.txt
@@ -0,0 +1 @@
+a = b = c 1
diff --git a/test/prism/fixtures/seattlerb/lasgn_middle_splat.txt b/test/prism/fixtures/seattlerb/lasgn_middle_splat.txt
new file mode 100644
index 0000000000..bb378ca680
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/lasgn_middle_splat.txt
@@ -0,0 +1 @@
+a = b, *c, d
diff --git a/test/prism/fixtures/seattlerb/magic_encoding_comment.txt b/test/prism/fixtures/seattlerb/magic_encoding_comment.txt
new file mode 100644
index 0000000000..a02711ea05
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/magic_encoding_comment.txt
@@ -0,0 +1,4 @@
+# encoding: utf-8
+class ExampleUTF8ClassNameVarietà; def self.è; così = :però; end
+end
+
diff --git a/test/prism/fixtures/seattlerb/masgn_anon_splat_arg.txt b/test/prism/fixtures/seattlerb/masgn_anon_splat_arg.txt
new file mode 100644
index 0000000000..b796a742ed
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_anon_splat_arg.txt
@@ -0,0 +1 @@
+*, a = b
diff --git a/test/prism/fixtures/seattlerb/masgn_arg_colon_arg.txt b/test/prism/fixtures/seattlerb/masgn_arg_colon_arg.txt
new file mode 100644
index 0000000000..e0919793d4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_arg_colon_arg.txt
@@ -0,0 +1 @@
+a, b::c = d
diff --git a/test/prism/fixtures/seattlerb/masgn_arg_ident.txt b/test/prism/fixtures/seattlerb/masgn_arg_ident.txt
new file mode 100644
index 0000000000..45f248d854
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_arg_ident.txt
@@ -0,0 +1 @@
+a, b.C = d
diff --git a/test/prism/fixtures/seattlerb/masgn_arg_splat_arg.txt b/test/prism/fixtures/seattlerb/masgn_arg_splat_arg.txt
new file mode 100644
index 0000000000..05fe7c4d5f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_arg_splat_arg.txt
@@ -0,0 +1 @@
+a, *b, c = d
diff --git a/test/prism/fixtures/seattlerb/masgn_colon2.txt b/test/prism/fixtures/seattlerb/masgn_colon2.txt
new file mode 100644
index 0000000000..4e4f838d7d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_colon2.txt
@@ -0,0 +1 @@
+a, b::C = 1, 2
diff --git a/test/prism/fixtures/seattlerb/masgn_colon3.txt b/test/prism/fixtures/seattlerb/masgn_colon3.txt
new file mode 100644
index 0000000000..46098ba8c5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_colon3.txt
@@ -0,0 +1 @@
+::A, ::B = 1, 2
diff --git a/test/prism/fixtures/seattlerb/masgn_command_call.txt b/test/prism/fixtures/seattlerb/masgn_command_call.txt
new file mode 100644
index 0000000000..6da01e8a31
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_command_call.txt
@@ -0,0 +1 @@
+a, = b.c 1
diff --git a/test/prism/fixtures/seattlerb/masgn_double_paren.txt b/test/prism/fixtures/seattlerb/masgn_double_paren.txt
new file mode 100644
index 0000000000..ffac0a85a3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_double_paren.txt
@@ -0,0 +1 @@
+((a,b))=c
diff --git a/test/prism/fixtures/seattlerb/masgn_lhs_splat.txt b/test/prism/fixtures/seattlerb/masgn_lhs_splat.txt
new file mode 100644
index 0000000000..2419ef1671
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_lhs_splat.txt
@@ -0,0 +1 @@
+*a = 1, 2, 3
diff --git a/test/prism/fixtures/seattlerb/masgn_paren.txt b/test/prism/fixtures/seattlerb/masgn_paren.txt
new file mode 100644
index 0000000000..3889b9ff48
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_paren.txt
@@ -0,0 +1 @@
+(a, b) = c.d
diff --git a/test/prism/fixtures/seattlerb/masgn_splat_arg.txt b/test/prism/fixtures/seattlerb/masgn_splat_arg.txt
new file mode 100644
index 0000000000..a7c91425b0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_splat_arg.txt
@@ -0,0 +1 @@
+*a, b = c
diff --git a/test/prism/fixtures/seattlerb/masgn_splat_arg_arg.txt b/test/prism/fixtures/seattlerb/masgn_splat_arg_arg.txt
new file mode 100644
index 0000000000..46196bd703
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_splat_arg_arg.txt
@@ -0,0 +1 @@
+*a, b, c = d
diff --git a/test/prism/fixtures/seattlerb/masgn_star.txt b/test/prism/fixtures/seattlerb/masgn_star.txt
new file mode 100644
index 0000000000..c5eea37de2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_star.txt
@@ -0,0 +1 @@
+* = 1
diff --git a/test/prism/fixtures/seattlerb/masgn_var_star_var.txt b/test/prism/fixtures/seattlerb/masgn_var_star_var.txt
new file mode 100644
index 0000000000..04089c36ac
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/masgn_var_star_var.txt
@@ -0,0 +1 @@
+a, *, b = c
diff --git a/test/prism/fixtures/seattlerb/messy_op_asgn_lineno.txt b/test/prism/fixtures/seattlerb/messy_op_asgn_lineno.txt
new file mode 100644
index 0000000000..a7d1035ae3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/messy_op_asgn_lineno.txt
@@ -0,0 +1 @@
+a (B::C *= d e)
diff --git a/test/prism/fixtures/seattlerb/method_call_assoc_trailing_comma.txt b/test/prism/fixtures/seattlerb/method_call_assoc_trailing_comma.txt
new file mode 100644
index 0000000000..86f0fbdfc9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/method_call_assoc_trailing_comma.txt
@@ -0,0 +1 @@
+a.f(1=>2,)
diff --git a/test/prism/fixtures/seattlerb/method_call_trailing_comma.txt b/test/prism/fixtures/seattlerb/method_call_trailing_comma.txt
new file mode 100644
index 0000000000..1a155fba12
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/method_call_trailing_comma.txt
@@ -0,0 +1 @@
+a.f(1,)
diff --git a/test/prism/fixtures/seattlerb/mlhs_back_anonsplat.txt b/test/prism/fixtures/seattlerb/mlhs_back_anonsplat.txt
new file mode 100644
index 0000000000..7389b95563
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_back_anonsplat.txt
@@ -0,0 +1 @@
+a, b, c, * = f
diff --git a/test/prism/fixtures/seattlerb/mlhs_back_splat.txt b/test/prism/fixtures/seattlerb/mlhs_back_splat.txt
new file mode 100644
index 0000000000..ec5d23889a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_back_splat.txt
@@ -0,0 +1 @@
+a, b, c, *s = f
diff --git a/test/prism/fixtures/seattlerb/mlhs_front_anonsplat.txt b/test/prism/fixtures/seattlerb/mlhs_front_anonsplat.txt
new file mode 100644
index 0000000000..67e569438c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_front_anonsplat.txt
@@ -0,0 +1 @@
+*, x, y, z = f
diff --git a/test/prism/fixtures/seattlerb/mlhs_front_splat.txt b/test/prism/fixtures/seattlerb/mlhs_front_splat.txt
new file mode 100644
index 0000000000..dabadc382d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_front_splat.txt
@@ -0,0 +1 @@
+*s, x, y, z = f
diff --git a/test/prism/fixtures/seattlerb/mlhs_keyword.txt b/test/prism/fixtures/seattlerb/mlhs_keyword.txt
new file mode 100644
index 0000000000..899e7f8ed3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_keyword.txt
@@ -0,0 +1 @@
+a.!=(true, true)
diff --git a/test/prism/fixtures/seattlerb/mlhs_mid_anonsplat.txt b/test/prism/fixtures/seattlerb/mlhs_mid_anonsplat.txt
new file mode 100644
index 0000000000..a70a7e531b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_mid_anonsplat.txt
@@ -0,0 +1 @@
+a, b, c, *, x, y, z = f
diff --git a/test/prism/fixtures/seattlerb/mlhs_mid_splat.txt b/test/prism/fixtures/seattlerb/mlhs_mid_splat.txt
new file mode 100644
index 0000000000..2d23fd3966
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_mid_splat.txt
@@ -0,0 +1 @@
+a, b, c, *s, x, y, z = f
diff --git a/test/prism/fixtures/seattlerb/mlhs_rescue.txt b/test/prism/fixtures/seattlerb/mlhs_rescue.txt
new file mode 100644
index 0000000000..b4c79ae32e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/mlhs_rescue.txt
@@ -0,0 +1 @@
+a, b = f rescue 42
diff --git a/test/prism/fixtures/seattlerb/module_comments.txt b/test/prism/fixtures/seattlerb/module_comments.txt
new file mode 100644
index 0000000000..cecb717c5b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/module_comments.txt
@@ -0,0 +1,10 @@
+# blah 1
+
+ # blah 2
+
+module X
+ # blah 3
+ def blah
+ # blah 4
+ end
+end
diff --git a/test/prism/fixtures/seattlerb/multiline_hash_declaration.txt b/test/prism/fixtures/seattlerb/multiline_hash_declaration.txt
new file mode 100644
index 0000000000..21530307d2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/multiline_hash_declaration.txt
@@ -0,0 +1,8 @@
+f(state:
+ {
+})
+
+f(state: {
+})
+
+f(state: {})
diff --git a/test/prism/fixtures/seattlerb/non_interpolated_symbol_array_line_breaks.txt b/test/prism/fixtures/seattlerb/non_interpolated_symbol_array_line_breaks.txt
new file mode 100644
index 0000000000..1e14673f4e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/non_interpolated_symbol_array_line_breaks.txt
@@ -0,0 +1,5 @@
+%i(
+a
+b
+)
+1
diff --git a/test/prism/fixtures/seattlerb/non_interpolated_word_array_line_breaks.txt b/test/prism/fixtures/seattlerb/non_interpolated_word_array_line_breaks.txt
new file mode 100644
index 0000000000..79c1418770
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/non_interpolated_word_array_line_breaks.txt
@@ -0,0 +1,5 @@
+%w(
+a
+b
+)
+1
diff --git a/test/prism/fixtures/seattlerb/op_asgn_command_call.txt b/test/prism/fixtures/seattlerb/op_asgn_command_call.txt
new file mode 100644
index 0000000000..92c989cb0d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/op_asgn_command_call.txt
@@ -0,0 +1 @@
+a ||= b.c 2
diff --git a/test/prism/fixtures/seattlerb/op_asgn_dot_ident_command_call.txt b/test/prism/fixtures/seattlerb/op_asgn_dot_ident_command_call.txt
new file mode 100644
index 0000000000..89cfccda66
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/op_asgn_dot_ident_command_call.txt
@@ -0,0 +1 @@
+A.B ||= c 1
diff --git a/test/prism/fixtures/seattlerb/op_asgn_index_command_call.txt b/test/prism/fixtures/seattlerb/op_asgn_index_command_call.txt
new file mode 100644
index 0000000000..2bfced81fe
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/op_asgn_index_command_call.txt
@@ -0,0 +1 @@
+a[:b] ||= c 1, 2
diff --git a/test/prism/fixtures/seattlerb/op_asgn_primary_colon_const_command_call.txt b/test/prism/fixtures/seattlerb/op_asgn_primary_colon_const_command_call.txt
new file mode 100644
index 0000000000..a567f60e83
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/op_asgn_primary_colon_const_command_call.txt
@@ -0,0 +1 @@
+A::B *= c d
diff --git a/test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier1.txt b/test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier1.txt
new file mode 100644
index 0000000000..0784b49167
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier1.txt
@@ -0,0 +1 @@
+A::b += 1
diff --git a/test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier_command_call.txt b/test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier_command_call.txt
new file mode 100644
index 0000000000..c0f16eb3c1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/op_asgn_primary_colon_identifier_command_call.txt
@@ -0,0 +1 @@
+A::b *= c d
diff --git a/test/prism/fixtures/seattlerb/op_asgn_val_dot_ident_command_call.txt b/test/prism/fixtures/seattlerb/op_asgn_val_dot_ident_command_call.txt
new file mode 100644
index 0000000000..69057abf04
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/op_asgn_val_dot_ident_command_call.txt
@@ -0,0 +1 @@
+a.b ||= c 1
diff --git a/test/prism/fixtures/seattlerb/parse_def_special_name.txt b/test/prism/fixtures/seattlerb/parse_def_special_name.txt
new file mode 100644
index 0000000000..8d7d06c688
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_def_special_name.txt
@@ -0,0 +1 @@
+def next; end
diff --git a/test/prism/fixtures/seattlerb/parse_if_not_canonical.txt b/test/prism/fixtures/seattlerb/parse_if_not_canonical.txt
new file mode 100644
index 0000000000..1fd9bb7327
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_if_not_canonical.txt
@@ -0,0 +1,2 @@
+if not var.nil? then 'foo' else 'bar'
+end
diff --git a/test/prism/fixtures/seattlerb/parse_if_not_noncanonical.txt b/test/prism/fixtures/seattlerb/parse_if_not_noncanonical.txt
new file mode 100644
index 0000000000..1fd9bb7327
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_if_not_noncanonical.txt
@@ -0,0 +1,2 @@
+if not var.nil? then 'foo' else 'bar'
+end
diff --git a/test/prism/fixtures/seattlerb/parse_line_block.txt b/test/prism/fixtures/seattlerb/parse_line_block.txt
new file mode 100644
index 0000000000..21664649db
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_block.txt
@@ -0,0 +1,2 @@
+a = 42
+p a
diff --git a/test/prism/fixtures/seattlerb/parse_line_block_inline_comment.txt b/test/prism/fixtures/seattlerb/parse_line_block_inline_comment.txt
new file mode 100644
index 0000000000..f55ced714f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_block_inline_comment.txt
@@ -0,0 +1,3 @@
+a
+b # comment
+c
diff --git a/test/prism/fixtures/seattlerb/parse_line_block_inline_comment_leading_newlines.txt b/test/prism/fixtures/seattlerb/parse_line_block_inline_comment_leading_newlines.txt
new file mode 100644
index 0000000000..6f1fee62a0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_block_inline_comment_leading_newlines.txt
@@ -0,0 +1,7 @@
+
+
+
+a
+b # comment
+# another comment
+c
diff --git a/test/prism/fixtures/seattlerb/parse_line_block_inline_multiline_comment.txt b/test/prism/fixtures/seattlerb/parse_line_block_inline_multiline_comment.txt
new file mode 100644
index 0000000000..b00de34dc0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_block_inline_multiline_comment.txt
@@ -0,0 +1,4 @@
+a
+b # comment
+# another comment
+c
diff --git a/test/prism/fixtures/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt b/test/prism/fixtures/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt
new file mode 100644
index 0000000000..73785eb794
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt
@@ -0,0 +1,2 @@
+a @b
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_call_ivar_line_break_paren.txt b/test/prism/fixtures/seattlerb/parse_line_call_ivar_line_break_paren.txt
new file mode 100644
index 0000000000..6f136e6d6f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_call_ivar_line_break_paren.txt
@@ -0,0 +1,2 @@
+a(@b
+)
diff --git a/test/prism/fixtures/seattlerb/parse_line_call_no_args.txt b/test/prism/fixtures/seattlerb/parse_line_call_no_args.txt
new file mode 100644
index 0000000000..7900afd4b8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_call_no_args.txt
@@ -0,0 +1,3 @@
+f do |x, y|
+ x + y
+end
diff --git a/test/prism/fixtures/seattlerb/parse_line_defn_complex.txt b/test/prism/fixtures/seattlerb/parse_line_defn_complex.txt
new file mode 100644
index 0000000000..244a8e862b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_defn_complex.txt
@@ -0,0 +1,5 @@
+def x(y)
+ p(y)
+ y *= 2
+ return y;
+end
diff --git a/test/prism/fixtures/seattlerb/parse_line_defn_no_parens.txt b/test/prism/fixtures/seattlerb/parse_line_defn_no_parens.txt
new file mode 100644
index 0000000000..373ca7fbec
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_defn_no_parens.txt
@@ -0,0 +1,6 @@
+def f
+
+end
+
+def f
+end
diff --git a/test/prism/fixtures/seattlerb/parse_line_defn_no_parens_args.txt b/test/prism/fixtures/seattlerb/parse_line_defn_no_parens_args.txt
new file mode 100644
index 0000000000..10f004a149
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_defn_no_parens_args.txt
@@ -0,0 +1,2 @@
+def f a
+end
diff --git a/test/prism/fixtures/seattlerb/parse_line_dot2.txt b/test/prism/fixtures/seattlerb/parse_line_dot2.txt
new file mode 100644
index 0000000000..61c7554221
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_dot2.txt
@@ -0,0 +1,5 @@
+0..
+4
+a..
+b
+c
diff --git a/test/prism/fixtures/seattlerb/parse_line_dot2_open.txt b/test/prism/fixtures/seattlerb/parse_line_dot2_open.txt
new file mode 100644
index 0000000000..b3e1e5aaf9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_dot2_open.txt
@@ -0,0 +1,3 @@
+0..
+; a..
+; c
diff --git a/test/prism/fixtures/seattlerb/parse_line_dot3.txt b/test/prism/fixtures/seattlerb/parse_line_dot3.txt
new file mode 100644
index 0000000000..d1866b41de
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_dot3.txt
@@ -0,0 +1,5 @@
+0...
+4
+a...
+b
+c
diff --git a/test/prism/fixtures/seattlerb/parse_line_dot3_open.txt b/test/prism/fixtures/seattlerb/parse_line_dot3_open.txt
new file mode 100644
index 0000000000..38e7634b21
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_dot3_open.txt
@@ -0,0 +1,3 @@
+0...
+; a...
+; c
diff --git a/test/prism/fixtures/seattlerb/parse_line_dstr_escaped_newline.txt b/test/prism/fixtures/seattlerb/parse_line_dstr_escaped_newline.txt
new file mode 100644
index 0000000000..29c1754915
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_dstr_escaped_newline.txt
@@ -0,0 +1,3 @@
+"a\n#{
+}"
+true
diff --git a/test/prism/fixtures/seattlerb/parse_line_dstr_soft_newline.txt b/test/prism/fixtures/seattlerb/parse_line_dstr_soft_newline.txt
new file mode 100644
index 0000000000..e4dbd7bcb2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_dstr_soft_newline.txt
@@ -0,0 +1,4 @@
+"a
+#{
+}"
+true
diff --git a/test/prism/fixtures/seattlerb/parse_line_evstr_after_break.txt b/test/prism/fixtures/seattlerb/parse_line_evstr_after_break.txt
new file mode 100644
index 0000000000..c1d91a51c4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_evstr_after_break.txt
@@ -0,0 +1,2 @@
+"a"\
+"#{b}"
diff --git a/test/prism/fixtures/seattlerb/parse_line_hash_lit.txt b/test/prism/fixtures/seattlerb/parse_line_hash_lit.txt
new file mode 100644
index 0000000000..25f8c90a06
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_hash_lit.txt
@@ -0,0 +1,3 @@
+{
+:s1 => 1,
+}
diff --git a/test/prism/fixtures/seattlerb/parse_line_heredoc.txt b/test/prism/fixtures/seattlerb/parse_line_heredoc.txt
new file mode 100644
index 0000000000..201339534c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_heredoc.txt
@@ -0,0 +1,5 @@
+ string = <<-HEREDOC.strip
+ very long string
+ HEREDOC
+ puts string
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_heredoc_evstr.txt b/test/prism/fixtures/seattlerb/parse_line_heredoc_evstr.txt
new file mode 100644
index 0000000000..d50844db4b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_heredoc_evstr.txt
@@ -0,0 +1,4 @@
+<<-A
+a
+#{b}
+A
diff --git a/test/prism/fixtures/seattlerb/parse_line_heredoc_hardnewline.txt b/test/prism/fixtures/seattlerb/parse_line_heredoc_hardnewline.txt
new file mode 100644
index 0000000000..3fbf0f2c26
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_heredoc_hardnewline.txt
@@ -0,0 +1,7 @@
+<<-EOFOO
+\n\n\n\n\n\n\n\n\n
+EOFOO
+
+class Foo
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_heredoc_regexp_chars.txt b/test/prism/fixtures/seattlerb/parse_line_heredoc_regexp_chars.txt
new file mode 100644
index 0000000000..5dab9cf4e7
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_heredoc_regexp_chars.txt
@@ -0,0 +1,5 @@
+ string = <<-"^D"
+ very long string
+ ^D
+ puts string
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_iter_call_no_parens.txt b/test/prism/fixtures/seattlerb/parse_line_iter_call_no_parens.txt
new file mode 100644
index 0000000000..bf1b33c8a2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_iter_call_no_parens.txt
@@ -0,0 +1,3 @@
+f a do |x, y|
+ x + y
+end
diff --git a/test/prism/fixtures/seattlerb/parse_line_iter_call_parens.txt b/test/prism/fixtures/seattlerb/parse_line_iter_call_parens.txt
new file mode 100644
index 0000000000..25e9ea1c67
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_iter_call_parens.txt
@@ -0,0 +1,3 @@
+f(a) do |x, y|
+ x + y
+end
diff --git a/test/prism/fixtures/seattlerb/parse_line_multiline_str.txt b/test/prism/fixtures/seattlerb/parse_line_multiline_str.txt
new file mode 100644
index 0000000000..cdefb3c9b7
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_multiline_str.txt
@@ -0,0 +1,3 @@
+"a
+b"
+1
diff --git a/test/prism/fixtures/seattlerb/parse_line_multiline_str_literal_n.txt b/test/prism/fixtures/seattlerb/parse_line_multiline_str_literal_n.txt
new file mode 100644
index 0000000000..a179ba8c9c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_multiline_str_literal_n.txt
@@ -0,0 +1,2 @@
+"a\nb"
+1
diff --git a/test/prism/fixtures/seattlerb/parse_line_newlines.txt b/test/prism/fixtures/seattlerb/parse_line_newlines.txt
new file mode 100644
index 0000000000..28b0c286e8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_newlines.txt
@@ -0,0 +1,3 @@
+true
+
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_op_asgn.txt b/test/prism/fixtures/seattlerb/parse_line_op_asgn.txt
new file mode 100644
index 0000000000..f2691c2ce4
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_op_asgn.txt
@@ -0,0 +1,4 @@
+ foo +=
+ bar
+ baz
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_postexe.txt b/test/prism/fixtures/seattlerb/parse_line_postexe.txt
new file mode 100644
index 0000000000..fd8b318d19
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_postexe.txt
@@ -0,0 +1,3 @@
+END {
+foo
+}
diff --git a/test/prism/fixtures/seattlerb/parse_line_preexe.txt b/test/prism/fixtures/seattlerb/parse_line_preexe.txt
new file mode 100644
index 0000000000..b3eda77ebc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_preexe.txt
@@ -0,0 +1,3 @@
+BEGIN {
+foo
+}
diff --git a/test/prism/fixtures/seattlerb/parse_line_rescue.txt b/test/prism/fixtures/seattlerb/parse_line_rescue.txt
new file mode 100644
index 0000000000..a583160ce2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_rescue.txt
@@ -0,0 +1,8 @@
+begin
+ a
+rescue
+ b
+rescue
+ c
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_return.txt b/test/prism/fixtures/seattlerb/parse_line_return.txt
new file mode 100644
index 0000000000..81021c2644
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_return.txt
@@ -0,0 +1,6 @@
+ def blah
+ if true then
+ return 42
+ end
+ end
+
diff --git a/test/prism/fixtures/seattlerb/parse_line_str_with_newline_escape.txt b/test/prism/fixtures/seattlerb/parse_line_str_with_newline_escape.txt
new file mode 100644
index 0000000000..b2b6bb8234
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_str_with_newline_escape.txt
@@ -0,0 +1 @@
+a("\n", true)
diff --git a/test/prism/fixtures/seattlerb/parse_line_to_ary.txt b/test/prism/fixtures/seattlerb/parse_line_to_ary.txt
new file mode 100644
index 0000000000..590d0abd14
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_to_ary.txt
@@ -0,0 +1,3 @@
+a,
+b = c
+d
diff --git a/test/prism/fixtures/seattlerb/parse_line_trailing_newlines.txt b/test/prism/fixtures/seattlerb/parse_line_trailing_newlines.txt
new file mode 100644
index 0000000000..afa826fb50
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_line_trailing_newlines.txt
@@ -0,0 +1,2 @@
+a
+b
diff --git a/test/prism/fixtures/seattlerb/parse_opt_call_args_assocs_comma.txt b/test/prism/fixtures/seattlerb/parse_opt_call_args_assocs_comma.txt
new file mode 100644
index 0000000000..649c109ea1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_opt_call_args_assocs_comma.txt
@@ -0,0 +1 @@
+1[2=>3,]
diff --git a/test/prism/fixtures/seattlerb/parse_opt_call_args_lit_comma.txt b/test/prism/fixtures/seattlerb/parse_opt_call_args_lit_comma.txt
new file mode 100644
index 0000000000..741cd4ffd1
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_opt_call_args_lit_comma.txt
@@ -0,0 +1 @@
+1[2,]
diff --git a/test/prism/fixtures/seattlerb/parse_pattern_019.txt b/test/prism/fixtures/seattlerb/parse_pattern_019.txt
new file mode 100644
index 0000000000..1e8a75902d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_pattern_019.txt
@@ -0,0 +1,5 @@
+case 0
+in -1..1
+ true
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_pattern_044.txt b/test/prism/fixtures/seattlerb/parse_pattern_044.txt
new file mode 100644
index 0000000000..a6a0ac6c1c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_pattern_044.txt
@@ -0,0 +1,5 @@
+case obj
+in Object[]
+ true
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_pattern_051.txt b/test/prism/fixtures/seattlerb/parse_pattern_051.txt
new file mode 100644
index 0000000000..b7cf769f50
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_pattern_051.txt
@@ -0,0 +1,5 @@
+case [0, 1, 2]
+in [0, 1,]
+ true
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_pattern_058.txt b/test/prism/fixtures/seattlerb/parse_pattern_058.txt
new file mode 100644
index 0000000000..bd7537098e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_pattern_058.txt
@@ -0,0 +1,5 @@
+case {a: 0}
+in {a:, **rest}
+ [a, rest]
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_pattern_058_2.txt b/test/prism/fixtures/seattlerb/parse_pattern_058_2.txt
new file mode 100644
index 0000000000..eb1b3cd8ab
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_pattern_058_2.txt
@@ -0,0 +1,5 @@
+case {a: 0}
+in {a:, **}
+ [a]
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_pattern_069.txt b/test/prism/fixtures/seattlerb/parse_pattern_069.txt
new file mode 100644
index 0000000000..f43dff8959
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_pattern_069.txt
@@ -0,0 +1,5 @@
+case :a
+in Object[b: 1]
+ 1
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_pattern_076.txt b/test/prism/fixtures/seattlerb/parse_pattern_076.txt
new file mode 100644
index 0000000000..bb947605b3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_pattern_076.txt
@@ -0,0 +1,5 @@
+case {a: 1}
+in {a: 1, **nil}
+ true
+end
+
diff --git a/test/prism/fixtures/seattlerb/parse_until_not_canonical.txt b/test/prism/fixtures/seattlerb/parse_until_not_canonical.txt
new file mode 100644
index 0000000000..4de38968dc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_until_not_canonical.txt
@@ -0,0 +1,3 @@
+until not var.nil?
+ 'foo'
+end
diff --git a/test/prism/fixtures/seattlerb/parse_until_not_noncanonical.txt b/test/prism/fixtures/seattlerb/parse_until_not_noncanonical.txt
new file mode 100644
index 0000000000..4de38968dc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_until_not_noncanonical.txt
@@ -0,0 +1,3 @@
+until not var.nil?
+ 'foo'
+end
diff --git a/test/prism/fixtures/seattlerb/parse_while_not_canonical.txt b/test/prism/fixtures/seattlerb/parse_while_not_canonical.txt
new file mode 100644
index 0000000000..5aa464167f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_while_not_canonical.txt
@@ -0,0 +1,3 @@
+while not var.nil?
+ 'foo'
+end
diff --git a/test/prism/fixtures/seattlerb/parse_while_not_noncanonical.txt b/test/prism/fixtures/seattlerb/parse_while_not_noncanonical.txt
new file mode 100644
index 0000000000..5aa464167f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/parse_while_not_noncanonical.txt
@@ -0,0 +1,3 @@
+while not var.nil?
+ 'foo'
+end
diff --git a/test/prism/fixtures/seattlerb/pctW_lineno.txt b/test/prism/fixtures/seattlerb/pctW_lineno.txt
new file mode 100644
index 0000000000..b222ff0174
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/pctW_lineno.txt
@@ -0,0 +1,5 @@
+%W(a\nb
+c d
+e\
+f
+gy h\y i\y)
diff --git a/test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt b/test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt
new file mode 100644
index 0000000000..4420560d2b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/pct_Q_backslash_nl.txt
@@ -0,0 +1,2 @@
+%q{ \
+}
diff --git a/test/prism/fixtures/seattlerb/pct_nl.txt b/test/prism/fixtures/seattlerb/pct_nl.txt
new file mode 100644
index 0000000000..2cee1cdd44
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/pct_nl.txt
@@ -0,0 +1,3 @@
+x = %
+
+
diff --git a/test/prism/fixtures/seattlerb/pct_w_heredoc_interp_nested.txt b/test/prism/fixtures/seattlerb/pct_w_heredoc_interp_nested.txt
new file mode 100644
index 0000000000..4e084661bf
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/pct_w_heredoc_interp_nested.txt
@@ -0,0 +1,4 @@
+%W( 1 #{<<A} 3
+2
+A
+ 4 5 )
diff --git a/test/prism/fixtures/seattlerb/pipe_semicolon.txt b/test/prism/fixtures/seattlerb/pipe_semicolon.txt
new file mode 100644
index 0000000000..e692cc434f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/pipe_semicolon.txt
@@ -0,0 +1 @@
+a.b do | ; c | end
diff --git a/test/prism/fixtures/seattlerb/pipe_space.txt b/test/prism/fixtures/seattlerb/pipe_space.txt
new file mode 100644
index 0000000000..7f0df799b9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/pipe_space.txt
@@ -0,0 +1 @@
+a.b do | | end
diff --git a/test/prism/fixtures/seattlerb/qWords_space.txt b/test/prism/fixtures/seattlerb/qWords_space.txt
new file mode 100644
index 0000000000..a8299ba3f8
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qWords_space.txt
@@ -0,0 +1 @@
+%W( )
diff --git a/test/prism/fixtures/seattlerb/qsymbols.txt b/test/prism/fixtures/seattlerb/qsymbols.txt
new file mode 100644
index 0000000000..cb9ff09ae0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qsymbols.txt
@@ -0,0 +1 @@
+%I(a b c)
diff --git a/test/prism/fixtures/seattlerb/qsymbols_empty.txt b/test/prism/fixtures/seattlerb/qsymbols_empty.txt
new file mode 100644
index 0000000000..10a3279907
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qsymbols_empty.txt
@@ -0,0 +1 @@
+%I()
diff --git a/test/prism/fixtures/seattlerb/qsymbols_empty_space.txt b/test/prism/fixtures/seattlerb/qsymbols_empty_space.txt
new file mode 100644
index 0000000000..819f16ad06
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qsymbols_empty_space.txt
@@ -0,0 +1 @@
+%I( )
diff --git a/test/prism/fixtures/seattlerb/qsymbols_interp.txt b/test/prism/fixtures/seattlerb/qsymbols_interp.txt
new file mode 100644
index 0000000000..2f34883867
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qsymbols_interp.txt
@@ -0,0 +1 @@
+%I(a b#{1+1} c)
diff --git a/test/prism/fixtures/seattlerb/quoted_symbol_hash_arg.txt b/test/prism/fixtures/seattlerb/quoted_symbol_hash_arg.txt
new file mode 100644
index 0000000000..4f1295ef18
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/quoted_symbol_hash_arg.txt
@@ -0,0 +1 @@
+puts 'a': {}
diff --git a/test/prism/fixtures/seattlerb/quoted_symbol_keys.txt b/test/prism/fixtures/seattlerb/quoted_symbol_keys.txt
new file mode 100644
index 0000000000..c6a946723d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/quoted_symbol_keys.txt
@@ -0,0 +1 @@
+{ 'a': :b }
diff --git a/test/prism/fixtures/seattlerb/qw_escape.txt b/test/prism/fixtures/seattlerb/qw_escape.txt
new file mode 100644
index 0000000000..a94a0e5dcb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qw_escape.txt
@@ -0,0 +1 @@
+%q(\')
diff --git a/test/prism/fixtures/seattlerb/qw_escape_term.txt b/test/prism/fixtures/seattlerb/qw_escape_term.txt
new file mode 100644
index 0000000000..9734fc3421
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qw_escape_term.txt
@@ -0,0 +1 @@
+%q|blah blah \| blah blah|
diff --git a/test/prism/fixtures/seattlerb/qwords_empty.txt b/test/prism/fixtures/seattlerb/qwords_empty.txt
new file mode 100644
index 0000000000..69cc6679d6
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/qwords_empty.txt
@@ -0,0 +1 @@
+%w()
diff --git a/test/prism/fixtures/seattlerb/read_escape_unicode_curlies.txt b/test/prism/fixtures/seattlerb/read_escape_unicode_curlies.txt
new file mode 100644
index 0000000000..427b94cc4d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/read_escape_unicode_curlies.txt
@@ -0,0 +1 @@
+?\u{00a0}
diff --git a/test/prism/fixtures/seattlerb/read_escape_unicode_h4.txt b/test/prism/fixtures/seattlerb/read_escape_unicode_h4.txt
new file mode 100644
index 0000000000..71aa7a4347
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/read_escape_unicode_h4.txt
@@ -0,0 +1 @@
+?\u00a0
diff --git a/test/prism/fixtures/seattlerb/regexp.txt b/test/prism/fixtures/seattlerb/regexp.txt
new file mode 100644
index 0000000000..bc06458c5c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/regexp.txt
@@ -0,0 +1,9 @@
+/wtf/
+
+/wtf/m
+
+/wtf/n
+
+/wtf/nm
+
+/wtf/nmnmnmnm
diff --git a/test/prism/fixtures/seattlerb/regexp_esc_C_slash.txt b/test/prism/fixtures/seattlerb/regexp_esc_C_slash.txt
new file mode 100644
index 0000000000..1fd9207c66
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/regexp_esc_C_slash.txt
@@ -0,0 +1 @@
+/\cC\d/
diff --git a/test/prism/fixtures/seattlerb/regexp_esc_u.txt b/test/prism/fixtures/seattlerb/regexp_esc_u.txt
new file mode 100644
index 0000000000..b91704fb0a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/regexp_esc_u.txt
@@ -0,0 +1 @@
+/[\u0021-\u0027]/
diff --git a/test/prism/fixtures/seattlerb/regexp_escape_extended.txt b/test/prism/fixtures/seattlerb/regexp_escape_extended.txt
new file mode 100644
index 0000000000..73dcbab69c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/regexp_escape_extended.txt
@@ -0,0 +1 @@
+/\“/
diff --git a/test/prism/fixtures/seattlerb/regexp_unicode_curlies.txt b/test/prism/fixtures/seattlerb/regexp_unicode_curlies.txt
new file mode 100644
index 0000000000..5a02bd92ca
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/regexp_unicode_curlies.txt
@@ -0,0 +1,3 @@
+/\u{c0de babe}/
+
+/\u{df}/
diff --git a/test/prism/fixtures/seattlerb/required_kwarg_no_value.txt b/test/prism/fixtures/seattlerb/required_kwarg_no_value.txt
new file mode 100644
index 0000000000..453bcbb33b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/required_kwarg_no_value.txt
@@ -0,0 +1,2 @@
+def x a:, b:
+end
diff --git a/test/prism/fixtures/seattlerb/rescue_do_end_ensure_result.txt b/test/prism/fixtures/seattlerb/rescue_do_end_ensure_result.txt
new file mode 100644
index 0000000000..7049be66c5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/rescue_do_end_ensure_result.txt
@@ -0,0 +1,5 @@
+proc do
+ :begin
+ensure
+ :ensure
+end.call
diff --git a/test/prism/fixtures/seattlerb/rescue_do_end_no_raise.txt b/test/prism/fixtures/seattlerb/rescue_do_end_no_raise.txt
new file mode 100644
index 0000000000..5f16ec2f15
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/rescue_do_end_no_raise.txt
@@ -0,0 +1,9 @@
+tap do
+ :begin
+rescue
+ :rescue
+else
+ :else
+ensure
+ :ensure
+end
diff --git a/test/prism/fixtures/seattlerb/rescue_do_end_raised.txt b/test/prism/fixtures/seattlerb/rescue_do_end_raised.txt
new file mode 100644
index 0000000000..d04215eb48
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/rescue_do_end_raised.txt
@@ -0,0 +1,5 @@
+tap do
+ raise
+ensure
+ :ensure
+end
diff --git a/test/prism/fixtures/seattlerb/rescue_do_end_rescued.txt b/test/prism/fixtures/seattlerb/rescue_do_end_rescued.txt
new file mode 100644
index 0000000000..4b377511f0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/rescue_do_end_rescued.txt
@@ -0,0 +1,9 @@
+tap do
+ raise
+rescue
+ :rescue
+else
+ :else
+ensure
+ :ensure
+end
diff --git a/test/prism/fixtures/seattlerb/rescue_in_block.txt b/test/prism/fixtures/seattlerb/rescue_in_block.txt
new file mode 100644
index 0000000000..c6e834aa1e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/rescue_in_block.txt
@@ -0,0 +1,4 @@
+blah do
+rescue
+ stuff
+end
diff --git a/test/prism/fixtures/seattlerb/rescue_parens.txt b/test/prism/fixtures/seattlerb/rescue_parens.txt
new file mode 100644
index 0000000000..f0eb4db417
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/rescue_parens.txt
@@ -0,0 +1 @@
+a (b rescue c)
diff --git a/test/prism/fixtures/seattlerb/return_call_assocs.txt b/test/prism/fixtures/seattlerb/return_call_assocs.txt
new file mode 100644
index 0000000000..34ea778f17
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/return_call_assocs.txt
@@ -0,0 +1,11 @@
+return 1, :z => 1
+
+return 1, :z => 1, :w => 2
+
+return y :z=>1
+
+return y z:1
+
+return y(z:1)
+
+return y(z=>1)
diff --git a/test/prism/fixtures/seattlerb/rhs_asgn.txt b/test/prism/fixtures/seattlerb/rhs_asgn.txt
new file mode 100644
index 0000000000..ca581031e2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/rhs_asgn.txt
@@ -0,0 +1 @@
+42 => n
diff --git a/test/prism/fixtures/seattlerb/ruby21_numbers.txt b/test/prism/fixtures/seattlerb/ruby21_numbers.txt
new file mode 100644
index 0000000000..34ceb63a0c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/ruby21_numbers.txt
@@ -0,0 +1 @@
+[1i, 2r, 3ri]
diff --git a/test/prism/fixtures/seattlerb/safe_attrasgn.txt b/test/prism/fixtures/seattlerb/safe_attrasgn.txt
new file mode 100644
index 0000000000..1279e02cfc
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_attrasgn.txt
@@ -0,0 +1 @@
+a&.b = 1
diff --git a/test/prism/fixtures/seattlerb/safe_attrasgn_constant.txt b/test/prism/fixtures/seattlerb/safe_attrasgn_constant.txt
new file mode 100644
index 0000000000..3a17ac6bcf
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_attrasgn_constant.txt
@@ -0,0 +1 @@
+a&.B = 1
diff --git a/test/prism/fixtures/seattlerb/safe_call.txt b/test/prism/fixtures/seattlerb/safe_call.txt
new file mode 100644
index 0000000000..8ecd27e0fe
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_call.txt
@@ -0,0 +1 @@
+a&.b
diff --git a/test/prism/fixtures/seattlerb/safe_call_after_newline.txt b/test/prism/fixtures/seattlerb/safe_call_after_newline.txt
new file mode 100644
index 0000000000..58e3fba554
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_call_after_newline.txt
@@ -0,0 +1,2 @@
+a
+&.b
diff --git a/test/prism/fixtures/seattlerb/safe_call_dot_parens.txt b/test/prism/fixtures/seattlerb/safe_call_dot_parens.txt
new file mode 100644
index 0000000000..5def076640
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_call_dot_parens.txt
@@ -0,0 +1 @@
+a&.()
diff --git a/test/prism/fixtures/seattlerb/safe_call_newline.txt b/test/prism/fixtures/seattlerb/safe_call_newline.txt
new file mode 100644
index 0000000000..8778b46585
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_call_newline.txt
@@ -0,0 +1,2 @@
+a&.b
+
diff --git a/test/prism/fixtures/seattlerb/safe_call_operator.txt b/test/prism/fixtures/seattlerb/safe_call_operator.txt
new file mode 100644
index 0000000000..f3fe2b0392
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_call_operator.txt
@@ -0,0 +1 @@
+a&.> 1
diff --git a/test/prism/fixtures/seattlerb/safe_call_rhs_newline.txt b/test/prism/fixtures/seattlerb/safe_call_rhs_newline.txt
new file mode 100644
index 0000000000..d3b07b77b2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_call_rhs_newline.txt
@@ -0,0 +1,2 @@
+c = a&.b
+
diff --git a/test/prism/fixtures/seattlerb/safe_calls.txt b/test/prism/fixtures/seattlerb/safe_calls.txt
new file mode 100644
index 0000000000..eafeace500
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_calls.txt
@@ -0,0 +1 @@
+a&.b&.c(1)
diff --git a/test/prism/fixtures/seattlerb/safe_op_asgn.txt b/test/prism/fixtures/seattlerb/safe_op_asgn.txt
new file mode 100644
index 0000000000..8915a1cccf
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_op_asgn.txt
@@ -0,0 +1 @@
+a&.b += x 1
diff --git a/test/prism/fixtures/seattlerb/safe_op_asgn2.txt b/test/prism/fixtures/seattlerb/safe_op_asgn2.txt
new file mode 100644
index 0000000000..0960b2548b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/safe_op_asgn2.txt
@@ -0,0 +1,2 @@
+a&.b ||=
+x;
diff --git a/test/prism/fixtures/seattlerb/slashy_newlines_within_string.txt b/test/prism/fixtures/seattlerb/slashy_newlines_within_string.txt
new file mode 100644
index 0000000000..421989c76f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/slashy_newlines_within_string.txt
@@ -0,0 +1,7 @@
+puts "hello\
+ my\
+ dear\
+ friend"
+
+a + b
+
diff --git a/test/prism/fixtures/seattlerb/stabby_arg_no_paren.txt b/test/prism/fixtures/seattlerb/stabby_arg_no_paren.txt
new file mode 100644
index 0000000000..f16bed4ccf
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/stabby_arg_no_paren.txt
@@ -0,0 +1 @@
+->a{}
diff --git a/test/prism/fixtures/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt b/test/prism/fixtures/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
new file mode 100644
index 0000000000..87a7c5dad3
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
@@ -0,0 +1 @@
+->(b, c=1, *d, e, &f){}
diff --git a/test/prism/fixtures/seattlerb/stabby_block_iter_call.txt b/test/prism/fixtures/seattlerb/stabby_block_iter_call.txt
new file mode 100644
index 0000000000..5e9e3f5527
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/stabby_block_iter_call.txt
@@ -0,0 +1,4 @@
+x -> () do
+a.b do
+end
+end
diff --git a/test/prism/fixtures/seattlerb/stabby_block_iter_call_no_target_with_arg.txt b/test/prism/fixtures/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
new file mode 100644
index 0000000000..7235394751
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
@@ -0,0 +1,4 @@
+x -> () do
+a(1) do
+end
+end
diff --git a/test/prism/fixtures/seattlerb/stabby_block_kw.txt b/test/prism/fixtures/seattlerb/stabby_block_kw.txt
new file mode 100644
index 0000000000..74d9e0a328
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/stabby_block_kw.txt
@@ -0,0 +1 @@
+-> (k:42) { }
diff --git a/test/prism/fixtures/seattlerb/stabby_block_kw__required.txt b/test/prism/fixtures/seattlerb/stabby_block_kw__required.txt
new file mode 100644
index 0000000000..bd16ffa73c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/stabby_block_kw__required.txt
@@ -0,0 +1 @@
+-> (k:) { }
diff --git a/test/prism/fixtures/seattlerb/stabby_proc_scope.txt b/test/prism/fixtures/seattlerb/stabby_proc_scope.txt
new file mode 100644
index 0000000000..1f7f9ff52b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/stabby_proc_scope.txt
@@ -0,0 +1 @@
+->(a; b) {}
diff --git a/test/prism/fixtures/seattlerb/str_backslashes.txt b/test/prism/fixtures/seattlerb/str_backslashes.txt
new file mode 100644
index 0000000000..5fd6da361b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_backslashes.txt
@@ -0,0 +1 @@
+x '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
diff --git a/test/prism/fixtures/seattlerb/str_double_double_escaped_newline.txt b/test/prism/fixtures/seattlerb/str_double_double_escaped_newline.txt
new file mode 100644
index 0000000000..2b022a55f6
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_double_double_escaped_newline.txt
@@ -0,0 +1 @@
+a "\\n";b
diff --git a/test/prism/fixtures/seattlerb/str_double_escaped_newline.txt b/test/prism/fixtures/seattlerb/str_double_escaped_newline.txt
new file mode 100644
index 0000000000..e439225344
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_double_escaped_newline.txt
@@ -0,0 +1 @@
+a "\n";b
diff --git a/test/prism/fixtures/seattlerb/str_double_newline.txt b/test/prism/fixtures/seattlerb/str_double_newline.txt
new file mode 100644
index 0000000000..2d439506ca
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_double_newline.txt
@@ -0,0 +1,2 @@
+a "
+";b
diff --git a/test/prism/fixtures/seattlerb/str_evstr.txt b/test/prism/fixtures/seattlerb/str_evstr.txt
new file mode 100644
index 0000000000..86c6d1526d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_evstr.txt
@@ -0,0 +1 @@
+"a #{b}"
diff --git a/test/prism/fixtures/seattlerb/str_evstr_escape.txt b/test/prism/fixtures/seattlerb/str_evstr_escape.txt
new file mode 100644
index 0000000000..517dfd4778
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_evstr_escape.txt
@@ -0,0 +1 @@
+"a #{b}\302\275"
diff --git a/test/prism/fixtures/seattlerb/str_heredoc_interp.txt b/test/prism/fixtures/seattlerb/str_heredoc_interp.txt
new file mode 100644
index 0000000000..aa2613008c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_heredoc_interp.txt
@@ -0,0 +1,5 @@
+<<""
+#{x}
+blah2
+
+
diff --git a/test/prism/fixtures/seattlerb/str_interp_ternary_or_label.txt b/test/prism/fixtures/seattlerb/str_interp_ternary_or_label.txt
new file mode 100644
index 0000000000..fe6637678f
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_interp_ternary_or_label.txt
@@ -0,0 +1 @@
+"#{a.b? ? ""+a+"": ""}"
diff --git a/test/prism/fixtures/seattlerb/str_lit_concat_bad_encodings.txt b/test/prism/fixtures/seattlerb/str_lit_concat_bad_encodings.txt
new file mode 100644
index 0000000000..f4eb3971bb
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_lit_concat_bad_encodings.txt
@@ -0,0 +1,2 @@
+"\xE3\xD3\x8B\xE3\x83\xBC\x83\xE3\x83\xE3\x82\xB3\xA3\x82\x99" \
+ "\xE3\x83\xB3\xE3\x83\x8F\xE3\x82\x9A\xC3\xBD;foo@bar.com"
diff --git a/test/prism/fixtures/seattlerb/str_newline_hash_line_number.txt b/test/prism/fixtures/seattlerb/str_newline_hash_line_number.txt
new file mode 100644
index 0000000000..9c8f702000
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_newline_hash_line_number.txt
@@ -0,0 +1,2 @@
+"\n\n\n\n#"
+1
diff --git a/test/prism/fixtures/seattlerb/str_pct_Q_nested.txt b/test/prism/fixtures/seattlerb/str_pct_Q_nested.txt
new file mode 100644
index 0000000000..1f3d0613e5
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_pct_Q_nested.txt
@@ -0,0 +1 @@
+%Q[before [#{nest}] after]
diff --git a/test/prism/fixtures/seattlerb/str_pct_nested_nested.txt b/test/prism/fixtures/seattlerb/str_pct_nested_nested.txt
new file mode 100644
index 0000000000..cb12415215
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_pct_nested_nested.txt
@@ -0,0 +1 @@
+%{ { #{ "#{1}" } } }
diff --git a/test/prism/fixtures/seattlerb/str_pct_q.txt b/test/prism/fixtures/seattlerb/str_pct_q.txt
new file mode 100644
index 0000000000..65d71197c9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_pct_q.txt
@@ -0,0 +1 @@
+%q{a b c}
diff --git a/test/prism/fixtures/seattlerb/str_single_double_escaped_newline.txt b/test/prism/fixtures/seattlerb/str_single_double_escaped_newline.txt
new file mode 100644
index 0000000000..2ff0aec111
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_single_double_escaped_newline.txt
@@ -0,0 +1 @@
+a '\\n';b
diff --git a/test/prism/fixtures/seattlerb/str_single_escaped_newline.txt b/test/prism/fixtures/seattlerb/str_single_escaped_newline.txt
new file mode 100644
index 0000000000..5abb8d6334
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_single_escaped_newline.txt
@@ -0,0 +1 @@
+a '\n';b
diff --git a/test/prism/fixtures/seattlerb/str_single_newline.txt b/test/prism/fixtures/seattlerb/str_single_newline.txt
new file mode 100644
index 0000000000..1033cc7e96
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_single_newline.txt
@@ -0,0 +1,2 @@
+a '
+';b
diff --git a/test/prism/fixtures/seattlerb/str_str.txt b/test/prism/fixtures/seattlerb/str_str.txt
new file mode 100644
index 0000000000..388d777dc2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_str.txt
@@ -0,0 +1 @@
+"a #{'b'}"
diff --git a/test/prism/fixtures/seattlerb/str_str_str.txt b/test/prism/fixtures/seattlerb/str_str_str.txt
new file mode 100644
index 0000000000..d64e01dc5d
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/str_str_str.txt
@@ -0,0 +1 @@
+"a #{'b'} c"
diff --git a/test/prism/fixtures/seattlerb/super_arg.txt b/test/prism/fixtures/seattlerb/super_arg.txt
new file mode 100644
index 0000000000..1b19ecd51c
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/super_arg.txt
@@ -0,0 +1 @@
+super 42
diff --git a/test/prism/fixtures/seattlerb/symbol_empty.txt b/test/prism/fixtures/seattlerb/symbol_empty.txt
new file mode 100644
index 0000000000..cbb260bb4e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/symbol_empty.txt
@@ -0,0 +1 @@
+:''
diff --git a/test/prism/fixtures/seattlerb/symbol_list.txt b/test/prism/fixtures/seattlerb/symbol_list.txt
new file mode 100644
index 0000000000..d357195184
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/symbol_list.txt
@@ -0,0 +1 @@
+%I[#{a} #{b}]
diff --git a/test/prism/fixtures/seattlerb/symbols.txt b/test/prism/fixtures/seattlerb/symbols.txt
new file mode 100644
index 0000000000..3ec930ce66
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/symbols.txt
@@ -0,0 +1 @@
+%i(a b c)
diff --git a/test/prism/fixtures/seattlerb/symbols_empty.txt b/test/prism/fixtures/seattlerb/symbols_empty.txt
new file mode 100644
index 0000000000..840948efb2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/symbols_empty.txt
@@ -0,0 +1 @@
+%i()
diff --git a/test/prism/fixtures/seattlerb/symbols_empty_space.txt b/test/prism/fixtures/seattlerb/symbols_empty_space.txt
new file mode 100644
index 0000000000..16c2e68a2b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/symbols_empty_space.txt
@@ -0,0 +1 @@
+%i( )
diff --git a/test/prism/fixtures/seattlerb/symbols_interp.txt b/test/prism/fixtures/seattlerb/symbols_interp.txt
new file mode 100644
index 0000000000..63116eb632
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/symbols_interp.txt
@@ -0,0 +1 @@
+%i(a b#{1+1} c)
diff --git a/test/prism/fixtures/seattlerb/thingy.txt b/test/prism/fixtures/seattlerb/thingy.txt
new file mode 100644
index 0000000000..5aa598c4be
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/thingy.txt
@@ -0,0 +1,3 @@
+f.(42)
+
+f::(42)
diff --git a/test/prism/fixtures/seattlerb/uminus_float.txt b/test/prism/fixtures/seattlerb/uminus_float.txt
new file mode 100644
index 0000000000..1344bfd9db
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/uminus_float.txt
@@ -0,0 +1 @@
+-0.0
diff --git a/test/prism/fixtures/seattlerb/unary_minus.txt b/test/prism/fixtures/seattlerb/unary_minus.txt
new file mode 100644
index 0000000000..66af866f85
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/unary_minus.txt
@@ -0,0 +1 @@
+-a
diff --git a/test/prism/fixtures/seattlerb/unary_plus.txt b/test/prism/fixtures/seattlerb/unary_plus.txt
new file mode 100644
index 0000000000..daea40b71e
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/unary_plus.txt
@@ -0,0 +1 @@
++a
diff --git a/test/prism/fixtures/seattlerb/unary_plus_on_literal.txt b/test/prism/fixtures/seattlerb/unary_plus_on_literal.txt
new file mode 100644
index 0000000000..752331df47
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/unary_plus_on_literal.txt
@@ -0,0 +1 @@
++:a
diff --git a/test/prism/fixtures/seattlerb/unary_tilde.txt b/test/prism/fixtures/seattlerb/unary_tilde.txt
new file mode 100644
index 0000000000..f0a507b437
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/unary_tilde.txt
@@ -0,0 +1 @@
+~a
diff --git a/test/prism/fixtures/seattlerb/utf8_bom.txt b/test/prism/fixtures/seattlerb/utf8_bom.txt
new file mode 100644
index 0000000000..c8e9e1cbae
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/utf8_bom.txt
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby -w
+p 0
+
diff --git a/test/prism/fixtures/seattlerb/when_splat.txt b/test/prism/fixtures/seattlerb/when_splat.txt
new file mode 100644
index 0000000000..6b79f5dad0
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/when_splat.txt
@@ -0,0 +1 @@
+case a; when *b then; end
diff --git a/test/prism/fixtures/seattlerb/words_interp.txt b/test/prism/fixtures/seattlerb/words_interp.txt
new file mode 100644
index 0000000000..f71486495b
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/words_interp.txt
@@ -0,0 +1 @@
+%W(#{1}b)
diff --git a/test/prism/fixtures/seattlerb/yield_arg.txt b/test/prism/fixtures/seattlerb/yield_arg.txt
new file mode 100644
index 0000000000..7e752f62e2
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/yield_arg.txt
@@ -0,0 +1 @@
+yield 42
diff --git a/test/prism/fixtures/seattlerb/yield_call_assocs.txt b/test/prism/fixtures/seattlerb/yield_call_assocs.txt
new file mode 100644
index 0000000000..95963dfcf9
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/yield_call_assocs.txt
@@ -0,0 +1,11 @@
+yield 1, :z => 1
+
+yield 1, :z => 1, :w => 2
+
+yield y :z=>1
+
+yield y z:1
+
+yield y(z:1)
+
+yield y(z=>1)
diff --git a/test/prism/fixtures/seattlerb/yield_empty_parens.txt b/test/prism/fixtures/seattlerb/yield_empty_parens.txt
new file mode 100644
index 0000000000..cff86b243a
--- /dev/null
+++ b/test/prism/fixtures/seattlerb/yield_empty_parens.txt
@@ -0,0 +1 @@
+yield()
diff --git a/test/prism/fixtures/single_quote_heredocs.txt b/test/prism/fixtures/single_quote_heredocs.txt
new file mode 100644
index 0000000000..0122b2726c
--- /dev/null
+++ b/test/prism/fixtures/single_quote_heredocs.txt
@@ -0,0 +1,3 @@
+<<-'EOS'
+ cd L:\Work\MG3710IQPro\Develop
+EOS
diff --git a/test/prism/fixtures/spanning_heredoc.txt b/test/prism/fixtures/spanning_heredoc.txt
new file mode 100644
index 0000000000..a52a4c3c27
--- /dev/null
+++ b/test/prism/fixtures/spanning_heredoc.txt
@@ -0,0 +1,51 @@
+# test regex, string, and lists that span a heredoc thanks to an escaped newline
+
+# ripper incorrectly creates a "b\nb" token instead of two separate string tokens
+pp <<-A.gsub(/b\
+a
+A
+b/, "")
+
+# ripper incorrectly creates a "d\nd" token instead of two separate string tokens
+pp <<-A, "d\
+c
+A
+d"
+
+# ripper gets this right
+pp <<-A, %q[f\
+e
+A
+f]
+
+# ripper incorrectly creates a "h\nh" token instead of two separate string tokens
+pp <<-A, %Q[h\
+g
+A
+h]
+
+# ripper can't parse this successfully, though ruby runs it correctly
+pp <<-A, %w[j\
+i
+A
+j]
+
+# ripper can't parse this successfully, though ruby runs it correctly
+# TODO: yarp does not include the "\n" in "l\nl" in the AST like ruby does
+pp <<-A, %W[l\
+k
+A
+l]
+
+# ripper can't parse this successfully, though ruby runs it correctly
+pp <<-A, %i[n\
+m
+A
+n]
+
+# ripper gets this one wrong in the same way that YARP does ...
+# TODO: yarp does not include the "\n" in "p\np" in the AST like ruby does
+pp <<-A, %I[p\
+o
+A
+p]
diff --git a/test/prism/fixtures/strings.txt b/test/prism/fixtures/strings.txt
new file mode 100644
index 0000000000..2ce8b738a3
--- /dev/null
+++ b/test/prism/fixtures/strings.txt
@@ -0,0 +1,105 @@
+%%abc%
+
+%^abc^
+
+%&abc&
+
+%*abc*
+
+%_abc_
+
+%+abc+
+
+%-abc-
+
+%:abc:
+
+%;abc;
+
+%'abc'
+
+%~abc~
+
+%?abc?
+
+%w{ }
+
+%/abc/
+
+%`abc`
+
+"#@@foo"
+
+%\abc\
+
+%{aaa #{bbb} ccc}
+
+%[foo[]]
+
+"foo" +
+#
+"bar"
+
+%q{abc}
+
+%s[abc]
+
+%{abc}
+
+''
+
+"abc"
+
+"#@---"
+
+"aaa #{bbb} ccc"
+
+'abc'
+
+%w[a b c]
+
+%w[a[] b[[]] c[]]
+
+%w[foo\ bar \#{1}]
+
+%w[foo\ bar baz]
+
+%W[a b#{c}d e]
+
+%W[a b c]
+
+%w[
+ a
+ b
+ c
+]
+
+'\' foo \' bar'
+
+'\\ foo \\ bar'
+
+"#$foo"
+
+"#@foo"
+
+"\x7 \x23 \x61"
+
+"\7 \43 \141"
+
+%[abc]
+
+%(abc)
+
+%@abc@
+
+%$abc$
+
+?a
+
+?a "a"
+
+%Q{abc}
+
+%^#$^#
+
+%@#@#
diff --git a/test/prism/fixtures/super.txt b/test/prism/fixtures/super.txt
new file mode 100644
index 0000000000..b685035970
--- /dev/null
+++ b/test/prism/fixtures/super.txt
@@ -0,0 +1,7 @@
+super
+
+super()
+
+super(1)
+
+super(1, 2, 3)
diff --git a/test/prism/fixtures/symbols.txt b/test/prism/fixtures/symbols.txt
new file mode 100644
index 0000000000..7563eb874f
--- /dev/null
+++ b/test/prism/fixtures/symbols.txt
@@ -0,0 +1,93 @@
+:'abc'
+
+:"#{var}"
+
+:"abc#{1}"
+
+[:Υ, :ά, :ŗ, :ρ]
+
+:-@
+
+:-
+
+:%
+
+:|
+
+:+@
+
+:+
+
+:/
+
+:**
+
+:*
+
+:~@
+
+[1, 1.0, 1r, 1i]
+
+:~
+
+:a
+
+%i[a b c]
+
+%i[a b#{1} #{2}c d#{3}f]
+
+%I[a b#{1} #{2}c d#{3}f]
+
+:@@a
+
+:👍
+
+%i[a\b]
+
+:$a
+
+:@a
+
+:do
+
+:&
+
+:`
+
+:!@
+
+:!~
+
+:!
+
+:[]
+
+:[]=
+
+:^
+
+:==
+
+:===
+
+:=~
+
+:>=
+
+:>>
+
+:>
+
+:<=>
+
+:<=
+
+:<<
+
+:<
+
+:__LINE__
+
+:__FILE__
+
+:__ENCODING__
diff --git a/test/prism/fixtures/ternary_operator.txt b/test/prism/fixtures/ternary_operator.txt
new file mode 100644
index 0000000000..79d2d7d837
--- /dev/null
+++ b/test/prism/fixtures/ternary_operator.txt
@@ -0,0 +1,15 @@
+a ? b : c
+
+a ? defined? b : defined? c
+
+empty??true:nil
+
+empty??false:nil
+
+empty??nil:nil
+
+a??nil:nil
+
+a ?var1 : var2
+
+nil??_a =2:1
diff --git a/test/prism/fixtures/tilde_heredocs.txt b/test/prism/fixtures/tilde_heredocs.txt
new file mode 100644
index 0000000000..415d4d42c8
--- /dev/null
+++ b/test/prism/fixtures/tilde_heredocs.txt
@@ -0,0 +1,91 @@
+<<~EOF
+ a
+EOF
+
+<<~EOF
+ a
+ b
+ c
+EOF
+
+<<~EOF
+ #{1} a
+EOF
+
+<<~EOF
+ a #{1}
+EOF
+
+<<~EOF
+ a
+ #{1}
+EOF
+
+<<~EOF
+ a
+ #{1}
+EOF
+
+<<~EOF
+ a
+ b
+EOF
+
+<<~EOF
+ a
+ b
+EOF
+
+<<~EOF
+ a
+ b
+EOF
+
+<<~'EOF'
+ a #{1}
+EOF
+
+<<~EOF
+ a
+ b
+EOF
+
+<<~EOF
+ a
+ b
+EOF
+
+<<~EOF
+ a
+ b
+EOF
+
+<<~EOF
+ a
+
+ b
+EOF
+
+<<~EOF
+ a
+
+ b
+EOF
+
+<<~EOF
+ a
+
+
+
+ b
+EOF
+
+<<~EOF
+
+ #{1}a
+ EOF
+
+<<~EOT
+ #{1}
+ b
+EOT
diff --git a/test/prism/fixtures/undef.txt b/test/prism/fixtures/undef.txt
new file mode 100644
index 0000000000..129c349433
--- /dev/null
+++ b/test/prism/fixtures/undef.txt
@@ -0,0 +1,17 @@
+undef a
+
+undef a, b
+
+undef if
+
+undef <=>
+
+undef :a
+
+undef :a, :b, :c
+
+undef :'abc'
+
+undef :"abc#{1}"
+
+undef Constant
diff --git a/test/prism/fixtures/unescaping.txt b/test/prism/fixtures/unescaping.txt
new file mode 100644
index 0000000000..e2da5a696c
--- /dev/null
+++ b/test/prism/fixtures/unescaping.txt
@@ -0,0 +1,9 @@
+["\c#{1}"]
+
+/\c#{1}/
+
+"\c#{1}"
+
+<<~HERE
+ \c#{1}
+HERE
diff --git a/test/prism/fixtures/unless.txt b/test/prism/fixtures/unless.txt
new file mode 100644
index 0000000000..410d460e69
--- /dev/null
+++ b/test/prism/fixtures/unless.txt
@@ -0,0 +1,14 @@
+unless true; 1; end
+
+unless true
+1 else 2 end
+
+1 unless true
+
+break unless true
+
+next unless true
+
+return unless true
+
+foo :a, :b unless bar?
diff --git a/test/prism/fixtures/unparser/LICENSE b/test/prism/fixtures/unparser/LICENSE
new file mode 100644
index 0000000000..44863d7afb
--- /dev/null
+++ b/test/prism/fixtures/unparser/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013 Markus Schirp
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/test/prism/fixtures/unparser/corpus/literal/alias.txt b/test/prism/fixtures/unparser/corpus/literal/alias.txt
new file mode 100644
index 0000000000..fb06a295e8
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/alias.txt
@@ -0,0 +1,2 @@
+alias $foo $bar
+alias :foo :bar
diff --git a/test/prism/fixtures/unparser/corpus/literal/assignment.txt b/test/prism/fixtures/unparser/corpus/literal/assignment.txt
new file mode 100644
index 0000000000..84a74e8928
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/assignment.txt
@@ -0,0 +1,53 @@
+$a = 1
+($a, $b) = [1, 2]
+((a,), b) = 1
+(*a) = []
+(*foo) = [1, 2]
+(@@a, @@b) = [1, 2]
+(@a, @b) = [1, 2]
+(a, (b, c)) = [1, [2, 3]]
+(a, *) = [1, 2]
+(a, *foo) = [1, 2]
+(a, b) = [1, 2]
+(a, b) = foo
+(a,) = foo
+(a.foo, a.bar) = [1, 2]
+(a[*foo], a[1]) = [1, 2]
+(a[0], a[1]) = [1, 2]
+(*c.foo) = 1
+::Foo = ::Bar
+@@a = 1
+@a = 1
+CONST = 1
+Name::Spaced::CONST = 1
+a = ((b, c) = 1)
+a = 1
+foo = foo()
+foo.[]=()
+foo.[]=(1, 2)
+foo.[]=true
+foo[*index] = value
+foo[1..2] = value
+foo[] = 1
+foo[a, b] = value
+foo[index] = value
+x = %()
+x.x=%()
+x[%()] = bar
+a[%()] ||= bar
+@a ||= %()
+x = <<-HEREDOC
+ #{}
+HEREDOC
+x.x=<<-HEREDOC
+ #{}
+HEREDOC
+x[] = <<-HEREDOC
+ #{}
+HEREDOC
+a[<<-HEREDOC] ||= bar
+ #{}
+HEREDOC
+@a ||= <<-HEREDOC
+ #{}
+HEREDOC
diff --git a/test/prism/fixtures/unparser/corpus/literal/block.txt b/test/prism/fixtures/unparser/corpus/literal/block.txt
new file mode 100644
index 0000000000..b2baf1dc12
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/block.txt
@@ -0,0 +1,96 @@
+foo {
+}
+foo { |a|
+}
+foo { |a,|
+}
+foo { |a,; x|
+}
+foo { |a, b|
+}
+foo(1) {
+ nil
+}
+foo { |a, *b|
+ nil
+}
+foo { |a, *|
+ nil
+}
+foo {
+ bar
+}
+foo.bar { |(a, b), c|
+ d
+}
+foo.bar { |*a; b|
+}
+foo.bar { |a; b|
+}
+foo.bar { |; a, b|
+}
+foo.bar { |*|
+ d
+}
+foo.bar { |(*)|
+ d
+}
+foo.bar { |((*))|
+ d
+}
+foo.bar { |(a, (*))|
+ d
+}
+foo.bar { |(a, b)|
+ d
+}
+foo.bar {
+}.baz
+m do
+rescue Exception => e
+end
+m do
+ foo
+rescue Exception => bar
+ bar
+end
+m do
+ bar
+rescue SomeError, *bar
+ baz
+end
+m do
+ bar
+rescue SomeError, *bar => exception
+ baz
+end
+m do
+ bar
+rescue *bar
+ baz
+end
+m do
+ bar
+rescue LoadError
+end
+m do
+ bar
+rescue
+else
+ baz
+end
+m do
+ bar
+rescue *bar => exception
+ baz
+end
+m do
+ensure
+end
+m do
+rescue
+ensure
+end
+bar {
+ _1 + _2
+}
diff --git a/test/prism/fixtures/unparser/corpus/literal/case.txt b/test/prism/fixtures/unparser/corpus/literal/case.txt
new file mode 100644
index 0000000000..c455fd7c39
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/case.txt
@@ -0,0 +1,37 @@
+case
+when bar
+ baz
+when baz
+ bar
+end
+case foo
+when bar
+when baz
+ bar
+end
+case foo
+when bar
+ baz
+when baz
+ bar
+end
+case foo
+when bar, baz
+ :other
+end
+case foo
+when *bar
+ :value
+end
+case foo
+when bar
+ baz
+else
+ :foo
+end
+case foo
+when *bar | baz
+end
+case foo
+when *bar.baz=1
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/class.txt b/test/prism/fixtures/unparser/corpus/literal/class.txt
new file mode 100644
index 0000000000..f0198625e9
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/class.txt
@@ -0,0 +1,35 @@
+class A
+end
+
+class << a
+end
+
+class << a
+ b
+end
+
+class A::B
+end
+
+class A::B::C
+end
+
+class A < B
+end
+
+class A < B::C
+end
+
+class A::B < C::D
+end
+
+class A
+ include(B.new)
+
+ def foo
+ :bar
+ end
+end
+
+class ::A
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/control.txt b/test/prism/fixtures/unparser/corpus/literal/control.txt
new file mode 100644
index 0000000000..648782bc96
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/control.txt
@@ -0,0 +1,15 @@
+next
+return
+break
+retry
+redo
+return 1
+return 1, 2
+return true ? 1 : 2
+break true ? 1 : 2
+next true ? 1 : 2
+return true, if true
+ 1
+else
+ 2
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/def.txt b/test/prism/fixtures/unparser/corpus/literal/def.txt
new file mode 100644
index 0000000000..61339bd4a6
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/def.txt
@@ -0,0 +1,134 @@
+def foo
+ a
+rescue
+ b
+else
+ c
+ensure
+ d
+end
+
+def foo
+ a rescue b
+rescue
+ b
+else
+ c
+ensure
+ d
+end
+
+def foo(bar:, baz:)
+end
+
+def foo
+end
+
+def foo
+ bar
+end
+
+def foo
+ foo
+rescue
+ bar
+ensure
+ baz
+end
+
+def foo
+ bar
+ensure
+ baz
+end
+
+def foo
+ bar
+rescue
+ baz
+end
+
+def foo(bar)
+ bar
+end
+
+def foo(bar, baz)
+ bar
+end
+
+def foo(bar = ())
+ bar
+end
+
+def foo(bar = (baz; nil))
+end
+
+def foo(bar = true)
+ bar
+end
+
+def foo(bar, baz = true)
+ bar
+end
+
+def foo(bar: 1)
+end
+
+def foo(bar: baz)
+end
+
+def foo(bar: bar())
+end
+
+def foo(*)
+ bar
+end
+
+def foo(*bar)
+ bar
+end
+
+def foo(bar, *baz)
+ bar
+end
+
+def foo(baz = true, *bor)
+ bar
+end
+
+def foo(baz = true, *bor, &block)
+ bar
+end
+
+def foo(bar, baz = true, *bor)
+ bar
+end
+
+def foo(&block)
+ bar
+end
+
+def foo(bar, &block)
+ bar
+end
+
+def foo
+ bar
+ baz
+end
+
+def f(((a)))
+end
+
+def foo(bar:, baz: "value")
+end
+
+def f
+ <<-HEREDOC
+ #{}
+ HEREDOC
+end
+
+def f
+ %()
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/defined.txt b/test/prism/fixtures/unparser/corpus/literal/defined.txt
new file mode 100644
index 0000000000..65e7c370fd
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/defined.txt
@@ -0,0 +1,3 @@
+defined?(@foo)
+defined?(Foo)
+defined?(((a, b) = [1, 2]))
diff --git a/test/prism/fixtures/unparser/corpus/literal/defs.txt b/test/prism/fixtures/unparser/corpus/literal/defs.txt
new file mode 100644
index 0000000000..b70aa9efc5
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/defs.txt
@@ -0,0 +1,40 @@
+def self.foo
+end
+
+def self.foo
+ bar
+end
+
+def self.foo
+ bar
+ baz
+end
+
+def Foo.bar
+ bar
+end
+
+def (foo { |bar|
+}).bar
+ bar
+end
+
+def (foo(1)).bar
+ bar
+end
+
+def (Foo::Bar.baz).bar
+ baz
+end
+
+def (Foo::Bar).bar
+ baz
+end
+
+def Foo.bar
+ baz
+end
+
+def foo.bar
+ baz
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/dstr.txt b/test/prism/fixtures/unparser/corpus/literal/dstr.txt
new file mode 100644
index 0000000000..8a912d28ed
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/dstr.txt
@@ -0,0 +1,37 @@
+if true
+ "#{}a"
+end
+if true
+ <<-HEREDOC
+a
+#{}a
+b
+ HEREDOC
+ x
+end
+<<-HEREDOC
+\#{}\#{}
+#{}
+#{}
+#{}
+HEREDOC
+<<-HEREDOC rescue nil
+#{}
+a
+HEREDOC
+"a#$1"
+"a#$a"
+"a#@a"
+"a#@@a"
+if true
+ return <<-HEREDOC
+ #{42}
+ HEREDOC
+end
+foo(<<-HEREDOC)
+ #{bar}
+HEREDOC
+foo(<<-HEREDOC) { |x|
+ #{bar}
+HEREDOC
+}
diff --git a/test/prism/fixtures/unparser/corpus/literal/empty.txt b/test/prism/fixtures/unparser/corpus/literal/empty.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/empty.txt
diff --git a/test/prism/fixtures/unparser/corpus/literal/empty_begin.txt b/test/prism/fixtures/unparser/corpus/literal/empty_begin.txt
new file mode 100644
index 0000000000..6a452c185a
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/empty_begin.txt
@@ -0,0 +1 @@
+()
diff --git a/test/prism/fixtures/unparser/corpus/literal/flipflop.txt b/test/prism/fixtures/unparser/corpus/literal/flipflop.txt
new file mode 100644
index 0000000000..8badd39d57
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/flipflop.txt
@@ -0,0 +1,6 @@
+if ((i == 4)..(i == 4))
+ foo
+end
+if ((i == 4)...(i == 4))
+ foo
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/for.txt b/test/prism/fixtures/unparser/corpus/literal/for.txt
new file mode 100644
index 0000000000..4c19a352d9
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/for.txt
@@ -0,0 +1,12 @@
+bar(for a in bar do
+ baz
+end)
+for a in bar do
+ baz
+end
+for (a, *b) in bar do
+ baz
+end
+for (a, b) in bar do
+ baz
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/hookexe.txt b/test/prism/fixtures/unparser/corpus/literal/hookexe.txt
new file mode 100644
index 0000000000..08f14f47b3
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/hookexe.txt
@@ -0,0 +1,7 @@
+BEGIN {
+ foo
+}
+bar
+END {
+ baz
+}
diff --git a/test/prism/fixtures/unparser/corpus/literal/if.txt b/test/prism/fixtures/unparser/corpus/literal/if.txt
new file mode 100644
index 0000000000..0c13801f9e
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/if.txt
@@ -0,0 +1,36 @@
+if /foo/
+ bar
+end
+if 3
+ 9
+end
+if 4
+ 5
+else
+ 6
+end
+unless 3
+ nil
+end
+unless 3
+ 9
+end
+if foo
+end
+
+module A
+ foo = bar if foo
+end
+
+module B
+ foo = bar unless foo
+end
+unless foo
+ foo = bar
+end
+if foo { |pair|
+ pair
+}
+ pair = :foo
+ foo
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/kwbegin.txt b/test/prism/fixtures/unparser/corpus/literal/kwbegin.txt
new file mode 100644
index 0000000000..6cc1e74ca6
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/kwbegin.txt
@@ -0,0 +1,80 @@
+begin
+rescue
+end
+
+begin
+ensure
+end
+
+begin
+ a
+end
+
+begin
+ a
+rescue
+ b
+end
+
+begin
+ a
+ b
+rescue
+ b
+end
+
+begin
+rescue A
+end
+
+begin
+rescue A => foo
+end
+
+begin
+ a
+rescue A
+ b
+rescue B
+ c
+ensure
+ d
+end
+
+begin
+ begin
+ foo
+ bar
+ rescue
+ end
+rescue
+ baz
+ bar
+end
+
+begin
+ raise(Exception) rescue foo = bar
+rescue Exception
+end
+
+begin
+ foo
+rescue => bar
+ bar
+end
+
+begin
+ foo
+rescue Exception, Other => bar
+ bar
+end
+
+begin
+ bar
+rescue SomeError, *bar => exception
+ baz
+end
+
+class << self
+ undef :bar rescue nil
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/lambda.txt b/test/prism/fixtures/unparser/corpus/literal/lambda.txt
new file mode 100644
index 0000000000..4eb722dad1
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/lambda.txt
@@ -0,0 +1,13 @@
+lambda {
+}
+lambda { |a, b|
+ a
+}
+->() {
+}
+->(a) {
+}
+->(a, b) {
+}
+->(a, b; c) {
+}
diff --git a/test/prism/fixtures/unparser/corpus/literal/literal.txt b/test/prism/fixtures/unparser/corpus/literal/literal.txt
new file mode 100644
index 0000000000..2fc7cd1d79
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/literal.txt
@@ -0,0 +1,91 @@
+{ "foo" => <<-HEREDOC, "bar" => :baz }
+ #{}
+HEREDOC
+{ "foo" => %(), "bar" => :baz }
+["foo", %()]
+a(<<-HEREDOC).a
+ #{}
+HEREDOC
+a(%()).a
+{ "foo" => <<-HEREDOC, **baz }
+ #{}
+HEREDOC
+{ "foo" => %(), **baz }
+"#@a #@@a #$a"
+0
+++1
+1
+1
+1r
+1.5r
+1.3r
+5i
+-5i
+0.6i
+-0.6i
+1000000000000000000000000000000i
+1ri
+"foo" "bar"
+"foobar #{baz}"
+"foo#{1}bar"
+"\\\\#{}"
+"#{}\#{}"
+"\#{}#{}"
+"foo\\\#{@bar}"
+"\""
+"foo bar"
+"foo\nbar"
+`foo`
+`foo#{@bar}`
+`)`
+`\``
+`"`
+:foo
+:"A B"
+:foo
+:"A B"
+:"A\"B"
+:""
+/foo/
+/[^-+',.\/:@[:alnum:]\[\]]+/
+/foo#{@bar}/
+/foo#{@bar}/imx
+/#{"\u0000"}/
+/\n/
+/\n/
+/\n/x
+/\/\//x
+:"foo#{bar}baz"
+:"#{"foo"}"
+(0.0 / 0.0)..1
+1..(0.0 / 0.0)
+(0.0 / 0.0)..100
+-0.1
+0.1
+[1, 2]
+[1, (), n2]
+[1]
+[]
+[1, *@foo]
+[*@foo, 1]
+[*@foo, *@baz]
+{}
+{ () => () }
+{ 1 => 2 }
+{ 1 => 2, 3 => 4 }
+{ a: (1 rescue foo), b: 2 }
+{ a: 1, b: 2 }
+{ a: :a }
+{ :"a b" => 1 }
+{ :-@ => 1 }
+"#{}
+#{}\na"
+foo {
+ "#{}
+#{}\na"
+}
+:"a\\
+b"
+` x
+#{foo}
+#`
diff --git a/test/prism/fixtures/unparser/corpus/literal/module.txt b/test/prism/fixtures/unparser/corpus/literal/module.txt
new file mode 100644
index 0000000000..cec03f3bfd
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/module.txt
@@ -0,0 +1,16 @@
+module A
+end
+
+module A::B
+end
+
+module A::B::C
+end
+
+module A
+ include(B.new)
+
+ def foo
+ :bar
+ end
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/opasgn.txt b/test/prism/fixtures/unparser/corpus/literal/opasgn.txt
new file mode 100644
index 0000000000..5858d773d0
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/opasgn.txt
@@ -0,0 +1,24 @@
+a += 2
+a -= 2
+a **= 2
+a *= 2
+a /= 2
+a &&= b
+a ||= 2
+(a ||= 2).bar
+(h ||= {})[k] = v
+a.b += 2
+a.b -= 2
+a.b **= 2
+a.b *= 2
+a.b /= 2
+a.b &&= b
+a.b ||= 2
+a[b] += 2
+a[b] -= 2
+a[b] **= 2
+a[b] *= 2
+a[b] /= 2
+a[b] &&= b
+a[b] ||= 2
+foo.A += 1
diff --git a/test/prism/fixtures/unparser/corpus/literal/pattern.txt b/test/prism/fixtures/unparser/corpus/literal/pattern.txt
new file mode 100644
index 0000000000..7cfaa4dc67
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/pattern.txt
@@ -0,0 +1,41 @@
+case foo
+in A[1, 2, *a, 3] then
+ true
+in [1, 2, ] then
+ y
+in A(x:) then
+ true
+in {**a} then
+ true
+in {} if true then
+ true
+in [x, y, *] then
+ true
+in {a: 1, aa: 2} then
+ true
+in {} then
+ true
+in {**nil} then
+ true
+in {"a": 1} then
+ true
+in 1 | 2 then
+ true
+in 1 => a then
+ true
+in ^x then
+ true
+in 1
+in 2 then
+ true
+else
+ true
+end
+case foo
+in A[1, 2, *a, 3]
+end
+case foo
+in A
+else
+end
+1 in [a]
diff --git a/test/prism/fixtures/unparser/corpus/literal/pragma.txt b/test/prism/fixtures/unparser/corpus/literal/pragma.txt
new file mode 100644
index 0000000000..4f6dd71b38
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/pragma.txt
@@ -0,0 +1,4 @@
+__ENCODING__
+__FILE__
+__LINE__
+__dir__
diff --git a/test/prism/fixtures/unparser/corpus/literal/range.txt b/test/prism/fixtures/unparser/corpus/literal/range.txt
new file mode 100644
index 0000000000..eb1f3874c0
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/range.txt
@@ -0,0 +1,4 @@
+(1..)
+1..2
+(1...)
+1...2
diff --git a/test/prism/fixtures/unparser/corpus/literal/rescue.txt b/test/prism/fixtures/unparser/corpus/literal/rescue.txt
new file mode 100644
index 0000000000..a787816808
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/rescue.txt
@@ -0,0 +1,3 @@
+foo rescue bar
+foo rescue return bar
+x = (foo rescue return bar)
diff --git a/test/prism/fixtures/unparser/corpus/literal/send.txt b/test/prism/fixtures/unparser/corpus/literal/send.txt
new file mode 100644
index 0000000000..1e9c2a94be
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/send.txt
@@ -0,0 +1,84 @@
+module A
+ foo ||= ((a, _) = b)
+end
+
+module A
+ local = 1
+ local.bar
+end
+class A
+end.bar
+module A
+end.bar
+begin
+rescue
+end.bar
+case (def foo
+end; :bar)
+when bar
+end.baz
+case foo
+when bar
+end.baz
+class << self
+end.bar
+def self.foo
+end.bar
+def foo
+end.bar
+until foo
+end.bar
+while foo
+end.bar
+loop {
+}.bar
+if foo
+end.baz
+(/bar/ =~ :foo).foo
+(1..2).max
+(foo =~ /bar/).foo
+/bar/ =~ :foo
+/bar/ =~ foo
+1..2.max
+A.foo
+FOO()
+a&.b
+a.foo
+foo
+foo << (bar * baz)
+foo =~ /bar/
+foo(&(foo || bar))
+foo(&block)
+foo(*args, &block)
+foo(*arguments)
+foo(1, 2)
+foo(bar)
+foo(bar, *args)
+foo(foo =~ /bar/)
+foo.bar(&baz)
+foo.bar(*arga, foo, *argb)
+foo.bar(*args)
+foo.bar(*args, foo)
+foo.bar(:baz, &baz)
+foo.bar(baz: boz)
+foo.bar(foo, "baz" => boz)
+foo.bar(foo, *args)
+foo.bar(foo, *args, &block)
+foo.bar(foo, {})
+foo.bar({ foo: boz }, boz)
+foo.bar=:baz
+foo(a: b)
+foo.&(a: b)
+foo.&(**a)
+foo[*baz]
+foo[1, 2]
+foo[]
+self.foo
+self.foo=:bar
+(a + b) / (c - d)
+(a + b) / c.-(e, f)
+(a + b) / c.-(*f)
+x(**foo)
+foo&.!
+foo.~(b)
+a&.+(b)
diff --git a/test/prism/fixtures/unparser/corpus/literal/since/27.txt b/test/prism/fixtures/unparser/corpus/literal/since/27.txt
new file mode 100644
index 0000000000..c332f9e48e
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/since/27.txt
@@ -0,0 +1,4 @@
+-> {
+ _1 + _2
+}
+(..1)
diff --git a/test/prism/fixtures/unparser/corpus/literal/since/30.txt b/test/prism/fixtures/unparser/corpus/literal/since/30.txt
new file mode 100644
index 0000000000..b73328a4b0
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/since/30.txt
@@ -0,0 +1,4 @@
+1 => [a]
+1 => [*]
+1 in [*, 42, *]
+1 in [*, a, *foo]
diff --git a/test/prism/fixtures/unparser/corpus/literal/since/31.txt b/test/prism/fixtures/unparser/corpus/literal/since/31.txt
new file mode 100644
index 0000000000..504eb94d5b
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/since/31.txt
@@ -0,0 +1,7 @@
+def foo(&)
+ bar(&)
+end
+
+def foo(a, &)
+ bar(&)
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/since/32.txt b/test/prism/fixtures/unparser/corpus/literal/since/32.txt
new file mode 100644
index 0000000000..fa279f11cf
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/since/32.txt
@@ -0,0 +1,7 @@
+def foo(argument, **)
+ bar(argument, **)
+end
+
+def foo(argument, *)
+ bar(argument, *)
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/singletons.txt b/test/prism/fixtures/unparser/corpus/literal/singletons.txt
new file mode 100644
index 0000000000..496e6a41ce
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/singletons.txt
@@ -0,0 +1,4 @@
+false
+nil
+self
+true
diff --git a/test/prism/fixtures/unparser/corpus/literal/super.txt b/test/prism/fixtures/unparser/corpus/literal/super.txt
new file mode 100644
index 0000000000..0e73e6f052
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/super.txt
@@ -0,0 +1,21 @@
+super
+super()
+super(a)
+super(a, b)
+super(&block)
+super(a, &block)
+super(a {
+ foo
+})
+super {
+ foo
+}
+super(a) {
+ foo
+}
+super() {
+ foo
+}
+super(a, b) {
+ foo
+}
diff --git a/test/prism/fixtures/unparser/corpus/literal/unary.txt b/test/prism/fixtures/unparser/corpus/literal/unary.txt
new file mode 100644
index 0000000000..77685cb71d
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/unary.txt
@@ -0,0 +1,8 @@
+!1
+!(!1)
+!(!(foo || bar))
+!(!1).baz
+~a
+-a
++a
+-(-a).foo
diff --git a/test/prism/fixtures/unparser/corpus/literal/undef.txt b/test/prism/fixtures/unparser/corpus/literal/undef.txt
new file mode 100644
index 0000000000..a65d8d0cc4
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/undef.txt
@@ -0,0 +1,2 @@
+undef :foo
+undef :foo, :bar
diff --git a/test/prism/fixtures/unparser/corpus/literal/variables.txt b/test/prism/fixtures/unparser/corpus/literal/variables.txt
new file mode 100644
index 0000000000..1de938f376
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/variables.txt
@@ -0,0 +1,10 @@
+a
+@a
+@@a
+$a
+$1
+$`
+CONST
+SCOPED::CONST
+::TOPLEVEL
+::TOPLEVEL::CONST
diff --git a/test/prism/fixtures/unparser/corpus/literal/while.txt b/test/prism/fixtures/unparser/corpus/literal/while.txt
new file mode 100644
index 0000000000..19a60ef5ff
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/while.txt
@@ -0,0 +1,73 @@
+module A
+ foo { |bar|
+ while foo
+ foo = bar
+ end
+ }
+end
+
+def foo
+ foo = bar while foo != baz
+end
+
+module A
+ foo = bar while foo
+end
+
+module A
+ foo = bar until foo
+end
+
+module A
+ while foo
+ foo = bar
+ end
+end
+
+module A
+ each { |baz|
+ while foo
+ foo = bar
+ end
+ }
+end
+
+module A
+ each { |foo|
+ while foo
+ foo = bar
+ end
+ }
+end
+x = (begin
+ foo
+end while baz)
+begin
+ foo
+end while baz
+begin
+ foo
+ bar
+end until baz
+begin
+ foo
+ bar
+end while baz
+while false
+end
+while false
+ 3
+end
+while (foo {
+})
+ :body
+end
+until false
+end
+until false
+ 3
+end
+until (foo {
+})
+ :body
+end
diff --git a/test/prism/fixtures/unparser/corpus/literal/yield.txt b/test/prism/fixtures/unparser/corpus/literal/yield.txt
new file mode 100644
index 0000000000..c0b5820842
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/literal/yield.txt
@@ -0,0 +1,3 @@
+yield
+yield(a)
+yield(a, b)
diff --git a/test/prism/fixtures/unparser/corpus/semantic/and.txt b/test/prism/fixtures/unparser/corpus/semantic/and.txt
new file mode 100644
index 0000000000..43d1712445
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/and.txt
@@ -0,0 +1,8 @@
+a...b or c...d
+a...b and c...d
+
+if a...b or c...d
+end
+
+if a...b and c...d
+end
diff --git a/test/prism/fixtures/unparser/corpus/semantic/block.txt b/test/prism/fixtures/unparser/corpus/semantic/block.txt
new file mode 100644
index 0000000000..5891690025
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/block.txt
@@ -0,0 +1,26 @@
+foo do
+end
+
+foo do
+rescue
+end
+
+foo do
+ nil rescue nil
+ nil
+end
+
+foo do |a|
+end
+
+foo(<<-DOC) do |a|
+ b
+DOC
+ a
+end
+
+foo(<<-DOC) do
+ b
+DOC
+ a
+end
diff --git a/test/prism/fixtures/unparser/corpus/semantic/def.txt b/test/prism/fixtures/unparser/corpus/semantic/def.txt
new file mode 100644
index 0000000000..7574619392
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/def.txt
@@ -0,0 +1,7 @@
+def foo
+ (a - b)
+end
+
+def foo
+ a rescue Exception
+end
diff --git a/test/prism/fixtures/unparser/corpus/semantic/dstr.txt b/test/prism/fixtures/unparser/corpus/semantic/dstr.txt
new file mode 100644
index 0000000000..919e736077
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/dstr.txt
@@ -0,0 +1,127 @@
+<<DOC
+DOC
+
+<<'DOC'
+DOC
+
+<<~DOC
+DOC
+
+<<~'DOC'
+DOC
+
+<<DOC
+ a
+DOC
+
+<<'DOC'
+ a
+DOC
+
+<<DOC
+ a
+ #{}
+DOC
+
+<<~DOC
+ a
+ #{}
+DOC
+
+<<~DOC
+ a
+ #{}
+ b
+DOC
+
+<<~DOC
+ a
+ b
+DOC
+
+<<'DOC'
+a
+
+b
+DOC
+
+<<'DOC'
+ a
+
+ b
+DOC
+
+<<'DOC'
+ a\nb
+DOC
+
+<<DOC
+#{}a
+ #{}a
+DOC
+
+<<DOC
+ #{}
+ \#{}
+DOC
+
+<<DOC
+ a#{}b
+ c
+DOC
+
+<<~DOC
+ #{}
+DOC
+
+if true
+ <<~DOC
+ #{}
+ DOC
+end
+
+if true
+ <<~DOC
+ b#{}
+ DOC
+end
+
+if true
+ <<~DOC
+ #{}a
+ DOC
+end
+
+if true
+ <<-'DOC'
+ a
+
+ b
+ DOC
+end
+
+"#{}a"
+
+%(\n"#{}"\n)
+
+%Q(-\n"#{}"\n)
+
+"a
+#{}
+b"
+
+"a\n#{}
+b"
+
+"a
+#{}\nb"
+
+'a' \
+"#{}"
+
+"" "" ""
+
+"a#{@a}" "b"
+"a#@a" "b"
+"a#$a" "b"
+"a#@@a" "b"
diff --git a/test/prism/fixtures/unparser/corpus/semantic/kwbegin.txt b/test/prism/fixtures/unparser/corpus/semantic/kwbegin.txt
new file mode 100644
index 0000000000..d275a96a5c
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/kwbegin.txt
@@ -0,0 +1,42 @@
+begin
+rescue
+end
+
+begin
+rescue
+else
+end
+
+begin
+ a
+end
+
+begin
+ a
+rescue
+ b
+end
+
+begin
+ a
+ b
+rescue
+ b
+end
+
+begin
+rescue A
+else
+end
+
+begin; rescue A; else; end
+
+begin
+ a
+rescue A
+ b
+rescue B
+ c
+ensure
+ d
+end
diff --git a/test/prism/fixtures/unparser/corpus/semantic/literal.txt b/test/prism/fixtures/unparser/corpus/semantic/literal.txt
new file mode 100644
index 0000000000..c424db5a53
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/literal.txt
@@ -0,0 +1,14 @@
+1.0r
+-0r
+0x1
+1_000
+1e10
+10e10000000000
+-10e10000000000
+?c
+%r(/)
+%r(\))
+%r(#{@bar}baz)
+10.2e10000000000
+-10.2e10000000000
+w(foo bar)
diff --git a/test/prism/fixtures/unparser/corpus/semantic/send.txt b/test/prism/fixtures/unparser/corpus/semantic/send.txt
new file mode 100644
index 0000000000..a65b27d2f2
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/send.txt
@@ -0,0 +1,6 @@
+foo
+foo(1)
+
+a.===(b).c == d
+
+a == d.c.===(c)
diff --git a/test/prism/fixtures/unparser/corpus/semantic/undef.txt b/test/prism/fixtures/unparser/corpus/semantic/undef.txt
new file mode 100644
index 0000000000..47debc3114
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/undef.txt
@@ -0,0 +1,2 @@
+undef foo
+undef foo, bar
diff --git a/test/prism/fixtures/unparser/corpus/semantic/while.txt b/test/prism/fixtures/unparser/corpus/semantic/while.txt
new file mode 100644
index 0000000000..a55dcc52fc
--- /dev/null
+++ b/test/prism/fixtures/unparser/corpus/semantic/while.txt
@@ -0,0 +1,25 @@
+a until b? {}
+
+until b? {}
+ a
+end
+
+foo = bar while foo
+
+a until b && a { }
+
+while a = b
+ a
+end
+
+a until b(<<-FOO) do
+FOO
+ c
+end
+
+module A
+ foo = exp
+ while foo
+ foo = bar
+ end
+end
diff --git a/test/prism/fixtures/until.txt b/test/prism/fixtures/until.txt
new file mode 100644
index 0000000000..fa93819e25
--- /dev/null
+++ b/test/prism/fixtures/until.txt
@@ -0,0 +1,11 @@
+until true; 1; end
+
+1 until true
+
+break until true
+
+next until true
+
+return until true
+
+foo :a, :b until bar?
diff --git a/test/prism/fixtures/variables.txt b/test/prism/fixtures/variables.txt
new file mode 100644
index 0000000000..276dc3b3f1
--- /dev/null
+++ b/test/prism/fixtures/variables.txt
@@ -0,0 +1,46 @@
+@@abc
+
+@@abc = 1
+
+@@foo, @@bar = 1
+
+@@foo = 1, 2
+
+$abc = 1
+
+$abc
+
+@abc
+
+@abc = 1
+
+a
+
+abc = 1
+
+$foo, $bar = 1
+
+$foo = 1, 2
+
+@foo, @bar = 1
+
+@foo = 1, 2
+
+foo = 1; foo = 1, 2
+
+foo = 1, 2
+
+foo, * = 1, 2
+
+foo, = 1, 2
+
+foo, *bar = 1, 2
+
+foo, (bar, baz) = 1, [2, 3]
+
+foo = *bar
+
+Foo = 1, 2
+
+(a; b; c)
+
diff --git a/test/prism/fixtures/while.txt b/test/prism/fixtures/while.txt
new file mode 100644
index 0000000000..ed5ea0f45c
--- /dev/null
+++ b/test/prism/fixtures/while.txt
@@ -0,0 +1,19 @@
+while true; 1; end
+
+1 while true
+
+break while true
+
+next while true
+
+return while true
+
+foo :a, :b while bar?
+
+while def self.foo a = tap do end; end; break; end
+
+while class Foo a = tap do end; end; break; end
+
+while class << self; tap do end; end; break; end
+
+while class << self; a = tap do end; end; break; end
diff --git a/test/prism/fixtures/whitequark/LICENSE b/test/prism/fixtures/whitequark/LICENSE
new file mode 100644
index 0000000000..971310e3d6
--- /dev/null
+++ b/test/prism/fixtures/whitequark/LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) 2013-2016 whitequark <whitequark@whitequark.org>
+
+Parts of the source are derived from ruby_parser:
+Copyright (c) Ryan Davis, seattle.rb
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/test/prism/fixtures/whitequark/__ENCODING__.txt b/test/prism/fixtures/whitequark/__ENCODING__.txt
new file mode 100644
index 0000000000..d6debf2f92
--- /dev/null
+++ b/test/prism/fixtures/whitequark/__ENCODING__.txt
@@ -0,0 +1 @@
+__ENCODING__
diff --git a/test/prism/fixtures/whitequark/__ENCODING___legacy_.txt b/test/prism/fixtures/whitequark/__ENCODING___legacy_.txt
new file mode 100644
index 0000000000..d6debf2f92
--- /dev/null
+++ b/test/prism/fixtures/whitequark/__ENCODING___legacy_.txt
@@ -0,0 +1 @@
+__ENCODING__
diff --git a/test/prism/fixtures/whitequark/alias.txt b/test/prism/fixtures/whitequark/alias.txt
new file mode 100644
index 0000000000..e33b120022
--- /dev/null
+++ b/test/prism/fixtures/whitequark/alias.txt
@@ -0,0 +1 @@
+alias :foo bar
diff --git a/test/prism/fixtures/whitequark/alias_gvar.txt b/test/prism/fixtures/whitequark/alias_gvar.txt
new file mode 100644
index 0000000000..b975d97f8e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/alias_gvar.txt
@@ -0,0 +1,3 @@
+alias $a $+
+
+alias $a $b
diff --git a/test/prism/fixtures/whitequark/ambiuous_quoted_label_in_ternary_operator.txt b/test/prism/fixtures/whitequark/ambiuous_quoted_label_in_ternary_operator.txt
new file mode 100644
index 0000000000..9b2e3afad5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ambiuous_quoted_label_in_ternary_operator.txt
@@ -0,0 +1 @@
+a ? b & '': nil
diff --git a/test/prism/fixtures/whitequark/and.txt b/test/prism/fixtures/whitequark/and.txt
new file mode 100644
index 0000000000..43fa6a65cd
--- /dev/null
+++ b/test/prism/fixtures/whitequark/and.txt
@@ -0,0 +1,3 @@
+foo && bar
+
+foo and bar
diff --git a/test/prism/fixtures/whitequark/and_asgn.txt b/test/prism/fixtures/whitequark/and_asgn.txt
new file mode 100644
index 0000000000..a979265914
--- /dev/null
+++ b/test/prism/fixtures/whitequark/and_asgn.txt
@@ -0,0 +1,3 @@
+foo.a &&= 1
+
+foo[0, 1] &&= 2
diff --git a/test/prism/fixtures/whitequark/and_or_masgn.txt b/test/prism/fixtures/whitequark/and_or_masgn.txt
new file mode 100644
index 0000000000..e346041604
--- /dev/null
+++ b/test/prism/fixtures/whitequark/and_or_masgn.txt
@@ -0,0 +1,3 @@
+foo && (a, b = bar)
+
+foo || (a, b = bar)
diff --git a/test/prism/fixtures/whitequark/anonymous_blockarg.txt b/test/prism/fixtures/whitequark/anonymous_blockarg.txt
new file mode 100644
index 0000000000..e3eaaad6ce
--- /dev/null
+++ b/test/prism/fixtures/whitequark/anonymous_blockarg.txt
@@ -0,0 +1 @@
+def foo(&); bar(&); end
diff --git a/test/prism/fixtures/whitequark/arg.txt b/test/prism/fixtures/whitequark/arg.txt
new file mode 100644
index 0000000000..b1984ad5c4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/arg.txt
@@ -0,0 +1,3 @@
+def f(foo); end
+
+def f(foo, bar); end
diff --git a/test/prism/fixtures/whitequark/arg_duplicate_ignored.txt b/test/prism/fixtures/whitequark/arg_duplicate_ignored.txt
new file mode 100644
index 0000000000..0f5cc33961
--- /dev/null
+++ b/test/prism/fixtures/whitequark/arg_duplicate_ignored.txt
@@ -0,0 +1,3 @@
+def foo(_, _); end
+
+def foo(_a, _a); end
diff --git a/test/prism/fixtures/whitequark/arg_label.txt b/test/prism/fixtures/whitequark/arg_label.txt
new file mode 100644
index 0000000000..82db416cb4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/arg_label.txt
@@ -0,0 +1,6 @@
+def foo
+ a:b end
+
+def foo() a:b end
+
+f { || a:b }
diff --git a/test/prism/fixtures/whitequark/arg_scope.txt b/test/prism/fixtures/whitequark/arg_scope.txt
new file mode 100644
index 0000000000..6c67ab72e3
--- /dev/null
+++ b/test/prism/fixtures/whitequark/arg_scope.txt
@@ -0,0 +1 @@
+lambda{|;a|a}
diff --git a/test/prism/fixtures/whitequark/args.txt b/test/prism/fixtures/whitequark/args.txt
new file mode 100644
index 0000000000..773be477d3
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args.txt
@@ -0,0 +1,63 @@
+def f &b; end
+
+def f (((a))); end
+
+def f ((*)); end
+
+def f ((*, p)); end
+
+def f ((*r)); end
+
+def f ((*r, p)); end
+
+def f ((a, *)); end
+
+def f ((a, *, p)); end
+
+def f ((a, *r)); end
+
+def f ((a, *r, p)); end
+
+def f ((a, a1)); end
+
+def f (foo: 1, &b); end
+
+def f (foo: 1, bar: 2, **baz, &b); end
+
+def f **baz, &b; end
+
+def f *, **; end
+
+def f *r, &b; end
+
+def f *r, p, &b; end
+
+def f ; end
+
+def f a, &b; end
+
+def f a, *r, &b; end
+
+def f a, *r, p, &b; end
+
+def f a, o=1, &b; end
+
+def f a, o=1, *r, &b; end
+
+def f a, o=1, *r, p, &b; end
+
+def f a, o=1, p, &b; end
+
+def f foo:
+; end
+
+def f foo: -1
+; end
+
+def f o=1, &b; end
+
+def f o=1, *r, &b; end
+
+def f o=1, *r, p, &b; end
+
+def f o=1, p, &b; end
diff --git a/test/prism/fixtures/whitequark/args_args_assocs.txt b/test/prism/fixtures/whitequark/args_args_assocs.txt
new file mode 100644
index 0000000000..445f899442
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_args_assocs.txt
@@ -0,0 +1,3 @@
+fun(foo, :foo => 1)
+
+fun(foo, :foo => 1, &baz)
diff --git a/test/prism/fixtures/whitequark/args_args_assocs_comma.txt b/test/prism/fixtures/whitequark/args_args_assocs_comma.txt
new file mode 100644
index 0000000000..b566a59037
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_args_assocs_comma.txt
@@ -0,0 +1 @@
+foo[bar, :baz => 1,]
diff --git a/test/prism/fixtures/whitequark/args_args_comma.txt b/test/prism/fixtures/whitequark/args_args_comma.txt
new file mode 100644
index 0000000000..80770716dd
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_args_comma.txt
@@ -0,0 +1 @@
+foo[bar,]
diff --git a/test/prism/fixtures/whitequark/args_args_star.txt b/test/prism/fixtures/whitequark/args_args_star.txt
new file mode 100644
index 0000000000..d4dc9cc579
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_args_star.txt
@@ -0,0 +1,3 @@
+fun(foo, *bar)
+
+fun(foo, *bar, &baz)
diff --git a/test/prism/fixtures/whitequark/args_assocs.txt b/test/prism/fixtures/whitequark/args_assocs.txt
new file mode 100644
index 0000000000..b33e131181
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_assocs.txt
@@ -0,0 +1,11 @@
+fun(:foo => 1)
+
+fun(:foo => 1, &baz)
+
+self.[]= foo, :a => 1
+
+self[:bar => 1]
+
+super(:foo => 42)
+
+yield(:foo => 42)
diff --git a/test/prism/fixtures/whitequark/args_assocs_comma.txt b/test/prism/fixtures/whitequark/args_assocs_comma.txt
new file mode 100644
index 0000000000..15e5cd65dc
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_assocs_comma.txt
@@ -0,0 +1 @@
+foo[:baz => 1,]
diff --git a/test/prism/fixtures/whitequark/args_assocs_legacy.txt b/test/prism/fixtures/whitequark/args_assocs_legacy.txt
new file mode 100644
index 0000000000..b33e131181
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_assocs_legacy.txt
@@ -0,0 +1,11 @@
+fun(:foo => 1)
+
+fun(:foo => 1, &baz)
+
+self.[]= foo, :a => 1
+
+self[:bar => 1]
+
+super(:foo => 42)
+
+yield(:foo => 42)
diff --git a/test/prism/fixtures/whitequark/args_block_pass.txt b/test/prism/fixtures/whitequark/args_block_pass.txt
new file mode 100644
index 0000000000..35d7d23885
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_block_pass.txt
@@ -0,0 +1 @@
+fun(&bar)
diff --git a/test/prism/fixtures/whitequark/args_cmd.txt b/test/prism/fixtures/whitequark/args_cmd.txt
new file mode 100644
index 0000000000..dd0c8891d0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_cmd.txt
@@ -0,0 +1 @@
+fun(f bar)
diff --git a/test/prism/fixtures/whitequark/args_star.txt b/test/prism/fixtures/whitequark/args_star.txt
new file mode 100644
index 0000000000..ce1e6f8465
--- /dev/null
+++ b/test/prism/fixtures/whitequark/args_star.txt
@@ -0,0 +1,3 @@
+fun(*bar)
+
+fun(*bar, &baz)
diff --git a/test/prism/fixtures/whitequark/array_assocs.txt b/test/prism/fixtures/whitequark/array_assocs.txt
new file mode 100644
index 0000000000..fcecfcdefc
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_assocs.txt
@@ -0,0 +1,3 @@
+[ 1 => 2 ]
+
+[ 1, 2 => 3 ]
diff --git a/test/prism/fixtures/whitequark/array_plain.txt b/test/prism/fixtures/whitequark/array_plain.txt
new file mode 100644
index 0000000000..44e2ace7e5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_plain.txt
@@ -0,0 +1 @@
+[1, 2]
diff --git a/test/prism/fixtures/whitequark/array_splat.txt b/test/prism/fixtures/whitequark/array_splat.txt
new file mode 100644
index 0000000000..144c1eb124
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_splat.txt
@@ -0,0 +1,5 @@
+[*foo]
+
+[1, *foo, 2]
+
+[1, *foo]
diff --git a/test/prism/fixtures/whitequark/array_symbols.txt b/test/prism/fixtures/whitequark/array_symbols.txt
new file mode 100644
index 0000000000..a9f9df0404
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_symbols.txt
@@ -0,0 +1 @@
+%i[foo bar]
diff --git a/test/prism/fixtures/whitequark/array_symbols_empty.txt b/test/prism/fixtures/whitequark/array_symbols_empty.txt
new file mode 100644
index 0000000000..da3a89ee9b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_symbols_empty.txt
@@ -0,0 +1,3 @@
+%I()
+
+%i[]
diff --git a/test/prism/fixtures/whitequark/array_symbols_interp.txt b/test/prism/fixtures/whitequark/array_symbols_interp.txt
new file mode 100644
index 0000000000..d4950d0c05
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_symbols_interp.txt
@@ -0,0 +1,3 @@
+%I[foo #{bar}]
+
+%I[foo#{bar}]
diff --git a/test/prism/fixtures/whitequark/array_words.txt b/test/prism/fixtures/whitequark/array_words.txt
new file mode 100644
index 0000000000..a07380cadc
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_words.txt
@@ -0,0 +1 @@
+%w[foo bar]
diff --git a/test/prism/fixtures/whitequark/array_words_empty.txt b/test/prism/fixtures/whitequark/array_words_empty.txt
new file mode 100644
index 0000000000..7568263f4a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_words_empty.txt
@@ -0,0 +1,3 @@
+%W()
+
+%w[]
diff --git a/test/prism/fixtures/whitequark/array_words_interp.txt b/test/prism/fixtures/whitequark/array_words_interp.txt
new file mode 100644
index 0000000000..1460f7dc03
--- /dev/null
+++ b/test/prism/fixtures/whitequark/array_words_interp.txt
@@ -0,0 +1,3 @@
+%W[foo #{bar}]
+
+%W[foo #{bar}foo#@baz]
diff --git a/test/prism/fixtures/whitequark/asgn_cmd.txt b/test/prism/fixtures/whitequark/asgn_cmd.txt
new file mode 100644
index 0000000000..81f8cc1c8d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/asgn_cmd.txt
@@ -0,0 +1,3 @@
+foo = bar = m foo
+
+foo = m foo
diff --git a/test/prism/fixtures/whitequark/asgn_mrhs.txt b/test/prism/fixtures/whitequark/asgn_mrhs.txt
new file mode 100644
index 0000000000..f0b0055e55
--- /dev/null
+++ b/test/prism/fixtures/whitequark/asgn_mrhs.txt
@@ -0,0 +1,5 @@
+foo = *bar
+
+foo = bar, 1
+
+foo = baz, *bar
diff --git a/test/prism/fixtures/whitequark/back_ref.txt b/test/prism/fixtures/whitequark/back_ref.txt
new file mode 100644
index 0000000000..03166e10ee
--- /dev/null
+++ b/test/prism/fixtures/whitequark/back_ref.txt
@@ -0,0 +1 @@
+$+
diff --git a/test/prism/fixtures/whitequark/bang.txt b/test/prism/fixtures/whitequark/bang.txt
new file mode 100644
index 0000000000..6cf9410cf5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bang.txt
@@ -0,0 +1 @@
+!foo
diff --git a/test/prism/fixtures/whitequark/bang_cmd.txt b/test/prism/fixtures/whitequark/bang_cmd.txt
new file mode 100644
index 0000000000..0a5252c001
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bang_cmd.txt
@@ -0,0 +1 @@
+!m foo
diff --git a/test/prism/fixtures/whitequark/begin_cmdarg.txt b/test/prism/fixtures/whitequark/begin_cmdarg.txt
new file mode 100644
index 0000000000..a5873668e9
--- /dev/null
+++ b/test/prism/fixtures/whitequark/begin_cmdarg.txt
@@ -0,0 +1 @@
+p begin 1.times do 1 end end
diff --git a/test/prism/fixtures/whitequark/beginless_erange_after_newline.txt b/test/prism/fixtures/whitequark/beginless_erange_after_newline.txt
new file mode 100644
index 0000000000..ae6c75564a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/beginless_erange_after_newline.txt
@@ -0,0 +1,2 @@
+foo
+...100
diff --git a/test/prism/fixtures/whitequark/beginless_irange_after_newline.txt b/test/prism/fixtures/whitequark/beginless_irange_after_newline.txt
new file mode 100644
index 0000000000..bfc8d5e5e8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/beginless_irange_after_newline.txt
@@ -0,0 +1,2 @@
+foo
+..100
diff --git a/test/prism/fixtures/whitequark/beginless_range.txt b/test/prism/fixtures/whitequark/beginless_range.txt
new file mode 100644
index 0000000000..ef52703b8a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/beginless_range.txt
@@ -0,0 +1,3 @@
+...100
+
+..100
diff --git a/test/prism/fixtures/whitequark/blockarg.txt b/test/prism/fixtures/whitequark/blockarg.txt
new file mode 100644
index 0000000000..63552e97be
--- /dev/null
+++ b/test/prism/fixtures/whitequark/blockarg.txt
@@ -0,0 +1 @@
+def f(&block); end
diff --git a/test/prism/fixtures/whitequark/blockargs.txt b/test/prism/fixtures/whitequark/blockargs.txt
new file mode 100644
index 0000000000..cdd2c4f331
--- /dev/null
+++ b/test/prism/fixtures/whitequark/blockargs.txt
@@ -0,0 +1,71 @@
+f{ }
+
+f{ | | }
+
+f{ |&b| }
+
+f{ |**baz, &b| }
+
+f{ |*, &b| }
+
+f{ |*r, p, &b| }
+
+f{ |*s, &b| }
+
+f{ |*s| }
+
+f{ |*| }
+
+f{ |;
+a
+| }
+
+f{ |;a| }
+
+f{ |a, &b| }
+
+f{ |a, *, &b| }
+
+f{ |a, *r, p, &b| }
+
+f{ |a, *s, &b| }
+
+f{ |a, *s| }
+
+f{ |a, *| }
+
+f{ |a, b,| }
+
+f{ |a, c| }
+
+f{ |a, o=1, &b| }
+
+f{ |a, o=1, *r, p, &b| }
+
+f{ |a, o=1, o1=2, *r, &b| }
+
+f{ |a, o=1, p, &b| }
+
+f{ |a,| }
+
+f{ |a| }
+
+f{ |a| }
+
+f{ |a| }
+
+f{ |foo: 1, &b| }
+
+f{ |foo: 1, bar: 2, **baz, &b| }
+
+f{ |foo:| }
+
+f{ |o=1, &b| }
+
+f{ |o=1, *r, &b| }
+
+f{ |o=1, *r, p, &b| }
+
+f{ |o=1, p, &b| }
+
+f{ || }
diff --git a/test/prism/fixtures/whitequark/break.txt b/test/prism/fixtures/whitequark/break.txt
new file mode 100644
index 0000000000..da51ec7c31
--- /dev/null
+++ b/test/prism/fixtures/whitequark/break.txt
@@ -0,0 +1,7 @@
+break
+
+break foo
+
+break()
+
+break(foo)
diff --git a/test/prism/fixtures/whitequark/break_block.txt b/test/prism/fixtures/whitequark/break_block.txt
new file mode 100644
index 0000000000..4b58c58d5e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/break_block.txt
@@ -0,0 +1 @@
+break fun foo do end
diff --git a/test/prism/fixtures/whitequark/bug_435.txt b/test/prism/fixtures/whitequark/bug_435.txt
new file mode 100644
index 0000000000..3e4e0d5abd
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_435.txt
@@ -0,0 +1 @@
+"#{-> foo {}}"
diff --git a/test/prism/fixtures/whitequark/bug_447.txt b/test/prism/fixtures/whitequark/bug_447.txt
new file mode 100644
index 0000000000..7da59bbc2f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_447.txt
@@ -0,0 +1,3 @@
+m [] do end
+
+m [], 1 do end
diff --git a/test/prism/fixtures/whitequark/bug_452.txt b/test/prism/fixtures/whitequark/bug_452.txt
new file mode 100644
index 0000000000..8b41dd6027
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_452.txt
@@ -0,0 +1 @@
+td (1_500).toString(); td.num do; end
diff --git a/test/prism/fixtures/whitequark/bug_466.txt b/test/prism/fixtures/whitequark/bug_466.txt
new file mode 100644
index 0000000000..ad02ad38ae
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_466.txt
@@ -0,0 +1 @@
+foo "#{(1+1).to_i}" do; end
diff --git a/test/prism/fixtures/whitequark/bug_473.txt b/test/prism/fixtures/whitequark/bug_473.txt
new file mode 100644
index 0000000000..0d2ea883a1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_473.txt
@@ -0,0 +1 @@
+m "#{[]}"
diff --git a/test/prism/fixtures/whitequark/bug_480.txt b/test/prism/fixtures/whitequark/bug_480.txt
new file mode 100644
index 0000000000..0558b2c957
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_480.txt
@@ -0,0 +1 @@
+m "#{}#{()}"
diff --git a/test/prism/fixtures/whitequark/bug_481.txt b/test/prism/fixtures/whitequark/bug_481.txt
new file mode 100644
index 0000000000..6328e9dbbd
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_481.txt
@@ -0,0 +1 @@
+m def x(); end; 1.tap do end
diff --git a/test/prism/fixtures/whitequark/bug_ascii_8bit_in_literal.txt b/test/prism/fixtures/whitequark/bug_ascii_8bit_in_literal.txt
new file mode 100644
index 0000000000..85399bd19a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_ascii_8bit_in_literal.txt
@@ -0,0 +1,2 @@
+# coding:utf-8
+ "\xD0\xBF\xD1\x80\xD0\xBE\xD0\xB2\xD0\xB5\xD1\x80\xD0\xBA\xD0\xB0"
diff --git a/test/prism/fixtures/whitequark/bug_cmd_string_lookahead.txt b/test/prism/fixtures/whitequark/bug_cmd_string_lookahead.txt
new file mode 100644
index 0000000000..7e9e54c518
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_cmd_string_lookahead.txt
@@ -0,0 +1 @@
+desc "foo" do end
diff --git a/test/prism/fixtures/whitequark/bug_cmdarg.txt b/test/prism/fixtures/whitequark/bug_cmdarg.txt
new file mode 100644
index 0000000000..0281cd6668
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_cmdarg.txt
@@ -0,0 +1,5 @@
+assert do: true
+
+assert dogs
+
+f x: -> do meth do end end
diff --git a/test/prism/fixtures/whitequark/bug_def_no_paren_eql_begin.txt b/test/prism/fixtures/whitequark/bug_def_no_paren_eql_begin.txt
new file mode 100644
index 0000000000..615dc88217
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_def_no_paren_eql_begin.txt
@@ -0,0 +1,4 @@
+def foo
+=begin
+=end
+end
diff --git a/test/prism/fixtures/whitequark/bug_do_block_in_call_args.txt b/test/prism/fixtures/whitequark/bug_do_block_in_call_args.txt
new file mode 100644
index 0000000000..21340fd6e8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_do_block_in_call_args.txt
@@ -0,0 +1 @@
+bar def foo; self.each do end end
diff --git a/test/prism/fixtures/whitequark/bug_do_block_in_cmdarg.txt b/test/prism/fixtures/whitequark/bug_do_block_in_cmdarg.txt
new file mode 100644
index 0000000000..7dece50408
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_do_block_in_cmdarg.txt
@@ -0,0 +1 @@
+tap (proc do end)
diff --git a/test/prism/fixtures/whitequark/bug_do_block_in_hash_brace.txt b/test/prism/fixtures/whitequark/bug_do_block_in_hash_brace.txt
new file mode 100644
index 0000000000..6c4dd205d2
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_do_block_in_hash_brace.txt
@@ -0,0 +1,9 @@
+p :foo, {"a": proc do end, b: proc do end}
+
+p :foo, {** proc do end, b: proc do end}
+
+p :foo, {:a => proc do end, b: proc do end}
+
+p :foo, {a: proc do end, b: proc do end}
+
+p :foo, {proc do end => proc do end, b: proc do end}
diff --git a/test/prism/fixtures/whitequark/bug_heredoc_do.txt b/test/prism/fixtures/whitequark/bug_heredoc_do.txt
new file mode 100644
index 0000000000..06fef0a99f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_heredoc_do.txt
@@ -0,0 +1,3 @@
+f <<-TABLE do
+TABLE
+end
diff --git a/test/prism/fixtures/whitequark/bug_interp_single.txt b/test/prism/fixtures/whitequark/bug_interp_single.txt
new file mode 100644
index 0000000000..be0b1a8542
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_interp_single.txt
@@ -0,0 +1,3 @@
+"#{1}"
+
+%W"#{1}"
diff --git a/test/prism/fixtures/whitequark/bug_lambda_leakage.txt b/test/prism/fixtures/whitequark/bug_lambda_leakage.txt
new file mode 100644
index 0000000000..372b36929a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_lambda_leakage.txt
@@ -0,0 +1 @@
+->(scope) {}; scope
diff --git a/test/prism/fixtures/whitequark/bug_regex_verification.txt b/test/prism/fixtures/whitequark/bug_regex_verification.txt
new file mode 100644
index 0000000000..f8483c8b10
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_regex_verification.txt
@@ -0,0 +1 @@
+/#)/x
diff --git a/test/prism/fixtures/whitequark/bug_rescue_empty_else.txt b/test/prism/fixtures/whitequark/bug_rescue_empty_else.txt
new file mode 100644
index 0000000000..e8c81edc57
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_rescue_empty_else.txt
@@ -0,0 +1 @@
+begin; rescue LoadError; else; end
diff --git a/test/prism/fixtures/whitequark/bug_while_not_parens_do.txt b/test/prism/fixtures/whitequark/bug_while_not_parens_do.txt
new file mode 100644
index 0000000000..628c36ef13
--- /dev/null
+++ b/test/prism/fixtures/whitequark/bug_while_not_parens_do.txt
@@ -0,0 +1 @@
+while not (true) do end
diff --git a/test/prism/fixtures/whitequark/case_cond.txt b/test/prism/fixtures/whitequark/case_cond.txt
new file mode 100644
index 0000000000..a236b27ebd
--- /dev/null
+++ b/test/prism/fixtures/whitequark/case_cond.txt
@@ -0,0 +1 @@
+case; when foo; 'foo'; end
diff --git a/test/prism/fixtures/whitequark/case_cond_else.txt b/test/prism/fixtures/whitequark/case_cond_else.txt
new file mode 100644
index 0000000000..06eefa4a1b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/case_cond_else.txt
@@ -0,0 +1 @@
+case; when foo; 'foo'; else 'bar'; end
diff --git a/test/prism/fixtures/whitequark/case_expr.txt b/test/prism/fixtures/whitequark/case_expr.txt
new file mode 100644
index 0000000000..472672c781
--- /dev/null
+++ b/test/prism/fixtures/whitequark/case_expr.txt
@@ -0,0 +1 @@
+case foo; when 'bar'; bar; end
diff --git a/test/prism/fixtures/whitequark/case_expr_else.txt b/test/prism/fixtures/whitequark/case_expr_else.txt
new file mode 100644
index 0000000000..3c55826134
--- /dev/null
+++ b/test/prism/fixtures/whitequark/case_expr_else.txt
@@ -0,0 +1 @@
+case foo; when 'bar'; bar; else baz; end
diff --git a/test/prism/fixtures/whitequark/casgn_scoped.txt b/test/prism/fixtures/whitequark/casgn_scoped.txt
new file mode 100644
index 0000000000..964d0f4c9b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/casgn_scoped.txt
@@ -0,0 +1 @@
+Bar::Foo = 10
diff --git a/test/prism/fixtures/whitequark/casgn_toplevel.txt b/test/prism/fixtures/whitequark/casgn_toplevel.txt
new file mode 100644
index 0000000000..047a3b6745
--- /dev/null
+++ b/test/prism/fixtures/whitequark/casgn_toplevel.txt
@@ -0,0 +1 @@
+::Foo = 10
diff --git a/test/prism/fixtures/whitequark/casgn_unscoped.txt b/test/prism/fixtures/whitequark/casgn_unscoped.txt
new file mode 100644
index 0000000000..5632cf64ee
--- /dev/null
+++ b/test/prism/fixtures/whitequark/casgn_unscoped.txt
@@ -0,0 +1 @@
+Foo = 10
diff --git a/test/prism/fixtures/whitequark/character.txt b/test/prism/fixtures/whitequark/character.txt
new file mode 100644
index 0000000000..b22ffbb71a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/character.txt
@@ -0,0 +1 @@
+?a
diff --git a/test/prism/fixtures/whitequark/class.txt b/test/prism/fixtures/whitequark/class.txt
new file mode 100644
index 0000000000..a30a248e96
--- /dev/null
+++ b/test/prism/fixtures/whitequark/class.txt
@@ -0,0 +1,3 @@
+class Foo end
+
+class Foo; end
diff --git a/test/prism/fixtures/whitequark/class_definition_in_while_cond.txt b/test/prism/fixtures/whitequark/class_definition_in_while_cond.txt
new file mode 100644
index 0000000000..10427314b5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/class_definition_in_while_cond.txt
@@ -0,0 +1,7 @@
+while class << self; a = tap do end; end; break; end
+
+while class << self; tap do end; end; break; end
+
+while class Foo a = tap do end; end; break; end
+
+while class Foo; tap do end; end; break; end
diff --git a/test/prism/fixtures/whitequark/class_super.txt b/test/prism/fixtures/whitequark/class_super.txt
new file mode 100644
index 0000000000..8829d82d36
--- /dev/null
+++ b/test/prism/fixtures/whitequark/class_super.txt
@@ -0,0 +1 @@
+class Foo < Bar; end
diff --git a/test/prism/fixtures/whitequark/class_super_label.txt b/test/prism/fixtures/whitequark/class_super_label.txt
new file mode 100644
index 0000000000..5d47897ab6
--- /dev/null
+++ b/test/prism/fixtures/whitequark/class_super_label.txt
@@ -0,0 +1 @@
+class Foo < a:b; end
diff --git a/test/prism/fixtures/whitequark/comments_before_leading_dot__27.txt b/test/prism/fixtures/whitequark/comments_before_leading_dot__27.txt
new file mode 100644
index 0000000000..208f2d87fe
--- /dev/null
+++ b/test/prism/fixtures/whitequark/comments_before_leading_dot__27.txt
@@ -0,0 +1,19 @@
+a #
+ #
+&.foo
+
+
+a #
+ #
+.foo
+
+
+a #
+#
+&.foo
+
+
+a #
+#
+.foo
+
diff --git a/test/prism/fixtures/whitequark/complex.txt b/test/prism/fixtures/whitequark/complex.txt
new file mode 100644
index 0000000000..1dbf2c13f4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/complex.txt
@@ -0,0 +1,7 @@
+42.1i
+
+42.1ri
+
+42i
+
+42ri
diff --git a/test/prism/fixtures/whitequark/cond_begin.txt b/test/prism/fixtures/whitequark/cond_begin.txt
new file mode 100644
index 0000000000..49d709b79c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_begin.txt
@@ -0,0 +1 @@
+if (bar); foo; end
diff --git a/test/prism/fixtures/whitequark/cond_begin_masgn.txt b/test/prism/fixtures/whitequark/cond_begin_masgn.txt
new file mode 100644
index 0000000000..f9b65026b4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_begin_masgn.txt
@@ -0,0 +1 @@
+if (bar; a, b = foo); end
diff --git a/test/prism/fixtures/whitequark/cond_eflipflop.txt b/test/prism/fixtures/whitequark/cond_eflipflop.txt
new file mode 100644
index 0000000000..1236c2dbb5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_eflipflop.txt
@@ -0,0 +1,3 @@
+!(foo...bar)
+
+if foo...bar; end
diff --git a/test/prism/fixtures/whitequark/cond_iflipflop.txt b/test/prism/fixtures/whitequark/cond_iflipflop.txt
new file mode 100644
index 0000000000..84bee71a74
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_iflipflop.txt
@@ -0,0 +1,3 @@
+!(foo..bar)
+
+if foo..bar; end
diff --git a/test/prism/fixtures/whitequark/cond_match_current_line.txt b/test/prism/fixtures/whitequark/cond_match_current_line.txt
new file mode 100644
index 0000000000..21878c7bd8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cond_match_current_line.txt
@@ -0,0 +1,3 @@
+!/wat/
+
+if /wat/; end
diff --git a/test/prism/fixtures/whitequark/const_op_asgn.txt b/test/prism/fixtures/whitequark/const_op_asgn.txt
new file mode 100644
index 0000000000..e72e7adee8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/const_op_asgn.txt
@@ -0,0 +1,9 @@
+::A += 1
+
+A += 1
+
+B::A += 1
+
+def x; ::A ||= 1; end
+
+def x; self::A ||= 1; end
diff --git a/test/prism/fixtures/whitequark/const_scoped.txt b/test/prism/fixtures/whitequark/const_scoped.txt
new file mode 100644
index 0000000000..4b03d85fc0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/const_scoped.txt
@@ -0,0 +1 @@
+Bar::Foo
diff --git a/test/prism/fixtures/whitequark/const_toplevel.txt b/test/prism/fixtures/whitequark/const_toplevel.txt
new file mode 100644
index 0000000000..f783ae752b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/const_toplevel.txt
@@ -0,0 +1 @@
+::Foo
diff --git a/test/prism/fixtures/whitequark/const_unscoped.txt b/test/prism/fixtures/whitequark/const_unscoped.txt
new file mode 100644
index 0000000000..bc56c4d894
--- /dev/null
+++ b/test/prism/fixtures/whitequark/const_unscoped.txt
@@ -0,0 +1 @@
+Foo
diff --git a/test/prism/fixtures/whitequark/cpath.txt b/test/prism/fixtures/whitequark/cpath.txt
new file mode 100644
index 0000000000..a4041692d1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cpath.txt
@@ -0,0 +1,3 @@
+module ::Foo; end
+
+module Bar::Foo; end
diff --git a/test/prism/fixtures/whitequark/cvar.txt b/test/prism/fixtures/whitequark/cvar.txt
new file mode 100644
index 0000000000..4997896e4a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cvar.txt
@@ -0,0 +1 @@
+@@foo
diff --git a/test/prism/fixtures/whitequark/cvasgn.txt b/test/prism/fixtures/whitequark/cvasgn.txt
new file mode 100644
index 0000000000..8f7e19c4fe
--- /dev/null
+++ b/test/prism/fixtures/whitequark/cvasgn.txt
@@ -0,0 +1 @@
+@@var = 10
diff --git a/test/prism/fixtures/whitequark/dedenting_heredoc.txt b/test/prism/fixtures/whitequark/dedenting_heredoc.txt
new file mode 100644
index 0000000000..84937d84ab
--- /dev/null
+++ b/test/prism/fixtures/whitequark/dedenting_heredoc.txt
@@ -0,0 +1,75 @@
+p <<~"E"
+ x
+ #{" y"}
+E
+
+p <<~"E"
+ x
+ #{foo}
+E
+
+p <<~E
+ x
+ y
+E
+
+p <<~E
+ x
+ y
+E
+
+p <<~E
+ x
+ y
+E
+
+p <<~E
+ x
+ y
+E
+
+p <<~E
+ x
+ \ y
+E
+
+p <<~E
+ x
+ \ y
+E
+
+p <<~E
+ E
+
+p <<~E
+ x
+
+y
+E
+
+p <<~E
+ x
+
+ y
+E
+
+p <<~E
+ x
+ y
+E
+
+p <<~E
+ x
+E
+
+p <<~E
+ ð
+E
+
+p <<~E
+E
+
+p <<~`E`
+ x
+ #{foo}
+E
diff --git a/test/prism/fixtures/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt b/test/prism/fixtures/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt
new file mode 100644
index 0000000000..0427715d61
--- /dev/null
+++ b/test/prism/fixtures/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt
@@ -0,0 +1,4 @@
+<<~'FOO'
+ baz\\
+ qux
+FOO
diff --git a/test/prism/fixtures/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt b/test/prism/fixtures/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt
new file mode 100644
index 0000000000..fd7bc02419
--- /dev/null
+++ b/test/prism/fixtures/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt
@@ -0,0 +1,4 @@
+<<~'FOO'
+ baz\
+ qux
+FOO
diff --git a/test/prism/fixtures/whitequark/def.txt b/test/prism/fixtures/whitequark/def.txt
new file mode 100644
index 0000000000..d96a4238b3
--- /dev/null
+++ b/test/prism/fixtures/whitequark/def.txt
@@ -0,0 +1,11 @@
+def BEGIN; end
+
+def END; end
+
+def String; end
+
+def String=; end
+
+def foo; end
+
+def until; end
diff --git a/test/prism/fixtures/whitequark/defined.txt b/test/prism/fixtures/whitequark/defined.txt
new file mode 100644
index 0000000000..5cf93e22e3
--- /dev/null
+++ b/test/prism/fixtures/whitequark/defined.txt
@@ -0,0 +1,5 @@
+defined? @foo
+
+defined? foo
+
+defined?(foo)
diff --git a/test/prism/fixtures/whitequark/defs.txt b/test/prism/fixtures/whitequark/defs.txt
new file mode 100644
index 0000000000..e0b7aa86eb
--- /dev/null
+++ b/test/prism/fixtures/whitequark/defs.txt
@@ -0,0 +1,9 @@
+def (foo).foo; end
+
+def String.foo; end
+
+def String::foo; end
+
+def self.foo; end
+
+def self::foo; end
diff --git a/test/prism/fixtures/whitequark/empty_stmt.txt b/test/prism/fixtures/whitequark/empty_stmt.txt
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/test/prism/fixtures/whitequark/empty_stmt.txt
@@ -0,0 +1 @@
+
diff --git a/test/prism/fixtures/whitequark/endless_comparison_method.txt b/test/prism/fixtures/whitequark/endless_comparison_method.txt
new file mode 100644
index 0000000000..e10c3a6ced
--- /dev/null
+++ b/test/prism/fixtures/whitequark/endless_comparison_method.txt
@@ -0,0 +1,11 @@
+def !=(other) = do_something
+
+def !=(other) = do_something
+
+def <=(other) = do_something
+
+def ==(other) = do_something
+
+def ===(other) = do_something
+
+def >=(other) = do_something
diff --git a/test/prism/fixtures/whitequark/endless_method.txt b/test/prism/fixtures/whitequark/endless_method.txt
new file mode 100644
index 0000000000..7002526229
--- /dev/null
+++ b/test/prism/fixtures/whitequark/endless_method.txt
@@ -0,0 +1,7 @@
+def foo() = 42
+
+def inc(x) = x + 1
+
+def obj.foo() = 42
+
+def obj.inc(x) = x + 1
diff --git a/test/prism/fixtures/whitequark/endless_method_command_syntax.txt b/test/prism/fixtures/whitequark/endless_method_command_syntax.txt
new file mode 100644
index 0000000000..d9dad2d747
--- /dev/null
+++ b/test/prism/fixtures/whitequark/endless_method_command_syntax.txt
@@ -0,0 +1,15 @@
+def foo = puts "Hello"
+
+def foo() = puts "Hello"
+
+def foo(x) = puts x
+
+def obj.foo = puts "Hello"
+
+def obj.foo() = puts "Hello"
+
+def obj.foo(x) = puts x
+
+def rescued(x) = raise "to be caught" rescue "instance #{x}"
+
+def self.rescued(x) = raise "to be caught" rescue "class #{x}"
diff --git a/test/prism/fixtures/whitequark/endless_method_forwarded_args_legacy.txt b/test/prism/fixtures/whitequark/endless_method_forwarded_args_legacy.txt
new file mode 100644
index 0000000000..5955e40b5b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/endless_method_forwarded_args_legacy.txt
@@ -0,0 +1 @@
+def foo(...) = bar(...)
diff --git a/test/prism/fixtures/whitequark/endless_method_with_rescue_mod.txt b/test/prism/fixtures/whitequark/endless_method_with_rescue_mod.txt
new file mode 100644
index 0000000000..93dc63a45d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/endless_method_with_rescue_mod.txt
@@ -0,0 +1,3 @@
+def m() = 1 rescue 2
+
+def self.m() = 1 rescue 2
diff --git a/test/prism/fixtures/whitequark/endless_method_without_args.txt b/test/prism/fixtures/whitequark/endless_method_without_args.txt
new file mode 100644
index 0000000000..90ea8f7c6d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/endless_method_without_args.txt
@@ -0,0 +1,7 @@
+def foo = 42
+
+def foo = 42 rescue nil
+
+def self.foo = 42
+
+def self.foo = 42 rescue nil
diff --git a/test/prism/fixtures/whitequark/ensure.txt b/test/prism/fixtures/whitequark/ensure.txt
new file mode 100644
index 0000000000..6c4b47c63c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ensure.txt
@@ -0,0 +1 @@
+begin; meth; ensure; bar; end
diff --git a/test/prism/fixtures/whitequark/ensure_empty.txt b/test/prism/fixtures/whitequark/ensure_empty.txt
new file mode 100644
index 0000000000..39a175c371
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ensure_empty.txt
@@ -0,0 +1 @@
+begin ensure end
diff --git a/test/prism/fixtures/whitequark/false.txt b/test/prism/fixtures/whitequark/false.txt
new file mode 100644
index 0000000000..c508d5366f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/false.txt
@@ -0,0 +1 @@
+false
diff --git a/test/prism/fixtures/whitequark/float.txt b/test/prism/fixtures/whitequark/float.txt
new file mode 100644
index 0000000000..8c7592a192
--- /dev/null
+++ b/test/prism/fixtures/whitequark/float.txt
@@ -0,0 +1,3 @@
+-1.33
+
+1.33
diff --git a/test/prism/fixtures/whitequark/for.txt b/test/prism/fixtures/whitequark/for.txt
new file mode 100644
index 0000000000..a27ae578da
--- /dev/null
+++ b/test/prism/fixtures/whitequark/for.txt
@@ -0,0 +1,3 @@
+for a in foo do p a; end
+
+for a in foo; p a; end
diff --git a/test/prism/fixtures/whitequark/for_mlhs.txt b/test/prism/fixtures/whitequark/for_mlhs.txt
new file mode 100644
index 0000000000..53cd5229a4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/for_mlhs.txt
@@ -0,0 +1 @@
+for a, b in foo; p a, b; end
diff --git a/test/prism/fixtures/whitequark/forward_arg.txt b/test/prism/fixtures/whitequark/forward_arg.txt
new file mode 100644
index 0000000000..c7590a8d53
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forward_arg.txt
@@ -0,0 +1 @@
+def foo(...); bar(...); end
diff --git a/test/prism/fixtures/whitequark/forward_arg_with_open_args.txt b/test/prism/fixtures/whitequark/forward_arg_with_open_args.txt
new file mode 100644
index 0000000000..fd4c06bcb5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forward_arg_with_open_args.txt
@@ -0,0 +1,27 @@
+(def foo ...
+ bar(...)
+end)
+
+(def foo ...; bar(...); end)
+
+def foo ...
+end
+
+def foo ...; bar(...); end
+
+def foo a, ...
+ bar(...)
+end
+
+def foo a, ...; bar(...); end
+
+def foo a, b = 1, ...
+end
+
+def foo b = 1, ...
+ bar(...)
+end
+
+def foo b = 1, ...; bar(...); end
+
+def foo(a, ...) bar(...) end
diff --git a/test/prism/fixtures/whitequark/forward_args_legacy.txt b/test/prism/fixtures/whitequark/forward_args_legacy.txt
new file mode 100644
index 0000000000..0d9162457f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forward_args_legacy.txt
@@ -0,0 +1,5 @@
+def foo(...); bar(...); end
+
+def foo(...); end
+
+def foo(...); super(...); end
diff --git a/test/prism/fixtures/whitequark/forwarded_argument_with_kwrestarg.txt b/test/prism/fixtures/whitequark/forwarded_argument_with_kwrestarg.txt
new file mode 100644
index 0000000000..7dbf472232
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forwarded_argument_with_kwrestarg.txt
@@ -0,0 +1 @@
+def foo(argument, **); bar(argument, **); end
diff --git a/test/prism/fixtures/whitequark/forwarded_argument_with_restarg.txt b/test/prism/fixtures/whitequark/forwarded_argument_with_restarg.txt
new file mode 100644
index 0000000000..f734bfd9ec
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forwarded_argument_with_restarg.txt
@@ -0,0 +1 @@
+def foo(argument, *); bar(argument, *); end
diff --git a/test/prism/fixtures/whitequark/forwarded_kwrestarg.txt b/test/prism/fixtures/whitequark/forwarded_kwrestarg.txt
new file mode 100644
index 0000000000..16cd8b2913
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forwarded_kwrestarg.txt
@@ -0,0 +1 @@
+def foo(**); bar(**); end
diff --git a/test/prism/fixtures/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt b/test/prism/fixtures/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
new file mode 100644
index 0000000000..52759b838f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
@@ -0,0 +1 @@
+def foo(**); bar(**, from_foo: true); end
diff --git a/test/prism/fixtures/whitequark/forwarded_restarg.txt b/test/prism/fixtures/whitequark/forwarded_restarg.txt
new file mode 100644
index 0000000000..65ac2cc1ed
--- /dev/null
+++ b/test/prism/fixtures/whitequark/forwarded_restarg.txt
@@ -0,0 +1 @@
+def foo(*); bar(*); end
diff --git a/test/prism/fixtures/whitequark/gvar.txt b/test/prism/fixtures/whitequark/gvar.txt
new file mode 100644
index 0000000000..bbf13489ad
--- /dev/null
+++ b/test/prism/fixtures/whitequark/gvar.txt
@@ -0,0 +1 @@
+$foo
diff --git a/test/prism/fixtures/whitequark/gvasgn.txt b/test/prism/fixtures/whitequark/gvasgn.txt
new file mode 100644
index 0000000000..2bcc22cdd1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/gvasgn.txt
@@ -0,0 +1 @@
+$var = 10
diff --git a/test/prism/fixtures/whitequark/hash_empty.txt b/test/prism/fixtures/whitequark/hash_empty.txt
new file mode 100644
index 0000000000..ffcd4415b0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/hash_empty.txt
@@ -0,0 +1 @@
+{ }
diff --git a/test/prism/fixtures/whitequark/hash_hashrocket.txt b/test/prism/fixtures/whitequark/hash_hashrocket.txt
new file mode 100644
index 0000000000..2cbb3bd96d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/hash_hashrocket.txt
@@ -0,0 +1,3 @@
+{ 1 => 2 }
+
+{ 1 => 2, :foo => "bar" }
diff --git a/test/prism/fixtures/whitequark/hash_kwsplat.txt b/test/prism/fixtures/whitequark/hash_kwsplat.txt
new file mode 100644
index 0000000000..921aa97c7c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/hash_kwsplat.txt
@@ -0,0 +1 @@
+{ foo: 2, **bar }
diff --git a/test/prism/fixtures/whitequark/hash_label.txt b/test/prism/fixtures/whitequark/hash_label.txt
new file mode 100644
index 0000000000..3aacae4b69
--- /dev/null
+++ b/test/prism/fixtures/whitequark/hash_label.txt
@@ -0,0 +1 @@
+{ foo: 2 }
diff --git a/test/prism/fixtures/whitequark/hash_label_end.txt b/test/prism/fixtures/whitequark/hash_label_end.txt
new file mode 100644
index 0000000000..ac9f7c4b41
--- /dev/null
+++ b/test/prism/fixtures/whitequark/hash_label_end.txt
@@ -0,0 +1,5 @@
+f(a ? "a":1)
+
+{ 'foo': 2 }
+
+{ 'foo': 2, 'bar': {}}
diff --git a/test/prism/fixtures/whitequark/hash_pair_value_omission.txt b/test/prism/fixtures/whitequark/hash_pair_value_omission.txt
new file mode 100644
index 0000000000..9d8ccb5877
--- /dev/null
+++ b/test/prism/fixtures/whitequark/hash_pair_value_omission.txt
@@ -0,0 +1,5 @@
+{BAR:}
+
+{a:, b:}
+
+{puts:}
diff --git a/test/prism/fixtures/whitequark/heredoc.txt b/test/prism/fixtures/whitequark/heredoc.txt
new file mode 100644
index 0000000000..1bfc963f94
--- /dev/null
+++ b/test/prism/fixtures/whitequark/heredoc.txt
@@ -0,0 +1,14 @@
+<<'HERE'
+foo
+bar
+HERE
+
+<<HERE
+foo
+bar
+HERE
+
+<<`HERE`
+foo
+bar
+HERE
diff --git a/test/prism/fixtures/whitequark/if.txt b/test/prism/fixtures/whitequark/if.txt
new file mode 100644
index 0000000000..3de3525286
--- /dev/null
+++ b/test/prism/fixtures/whitequark/if.txt
@@ -0,0 +1,3 @@
+if foo then bar; end
+
+if foo; bar; end
diff --git a/test/prism/fixtures/whitequark/if_else.txt b/test/prism/fixtures/whitequark/if_else.txt
new file mode 100644
index 0000000000..62bab8138c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/if_else.txt
@@ -0,0 +1,3 @@
+if foo then bar; else baz; end
+
+if foo; bar; else baz; end
diff --git a/test/prism/fixtures/whitequark/if_elsif.txt b/test/prism/fixtures/whitequark/if_elsif.txt
new file mode 100644
index 0000000000..4d71e82214
--- /dev/null
+++ b/test/prism/fixtures/whitequark/if_elsif.txt
@@ -0,0 +1 @@
+if foo; bar; elsif baz; 1; else 2; end
diff --git a/test/prism/fixtures/whitequark/if_masgn__24.txt b/test/prism/fixtures/whitequark/if_masgn__24.txt
new file mode 100644
index 0000000000..0c2c8bb04f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/if_masgn__24.txt
@@ -0,0 +1 @@
+if (a, b = foo); end
diff --git a/test/prism/fixtures/whitequark/if_mod.txt b/test/prism/fixtures/whitequark/if_mod.txt
new file mode 100644
index 0000000000..da177b5606
--- /dev/null
+++ b/test/prism/fixtures/whitequark/if_mod.txt
@@ -0,0 +1 @@
+bar if foo
diff --git a/test/prism/fixtures/whitequark/if_nl_then.txt b/test/prism/fixtures/whitequark/if_nl_then.txt
new file mode 100644
index 0000000000..b68107bad2
--- /dev/null
+++ b/test/prism/fixtures/whitequark/if_nl_then.txt
@@ -0,0 +1,2 @@
+if foo
+then bar end
diff --git a/test/prism/fixtures/whitequark/if_while_after_class__since_32.txt b/test/prism/fixtures/whitequark/if_while_after_class__since_32.txt
new file mode 100644
index 0000000000..1552494d28
--- /dev/null
+++ b/test/prism/fixtures/whitequark/if_while_after_class__since_32.txt
@@ -0,0 +1,7 @@
+class if true; Object end::Kernel; end
+
+class while true; break Object end::Kernel; end
+
+module if true; Object end::Kernel; end
+
+module while true; break Object end::Kernel; end
diff --git a/test/prism/fixtures/whitequark/int.txt b/test/prism/fixtures/whitequark/int.txt
new file mode 100644
index 0000000000..6d419918c6
--- /dev/null
+++ b/test/prism/fixtures/whitequark/int.txt
@@ -0,0 +1,5 @@
++42
+
+-42
+
+42
diff --git a/test/prism/fixtures/whitequark/int___LINE__.txt b/test/prism/fixtures/whitequark/int___LINE__.txt
new file mode 100644
index 0000000000..05dcf7afe0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/int___LINE__.txt
@@ -0,0 +1 @@
+__LINE__
diff --git a/test/prism/fixtures/whitequark/interp_digit_var.txt b/test/prism/fixtures/whitequark/interp_digit_var.txt
new file mode 100644
index 0000000000..1ae5a2e3e0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/interp_digit_var.txt
@@ -0,0 +1,87 @@
+ "#@1"
+
+ "#@@1"
+
+ %I[#@1]
+
+ %I[#@@1]
+
+ %Q{#@1}
+
+ %Q{#@@1}
+
+ %W[#@1]
+
+ %W[#@@1]
+
+ %i[ #@1 ]
+
+ %i[ #@@1 ]
+
+ %q{#@1}
+
+ %q{#@@1}
+
+ %r{#@1}
+
+ %r{#@@1}
+
+ %s{#@1}
+
+ %s{#@@1}
+
+ %w[ #@1 ]
+
+ %w[ #@@1 ]
+
+ %x{#@1}
+
+ %x{#@@1}
+
+ %{#@1}
+
+ %{#@@1}
+
+ '#@1'
+
+ '#@@1'
+
+ /#@1/
+
+ /#@@1/
+
+ :"#@1"
+
+ :"#@@1"
+
+ :'#@1'
+
+ :'#@@1'
+
+ `#@1`
+
+ `#@@1`
+
+<<-"HERE"
+#@1
+HERE
+
+<<-"HERE"
+#@@1
+HERE
+
+<<-'HERE'
+#@1
+HERE
+
+<<-'HERE'
+#@@1
+HERE
+
+<<-`HERE`
+#@1
+HERE
+
+<<-`HERE`
+#@@1
+HERE
diff --git a/test/prism/fixtures/whitequark/ivar.txt b/test/prism/fixtures/whitequark/ivar.txt
new file mode 100644
index 0000000000..9149fc67f9
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ivar.txt
@@ -0,0 +1 @@
+@foo
diff --git a/test/prism/fixtures/whitequark/ivasgn.txt b/test/prism/fixtures/whitequark/ivasgn.txt
new file mode 100644
index 0000000000..ac291799db
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ivasgn.txt
@@ -0,0 +1 @@
+@var = 10
diff --git a/test/prism/fixtures/whitequark/keyword_argument_omission.txt b/test/prism/fixtures/whitequark/keyword_argument_omission.txt
new file mode 100644
index 0000000000..47883dc9a5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/keyword_argument_omission.txt
@@ -0,0 +1 @@
+foo(a:, b:)
diff --git a/test/prism/fixtures/whitequark/kwarg.txt b/test/prism/fixtures/whitequark/kwarg.txt
new file mode 100644
index 0000000000..ca02a1fd2a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwarg.txt
@@ -0,0 +1 @@
+def f(foo:); end
diff --git a/test/prism/fixtures/whitequark/kwbegin_compstmt.txt b/test/prism/fixtures/whitequark/kwbegin_compstmt.txt
new file mode 100644
index 0000000000..33ceff2489
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwbegin_compstmt.txt
@@ -0,0 +1 @@
+begin foo!; bar! end
diff --git a/test/prism/fixtures/whitequark/kwnilarg.txt b/test/prism/fixtures/whitequark/kwnilarg.txt
new file mode 100644
index 0000000000..8fc482d5af
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwnilarg.txt
@@ -0,0 +1,5 @@
+->(**nil) {}
+
+def f(**nil); end
+
+m { |**nil| }
diff --git a/test/prism/fixtures/whitequark/kwoptarg.txt b/test/prism/fixtures/whitequark/kwoptarg.txt
new file mode 100644
index 0000000000..dc3ce728d6
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwoptarg.txt
@@ -0,0 +1 @@
+def f(foo: 1); end
diff --git a/test/prism/fixtures/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt b/test/prism/fixtures/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
new file mode 100644
index 0000000000..99dcc7239b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
@@ -0,0 +1 @@
+def f(a: nil, **); b(**) end
diff --git a/test/prism/fixtures/whitequark/kwrestarg_named.txt b/test/prism/fixtures/whitequark/kwrestarg_named.txt
new file mode 100644
index 0000000000..e17a661001
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwrestarg_named.txt
@@ -0,0 +1 @@
+def f(**foo); end
diff --git a/test/prism/fixtures/whitequark/kwrestarg_unnamed.txt b/test/prism/fixtures/whitequark/kwrestarg_unnamed.txt
new file mode 100644
index 0000000000..1b26b1d2ac
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwrestarg_unnamed.txt
@@ -0,0 +1 @@
+def f(**); end
diff --git a/test/prism/fixtures/whitequark/lbrace_arg_after_command_args.txt b/test/prism/fixtures/whitequark/lbrace_arg_after_command_args.txt
new file mode 100644
index 0000000000..277c200c9f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/lbrace_arg_after_command_args.txt
@@ -0,0 +1 @@
+let (:a) { m do; end }
diff --git a/test/prism/fixtures/whitequark/lparenarg_after_lvar__since_25.txt b/test/prism/fixtures/whitequark/lparenarg_after_lvar__since_25.txt
new file mode 100644
index 0000000000..dc3a98b1c8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/lparenarg_after_lvar__since_25.txt
@@ -0,0 +1,3 @@
+foo (-1.3).abs
+
+meth (-1.3).abs
diff --git a/test/prism/fixtures/whitequark/lvar.txt b/test/prism/fixtures/whitequark/lvar.txt
new file mode 100644
index 0000000000..257cc5642c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/lvar.txt
@@ -0,0 +1 @@
+foo
diff --git a/test/prism/fixtures/whitequark/lvar_injecting_match.txt b/test/prism/fixtures/whitequark/lvar_injecting_match.txt
new file mode 100644
index 0000000000..ba814a1088
--- /dev/null
+++ b/test/prism/fixtures/whitequark/lvar_injecting_match.txt
@@ -0,0 +1 @@
+/(?<match>bar)/ =~ 'bar'; match
diff --git a/test/prism/fixtures/whitequark/lvasgn.txt b/test/prism/fixtures/whitequark/lvasgn.txt
new file mode 100644
index 0000000000..330b8eff27
--- /dev/null
+++ b/test/prism/fixtures/whitequark/lvasgn.txt
@@ -0,0 +1 @@
+var = 10; var
diff --git a/test/prism/fixtures/whitequark/masgn.txt b/test/prism/fixtures/whitequark/masgn.txt
new file mode 100644
index 0000000000..032124287c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/masgn.txt
@@ -0,0 +1,5 @@
+(foo, bar) = 1, 2
+
+foo, bar = 1, 2
+
+foo, bar, baz = 1, 2
diff --git a/test/prism/fixtures/whitequark/masgn_attr.txt b/test/prism/fixtures/whitequark/masgn_attr.txt
new file mode 100644
index 0000000000..91a703ef44
--- /dev/null
+++ b/test/prism/fixtures/whitequark/masgn_attr.txt
@@ -0,0 +1,5 @@
+self.A, foo = foo
+
+self.a, self[1, 2] = foo
+
+self::a, foo = foo
diff --git a/test/prism/fixtures/whitequark/masgn_cmd.txt b/test/prism/fixtures/whitequark/masgn_cmd.txt
new file mode 100644
index 0000000000..18e096f1ee
--- /dev/null
+++ b/test/prism/fixtures/whitequark/masgn_cmd.txt
@@ -0,0 +1 @@
+foo, bar = m foo
diff --git a/test/prism/fixtures/whitequark/masgn_const.txt b/test/prism/fixtures/whitequark/masgn_const.txt
new file mode 100644
index 0000000000..3b6fba588a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/masgn_const.txt
@@ -0,0 +1,3 @@
+::A, foo = foo
+
+self::A, foo = foo
diff --git a/test/prism/fixtures/whitequark/masgn_nested.txt b/test/prism/fixtures/whitequark/masgn_nested.txt
new file mode 100644
index 0000000000..a1ccf4e385
--- /dev/null
+++ b/test/prism/fixtures/whitequark/masgn_nested.txt
@@ -0,0 +1,3 @@
+((b, )) = foo
+
+a, (b, c) = foo
diff --git a/test/prism/fixtures/whitequark/masgn_splat.txt b/test/prism/fixtures/whitequark/masgn_splat.txt
new file mode 100644
index 0000000000..a15dab10f2
--- /dev/null
+++ b/test/prism/fixtures/whitequark/masgn_splat.txt
@@ -0,0 +1,19 @@
+* = bar
+
+*, c, d = bar
+
+*b = bar
+
+*b, c = bar
+
+@foo, @@bar = *foo
+
+a, * = bar
+
+a, *, c = bar
+
+a, *b = bar
+
+a, *b, c = bar
+
+a, b = *foo, bar
diff --git a/test/prism/fixtures/whitequark/method_definition_in_while_cond.txt b/test/prism/fixtures/whitequark/method_definition_in_while_cond.txt
new file mode 100644
index 0000000000..6ec38906a1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/method_definition_in_while_cond.txt
@@ -0,0 +1,7 @@
+while def foo a = tap do end; end; break; end
+
+while def foo; tap do end; end; break; end
+
+while def self.foo a = tap do end; end; break; end
+
+while def self.foo; tap do end; end; break; end
diff --git a/test/prism/fixtures/whitequark/module.txt b/test/prism/fixtures/whitequark/module.txt
new file mode 100644
index 0000000000..f999df3791
--- /dev/null
+++ b/test/prism/fixtures/whitequark/module.txt
@@ -0,0 +1 @@
+module Foo; end
diff --git a/test/prism/fixtures/whitequark/multiple_pattern_matches.txt b/test/prism/fixtures/whitequark/multiple_pattern_matches.txt
new file mode 100644
index 0000000000..54a4bb4774
--- /dev/null
+++ b/test/prism/fixtures/whitequark/multiple_pattern_matches.txt
@@ -0,0 +1,5 @@
+{a: 0} => a:
+{a: 0} => a:
+
+{a: 0} in a:
+{a: 0} in a:
diff --git a/test/prism/fixtures/whitequark/newline_in_hash_argument.txt b/test/prism/fixtures/whitequark/newline_in_hash_argument.txt
new file mode 100644
index 0000000000..1681844331
--- /dev/null
+++ b/test/prism/fixtures/whitequark/newline_in_hash_argument.txt
@@ -0,0 +1,14 @@
+case foo
+in a:
+0
+true
+in "b":
+0
+true
+end
+
+obj.set "foo":
+1
+
+obj.set foo:
+1
diff --git a/test/prism/fixtures/whitequark/next.txt b/test/prism/fixtures/whitequark/next.txt
new file mode 100644
index 0000000000..7556ac2b74
--- /dev/null
+++ b/test/prism/fixtures/whitequark/next.txt
@@ -0,0 +1,7 @@
+next
+
+next foo
+
+next()
+
+next(foo)
diff --git a/test/prism/fixtures/whitequark/next_block.txt b/test/prism/fixtures/whitequark/next_block.txt
new file mode 100644
index 0000000000..d3b51dfa21
--- /dev/null
+++ b/test/prism/fixtures/whitequark/next_block.txt
@@ -0,0 +1 @@
+next fun foo do end
diff --git a/test/prism/fixtures/whitequark/nil.txt b/test/prism/fixtures/whitequark/nil.txt
new file mode 100644
index 0000000000..607602cfc6
--- /dev/null
+++ b/test/prism/fixtures/whitequark/nil.txt
@@ -0,0 +1 @@
+nil
diff --git a/test/prism/fixtures/whitequark/nil_expression.txt b/test/prism/fixtures/whitequark/nil_expression.txt
new file mode 100644
index 0000000000..aabf53f005
--- /dev/null
+++ b/test/prism/fixtures/whitequark/nil_expression.txt
@@ -0,0 +1,3 @@
+()
+
+begin end
diff --git a/test/prism/fixtures/whitequark/non_lvar_injecting_match.txt b/test/prism/fixtures/whitequark/non_lvar_injecting_match.txt
new file mode 100644
index 0000000000..f1eb7d3c2c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/non_lvar_injecting_match.txt
@@ -0,0 +1 @@
+/#{1}(?<match>bar)/ =~ 'bar'
diff --git a/test/prism/fixtures/whitequark/not.txt b/test/prism/fixtures/whitequark/not.txt
new file mode 100644
index 0000000000..d87f68f48c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/not.txt
@@ -0,0 +1,5 @@
+not foo
+
+not()
+
+not(foo)
diff --git a/test/prism/fixtures/whitequark/not_cmd.txt b/test/prism/fixtures/whitequark/not_cmd.txt
new file mode 100644
index 0000000000..685ec209ee
--- /dev/null
+++ b/test/prism/fixtures/whitequark/not_cmd.txt
@@ -0,0 +1 @@
+not m foo
diff --git a/test/prism/fixtures/whitequark/not_masgn__24.txt b/test/prism/fixtures/whitequark/not_masgn__24.txt
new file mode 100644
index 0000000000..cb93b9103d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/not_masgn__24.txt
@@ -0,0 +1 @@
+!(a, b = foo)
diff --git a/test/prism/fixtures/whitequark/nth_ref.txt b/test/prism/fixtures/whitequark/nth_ref.txt
new file mode 100644
index 0000000000..16ef65b105
--- /dev/null
+++ b/test/prism/fixtures/whitequark/nth_ref.txt
@@ -0,0 +1 @@
+$10
diff --git a/test/prism/fixtures/whitequark/numbered_args_after_27.txt b/test/prism/fixtures/whitequark/numbered_args_after_27.txt
new file mode 100644
index 0000000000..96fe7a32e2
--- /dev/null
+++ b/test/prism/fixtures/whitequark/numbered_args_after_27.txt
@@ -0,0 +1,7 @@
+-> do _1 + _9 end
+
+-> { _1 + _9}
+
+m do _1 + _9 end
+
+m { _1 + _9 }
diff --git a/test/prism/fixtures/whitequark/numparam_outside_block.txt b/test/prism/fixtures/whitequark/numparam_outside_block.txt
new file mode 100644
index 0000000000..37cbce182d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/numparam_outside_block.txt
@@ -0,0 +1,9 @@
+_1
+
+class << foo; _1; end
+
+class A; _1; end
+
+def self.m; _1; end
+
+module A; _1; end
diff --git a/test/prism/fixtures/whitequark/op_asgn.txt b/test/prism/fixtures/whitequark/op_asgn.txt
new file mode 100644
index 0000000000..a5a28b1010
--- /dev/null
+++ b/test/prism/fixtures/whitequark/op_asgn.txt
@@ -0,0 +1,5 @@
+foo.A += 1
+
+foo.a += 1
+
+foo::a += 1
diff --git a/test/prism/fixtures/whitequark/op_asgn_cmd.txt b/test/prism/fixtures/whitequark/op_asgn_cmd.txt
new file mode 100644
index 0000000000..017aa9bef7
--- /dev/null
+++ b/test/prism/fixtures/whitequark/op_asgn_cmd.txt
@@ -0,0 +1,7 @@
+foo.A += m foo
+
+foo.a += m foo
+
+foo::A += m foo
+
+foo::a += m foo
diff --git a/test/prism/fixtures/whitequark/op_asgn_index.txt b/test/prism/fixtures/whitequark/op_asgn_index.txt
new file mode 100644
index 0000000000..92cfb225fc
--- /dev/null
+++ b/test/prism/fixtures/whitequark/op_asgn_index.txt
@@ -0,0 +1 @@
+foo[0, 1] += 2
diff --git a/test/prism/fixtures/whitequark/op_asgn_index_cmd.txt b/test/prism/fixtures/whitequark/op_asgn_index_cmd.txt
new file mode 100644
index 0000000000..161b244bd4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/op_asgn_index_cmd.txt
@@ -0,0 +1 @@
+foo[0, 1] += m foo
diff --git a/test/prism/fixtures/whitequark/optarg.txt b/test/prism/fixtures/whitequark/optarg.txt
new file mode 100644
index 0000000000..9d60609961
--- /dev/null
+++ b/test/prism/fixtures/whitequark/optarg.txt
@@ -0,0 +1,3 @@
+def f foo = 1; end
+
+def f(foo=1, bar=2); end
diff --git a/test/prism/fixtures/whitequark/or.txt b/test/prism/fixtures/whitequark/or.txt
new file mode 100644
index 0000000000..c2042ebb41
--- /dev/null
+++ b/test/prism/fixtures/whitequark/or.txt
@@ -0,0 +1,3 @@
+foo or bar
+
+foo || bar
diff --git a/test/prism/fixtures/whitequark/or_asgn.txt b/test/prism/fixtures/whitequark/or_asgn.txt
new file mode 100644
index 0000000000..6e4ecc9f93
--- /dev/null
+++ b/test/prism/fixtures/whitequark/or_asgn.txt
@@ -0,0 +1,3 @@
+foo.a ||= 1
+
+foo[0, 1] ||= 2
diff --git a/test/prism/fixtures/whitequark/parser_bug_272.txt b/test/prism/fixtures/whitequark/parser_bug_272.txt
new file mode 100644
index 0000000000..2f2f2b84d2
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_272.txt
@@ -0,0 +1 @@
+a @b do |c|;end
diff --git a/test/prism/fixtures/whitequark/parser_bug_490.txt b/test/prism/fixtures/whitequark/parser_bug_490.txt
new file mode 100644
index 0000000000..cf544b1ff6
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_490.txt
@@ -0,0 +1,5 @@
+def m; class << self; A = nil; end; end
+
+def m; class << self; class C; end; end; end
+
+def m; class << self; module M; end; end; end
diff --git a/test/prism/fixtures/whitequark/parser_bug_507.txt b/test/prism/fixtures/whitequark/parser_bug_507.txt
new file mode 100644
index 0000000000..bf616b85c8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_507.txt
@@ -0,0 +1 @@
+m = -> *args do end
diff --git a/test/prism/fixtures/whitequark/parser_bug_518.txt b/test/prism/fixtures/whitequark/parser_bug_518.txt
new file mode 100644
index 0000000000..22f4afe3c8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_518.txt
@@ -0,0 +1,2 @@
+class A < B
+end
diff --git a/test/prism/fixtures/whitequark/parser_bug_525.txt b/test/prism/fixtures/whitequark/parser_bug_525.txt
new file mode 100644
index 0000000000..59d0e735b4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_525.txt
@@ -0,0 +1 @@
+m1 :k => m2 do; m3() do end; end
diff --git a/test/prism/fixtures/whitequark/parser_bug_604.txt b/test/prism/fixtures/whitequark/parser_bug_604.txt
new file mode 100644
index 0000000000..7eb91c2f46
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_604.txt
@@ -0,0 +1 @@
+m a + b do end
diff --git a/test/prism/fixtures/whitequark/parser_bug_640.txt b/test/prism/fixtures/whitequark/parser_bug_640.txt
new file mode 100644
index 0000000000..fb62ded04c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_640.txt
@@ -0,0 +1,4 @@
+<<~FOO
+ baz\
+ qux
+FOO
diff --git a/test/prism/fixtures/whitequark/parser_bug_645.txt b/test/prism/fixtures/whitequark/parser_bug_645.txt
new file mode 100644
index 0000000000..cb1e5a0dcf
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_645.txt
@@ -0,0 +1 @@
+-> (arg={}) {}
diff --git a/test/prism/fixtures/whitequark/parser_bug_830.txt b/test/prism/fixtures/whitequark/parser_bug_830.txt
new file mode 100644
index 0000000000..e5865e960d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_bug_830.txt
@@ -0,0 +1 @@
+/\(/
diff --git a/test/prism/fixtures/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt b/test/prism/fixtures/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt
new file mode 100644
index 0000000000..bddae8e153
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt
@@ -0,0 +1,3 @@
+<<~HERE
+ #{}
+HERE
diff --git a/test/prism/fixtures/whitequark/parser_slash_slash_n_escaping_in_literals.txt b/test/prism/fixtures/whitequark/parser_slash_slash_n_escaping_in_literals.txt
new file mode 100644
index 0000000000..564cebdd74
--- /dev/null
+++ b/test/prism/fixtures/whitequark/parser_slash_slash_n_escaping_in_literals.txt
@@ -0,0 +1,62 @@
+"a\
+b"
+
+%I{a\
+b}
+
+%Q{a\
+b}
+
+%W{a\
+b}
+
+%i{a\
+b}
+
+%q{a\
+b}
+
+%r{a\
+b}
+
+%s{a\
+b}
+
+%w{a\
+b}
+
+%x{a\
+b}
+
+%{a\
+b}
+
+'a\
+b'
+
+/a\
+b/
+
+:"a\
+b"
+
+:'a\
+b'
+
+<<-"HERE"
+a\
+b
+HERE
+
+<<-'HERE'
+a\
+b
+HERE
+
+<<-`HERE`
+a\
+b
+HERE
+
+`a\
+b`
diff --git a/test/prism/fixtures/whitequark/pattern_matching__FILE__LINE_literals.txt b/test/prism/fixtures/whitequark/pattern_matching__FILE__LINE_literals.txt
new file mode 100644
index 0000000000..fe0edaed55
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching__FILE__LINE_literals.txt
@@ -0,0 +1,4 @@
+ case [__FILE__, __LINE__ + 1, __ENCODING__]
+ in [__FILE__, __LINE__, __ENCODING__]
+ end
+
diff --git a/test/prism/fixtures/whitequark/pattern_matching_blank_else.txt b/test/prism/fixtures/whitequark/pattern_matching_blank_else.txt
new file mode 100644
index 0000000000..6bf059af41
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_blank_else.txt
@@ -0,0 +1 @@
+case 1; in 2; 3; else; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_else.txt b/test/prism/fixtures/whitequark/pattern_matching_else.txt
new file mode 100644
index 0000000000..29f14c91ab
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_else.txt
@@ -0,0 +1 @@
+case 1; in 2; 3; else; 4; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_single_line.txt b/test/prism/fixtures/whitequark/pattern_matching_single_line.txt
new file mode 100644
index 0000000000..12279afa24
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_single_line.txt
@@ -0,0 +1,3 @@
+1 => [a]; a
+
+1 in [a]; a
diff --git a/test/prism/fixtures/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt b/test/prism/fixtures/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
new file mode 100644
index 0000000000..1e429335d0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
@@ -0,0 +1,11 @@
+[1, 2] => a, b; a
+
+[1, 2] in a, b; a
+
+{a: 1} => a:; a
+
+{a: 1} in a:; a
+
+{key: :value} => key: value; value
+
+{key: :value} in key: value; value
diff --git a/test/prism/fixtures/whitequark/postexe.txt b/test/prism/fixtures/whitequark/postexe.txt
new file mode 100644
index 0000000000..baee33af66
--- /dev/null
+++ b/test/prism/fixtures/whitequark/postexe.txt
@@ -0,0 +1 @@
+END { 1 }
diff --git a/test/prism/fixtures/whitequark/preexe.txt b/test/prism/fixtures/whitequark/preexe.txt
new file mode 100644
index 0000000000..9e802f3f4e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/preexe.txt
@@ -0,0 +1 @@
+BEGIN { 1 }
diff --git a/test/prism/fixtures/whitequark/procarg0.txt b/test/prism/fixtures/whitequark/procarg0.txt
new file mode 100644
index 0000000000..74cae2c2eb
--- /dev/null
+++ b/test/prism/fixtures/whitequark/procarg0.txt
@@ -0,0 +1,3 @@
+m { |(foo, bar)| }
+
+m { |foo| }
diff --git a/test/prism/fixtures/whitequark/range_exclusive.txt b/test/prism/fixtures/whitequark/range_exclusive.txt
new file mode 100644
index 0000000000..9e07faed27
--- /dev/null
+++ b/test/prism/fixtures/whitequark/range_exclusive.txt
@@ -0,0 +1 @@
+1...2
diff --git a/test/prism/fixtures/whitequark/range_inclusive.txt b/test/prism/fixtures/whitequark/range_inclusive.txt
new file mode 100644
index 0000000000..8c12abf7de
--- /dev/null
+++ b/test/prism/fixtures/whitequark/range_inclusive.txt
@@ -0,0 +1 @@
+1..2
diff --git a/test/prism/fixtures/whitequark/rational.txt b/test/prism/fixtures/whitequark/rational.txt
new file mode 100644
index 0000000000..e11cacc742
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rational.txt
@@ -0,0 +1,3 @@
+42.1r
+
+42r
diff --git a/test/prism/fixtures/whitequark/redo.txt b/test/prism/fixtures/whitequark/redo.txt
new file mode 100644
index 0000000000..f49789cbab
--- /dev/null
+++ b/test/prism/fixtures/whitequark/redo.txt
@@ -0,0 +1 @@
+redo
diff --git a/test/prism/fixtures/whitequark/regex_interp.txt b/test/prism/fixtures/whitequark/regex_interp.txt
new file mode 100644
index 0000000000..f9ad7fcbc8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/regex_interp.txt
@@ -0,0 +1 @@
+/foo#{bar}baz/
diff --git a/test/prism/fixtures/whitequark/regex_plain.txt b/test/prism/fixtures/whitequark/regex_plain.txt
new file mode 100644
index 0000000000..b86faecf98
--- /dev/null
+++ b/test/prism/fixtures/whitequark/regex_plain.txt
@@ -0,0 +1 @@
+/source/im
diff --git a/test/prism/fixtures/whitequark/resbody_list.txt b/test/prism/fixtures/whitequark/resbody_list.txt
new file mode 100644
index 0000000000..e40d45fc45
--- /dev/null
+++ b/test/prism/fixtures/whitequark/resbody_list.txt
@@ -0,0 +1 @@
+begin; meth; rescue Exception; bar; end
diff --git a/test/prism/fixtures/whitequark/resbody_list_mrhs.txt b/test/prism/fixtures/whitequark/resbody_list_mrhs.txt
new file mode 100644
index 0000000000..92b8bb2c02
--- /dev/null
+++ b/test/prism/fixtures/whitequark/resbody_list_mrhs.txt
@@ -0,0 +1 @@
+begin; meth; rescue Exception, foo; bar; end
diff --git a/test/prism/fixtures/whitequark/resbody_list_var.txt b/test/prism/fixtures/whitequark/resbody_list_var.txt
new file mode 100644
index 0000000000..0a2fb90b6d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/resbody_list_var.txt
@@ -0,0 +1 @@
+begin; meth; rescue foo => ex; bar; end
diff --git a/test/prism/fixtures/whitequark/resbody_var.txt b/test/prism/fixtures/whitequark/resbody_var.txt
new file mode 100644
index 0000000000..2104ac58e7
--- /dev/null
+++ b/test/prism/fixtures/whitequark/resbody_var.txt
@@ -0,0 +1,3 @@
+begin; meth; rescue => @ex; bar; end
+
+begin; meth; rescue => ex; bar; end
diff --git a/test/prism/fixtures/whitequark/rescue.txt b/test/prism/fixtures/whitequark/rescue.txt
new file mode 100644
index 0000000000..2d3be9dc56
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue.txt
@@ -0,0 +1 @@
+begin; meth; rescue; foo; end
diff --git a/test/prism/fixtures/whitequark/rescue_else.txt b/test/prism/fixtures/whitequark/rescue_else.txt
new file mode 100644
index 0000000000..a22f8d100e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_else.txt
@@ -0,0 +1 @@
+begin; meth; rescue; foo; else; bar; end
diff --git a/test/prism/fixtures/whitequark/rescue_else_ensure.txt b/test/prism/fixtures/whitequark/rescue_else_ensure.txt
new file mode 100644
index 0000000000..167eee194a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_else_ensure.txt
@@ -0,0 +1 @@
+begin; meth; rescue; baz; else foo; ensure; bar end
diff --git a/test/prism/fixtures/whitequark/rescue_ensure.txt b/test/prism/fixtures/whitequark/rescue_ensure.txt
new file mode 100644
index 0000000000..8237257c41
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_ensure.txt
@@ -0,0 +1 @@
+begin; meth; rescue; baz; ensure; bar; end
diff --git a/test/prism/fixtures/whitequark/rescue_in_lambda_block.txt b/test/prism/fixtures/whitequark/rescue_in_lambda_block.txt
new file mode 100644
index 0000000000..ccd8ed72c5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_in_lambda_block.txt
@@ -0,0 +1 @@
+-> do rescue; end
diff --git a/test/prism/fixtures/whitequark/rescue_mod.txt b/test/prism/fixtures/whitequark/rescue_mod.txt
new file mode 100644
index 0000000000..06375d3e9b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_mod.txt
@@ -0,0 +1 @@
+meth rescue bar
diff --git a/test/prism/fixtures/whitequark/rescue_mod_asgn.txt b/test/prism/fixtures/whitequark/rescue_mod_asgn.txt
new file mode 100644
index 0000000000..abf7cd9a3d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_mod_asgn.txt
@@ -0,0 +1 @@
+foo = meth rescue bar
diff --git a/test/prism/fixtures/whitequark/rescue_mod_masgn.txt b/test/prism/fixtures/whitequark/rescue_mod_masgn.txt
new file mode 100644
index 0000000000..0716eb1f67
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_mod_masgn.txt
@@ -0,0 +1 @@
+foo, bar = meth rescue [1, 2]
diff --git a/test/prism/fixtures/whitequark/rescue_mod_op_assign.txt b/test/prism/fixtures/whitequark/rescue_mod_op_assign.txt
new file mode 100644
index 0000000000..178efa3a20
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_mod_op_assign.txt
@@ -0,0 +1 @@
+foo += meth rescue bar
diff --git a/test/prism/fixtures/whitequark/rescue_without_begin_end.txt b/test/prism/fixtures/whitequark/rescue_without_begin_end.txt
new file mode 100644
index 0000000000..8416569e2c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/rescue_without_begin_end.txt
@@ -0,0 +1 @@
+meth do; foo; rescue; bar; end
diff --git a/test/prism/fixtures/whitequark/restarg_named.txt b/test/prism/fixtures/whitequark/restarg_named.txt
new file mode 100644
index 0000000000..355cd8f493
--- /dev/null
+++ b/test/prism/fixtures/whitequark/restarg_named.txt
@@ -0,0 +1 @@
+def f(*foo); end
diff --git a/test/prism/fixtures/whitequark/restarg_unnamed.txt b/test/prism/fixtures/whitequark/restarg_unnamed.txt
new file mode 100644
index 0000000000..c9932dd30c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/restarg_unnamed.txt
@@ -0,0 +1 @@
+def f(*); end
diff --git a/test/prism/fixtures/whitequark/retry.txt b/test/prism/fixtures/whitequark/retry.txt
new file mode 100644
index 0000000000..77428f7b73
--- /dev/null
+++ b/test/prism/fixtures/whitequark/retry.txt
@@ -0,0 +1 @@
+retry
diff --git a/test/prism/fixtures/whitequark/return.txt b/test/prism/fixtures/whitequark/return.txt
new file mode 100644
index 0000000000..e3d966bda0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/return.txt
@@ -0,0 +1,7 @@
+return
+
+return foo
+
+return()
+
+return(foo)
diff --git a/test/prism/fixtures/whitequark/return_block.txt b/test/prism/fixtures/whitequark/return_block.txt
new file mode 100644
index 0000000000..00723a7517
--- /dev/null
+++ b/test/prism/fixtures/whitequark/return_block.txt
@@ -0,0 +1 @@
+return fun foo do end
diff --git a/test/prism/fixtures/whitequark/ruby_bug_10279.txt b/test/prism/fixtures/whitequark/ruby_bug_10279.txt
new file mode 100644
index 0000000000..4d0fb213d8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_10279.txt
@@ -0,0 +1 @@
+{a: if true then 42 end}
diff --git a/test/prism/fixtures/whitequark/ruby_bug_10653.txt b/test/prism/fixtures/whitequark/ruby_bug_10653.txt
new file mode 100644
index 0000000000..51354a1f70
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_10653.txt
@@ -0,0 +1,5 @@
+false ? raise do end : tap do end
+
+false ? raise {} : tap {}
+
+true ? 1.tap do |n| p n end : 0
diff --git a/test/prism/fixtures/whitequark/ruby_bug_11107.txt b/test/prism/fixtures/whitequark/ruby_bug_11107.txt
new file mode 100644
index 0000000000..1f28cb06f6
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_11107.txt
@@ -0,0 +1 @@
+p ->() do a() do end end
diff --git a/test/prism/fixtures/whitequark/ruby_bug_11380.txt b/test/prism/fixtures/whitequark/ruby_bug_11380.txt
new file mode 100644
index 0000000000..1631548e3a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_11380.txt
@@ -0,0 +1 @@
+p -> { :hello }, a: 1 do end
diff --git a/test/prism/fixtures/whitequark/ruby_bug_11873.txt b/test/prism/fixtures/whitequark/ruby_bug_11873.txt
new file mode 100644
index 0000000000..a25aa9e267
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_11873.txt
@@ -0,0 +1,23 @@
+a b(c d), "x" do end
+
+a b(c d), /x/ do end
+
+a b(c d), /x/m do end
+
+a b(c(d)), "x" do end
+
+a b(c(d)), /x/ do end
+
+a b(c(d)), /x/m do end
+
+a b{c d}, "x" do end
+
+a b{c d}, /x/ do end
+
+a b{c d}, /x/m do end
+
+a b{c(d)}, "x" do end
+
+a b{c(d)}, /x/ do end
+
+a b{c(d)}, /x/m do end
diff --git a/test/prism/fixtures/whitequark/ruby_bug_11873_a.txt b/test/prism/fixtures/whitequark/ruby_bug_11873_a.txt
new file mode 100644
index 0000000000..1856235ce5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_11873_a.txt
@@ -0,0 +1,39 @@
+a b(c d), 1 do end
+
+a b(c d), 1.0 do end
+
+a b(c d), 1.0i do end
+
+a b(c d), 1.0r do end
+
+a b(c d), :e do end
+
+a b(c(d)), 1 do end
+
+a b(c(d)), 1.0 do end
+
+a b(c(d)), 1.0i do end
+
+a b(c(d)), 1.0r do end
+
+a b(c(d)), :e do end
+
+a b{c d}, 1 do end
+
+a b{c d}, 1.0 do end
+
+a b{c d}, 1.0i do end
+
+a b{c d}, 1.0r do end
+
+a b{c d}, :e do end
+
+a b{c(d)}, 1 do end
+
+a b{c(d)}, 1.0 do end
+
+a b{c(d)}, 1.0i do end
+
+a b{c(d)}, 1.0r do end
+
+a b{c(d)}, :e do end
diff --git a/test/prism/fixtures/whitequark/ruby_bug_11873_b.txt b/test/prism/fixtures/whitequark/ruby_bug_11873_b.txt
new file mode 100644
index 0000000000..1b86662008
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_11873_b.txt
@@ -0,0 +1 @@
+p p{p(p);p p}, tap do end
diff --git a/test/prism/fixtures/whitequark/ruby_bug_11989.txt b/test/prism/fixtures/whitequark/ruby_bug_11989.txt
new file mode 100644
index 0000000000..d49b8614ed
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_11989.txt
@@ -0,0 +1,3 @@
+p <<~"E"
+ x\n y
+E
diff --git a/test/prism/fixtures/whitequark/ruby_bug_11990.txt b/test/prism/fixtures/whitequark/ruby_bug_11990.txt
new file mode 100644
index 0000000000..d0fe7b2739
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_11990.txt
@@ -0,0 +1,3 @@
+p <<~E " y"
+ x
+E
diff --git a/test/prism/fixtures/whitequark/ruby_bug_12073.txt b/test/prism/fixtures/whitequark/ruby_bug_12073.txt
new file mode 100644
index 0000000000..b2e3784422
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_12073.txt
@@ -0,0 +1,3 @@
+a = 1; a b: 1
+
+def foo raise; raise A::B, ''; end
diff --git a/test/prism/fixtures/whitequark/ruby_bug_12402.txt b/test/prism/fixtures/whitequark/ruby_bug_12402.txt
new file mode 100644
index 0000000000..060d5d95a1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_12402.txt
@@ -0,0 +1,27 @@
+foo += raise bar rescue nil
+
+foo += raise(bar) rescue nil
+
+foo = raise bar rescue nil
+
+foo = raise(bar) rescue nil
+
+foo.C += raise bar rescue nil
+
+foo.C += raise(bar) rescue nil
+
+foo.m += raise bar rescue nil
+
+foo.m += raise(bar) rescue nil
+
+foo::C ||= raise bar rescue nil
+
+foo::C ||= raise(bar) rescue nil
+
+foo::m += raise bar rescue nil
+
+foo::m += raise(bar) rescue nil
+
+foo[0] += raise bar rescue nil
+
+foo[0] += raise(bar) rescue nil
diff --git a/test/prism/fixtures/whitequark/ruby_bug_12669.txt b/test/prism/fixtures/whitequark/ruby_bug_12669.txt
new file mode 100644
index 0000000000..cd89689446
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_12669.txt
@@ -0,0 +1,7 @@
+a += b += raise :x
+
+a += b = raise :x
+
+a = b += raise :x
+
+a = b = raise :x
diff --git a/test/prism/fixtures/whitequark/ruby_bug_12686.txt b/test/prism/fixtures/whitequark/ruby_bug_12686.txt
new file mode 100644
index 0000000000..7742e791b8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_12686.txt
@@ -0,0 +1 @@
+f (g rescue nil)
diff --git a/test/prism/fixtures/whitequark/ruby_bug_13547.txt b/test/prism/fixtures/whitequark/ruby_bug_13547.txt
new file mode 100644
index 0000000000..29eafc3a4c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_13547.txt
@@ -0,0 +1 @@
+meth[] {}
diff --git a/test/prism/fixtures/whitequark/ruby_bug_14690.txt b/test/prism/fixtures/whitequark/ruby_bug_14690.txt
new file mode 100644
index 0000000000..b73b1d8aad
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_14690.txt
@@ -0,0 +1 @@
+let () { m(a) do; end }
diff --git a/test/prism/fixtures/whitequark/ruby_bug_15789.txt b/test/prism/fixtures/whitequark/ruby_bug_15789.txt
new file mode 100644
index 0000000000..6324db5110
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_15789.txt
@@ -0,0 +1,3 @@
+m ->(a = ->{_1}) {a}
+
+m ->(a: ->{_1}) {a}
diff --git a/test/prism/fixtures/whitequark/ruby_bug_9669.txt b/test/prism/fixtures/whitequark/ruby_bug_9669.txt
new file mode 100644
index 0000000000..60dfa09d51
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_9669.txt
@@ -0,0 +1,8 @@
+def a b:
+return
+end
+
+o = {
+a:
+1
+}
diff --git a/test/prism/fixtures/whitequark/sclass.txt b/test/prism/fixtures/whitequark/sclass.txt
new file mode 100644
index 0000000000..e6aadaef21
--- /dev/null
+++ b/test/prism/fixtures/whitequark/sclass.txt
@@ -0,0 +1 @@
+class << foo; nil; end
diff --git a/test/prism/fixtures/whitequark/self.txt b/test/prism/fixtures/whitequark/self.txt
new file mode 100644
index 0000000000..31f9efa4a1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/self.txt
@@ -0,0 +1 @@
+self
diff --git a/test/prism/fixtures/whitequark/send_attr_asgn.txt b/test/prism/fixtures/whitequark/send_attr_asgn.txt
new file mode 100644
index 0000000000..b477966b2a
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_attr_asgn.txt
@@ -0,0 +1,7 @@
+foo.A = 1
+
+foo.a = 1
+
+foo::A = 1
+
+foo::a = 1
diff --git a/test/prism/fixtures/whitequark/send_attr_asgn_conditional.txt b/test/prism/fixtures/whitequark/send_attr_asgn_conditional.txt
new file mode 100644
index 0000000000..1279e02cfc
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_attr_asgn_conditional.txt
@@ -0,0 +1 @@
+a&.b = 1
diff --git a/test/prism/fixtures/whitequark/send_binary_op.txt b/test/prism/fixtures/whitequark/send_binary_op.txt
new file mode 100644
index 0000000000..3e3e9300b3
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_binary_op.txt
@@ -0,0 +1,41 @@
+foo != 1
+
+foo !~ 1
+
+foo % 1
+
+foo & 1
+
+foo * 1
+
+foo ** 1
+
+foo + 1
+
+foo - 1
+
+foo / 1
+
+foo < 1
+
+foo << 1
+
+foo <= 1
+
+foo <=> 1
+
+foo == 1
+
+foo === 1
+
+foo =~ 1
+
+foo > 1
+
+foo >= 1
+
+foo >> 1
+
+foo ^ 1
+
+foo | 1
diff --git a/test/prism/fixtures/whitequark/send_block_chain_cmd.txt b/test/prism/fixtures/whitequark/send_block_chain_cmd.txt
new file mode 100644
index 0000000000..c6fe1aab0e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_block_chain_cmd.txt
@@ -0,0 +1,13 @@
+meth 1 do end.fun bar
+
+meth 1 do end.fun bar do end
+
+meth 1 do end.fun {}
+
+meth 1 do end.fun(bar)
+
+meth 1 do end.fun(bar) {}
+
+meth 1 do end::fun bar
+
+meth 1 do end::fun(bar)
diff --git a/test/prism/fixtures/whitequark/send_block_conditional.txt b/test/prism/fixtures/whitequark/send_block_conditional.txt
new file mode 100644
index 0000000000..dcc8361762
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_block_conditional.txt
@@ -0,0 +1 @@
+foo&.bar {}
diff --git a/test/prism/fixtures/whitequark/send_call.txt b/test/prism/fixtures/whitequark/send_call.txt
new file mode 100644
index 0000000000..99701270bb
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_call.txt
@@ -0,0 +1,3 @@
+foo.(1)
+
+foo::(1)
diff --git a/test/prism/fixtures/whitequark/send_conditional.txt b/test/prism/fixtures/whitequark/send_conditional.txt
new file mode 100644
index 0000000000..8ecd27e0fe
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_conditional.txt
@@ -0,0 +1 @@
+a&.b
diff --git a/test/prism/fixtures/whitequark/send_index.txt b/test/prism/fixtures/whitequark/send_index.txt
new file mode 100644
index 0000000000..f9c4dafc4e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_index.txt
@@ -0,0 +1 @@
+foo[1, 2]
diff --git a/test/prism/fixtures/whitequark/send_index_asgn.txt b/test/prism/fixtures/whitequark/send_index_asgn.txt
new file mode 100644
index 0000000000..e232fa3b96
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_index_asgn.txt
@@ -0,0 +1 @@
+foo[1, 2] = 3
diff --git a/test/prism/fixtures/whitequark/send_index_asgn_legacy.txt b/test/prism/fixtures/whitequark/send_index_asgn_legacy.txt
new file mode 100644
index 0000000000..e232fa3b96
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_index_asgn_legacy.txt
@@ -0,0 +1 @@
+foo[1, 2] = 3
diff --git a/test/prism/fixtures/whitequark/send_index_cmd.txt b/test/prism/fixtures/whitequark/send_index_cmd.txt
new file mode 100644
index 0000000000..32090e7536
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_index_cmd.txt
@@ -0,0 +1 @@
+foo[m bar]
diff --git a/test/prism/fixtures/whitequark/send_index_legacy.txt b/test/prism/fixtures/whitequark/send_index_legacy.txt
new file mode 100644
index 0000000000..f9c4dafc4e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_index_legacy.txt
@@ -0,0 +1 @@
+foo[1, 2]
diff --git a/test/prism/fixtures/whitequark/send_lambda.txt b/test/prism/fixtures/whitequark/send_lambda.txt
new file mode 100644
index 0000000000..eadd6c9c03
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_lambda.txt
@@ -0,0 +1,5 @@
+-> * { }
+
+-> do end
+
+->{ }
diff --git a/test/prism/fixtures/whitequark/send_lambda_args.txt b/test/prism/fixtures/whitequark/send_lambda_args.txt
new file mode 100644
index 0000000000..68392f2f34
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_lambda_args.txt
@@ -0,0 +1,3 @@
+-> (a) { }
+
+->(a) { }
diff --git a/test/prism/fixtures/whitequark/send_lambda_args_noparen.txt b/test/prism/fixtures/whitequark/send_lambda_args_noparen.txt
new file mode 100644
index 0000000000..c0ae077f95
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_lambda_args_noparen.txt
@@ -0,0 +1,3 @@
+-> a: 1 { }
+
+-> a: { }
diff --git a/test/prism/fixtures/whitequark/send_lambda_args_shadow.txt b/test/prism/fixtures/whitequark/send_lambda_args_shadow.txt
new file mode 100644
index 0000000000..230f35ab89
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_lambda_args_shadow.txt
@@ -0,0 +1 @@
+->(a; foo, bar) { }
diff --git a/test/prism/fixtures/whitequark/send_lambda_legacy.txt b/test/prism/fixtures/whitequark/send_lambda_legacy.txt
new file mode 100644
index 0000000000..a509407c43
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_lambda_legacy.txt
@@ -0,0 +1 @@
+->{ }
diff --git a/test/prism/fixtures/whitequark/send_op_asgn_conditional.txt b/test/prism/fixtures/whitequark/send_op_asgn_conditional.txt
new file mode 100644
index 0000000000..906088dcd1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_op_asgn_conditional.txt
@@ -0,0 +1 @@
+a&.b &&= 1
diff --git a/test/prism/fixtures/whitequark/send_plain.txt b/test/prism/fixtures/whitequark/send_plain.txt
new file mode 100644
index 0000000000..ebaf1d18c7
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_plain.txt
@@ -0,0 +1,5 @@
+foo.fun
+
+foo::Fun()
+
+foo::fun
diff --git a/test/prism/fixtures/whitequark/send_plain_cmd.txt b/test/prism/fixtures/whitequark/send_plain_cmd.txt
new file mode 100644
index 0000000000..e3fd63f272
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_plain_cmd.txt
@@ -0,0 +1,5 @@
+foo.fun bar
+
+foo::Fun bar
+
+foo::fun bar
diff --git a/test/prism/fixtures/whitequark/send_self.txt b/test/prism/fixtures/whitequark/send_self.txt
new file mode 100644
index 0000000000..f084b9bca7
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_self.txt
@@ -0,0 +1,5 @@
+fun
+
+fun!
+
+fun(1)
diff --git a/test/prism/fixtures/whitequark/send_self_block.txt b/test/prism/fixtures/whitequark/send_self_block.txt
new file mode 100644
index 0000000000..1cd6703c82
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_self_block.txt
@@ -0,0 +1,7 @@
+fun do end
+
+fun { }
+
+fun() { }
+
+fun(1) { }
diff --git a/test/prism/fixtures/whitequark/send_unary_op.txt b/test/prism/fixtures/whitequark/send_unary_op.txt
new file mode 100644
index 0000000000..73814d199f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/send_unary_op.txt
@@ -0,0 +1,5 @@
++foo
+
+-foo
+
+~foo
diff --git a/test/prism/fixtures/whitequark/slash_newline_in_heredocs.txt b/test/prism/fixtures/whitequark/slash_newline_in_heredocs.txt
new file mode 100644
index 0000000000..4962a058ea
--- /dev/null
+++ b/test/prism/fixtures/whitequark/slash_newline_in_heredocs.txt
@@ -0,0 +1,13 @@
+<<-E
+ 1 \
+ 2
+ 3
+E
+
+
+<<~E
+ 1 \
+ 2
+ 3
+E
+
diff --git a/test/prism/fixtures/whitequark/space_args_arg.txt b/test/prism/fixtures/whitequark/space_args_arg.txt
new file mode 100644
index 0000000000..47957cba54
--- /dev/null
+++ b/test/prism/fixtures/whitequark/space_args_arg.txt
@@ -0,0 +1 @@
+fun (1)
diff --git a/test/prism/fixtures/whitequark/space_args_arg_block.txt b/test/prism/fixtures/whitequark/space_args_arg_block.txt
new file mode 100644
index 0000000000..5560a82818
--- /dev/null
+++ b/test/prism/fixtures/whitequark/space_args_arg_block.txt
@@ -0,0 +1,5 @@
+foo.fun (1) {}
+
+foo::fun (1) {}
+
+fun (1) {}
diff --git a/test/prism/fixtures/whitequark/space_args_arg_call.txt b/test/prism/fixtures/whitequark/space_args_arg_call.txt
new file mode 100644
index 0000000000..3b0ae831fe
--- /dev/null
+++ b/test/prism/fixtures/whitequark/space_args_arg_call.txt
@@ -0,0 +1 @@
+fun (1).to_i
diff --git a/test/prism/fixtures/whitequark/space_args_arg_newline.txt b/test/prism/fixtures/whitequark/space_args_arg_newline.txt
new file mode 100644
index 0000000000..a6cdac6ed1
--- /dev/null
+++ b/test/prism/fixtures/whitequark/space_args_arg_newline.txt
@@ -0,0 +1,2 @@
+fun (1
+)
diff --git a/test/prism/fixtures/whitequark/space_args_block.txt b/test/prism/fixtures/whitequark/space_args_block.txt
new file mode 100644
index 0000000000..555a097605
--- /dev/null
+++ b/test/prism/fixtures/whitequark/space_args_block.txt
@@ -0,0 +1 @@
+fun () {}
diff --git a/test/prism/fixtures/whitequark/space_args_cmd.txt b/test/prism/fixtures/whitequark/space_args_cmd.txt
new file mode 100644
index 0000000000..a749695cb7
--- /dev/null
+++ b/test/prism/fixtures/whitequark/space_args_cmd.txt
@@ -0,0 +1 @@
+fun (f bar)
diff --git a/test/prism/fixtures/whitequark/string___FILE__.txt b/test/prism/fixtures/whitequark/string___FILE__.txt
new file mode 100644
index 0000000000..4815727d05
--- /dev/null
+++ b/test/prism/fixtures/whitequark/string___FILE__.txt
@@ -0,0 +1 @@
+__FILE__
diff --git a/test/prism/fixtures/whitequark/string_concat.txt b/test/prism/fixtures/whitequark/string_concat.txt
new file mode 100644
index 0000000000..30cc4f8116
--- /dev/null
+++ b/test/prism/fixtures/whitequark/string_concat.txt
@@ -0,0 +1 @@
+"foo#@a" "bar"
diff --git a/test/prism/fixtures/whitequark/string_dvar.txt b/test/prism/fixtures/whitequark/string_dvar.txt
new file mode 100644
index 0000000000..bbe5b617b2
--- /dev/null
+++ b/test/prism/fixtures/whitequark/string_dvar.txt
@@ -0,0 +1 @@
+"#@a #@@a #$a"
diff --git a/test/prism/fixtures/whitequark/string_interp.txt b/test/prism/fixtures/whitequark/string_interp.txt
new file mode 100644
index 0000000000..5fdd803341
--- /dev/null
+++ b/test/prism/fixtures/whitequark/string_interp.txt
@@ -0,0 +1 @@
+"foo#{bar}baz"
diff --git a/test/prism/fixtures/whitequark/string_plain.txt b/test/prism/fixtures/whitequark/string_plain.txt
new file mode 100644
index 0000000000..4aca78decb
--- /dev/null
+++ b/test/prism/fixtures/whitequark/string_plain.txt
@@ -0,0 +1,3 @@
+%q(foobar)
+
+'foobar'
diff --git a/test/prism/fixtures/whitequark/super.txt b/test/prism/fixtures/whitequark/super.txt
new file mode 100644
index 0000000000..9e68a9e988
--- /dev/null
+++ b/test/prism/fixtures/whitequark/super.txt
@@ -0,0 +1,5 @@
+super foo
+
+super()
+
+super(foo)
diff --git a/test/prism/fixtures/whitequark/super_block.txt b/test/prism/fixtures/whitequark/super_block.txt
new file mode 100644
index 0000000000..05a7d7fdd8
--- /dev/null
+++ b/test/prism/fixtures/whitequark/super_block.txt
@@ -0,0 +1,3 @@
+super do end
+
+super foo, bar do end
diff --git a/test/prism/fixtures/whitequark/symbol_interp.txt b/test/prism/fixtures/whitequark/symbol_interp.txt
new file mode 100644
index 0000000000..d5011b270d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/symbol_interp.txt
@@ -0,0 +1 @@
+:"foo#{bar}baz"
diff --git a/test/prism/fixtures/whitequark/symbol_plain.txt b/test/prism/fixtures/whitequark/symbol_plain.txt
new file mode 100644
index 0000000000..fd1fd0017c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/symbol_plain.txt
@@ -0,0 +1,3 @@
+:'foo'
+
+:foo
diff --git a/test/prism/fixtures/whitequark/ternary.txt b/test/prism/fixtures/whitequark/ternary.txt
new file mode 100644
index 0000000000..3a149d4e1c
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ternary.txt
@@ -0,0 +1 @@
+foo ? 1 : 2
diff --git a/test/prism/fixtures/whitequark/ternary_ambiguous_symbol.txt b/test/prism/fixtures/whitequark/ternary_ambiguous_symbol.txt
new file mode 100644
index 0000000000..19aa523c07
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ternary_ambiguous_symbol.txt
@@ -0,0 +1 @@
+t=1;(foo)?t:T
diff --git a/test/prism/fixtures/whitequark/trailing_forward_arg.txt b/test/prism/fixtures/whitequark/trailing_forward_arg.txt
new file mode 100644
index 0000000000..043870ade2
--- /dev/null
+++ b/test/prism/fixtures/whitequark/trailing_forward_arg.txt
@@ -0,0 +1 @@
+def foo(a, b, ...); bar(a, 42, ...); end
diff --git a/test/prism/fixtures/whitequark/true.txt b/test/prism/fixtures/whitequark/true.txt
new file mode 100644
index 0000000000..27ba77ddaf
--- /dev/null
+++ b/test/prism/fixtures/whitequark/true.txt
@@ -0,0 +1 @@
+true
diff --git a/test/prism/fixtures/whitequark/unary_num_pow_precedence.txt b/test/prism/fixtures/whitequark/unary_num_pow_precedence.txt
new file mode 100644
index 0000000000..f0343e3c8b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/unary_num_pow_precedence.txt
@@ -0,0 +1,5 @@
++2.0 ** 10
+
+-2 ** 10
+
+-2.0 ** 10
diff --git a/test/prism/fixtures/whitequark/undef.txt b/test/prism/fixtures/whitequark/undef.txt
new file mode 100644
index 0000000000..3e88ec7084
--- /dev/null
+++ b/test/prism/fixtures/whitequark/undef.txt
@@ -0,0 +1 @@
+undef foo, :bar, :"foo#{1}"
diff --git a/test/prism/fixtures/whitequark/unless.txt b/test/prism/fixtures/whitequark/unless.txt
new file mode 100644
index 0000000000..d04043ed90
--- /dev/null
+++ b/test/prism/fixtures/whitequark/unless.txt
@@ -0,0 +1,3 @@
+unless foo then bar; end
+
+unless foo; bar; end
diff --git a/test/prism/fixtures/whitequark/unless_else.txt b/test/prism/fixtures/whitequark/unless_else.txt
new file mode 100644
index 0000000000..8243d42031
--- /dev/null
+++ b/test/prism/fixtures/whitequark/unless_else.txt
@@ -0,0 +1,3 @@
+unless foo then bar; else baz; end
+
+unless foo; bar; else baz; end
diff --git a/test/prism/fixtures/whitequark/unless_mod.txt b/test/prism/fixtures/whitequark/unless_mod.txt
new file mode 100644
index 0000000000..2d0376a310
--- /dev/null
+++ b/test/prism/fixtures/whitequark/unless_mod.txt
@@ -0,0 +1 @@
+bar unless foo
diff --git a/test/prism/fixtures/whitequark/until.txt b/test/prism/fixtures/whitequark/until.txt
new file mode 100644
index 0000000000..06082233cb
--- /dev/null
+++ b/test/prism/fixtures/whitequark/until.txt
@@ -0,0 +1,3 @@
+until foo do meth end
+
+until foo; meth end
diff --git a/test/prism/fixtures/whitequark/until_mod.txt b/test/prism/fixtures/whitequark/until_mod.txt
new file mode 100644
index 0000000000..46a85d2ba9
--- /dev/null
+++ b/test/prism/fixtures/whitequark/until_mod.txt
@@ -0,0 +1 @@
+meth until foo
diff --git a/test/prism/fixtures/whitequark/until_post.txt b/test/prism/fixtures/whitequark/until_post.txt
new file mode 100644
index 0000000000..988e43b665
--- /dev/null
+++ b/test/prism/fixtures/whitequark/until_post.txt
@@ -0,0 +1 @@
+begin meth end until foo
diff --git a/test/prism/fixtures/whitequark/var_and_asgn.txt b/test/prism/fixtures/whitequark/var_and_asgn.txt
new file mode 100644
index 0000000000..25502968f9
--- /dev/null
+++ b/test/prism/fixtures/whitequark/var_and_asgn.txt
@@ -0,0 +1 @@
+a &&= 1
diff --git a/test/prism/fixtures/whitequark/var_op_asgn.txt b/test/prism/fixtures/whitequark/var_op_asgn.txt
new file mode 100644
index 0000000000..402d818a7e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/var_op_asgn.txt
@@ -0,0 +1,7 @@
+@@var |= 10
+
+@a |= 1
+
+a += 1
+
+def a; @@var |= 10; end
diff --git a/test/prism/fixtures/whitequark/var_op_asgn_cmd.txt b/test/prism/fixtures/whitequark/var_op_asgn_cmd.txt
new file mode 100644
index 0000000000..33f4bc0e73
--- /dev/null
+++ b/test/prism/fixtures/whitequark/var_op_asgn_cmd.txt
@@ -0,0 +1 @@
+foo += m foo
diff --git a/test/prism/fixtures/whitequark/var_or_asgn.txt b/test/prism/fixtures/whitequark/var_or_asgn.txt
new file mode 100644
index 0000000000..aa30b3d5ca
--- /dev/null
+++ b/test/prism/fixtures/whitequark/var_or_asgn.txt
@@ -0,0 +1 @@
+a ||= 1
diff --git a/test/prism/fixtures/whitequark/when_multi.txt b/test/prism/fixtures/whitequark/when_multi.txt
new file mode 100644
index 0000000000..b4fbd33125
--- /dev/null
+++ b/test/prism/fixtures/whitequark/when_multi.txt
@@ -0,0 +1 @@
+case foo; when 'bar', 'baz'; bar; end
diff --git a/test/prism/fixtures/whitequark/when_splat.txt b/test/prism/fixtures/whitequark/when_splat.txt
new file mode 100644
index 0000000000..695e5da34e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/when_splat.txt
@@ -0,0 +1 @@
+case foo; when 1, *baz; bar; when *foo; end
diff --git a/test/prism/fixtures/whitequark/when_then.txt b/test/prism/fixtures/whitequark/when_then.txt
new file mode 100644
index 0000000000..63293452b3
--- /dev/null
+++ b/test/prism/fixtures/whitequark/when_then.txt
@@ -0,0 +1 @@
+case foo; when 'bar' then bar; end
diff --git a/test/prism/fixtures/whitequark/while.txt b/test/prism/fixtures/whitequark/while.txt
new file mode 100644
index 0000000000..28b204f247
--- /dev/null
+++ b/test/prism/fixtures/whitequark/while.txt
@@ -0,0 +1,3 @@
+while foo do meth end
+
+while foo; meth end
diff --git a/test/prism/fixtures/whitequark/while_mod.txt b/test/prism/fixtures/whitequark/while_mod.txt
new file mode 100644
index 0000000000..ce3cf01d14
--- /dev/null
+++ b/test/prism/fixtures/whitequark/while_mod.txt
@@ -0,0 +1 @@
+meth while foo
diff --git a/test/prism/fixtures/whitequark/while_post.txt b/test/prism/fixtures/whitequark/while_post.txt
new file mode 100644
index 0000000000..ac6e05008b
--- /dev/null
+++ b/test/prism/fixtures/whitequark/while_post.txt
@@ -0,0 +1 @@
+begin meth end while foo
diff --git a/test/prism/fixtures/whitequark/xstring_interp.txt b/test/prism/fixtures/whitequark/xstring_interp.txt
new file mode 100644
index 0000000000..dfede8123f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/xstring_interp.txt
@@ -0,0 +1 @@
+`foo#{bar}baz`
diff --git a/test/prism/fixtures/whitequark/xstring_plain.txt b/test/prism/fixtures/whitequark/xstring_plain.txt
new file mode 100644
index 0000000000..fce255049d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/xstring_plain.txt
@@ -0,0 +1 @@
+`foobar`
diff --git a/test/prism/fixtures/whitequark/yield.txt b/test/prism/fixtures/whitequark/yield.txt
new file mode 100644
index 0000000000..0ecf639589
--- /dev/null
+++ b/test/prism/fixtures/whitequark/yield.txt
@@ -0,0 +1,7 @@
+yield
+
+yield foo
+
+yield()
+
+yield(foo)
diff --git a/test/prism/fixtures/whitequark/zsuper.txt b/test/prism/fixtures/whitequark/zsuper.txt
new file mode 100644
index 0000000000..16f5c2d3aa
--- /dev/null
+++ b/test/prism/fixtures/whitequark/zsuper.txt
@@ -0,0 +1 @@
+super
diff --git a/test/prism/fixtures/xstring.txt b/test/prism/fixtures/xstring.txt
new file mode 100644
index 0000000000..01bcc09fc5
--- /dev/null
+++ b/test/prism/fixtures/xstring.txt
@@ -0,0 +1,7 @@
+%x[foo]
+
+`foo #{bar} baz`
+
+`f\oo`
+
+`foo`
diff --git a/test/prism/fixtures/yield.txt b/test/prism/fixtures/yield.txt
new file mode 100644
index 0000000000..d75ab57a18
--- /dev/null
+++ b/test/prism/fixtures/yield.txt
@@ -0,0 +1,7 @@
+yield
+
+yield()
+
+yield(1)
+
+yield(1, 2, 3)
diff --git a/test/prism/fuzzer_test.rb b/test/prism/fuzzer_test.rb
new file mode 100644
index 0000000000..f4abcd4ac8
--- /dev/null
+++ b/test/prism/fuzzer_test.rb
@@ -0,0 +1,61 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ # These tests are simply to exercise snippets found by the fuzzer that caused invalid memory access.
+ class FuzzerTest < TestCase
+ def self.snippet(name, source)
+ define_method(:"test_fuzzer_#{name}") { YARP.dump(source) }
+ end
+
+ snippet "incomplete global variable", "$"
+ snippet "incomplete symbol", ":"
+ snippet "incomplete escaped string", '"\\'
+ snippet "trailing comment", "1\n#\n"
+ snippet "comment followed by whitespace at end of file", "1\n#\n "
+ snippet "trailing asterisk", "a *"
+ snippet "incomplete decimal number", "0d"
+ snippet "incomplete binary number", "0b"
+ snippet "incomplete octal number", "0o"
+ snippet "incomplete hex number", "0x"
+ snippet "incomplete escaped list", "%w[\\"
+ snippet "incomplete escaped regex", "/a\\"
+ snippet "unterminated heredoc with unterminated escape at end of file", "<<A\n\\"
+ snippet "escaped octal at end of file 1", '"\\3'
+ snippet "escaped octal at end of file 2", '"\\33'
+ snippet "escaped hex at end of file 1", '"\\x'
+ snippet "escaped hex at end of file 2", '"\\x3'
+ snippet "escaped unicode at end of file 1", '"\\u{3'
+ snippet "escaped unicode at end of file 2", '"\\u{33'
+ snippet "escaped unicode at end of file 3", '"\\u{333'
+ snippet "escaped unicode at end of file 4", '"\\u{3333'
+ snippet "escaped unicode at end of file 5", '"\\u{33333'
+ snippet "escaped unicode at end of file 6", '"\\u{333333'
+ snippet "escaped unicode at end of file 7", '"\\u3'
+ snippet "escaped unicode at end of file 8", '"\\u33'
+ snippet "escaped unicode at end of file 9", '"\\u333'
+
+ snippet "statements node with multiple heredocs", <<~EOF
+ for <<A + <<B
+ A
+ B
+ EOF
+ snippet "create a binary call node with arg before receiver", <<~EOF
+ <<-A.g/{/
+ A
+ /, ""\\
+ EOF
+ snippet "regular expression with start and end out of order", <<~RUBY
+ <<-A.g//,
+ A
+ /{/, ''\\
+ RUBY
+ snippet "interpolated regular expression with start and end out of order", <<~RUBY
+ <<-A.g/{/,
+ A
+ a
+ /{/, ''\\
+ RUBY
+ end
+end
diff --git a/test/prism/heredoc_dedent_test.rb b/test/prism/heredoc_dedent_test.rb
new file mode 100644
index 0000000000..9d26febc01
--- /dev/null
+++ b/test/prism/heredoc_dedent_test.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class HeredocDedentTest < TestCase
+ filepath = File.expand_path("fixtures/tilde_heredocs.txt", __dir__)
+
+ File.read(filepath).split(/(?=\n)\n(?=<)/).each_with_index do |heredoc, index|
+ define_method "test_heredoc_#{index}" do
+ node = YARP.parse(heredoc).value.statements.body.first
+ if node.is_a? StringNode
+ actual = node.unescaped
+ else
+ actual = node.parts.map { |part| part.is_a?(StringNode) ? part.unescaped : "1" }.join
+ end
+
+ assert_equal(eval(heredoc), actual, "Expected heredocs to match.")
+ end
+ end
+ end
+end
diff --git a/test/prism/iseq_test.rb b/test/prism/iseq_test.rb
new file mode 100644
index 0000000000..11d1b0572c
--- /dev/null
+++ b/test/prism/iseq_test.rb
@@ -0,0 +1,337 @@
+# frozen_string_literal: true
+
+module YARP
+ class ISeqTest < Test::Unit::TestCase
+ def test_empty_program
+ test_yarp_eval("")
+ end
+
+ ############################################################################
+ # Literals #
+ ############################################################################
+
+ def test_FalseNode
+ test_yarp_eval("false")
+ end
+
+ def test_FloatNode
+ test_yarp_eval("1.2")
+ test_yarp_eval("1.2e3")
+ test_yarp_eval("+1.2e+3")
+ test_yarp_eval("-1.2e-3")
+ end
+
+ def test_ImaginaryNode
+ test_yarp_eval("1i")
+ test_yarp_eval("+1.0i")
+ test_yarp_eval("1ri")
+ end
+
+ def test_IntegerNode
+ test_yarp_eval("1")
+ test_yarp_eval("+1")
+ test_yarp_eval("-1")
+ test_yarp_eval("0x10")
+ test_yarp_eval("0b10")
+ test_yarp_eval("0o10")
+ test_yarp_eval("010")
+ end
+
+ def test_NilNode
+ test_yarp_eval("nil")
+ end
+
+ def test_RationalNode
+ test_yarp_eval("1.2r")
+ test_yarp_eval("+1.2r")
+ end
+
+ def test_SelfNode
+ test_yarp_eval("self")
+ end
+
+ def test_TrueNode
+ test_yarp_eval("true")
+ end
+
+ ############################################################################
+ # Reads #
+ ############################################################################
+
+ def test_ClassVariableReadNode
+ test_yarp_eval("class YARP::ISeqTest; @@yct = 1; @@yct; end")
+ end
+
+ def test_ConstantPathNode
+ test_yarp_eval("YARP::ISeqTest")
+ end
+
+ def test_ConstantReadNode
+ test_yarp_eval("YARP")
+ end
+
+ def test_GlobalVariableReadNode
+ test_yarp_eval("$yct = 1; $yct")
+ end
+
+ def test_InstanceVariableReadNode
+ test_yarp_eval("class YARP::ISeqTest; @yct = 1; @yct; end")
+ end
+
+ def test_LocalVariableReadNode
+ test_yarp_eval("yct = 1; yct")
+ end
+
+ ############################################################################
+ # Writes #
+ ############################################################################
+
+ def test_ClassVariableTargetNode
+ test_yarp_eval("class YARP::ISeqTest; @@yct, @@yct1 = 1; end")
+ end
+
+ def test_ClassVariableWriteNode
+ test_yarp_eval("class YARP::ISeqTest; @@yct = 1; end")
+ end
+
+ def test_ClassVariableAndWriteNode
+ test_yarp_eval("class YARP::ISeqTest; @@yct = 0; @@yct &&= 1; end")
+ end
+
+ def test_ClassVariableOrWriteNode
+ test_yarp_eval("class YARP::ISeqTest; @@yct = 1; @@yct ||= 0; end")
+ test_yarp_eval("class YARP::ISeqTest; @@yct = nil; @@yct ||= 1; end")
+ end
+
+ def test_ClassVariableOperatorWriteNode
+ test_yarp_eval("class YARP::ISeqTest; @@yct = 0; @@yct += 1; end")
+ end
+
+ def test_ConstantTargetNode
+ # We don't call test_yarp_eval directly in this case becuase we
+ # don't want to assign the constant mutliple times if we run
+ # with `--repeat-count`
+ # Instead, we eval manually here, and remove the constant to
+ constant_names = ["YCT", "YCT2"]
+ source = "#{constant_names.join(",")} = 1"
+ yarp_eval = RubyVM::InstructionSequence.compile_yarp(source).eval
+ assert_equal yarp_eval, 1
+ constant_names.map { |name|
+ Object.send(:remove_const, name)
+ }
+ end
+
+ def test_ConstantWriteNode
+ # We don't call test_yarp_eval directly in this case becuase we
+ # don't want to assign the constant mutliple times if we run
+ # with `--repeat-count`
+ # Instead, we eval manually here, and remove the constant to
+ constant_name = "YCT"
+ source = "#{constant_name} = 1"
+ yarp_eval = RubyVM::InstructionSequence.compile_yarp(source).eval
+ assert_equal yarp_eval, 1
+ Object.send(:remove_const, constant_name)
+ end
+
+ def test_ConstantPathTargetNode
+ verbose = $VERBOSE
+ # Create some temporary nested constants
+ Object.send(:const_set, "MyFoo", Object)
+ Object.const_get("MyFoo").send(:const_set, "Bar", Object)
+
+ constant_names = ["MyBar", "MyFoo::Bar", "MyFoo::Bar::Baz"]
+ source = "#{constant_names.join(",")} = Object"
+ iseq = RubyVM::InstructionSequence.compile_yarp(source)
+ $VERBOSE = nil
+ yarp_eval = iseq.eval
+ $VERBOSE = verbose
+ assert_equal yarp_eval, Object
+
+ ensure
+ ## Teardown temp constants
+ Object.const_get("MyFoo").send(:remove_const, "Bar")
+ Object.send(:remove_const, "MyFoo")
+ Object.send(:remove_const, "MyBar")
+ $VERBOSE = verbose
+ end
+
+ def test_ConstantPathWriteNode
+ # test_yarp_eval("YARP::YCT = 1")
+ end
+
+ def test_GlobalVariableTargetNode
+ test_yarp_eval("$yct, $yct1 = 1")
+ end
+
+ def test_GlobalVariableWriteNode
+ test_yarp_eval("$yct = 1")
+ end
+
+ def test_GlobalVariableAndWriteNode
+ test_yarp_eval("$yct = 0; $yct &&= 1")
+ end
+
+ def test_GlobalVariableOrWriteNode
+ test_yarp_eval("$yct ||= 1")
+ end
+
+ def test_GlobalVariableOperatorWriteNode
+ test_yarp_eval("$yct = 0; $yct += 1")
+ end
+
+ def test_InstanceVariableTargetNode
+ test_yarp_eval("class YARP::ISeqTest; @yct, @yct1 = 1; end")
+ end
+
+ def test_InstanceVariableWriteNode
+ test_yarp_eval("class YARP::ISeqTest; @yct = 1; end")
+ end
+
+ def test_InstanceVariableAndWriteNode
+ test_yarp_eval("@yct = 0; @yct &&= 1")
+ end
+
+ def test_InstanceVariableOrWriteNode
+ test_yarp_eval("@yct ||= 1")
+ end
+
+ def test_InstanceVariableOperatorWriteNode
+ test_yarp_eval("@yct = 0; @yct += 1")
+ end
+
+ def test_LocalVariableTargetNode
+ test_yarp_eval("yct, yct1 = 1")
+ end
+
+ def test_LocalVariableWriteNode
+ test_yarp_eval("yct = 1")
+ end
+
+ def test_LocalVariableAndWriteNode
+ test_yarp_eval("yct = 0; yct &&= 1")
+ end
+
+ def test_LocalVariableOrWriteNode
+ test_yarp_eval("yct ||= 1")
+ end
+
+ def test_LocalVariableOperatorWriteNode
+ test_yarp_eval("yct = 0; yct += 1")
+ end
+
+ ############################################################################
+ # String-likes #
+ ############################################################################
+
+ def test_EmbeddedVariableNode
+ # test_yarp_eval('class YARP::ISeqTest; @yct = 1; "#@yct"; end')
+ # test_yarp_eval('class YARP::ISeqTest; @@yct = 1; "#@@yct"; end')
+ test_yarp_eval('$yct = 1; "#$yct"')
+ end
+
+ def test_InterpolatedRegularExpressionNode
+ test_yarp_eval('$yct = 1; /1 #$yct 1/')
+ test_yarp_eval('/1 #{1 + 2} 1/')
+ test_yarp_eval('/1 #{"2"} #{1 + 2} 1/')
+ end
+
+ def test_InterpolatedStringNode
+ test_yarp_eval('$yct = 1; "1 #$yct 1"')
+ test_yarp_eval('"1 #{1 + 2} 1"')
+ end
+
+ def test_InterpolatedSymbolNode
+ test_yarp_eval('$yct = 1; :"1 #$yct 1"')
+ test_yarp_eval(':"1 #{1 + 2} 1"')
+ end
+
+ def test_InterpolatedXStringNode
+ test_yarp_eval('`echo #{1}`')
+ test_yarp_eval('`printf #{"100"}`')
+ end
+
+ def test_RegularExpressionNode
+ test_yarp_eval('/yct/')
+ test_yarp_eval('/yct/i')
+ test_yarp_eval('/yct/x')
+ test_yarp_eval('/yct/m')
+ test_yarp_eval('/yct/im')
+ test_yarp_eval('/yct/mx')
+ test_yarp_eval('/yct/xi')
+ test_yarp_eval('/yct/ixm')
+ end
+
+ def test_StringConcatNode
+ # test_yarp_eval('"YARP" "::" "ISeqTest"')
+ end
+
+ def test_StringNode
+ test_yarp_eval('"yct"')
+ end
+
+ def test_SymbolNode
+ test_yarp_eval(":yct")
+ end
+
+ def test_XStringNode
+ # test_yarp_eval(<<~RUBY)
+ # class YARP::ISeqTest
+ # def self.`(command) = command * 2
+ # `yct`
+ # end
+ # RUBY
+ end
+
+ ############################################################################
+ # Jumps #
+ ############################################################################
+
+ def test_AndNode
+ test_yarp_eval("true && 1")
+ test_yarp_eval("false && 1")
+ end
+
+ def test_OrNode
+ test_yarp_eval("true || 1")
+ test_yarp_eval("false || 1")
+ end
+
+ ############################################################################
+ # Calls / arugments #
+ ############################################################################
+
+ def test_BlockArgumentNode
+ test_yarp_eval("1.then(&:to_s)")
+ end
+
+ ############################################################################
+ # Scopes/statements #
+ ############################################################################
+
+ def test_ParenthesesNode
+ test_yarp_eval("()")
+ test_yarp_eval("(1)")
+ end
+
+ private
+
+ def compare_eval(source)
+ ruby_eval = RubyVM::InstructionSequence.compile(source).eval
+ yarp_eval = RubyVM::InstructionSequence.compile_yarp(source).eval
+
+ assert_equal ruby_eval, yarp_eval
+ end
+
+ def test_yarp_eval(source)
+ compare_eval(source)
+
+ begin
+ $VERBOSE, verbose_bak = nil, $VERBOSE
+ # Test "popped" functionality
+ compare_eval("#{source}; 1")
+ ensure
+ $VERBOSE = verbose_bak
+ end
+ end
+ end
+end
diff --git a/test/prism/library_symbols_test.rb b/test/prism/library_symbols_test.rb
new file mode 100644
index 0000000000..53f56d9bfa
--- /dev/null
+++ b/test/prism/library_symbols_test.rb
@@ -0,0 +1,103 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if RUBY_PLATFORM !~ /linux/
+
+module YARP
+ #
+ # examine a yarp dll or static archive for expected external symbols.
+ # these tests only work on a linux system right now.
+ #
+ class LibrarySymbolsTest < TestCase
+ def setup
+ super
+
+ @librubyparser_a = File.expand_path("../../build/librubyparser.a", __dir__)
+ @librubyparser_so = File.expand_path("../../build/librubyparser.so", __dir__)
+ @yarp_so = File.expand_path("../../lib/yarp/yarp.so", __dir__)
+ end
+
+ # objdump runner and helpers
+ def objdump(path)
+ assert_path_exist(path)
+ %x(objdump --section=.text --syms #{path}).split("\n")
+ end
+
+ def global_objdump_symbols(path)
+ objdump(path).select { |line| line[17] == "g" }
+ end
+
+ def hidden_global_objdump_symbols(path)
+ global_objdump_symbols(path).select { |line| line =~ / \.hidden / }
+ end
+
+ def visible_global_objdump_symbols(path)
+ global_objdump_symbols(path).reject { |line| line =~ / \.hidden / }
+ end
+
+ # nm runner and helpers
+ def nm(path)
+ assert_path_exist(path)
+ %x(nm #{path}).split("\n")
+ end
+
+ def global_nm_symbols(path)
+ nm(path).select { |line| line[17] == "T" }
+ end
+
+ def local_nm_symbols(path)
+ nm(path).select { |line| line[17] == "t" }
+ end
+
+ # dig the symbol name out of each line. works for both `objdump` and `nm` output.
+ def names(symbol_lines)
+ symbol_lines.map { |line| line.split(/\s+/).last }
+ end
+
+ #
+ # static archive - librubyparser.a
+ #
+ def test_librubyparser_a_contains_nothing_globally_visible
+ omit("librubyparser.a is not built") unless File.exist?(@librubyparser_a)
+
+ assert_empty(names(visible_global_objdump_symbols(@librubyparser_a)))
+ end
+
+ def test_librubyparser_a_contains_hidden_yp_symbols
+ omit("librubyparser.a is not built") unless File.exist?(@librubyparser_a)
+
+ names(hidden_global_objdump_symbols(@librubyparser_a)).tap do |symbols|
+ assert_includes(symbols, "yp_parse")
+ assert_includes(symbols, "yp_version")
+ end
+ end
+
+ #
+ # shared object - librubyparser.so
+ #
+ def test_librubyparser_so_exports_only_the_necessary_functions
+ omit("librubyparser.so is not built") unless File.exist?(@librubyparser_so)
+
+ names(global_nm_symbols(@librubyparser_so)).tap do |symbols|
+ assert_includes(symbols, "yp_parse")
+ assert_includes(symbols, "yp_version")
+ end
+ names(local_nm_symbols(@librubyparser_so)).tap do |symbols|
+ assert_includes(symbols, "yp_encoding_shift_jis_isupper_char")
+ end
+ # TODO: someone who uses this library needs to finish this test
+ end
+
+ #
+ # shared object - yarp.so
+ #
+ def test_yarp_so_exports_only_the_C_extension_init_function
+ omit("yarp.so is not built") unless File.exist?(@yarp_so)
+
+ names(global_nm_symbols(@yarp_so)).tap do |symbols|
+ assert_equal(["Init_yarp"], symbols)
+ end
+ end
+ end
+end
diff --git a/test/prism/locals_test.rb b/test/prism/locals_test.rb
new file mode 100644
index 0000000000..45aecdcaf7
--- /dev/null
+++ b/test/prism/locals_test.rb
@@ -0,0 +1,109 @@
+# frozen_string_literal: true
+
+# This test is going to use the RubyVM::InstructionSequence class to compile
+# local tables and compare against them to ensure we have the same locals in the
+# same order. This is important to guarantee that we compile indices correctly
+# on CRuby (in terms of compatibility).
+#
+# There have also been changes made in other versions of Ruby, so we only want
+# to test on the most recent versions.
+return if !defined?(RubyVM::InstructionSequence) || RUBY_VERSION < "3.2"
+
+# Omit tests if running on a 32-bit machine because there is a bug with how
+# Ruby is handling large ISeqs on 32-bit machines
+return if RUBY_PLATFORM =~ /i686/
+
+require_relative "test_helper"
+
+module YARP
+ class LocalsTest < TestCase
+ invalid = []
+ todos = []
+
+ # Invalid break
+ invalid << "break.txt"
+ invalid << "if.txt"
+ invalid << "rescue.txt"
+ invalid << "seattlerb/block_break.txt"
+ invalid << "unless.txt"
+ invalid << "whitequark/break.txt"
+ invalid << "whitequark/break_block.txt"
+
+ # Invalid next
+ invalid << "next.txt"
+ invalid << "seattlerb/block_next.txt"
+ invalid << "unparser/corpus/literal/control.txt"
+ invalid << "whitequark/next.txt"
+ invalid << "whitequark/next_block.txt"
+
+ # Invalid redo
+ invalid << "keywords.txt"
+ invalid << "whitequark/redo.txt"
+
+ # Invalid retry
+ invalid << "whitequark/retry.txt"
+
+ # Invalid yield
+ invalid << "seattlerb/dasgn_icky2.txt"
+ invalid << "seattlerb/yield_arg.txt"
+ invalid << "seattlerb/yield_call_assocs.txt"
+ invalid << "seattlerb/yield_empty_parens.txt"
+ invalid << "unparser/corpus/literal/yield.txt"
+ invalid << "whitequark/args_assocs.txt"
+ invalid << "whitequark/args_assocs_legacy.txt"
+ invalid << "whitequark/yield.txt"
+ invalid << "yield.txt"
+
+ # Dead code eliminated
+ invalid << "whitequark/ruby_bug_10653.txt"
+
+ # case :a
+ # in Symbol(*lhs, x, *rhs)
+ # end
+ todos << "seattlerb/case_in.txt"
+
+ # <<~HERE
+ # #{<<~THERE}
+ # THERE
+ # HERE
+ todos << "seattlerb/heredoc_nested.txt"
+
+ base = File.join(__dir__, "fixtures")
+ skips = invalid | todos
+
+ Dir["**/*.txt", base: base].each do |relative|
+ next if skips.include?(relative)
+
+ filepath = File.join(base, relative)
+ define_method("test_#{relative}") { assert_locals(filepath) }
+ end
+
+ def setup
+ @previous_default_external = Encoding.default_external
+ ignore_warnings { Encoding.default_external = Encoding::UTF_8 }
+ end
+
+ def teardown
+ ignore_warnings { Encoding.default_external = @previous_default_external }
+ end
+
+ private
+
+ def assert_locals(filepath)
+ source = File.read(filepath)
+
+ expected = Debug.cruby_locals(source)
+ actual = Debug.yarp_locals(source)
+
+ assert_equal(expected, actual)
+ end
+
+ def ignore_warnings
+ previous_verbosity = $VERBOSE
+ $VERBOSE = nil
+ yield
+ ensure
+ $VERBOSE = previous_verbosity
+ end
+ end
+end
diff --git a/test/prism/location_test.rb b/test/prism/location_test.rb
new file mode 100644
index 0000000000..a8e9b345a1
--- /dev/null
+++ b/test/prism/location_test.rb
@@ -0,0 +1,870 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class LocationTest < TestCase
+ def test_AliasGlobalVariableNode
+ assert_location(AliasGlobalVariableNode, "alias $foo $bar")
+ end
+
+ def test_AliasMethodNode
+ assert_location(AliasMethodNode, "alias foo bar")
+ end
+
+ def test_AlternationPatternNode
+ assert_location(AlternationPatternNode, "foo => bar | baz", 7...16, &:pattern)
+ end
+
+ def test_AndNode
+ assert_location(AndNode, "foo and bar")
+ assert_location(AndNode, "foo && bar")
+ end
+
+ def test_ArgumentsNode
+ assert_location(ArgumentsNode, "foo(bar, baz, qux)", 4...17, &:arguments)
+ end
+
+ def test_ArrayNode
+ assert_location(ArrayNode, "[foo, bar, baz]")
+ assert_location(ArrayNode, "%i[foo bar baz]")
+ assert_location(ArrayNode, "%I[foo bar baz]")
+ assert_location(ArrayNode, "%w[foo bar baz]")
+ assert_location(ArrayNode, "%W[foo bar baz]")
+ end
+
+ def test_ArrayPatternNode
+ assert_location(ArrayPatternNode, "foo => bar, baz", 7...15, &:pattern)
+ assert_location(ArrayPatternNode, "foo => [bar, baz]", 7...17, &:pattern)
+ assert_location(ArrayPatternNode, "foo => *bar", 7...11, &:pattern)
+ assert_location(ArrayPatternNode, "foo => []", 7...9, &:pattern)
+ assert_location(ArrayPatternNode, "foo => Foo[]", 7...12, &:pattern)
+ assert_location(ArrayPatternNode, "foo => Foo[bar]", 7...15, &:pattern)
+ end
+
+ def test_AssocNode
+ assert_location(AssocNode, "{ foo: :bar }", 2...11) { |node| node.elements.first }
+ assert_location(AssocNode, "{ :foo => :bar }", 2...14) { |node| node.elements.first }
+ assert_location(AssocNode, "foo(bar: :baz)", 4...13) { |node| node.arguments.arguments.first.elements.first }
+ end
+
+ def test_AssocSplatNode
+ assert_location(AssocSplatNode, "{ **foo }", 2...7) { |node| node.elements.first }
+ assert_location(AssocSplatNode, "foo(**bar)", 4...9) { |node| node.arguments.arguments.first.elements.first }
+ end
+
+ def test_BackReferenceReadNode
+ assert_location(BackReferenceReadNode, "$+")
+ end
+
+ def test_BeginNode
+ assert_location(BeginNode, "begin foo end")
+ assert_location(BeginNode, "begin foo rescue bar end")
+ assert_location(BeginNode, "begin foo; rescue bar\nelse baz end")
+ assert_location(BeginNode, "begin foo; rescue bar\nelse baz\nensure qux end")
+
+ assert_location(BeginNode, "class Foo\nrescue then end", 10..25, &:body)
+ assert_location(BeginNode, "module Foo\nrescue then end", 11..26, &:body)
+ end
+
+ def test_BlockArgumentNode
+ assert_location(BlockArgumentNode, "foo(&bar)", 4...8, &:block)
+ end
+
+ def test_BlockLocalVariableNode
+ assert_location(BlockLocalVariableNode, "foo { |;bar| }", 8...11) do |node|
+ node.block.parameters.locals.first
+ end
+ end
+
+ def test_BlockNode
+ assert_location(BlockNode, "foo {}", 4...6, &:block)
+ assert_location(BlockNode, "foo do end", 4...10, &:block)
+ end
+
+ def test_BlockParameterNode
+ assert_location(BlockParameterNode, "def foo(&bar) end", 8...12) { |node| node.parameters.block }
+ end
+
+ def test_BlockParametersNode
+ assert_location(BlockParametersNode, "foo { || }", 6...8) { |node| node.block.parameters }
+ assert_location(BlockParametersNode, "foo { |bar| baz }", 6...11) { |node| node.block.parameters }
+ assert_location(BlockParametersNode, "foo { |bar; baz| baz }", 6...16) { |node| node.block.parameters }
+
+ assert_location(BlockParametersNode, "-> () {}", 3...5, &:parameters)
+ assert_location(BlockParametersNode, "-> (bar) { baz }", 3...8, &:parameters)
+ assert_location(BlockParametersNode, "-> (bar; baz) { baz }", 3...13, &:parameters)
+ end
+
+ def test_BreakNode
+ assert_location(BreakNode, "break")
+ assert_location(BreakNode, "break foo")
+ assert_location(BreakNode, "break foo, bar")
+ assert_location(BreakNode, "break(foo)")
+ end
+
+ def test_CallNode
+ assert_location(CallNode, "foo")
+ assert_location(CallNode, "foo?")
+ assert_location(CallNode, "foo!")
+
+ assert_location(CallNode, "foo()")
+ assert_location(CallNode, "foo?()")
+ assert_location(CallNode, "foo!()")
+
+ assert_location(CallNode, "foo(bar)")
+ assert_location(CallNode, "foo?(bar)")
+ assert_location(CallNode, "foo!(bar)")
+
+ assert_location(CallNode, "!foo")
+ assert_location(CallNode, "~foo")
+ assert_location(CallNode, "+foo")
+ assert_location(CallNode, "-foo")
+
+ assert_location(CallNode, "not foo")
+ assert_location(CallNode, "not(foo)")
+ assert_location(CallNode, "not()")
+
+ assert_location(CallNode, "foo + bar")
+ assert_location(CallNode, "foo -\n bar")
+
+ assert_location(CallNode, "Foo()")
+ assert_location(CallNode, "Foo(bar)")
+
+ assert_location(CallNode, "Foo::Bar()")
+ assert_location(CallNode, "Foo::Bar(baz)")
+
+ assert_location(CallNode, "Foo::bar")
+ assert_location(CallNode, "Foo::bar()")
+ assert_location(CallNode, "Foo::bar(baz)")
+
+ assert_location(CallNode, "Foo.bar")
+ assert_location(CallNode, "Foo.bar()")
+ assert_location(CallNode, "Foo.bar(baz)")
+
+ assert_location(CallNode, "foo::bar")
+ assert_location(CallNode, "foo::bar()")
+ assert_location(CallNode, "foo::bar(baz)")
+
+ assert_location(CallNode, "foo.bar")
+ assert_location(CallNode, "foo.bar()")
+ assert_location(CallNode, "foo.bar(baz)")
+
+ assert_location(CallNode, "foo&.bar")
+ assert_location(CallNode, "foo&.bar()")
+ assert_location(CallNode, "foo&.bar(baz)")
+
+ assert_location(CallNode, "foo[]")
+ assert_location(CallNode, "foo[bar]")
+ assert_location(CallNode, "foo[bar, baz]")
+
+ assert_location(CallNode, "foo[] = 1")
+ assert_location(CallNode, "foo[bar] = 1")
+ assert_location(CallNode, "foo[bar, baz] = 1")
+
+ assert_location(CallNode, "foo.()")
+ assert_location(CallNode, "foo.(bar)")
+
+ assert_location(CallNode, "foo&.()")
+ assert_location(CallNode, "foo&.(bar)")
+
+ assert_location(CallNode, "foo::()")
+ assert_location(CallNode, "foo::(bar)")
+ assert_location(CallNode, "foo::(bar, baz)")
+
+ assert_location(CallNode, "foo bar baz")
+ assert_location(CallNode, "foo bar('baz')")
+ end
+
+ def test_CallAndWriteNode
+ assert_location(CallAndWriteNode, "foo.foo &&= bar")
+ assert_location(CallAndWriteNode, "foo[foo] &&= bar")
+ end
+
+ def test_CallOperatorWriteNode
+ assert_location(CallOperatorWriteNode, "foo.foo += bar")
+ assert_location(CallOperatorWriteNode, "foo[foo] += bar")
+ end
+
+ def test_CallOrWriteNode
+ assert_location(CallOrWriteNode, "foo.foo ||= bar")
+ assert_location(CallOrWriteNode, "foo[foo] ||= bar")
+ end
+
+ def test_CapturePatternNode
+ assert_location(CapturePatternNode, "case foo; in bar => baz; end", 13...23) do |node|
+ node.conditions.first.pattern
+ end
+ end
+
+ def test_CaseNode
+ assert_location(CaseNode, "case foo; when bar; end")
+ assert_location(CaseNode, "case foo; when bar; else; end")
+ assert_location(CaseNode, "case foo; when bar; when baz; end")
+ assert_location(CaseNode, "case foo; when bar; when baz; else; end")
+ end
+
+ def test_ClassNode
+ assert_location(ClassNode, "class Foo end")
+ assert_location(ClassNode, "class Foo < Bar end")
+ end
+
+ def test_ClassVariableAndWriteNode
+ assert_location(ClassVariableAndWriteNode, "@@foo &&= bar")
+ end
+
+ def test_ClassVariableOperatorWriteNode
+ assert_location(ClassVariableOperatorWriteNode, "@@foo += bar")
+ end
+
+ def test_ClassVariableOrWriteNode
+ assert_location(ClassVariableOrWriteNode, "@@foo ||= bar")
+ end
+
+ def test_ClassVariableReadNode
+ assert_location(ClassVariableReadNode, "@@foo")
+ end
+
+ def test_ClassVariableTargetNode
+ assert_location(ClassVariableTargetNode, "@@foo, @@bar = baz", 0...5) do |node|
+ node.targets.first
+ end
+ end
+
+ def test_ClassVariableWriteNode
+ assert_location(ClassVariableWriteNode, "@@foo = bar")
+ end
+
+ def test_ConstantPathAndWriteNode
+ assert_location(ConstantPathAndWriteNode, "Parent::Child &&= bar")
+ end
+
+ def test_ConstantPathNode
+ assert_location(ConstantPathNode, "Foo::Bar")
+ assert_location(ConstantPathNode, "::Foo")
+ assert_location(ConstantPathNode, "::Foo::Bar")
+ end
+
+ def test_ConstantPathOperatorWriteNode
+ assert_location(ConstantPathOperatorWriteNode, "Parent::Child += bar")
+ end
+
+ def test_ConstantPathOrWriteNode
+ assert_location(ConstantPathOrWriteNode, "Parent::Child ||= bar")
+ end
+
+ def test_ConstantPathTargetNode
+ assert_location(ConstantPathTargetNode, "::Foo, ::Bar = baz", 0...5) do |node|
+ node.targets.first
+ end
+ end
+
+ def test_ConstantPathWriteNode
+ assert_location(ConstantPathWriteNode, "Foo::Bar = baz")
+ assert_location(ConstantPathWriteNode, "::Foo = bar")
+ assert_location(ConstantPathWriteNode, "::Foo::Bar = baz")
+ end
+
+ def test_ConstantAndWriteNode
+ assert_location(ConstantAndWriteNode, "Foo &&= bar")
+ end
+
+ def test_ConstantOperatorWriteNode
+ assert_location(ConstantOperatorWriteNode, "Foo += bar")
+ end
+
+ def test_ConstantOrWriteNode
+ assert_location(ConstantOrWriteNode, "Foo ||= bar")
+ end
+
+ def test_ConstantReadNode
+ assert_location(ConstantReadNode, "Foo")
+ assert_location(ConstantReadNode, "Foo::Bar", 5...8, &:child)
+ end
+
+ def test_ConstantTargetNode
+ assert_location(ConstantTargetNode, "Foo, Bar = baz", 0...3) do |node|
+ node.targets.first
+ end
+ end
+
+ def test_ConstantWriteNode
+ assert_location(ConstantWriteNode, "Foo = bar")
+ end
+
+ def test_DefNode
+ assert_location(DefNode, "def foo; bar; end")
+ assert_location(DefNode, "def foo = bar")
+ assert_location(DefNode, "def foo.bar; baz; end")
+ assert_location(DefNode, "def foo.bar = baz")
+ end
+
+ def test_DefinedNode
+ assert_location(DefinedNode, "defined? foo")
+ assert_location(DefinedNode, "defined?(foo)")
+ end
+
+ def test_ElseNode
+ assert_location(ElseNode, "if foo; bar; else; baz; end", 13...27, &:consequent)
+ assert_location(ElseNode, "foo ? bar : baz", 10...15, &:consequent)
+ end
+
+ def test_EmbeddedStatementsNode
+ assert_location(EmbeddedStatementsNode, '"foo #{bar} baz"', 5...11) { |node| node.parts[1] }
+ end
+
+ def test_EmbeddedVariableNode
+ assert_location(EmbeddedVariableNode, '"foo #@@bar baz"', 5...11) { |node| node.parts[1] }
+ end
+
+ def test_EnsureNode
+ assert_location(EnsureNode, "begin; foo; ensure; bar; end", 12...28, &:ensure_clause)
+ end
+
+ def test_FalseNode
+ assert_location(FalseNode, "false")
+ end
+
+ def test_FindPatternNode
+ assert_location(FindPatternNode, "case foo; in *, bar, *; end", 13...22) do |node|
+ node.conditions.first.pattern
+ end
+ end
+
+ def test_FlipFlopNode
+ assert_location(FlipFlopNode, "if foo..bar; end", 3..11, &:predicate)
+ end
+
+ def test_FloatNode
+ assert_location(FloatNode, "0.0")
+ assert_location(FloatNode, "1.0")
+ assert_location(FloatNode, "1.0e10")
+ assert_location(FloatNode, "1.0e-10")
+ end
+
+ def test_ForNode
+ assert_location(ForNode, "for foo in bar; end")
+ assert_location(ForNode, "for foo, bar in baz do end")
+ end
+
+ def test_ForwardingArgumentsNode
+ assert_location(ForwardingArgumentsNode, "def foo(...); bar(...); end", 18...21) do |node|
+ node.body.body.first.arguments.arguments.first
+ end
+ end
+
+ def test_ForwardingParameterNode
+ assert_location(ForwardingParameterNode, "def foo(...); end", 8...11) do |node|
+ node.parameters.keyword_rest
+ end
+ end
+
+ def test_ForwardingSuperNode
+ assert_location(ForwardingSuperNode, "super")
+ assert_location(ForwardingSuperNode, "super {}")
+ end
+
+ def test_GlobalVariableAndWriteNode
+ assert_location(GlobalVariableAndWriteNode, "$foo &&= bar")
+ end
+
+ def test_GlobalVariableOperatorWriteNode
+ assert_location(GlobalVariableOperatorWriteNode, "$foo += bar")
+ end
+
+ def test_GlobalVariableOrWriteNode
+ assert_location(GlobalVariableOrWriteNode, "$foo ||= bar")
+ end
+
+ def test_GlobalVariableReadNode
+ assert_location(GlobalVariableReadNode, "$foo")
+ end
+
+ def test_GlobalVariableTargetNode
+ assert_location(GlobalVariableTargetNode, "$foo, $bar = baz", 0...4) do |node|
+ node.targets.first
+ end
+ end
+
+ def test_GlobalVariableWriteNode
+ assert_location(GlobalVariableWriteNode, "$foo = bar")
+ end
+
+ def test_HashNode
+ assert_location(HashNode, "{ foo: 2 }")
+ assert_location(HashNode, "{ \nfoo: 2, \nbar: 3 \n}")
+ end
+
+ def test_HashPatternNode
+ assert_location(HashPatternNode, "case foo; in bar: baz; end", 13...21) do |node|
+ node.conditions.first.pattern
+ end
+ end
+
+ def test_IfNode
+ assert_location(IfNode, "if type in 1;elsif type in B;end")
+ end
+
+ def test_ImaginaryNode
+ assert_location(ImaginaryNode, "1i")
+ assert_location(ImaginaryNode, "1ri")
+ end
+
+ def test_ImplicitNode
+ assert_location(ImplicitNode, "{ foo: }", 2...6) do |node|
+ node.elements.first.value
+ end
+
+ assert_location(ImplicitNode, "{ Foo: }", 2..6) do |node|
+ node.elements.first.value
+ end
+
+ assert_location(ImplicitNode, "foo = 1; { foo: }", 11..15) do |node|
+ node.elements.first.value
+ end
+ end
+
+ def test_InNode
+ assert_location(InNode, "case foo; in bar; end", 10...16) do |node|
+ node.conditions.first
+ end
+ end
+
+ def test_InstanceVariableAndWriteNode
+ assert_location(InstanceVariableAndWriteNode, "@foo &&= bar")
+ end
+
+ def test_InstanceVariableOperatorWriteNode
+ assert_location(InstanceVariableOperatorWriteNode, "@foo += bar")
+ end
+
+ def test_InstanceVariableOrWriteNode
+ assert_location(InstanceVariableOrWriteNode, "@foo ||= bar")
+ end
+
+ def test_InstanceVariableReadNode
+ assert_location(InstanceVariableReadNode, "@foo")
+ end
+
+ def test_InstanceVariableTargetNode
+ assert_location(InstanceVariableTargetNode, "@foo, @bar = baz", 0...4) do |node|
+ node.targets.first
+ end
+ end
+
+ def test_InstanceVariableWriteNode
+ assert_location(InstanceVariableWriteNode, "@foo = bar")
+ end
+
+ def test_IntegerNode
+ assert_location(IntegerNode, "0")
+ assert_location(IntegerNode, "1")
+ assert_location(IntegerNode, "1_000")
+ assert_location(IntegerNode, "0x1")
+ assert_location(IntegerNode, "0x1_000")
+ assert_location(IntegerNode, "0b1")
+ assert_location(IntegerNode, "0b1_000")
+ assert_location(IntegerNode, "0o1")
+ assert_location(IntegerNode, "0o1_000")
+ end
+
+ def test_InterpolatedMatchLastLineNode
+ assert_location(InterpolatedMatchLastLineNode, "if /foo \#{bar}/ then end", 3...15, &:predicate)
+ end
+
+ def test_InterpolatedRegularExpressionNode
+ assert_location(InterpolatedRegularExpressionNode, "/\#{foo}/")
+ end
+
+ def test_InterpolatedStringNode
+ assert_location(InterpolatedStringNode, "\"foo \#@bar baz\"")
+ assert_location(InterpolatedStringNode, "<<~A\nhello \#{1} world\nA", 0...4)
+ end
+
+ def test_InterpolatedSymbolNode
+ assert_location(InterpolatedSymbolNode, ':"#{foo}bar"')
+ end
+
+ def test_InterpolatedXStringNode
+ assert_location(InterpolatedXStringNode, '`foo #{bar} baz`')
+ end
+
+ def test_KeywordHashNode
+ assert_location(KeywordHashNode, "foo(a, b: 1)", 7...11) { |node| node.arguments.arguments[1] }
+ end
+
+ def test_KeywordParameterNode
+ assert_location(KeywordParameterNode, "def foo(bar:); end", 8...12) do |node|
+ node.parameters.keywords.first
+ end
+
+ assert_location(KeywordParameterNode, "def foo(bar: nil); end", 8...16) do |node|
+ node.parameters.keywords.first
+ end
+ end
+
+ def test_KeywordRestParameterNode
+ assert_location(KeywordRestParameterNode, "def foo(**); end", 8...10) do |node|
+ node.parameters.keyword_rest
+ end
+
+ assert_location(KeywordRestParameterNode, "def foo(**bar); end", 8...13) do |node|
+ node.parameters.keyword_rest
+ end
+ end
+
+ def test_LambdaNode
+ assert_location(LambdaNode, "-> { foo }")
+ assert_location(LambdaNode, "-> do foo end")
+ end
+
+ def test_LocalVariableAndWriteNode
+ assert_location(LocalVariableAndWriteNode, "foo &&= bar")
+ assert_location(LocalVariableAndWriteNode, "foo = 1; foo &&= bar", 9...20)
+ end
+
+ def test_LocalVariableOperatorWriteNode
+ assert_location(LocalVariableOperatorWriteNode, "foo += bar")
+ assert_location(LocalVariableOperatorWriteNode, "foo = 1; foo += bar", 9...19)
+ end
+
+ def test_LocalVariableOrWriteNode
+ assert_location(LocalVariableOrWriteNode, "foo ||= bar")
+ assert_location(LocalVariableOrWriteNode, "foo = 1; foo ||= bar", 9...20)
+ end
+
+ def test_LocalVariableReadNode
+ assert_location(LocalVariableReadNode, "foo = 1; foo", 9...12)
+ end
+
+ def test_LocalVariableTargetNode
+ assert_location(LocalVariableTargetNode, "foo, bar = baz", 0...3) do |node|
+ node.targets.first
+ end
+ end
+
+ def test_LocalVariableWriteNode
+ assert_location(LocalVariableWriteNode, "foo = bar")
+ end
+
+ def test_MatchLastLineNode
+ assert_location(MatchLastLineNode, "if /foo/ then end", 3...8, &:predicate)
+ end
+
+ def test_MatchPredicateNode
+ assert_location(MatchPredicateNode, "foo in bar")
+ end
+
+ def test_MatchRequiredNode
+ assert_location(MatchRequiredNode, "foo => bar")
+ end
+
+ def test_MatchWriteNode
+ assert_location(MatchWriteNode, "/(?<foo>)/ =~ foo")
+ end
+
+ def test_ModuleNode
+ assert_location(ModuleNode, "module Foo end")
+ end
+
+ def test_MultiTargetNode
+ assert_location(MultiTargetNode, "for foo, bar in baz do end", 4...12, &:index)
+ assert_location(MultiTargetNode, "foo, (bar, baz) = qux", 5...15) { |node| node.targets.last }
+ end
+
+ def test_MultiWriteNode
+ assert_location(MultiWriteNode, "foo, bar = baz")
+ assert_location(MultiWriteNode, "(foo, bar) = baz")
+ assert_location(MultiWriteNode, "((foo, bar)) = baz")
+ end
+
+ def test_NextNode
+ assert_location(NextNode, "next")
+ assert_location(NextNode, "next foo")
+ assert_location(NextNode, "next foo, bar")
+ assert_location(NextNode, "next(foo)")
+ end
+
+ def test_NilNode
+ assert_location(NilNode, "nil")
+ end
+
+ def test_NoKeywordsParameterNode
+ assert_location(NoKeywordsParameterNode, "def foo(**nil); end", 8...13) { |node| node.parameters.keyword_rest }
+ end
+
+ def test_NumberedReferenceReadNode
+ assert_location(NumberedReferenceReadNode, "$1")
+ end
+
+ def test_OptionalParameterNode
+ assert_location(OptionalParameterNode, "def foo(bar = nil); end", 8...17) do |node|
+ node.parameters.optionals.first
+ end
+ end
+
+ def test_OrNode
+ assert_location(OrNode, "foo || bar")
+ assert_location(OrNode, "foo or bar")
+ end
+
+ def test_ParametersNode
+ assert_location(ParametersNode, "def foo(bar, baz); end", 8...16, &:parameters)
+ end
+
+ def test_ParenthesesNode
+ assert_location(ParenthesesNode, "()")
+ assert_location(ParenthesesNode, "(foo)")
+ assert_location(ParenthesesNode, "foo (bar), baz", 4...9) { |node| node.arguments.arguments.first }
+ assert_location(ParenthesesNode, "def (foo).bar; end", 4...9, &:receiver)
+ end
+
+ def test_PinnedExpressionNode
+ assert_location(PinnedExpressionNode, "foo in ^(bar)", 7...13, &:pattern)
+ end
+
+ def test_PinnedVariableNode
+ assert_location(PinnedVariableNode, "foo in ^bar", 7...11, &:pattern)
+ end
+
+ def test_PostExecutionNode
+ assert_location(PostExecutionNode, "END {}")
+ assert_location(PostExecutionNode, "END { foo }")
+ end
+
+ def test_PreExecutionNode
+ assert_location(PreExecutionNode, "BEGIN {}")
+ assert_location(PreExecutionNode, "BEGIN { foo }")
+ end
+
+ def test_RangeNode
+ assert_location(RangeNode, "1..2")
+ assert_location(RangeNode, "1...2")
+
+ assert_location(RangeNode, "..2")
+ assert_location(RangeNode, "...2")
+
+ assert_location(RangeNode, "1..")
+ assert_location(RangeNode, "1...")
+ end
+
+ def test_RationalNode
+ assert_location(RationalNode, "1r")
+ assert_location(RationalNode, "1.0r")
+ end
+
+ def test_RedoNode
+ assert_location(RedoNode, "redo")
+ end
+
+ def test_RegularExpressionNode
+ assert_location(RegularExpressionNode, "/foo/")
+ end
+
+ def test_RequiredParameterNode
+ assert_location(RequiredParameterNode, "def foo(bar); end", 8...11) do |node|
+ node.parameters.requireds.first
+ end
+ end
+
+ def test_RequiredDestructuredParameterNode
+ assert_location(RequiredDestructuredParameterNode, "def foo((bar)); end", 8...13) do |node|
+ node.parameters.requireds.first
+ end
+ end
+
+ def test_RescueNode
+ code = <<~RUBY
+ begin
+ body
+ rescue TypeError
+ rescue ArgumentError
+ end
+ RUBY
+ assert_location(RescueNode, code, 13...50) { |node| node.rescue_clause }
+ assert_location(RescueNode, code, 30...50) { |node| node.rescue_clause.consequent }
+ end
+
+ def test_RescueModifierNode
+ assert_location(RescueModifierNode, "foo rescue bar")
+ end
+
+ def test_RestParameterNode
+ assert_location(RestParameterNode, "def foo(*bar); end", 8...12) do |node|
+ node.parameters.rest
+ end
+ end
+
+ def test_RetryNode
+ assert_location(RetryNode, "retry")
+ end
+
+ def test_ReturnNode
+ assert_location(ReturnNode, "return")
+ assert_location(ReturnNode, "return foo")
+ assert_location(ReturnNode, "return foo, bar")
+ assert_location(ReturnNode, "return(foo)")
+ end
+
+ def test_SelfNode
+ assert_location(SelfNode, "self")
+ end
+
+ def test_SingletonClassNode
+ assert_location(SingletonClassNode, "class << self; end")
+ end
+
+ def test_SourceEncodingNode
+ assert_location(SourceEncodingNode, "__ENCODING__")
+ end
+
+ def test_SourceFileNode
+ assert_location(SourceFileNode, "__FILE__")
+ end
+
+ def test_SourceLineNode
+ assert_location(SourceLineNode, "__LINE__")
+ end
+
+ def test_SplatNode
+ assert_location(SplatNode, "*foo = bar", 0...4) { |node| node.targets.first }
+ end
+
+ def test_StatementsNode
+ assert_location(StatementsNode, "foo { 1 }", 6...7) { |node| node.block.body }
+
+ assert_location(StatementsNode, "(1)", 1...2, &:body)
+
+ assert_location(StatementsNode, "def foo; 1; end", 9...10, &:body)
+ assert_location(StatementsNode, "def foo = 1", 10...11, &:body)
+ assert_location(StatementsNode, "def foo; 1\n2; end", 9...12, &:body)
+
+ assert_location(StatementsNode, "if foo; bar; end", 8...11, &:statements)
+ assert_location(StatementsNode, "foo if bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "if foo; foo; elsif bar; bar; end", 24...27) { |node| node.consequent.statements }
+ assert_location(StatementsNode, "if foo; foo; else; bar; end", 19...22) { |node| node.consequent.statements }
+
+ assert_location(StatementsNode, "unless foo; bar; end", 12...15, &:statements)
+ assert_location(StatementsNode, "foo unless bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "case; when foo; bar; end", 16...19) { |node| node.conditions.first.statements }
+
+ assert_location(StatementsNode, "while foo; bar; end", 11...14, &:statements)
+ assert_location(StatementsNode, "foo while bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "until foo; bar; end", 11...14, &:statements)
+ assert_location(StatementsNode, "foo until bar", 0...3, &:statements)
+
+ assert_location(StatementsNode, "for foo in bar; baz; end", 16...19, &:statements)
+
+ assert_location(StatementsNode, "begin; foo; end", 7...10, &:statements)
+ assert_location(StatementsNode, "begin; rescue; foo; end", 15...18) { |node| node.rescue_clause.statements }
+ assert_location(StatementsNode, "begin; ensure; foo; end", 15...18) { |node| node.ensure_clause.statements }
+ assert_location(StatementsNode, "begin; rescue; else; foo; end", 21...24) { |node| node.else_clause.statements }
+
+ assert_location(StatementsNode, "class Foo; foo; end", 11...14, &:body)
+ assert_location(StatementsNode, "module Foo; foo; end", 12...15, &:body)
+ assert_location(StatementsNode, "class << self; foo; end", 15...18, &:body)
+
+ assert_location(StatementsNode, "-> { foo }", 5...8, &:body)
+ assert_location(StatementsNode, "BEGIN { foo }", 8...11, &:statements)
+ assert_location(StatementsNode, "END { foo }", 6...9, &:statements)
+
+ assert_location(StatementsNode, "\"\#{foo}\"", 3...6) { |node| node.parts.first.statements }
+ end
+
+ def test_StringConcatNode
+ assert_location(StringConcatNode, '"foo" "bar"')
+ end
+
+ def test_StringNode
+ assert_location(StringNode, '"foo"')
+ assert_location(StringNode, '%q[foo]')
+ end
+
+ def test_SuperNode
+ assert_location(SuperNode, "super foo")
+ assert_location(SuperNode, "super foo, bar")
+
+ assert_location(SuperNode, "super()")
+ assert_location(SuperNode, "super(foo)")
+ assert_location(SuperNode, "super(foo, bar)")
+
+ assert_location(SuperNode, "super() {}")
+ end
+
+ def test_SymbolNode
+ assert_location(SymbolNode, ":foo")
+ end
+
+ def test_TrueNode
+ assert_location(TrueNode, "true")
+ end
+
+ def test_UndefNode
+ assert_location(UndefNode, "undef foo")
+ assert_location(UndefNode, "undef foo, bar")
+ end
+
+ def test_UnlessNode
+ assert_location(UnlessNode, "foo unless bar")
+ assert_location(UnlessNode, "unless bar; foo; end")
+ end
+
+ def test_UntilNode
+ assert_location(UntilNode, "foo = bar until baz")
+ assert_location(UntilNode, "until bar;baz;end")
+ end
+
+ def test_WhenNode
+ assert_location(WhenNode, "case foo; when bar; end", 10...18) { |node| node.conditions.first }
+ end
+
+ def test_WhileNode
+ assert_location(WhileNode, "foo = bar while foo != baz")
+ assert_location(WhileNode, "while a;bar;baz;end")
+ end
+
+ def test_XStringNode
+ assert_location(XStringNode, "`foo`")
+ assert_location(XStringNode, "%x[foo]")
+ end
+
+ def test_YieldNode
+ assert_location(YieldNode, "yield")
+ assert_location(YieldNode, "yield foo")
+ assert_location(YieldNode, "yield foo, bar")
+ assert_location(YieldNode, "yield(foo)")
+ end
+
+ def test_all_tested
+ expected = YARP.constants.grep(/.Node$/).sort - %i[MissingNode ProgramNode]
+ actual = LocationTest.instance_methods(false).grep(/.Node$/).map { |name| name[5..].to_sym }.sort
+ assert_equal expected, actual
+ end
+
+ private
+
+ def assert_location(kind, source, expected = 0...source.length)
+ result = YARP.parse(source)
+ assert_equal [], result.comments
+ assert_equal [], result.errors
+
+ node = result.value.statements.body.last
+ node = yield node if block_given?
+
+ if expected.begin == 0
+ assert_equal 0, node.location.start_column
+ end
+
+ if expected.end == source.length
+ assert_equal source.split("\n").last.length, node.location.end_column
+ end
+
+ assert_kind_of kind, node
+ assert_equal expected.begin, node.location.start_offset
+ assert_equal expected.end, node.location.end_offset
+ end
+ end
+end
diff --git a/test/prism/memsize_test.rb b/test/prism/memsize_test.rb
new file mode 100644
index 0000000000..07c85ce329
--- /dev/null
+++ b/test/prism/memsize_test.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if YARP::BACKEND == :FFI
+
+module YARP
+ class MemsizeTest < TestCase
+ def test_memsize
+ result = Debug.memsize("2 + 3")
+
+ assert_equal 5, result[:length]
+ assert_kind_of Integer, result[:memsize]
+ assert_equal 6, result[:node_count]
+ end
+ end
+end
diff --git a/test/prism/newline_test.rb b/test/prism/newline_test.rb
new file mode 100644
index 0000000000..7bf79d46e5
--- /dev/null
+++ b/test/prism/newline_test.rb
@@ -0,0 +1,91 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return unless defined?(RubyVM::InstructionSequence)
+
+module YARP
+ class NewlineTest < TestCase
+ base = File.dirname(__dir__)
+ Dir["{lib,test}/**/*.rb", base: base].each do |relative|
+ define_method("test_newline_flags_#{relative}") do
+ assert_newlines(base, relative)
+ end
+ end
+
+ private
+
+ def assert_newlines(base, relative)
+ filepath = File.join(base, relative)
+ source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
+ expected = rubyvm_lines(source)
+
+ result = YARP.parse_file(filepath)
+ assert_empty result.errors
+ actual = yarp_lines(result)
+
+ source.each_line.with_index(1) do |line, line_number|
+ # Lines like `while (foo = bar)` result in two line flags in the
+ # bytecode but only one newline flag in the AST. We need to remove the
+ # extra line flag from the bytecode to make the test pass.
+ if line.match?(/while \(/)
+ index = expected.index(line_number)
+ expected.delete_at(index) if index
+ end
+
+ # Lines like `foo =` where the value is on the next line result in
+ # another line flag in the bytecode but only one newline flag in the
+ # AST.
+ if line.match?(/^\s+\w+ =$/)
+ if source.lines[line_number].match?(/^\s+case/)
+ actual[actual.index(line_number)] += 1
+ else
+ actual.delete_at(actual.index(line_number))
+ end
+ end
+
+ if line.match?(/^\s+\w+ = \[$/)
+ if !expected.include?(line_number) && !expected.include?(line_number + 2)
+ actual[actual.index(line_number)] += 1
+ end
+ end
+ end
+
+ assert_equal expected, actual
+ end
+
+ def ignore_warnings
+ previous_verbosity = $VERBOSE
+ $VERBOSE = nil
+ yield
+ ensure
+ $VERBOSE = previous_verbosity
+ end
+
+ def rubyvm_lines(source)
+ queue = [ignore_warnings { RubyVM::InstructionSequence.compile(source) }]
+ lines = []
+
+ while iseq = queue.shift
+ lines.concat(iseq.trace_points.filter_map { |line, event| line if event == :line })
+ iseq.each_child { |insn| queue << insn unless insn.label.start_with?("ensure in ") }
+ end
+
+ lines.sort
+ end
+
+ def yarp_lines(result)
+ result.mark_newlines!
+
+ queue = [result.value]
+ newlines = []
+
+ while node = queue.shift
+ queue.concat(node.compact_child_nodes)
+ newlines << result.source.line(node.location.start_offset) if node&.newline?
+ end
+
+ newlines.sort
+ end
+ end
+end
diff --git a/test/prism/parse_serialize_test.rb b/test/prism/parse_serialize_test.rb
new file mode 100644
index 0000000000..18ff0c4319
--- /dev/null
+++ b/test/prism/parse_serialize_test.rb
@@ -0,0 +1,38 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if YARP::BACKEND == :FFI
+
+module YARP
+ class ParseSerializeTest < TestCase
+ def test_parse_serialize
+ dumped = Debug.parse_serialize_file(__FILE__)
+ result = YARP.load(File.read(__FILE__), dumped)
+
+ assert_kind_of ParseResult, result, "Expected the return value to be a ParseResult"
+ assert_equal __FILE__, find_file_node(result)&.filepath, "Expected the filepath to be set correctly"
+ end
+
+ def test_parse_serialize_with_locals
+ filepath = __FILE__
+ metadata = [filepath.bytesize, filepath.b, 1, 1, 1, "foo".b].pack("LA*LLLA*")
+
+ dumped = Debug.parse_serialize_file_metadata(filepath, metadata)
+ result = YARP.load(File.read(__FILE__), dumped)
+
+ assert_kind_of ParseResult, result, "Expected the return value to be a ParseResult"
+ end
+
+ private
+
+ def find_file_node(result)
+ queue = [result.value]
+
+ while (node = queue.shift)
+ return node if node.is_a?(SourceFileNode)
+ queue.concat(node.compact_child_nodes)
+ end
+ end
+ end
+end
diff --git a/test/prism/parse_test.rb b/test/prism/parse_test.rb
new file mode 100644
index 0000000000..aa3a76ad7c
--- /dev/null
+++ b/test/prism/parse_test.rb
@@ -0,0 +1,230 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class ParseTest < TestCase
+ # When we pretty-print the trees to compare against the snapshots, we want to
+ # be certain that we print with the same external encoding. This is because
+ # methods like Symbol#inspect take into account external encoding and it could
+ # change how the snapshot is generated. On machines with certain settings
+ # (like LANG=C or -Eascii-8bit) this could have been changed. So here we're
+ # going to force it to be UTF-8 to keep the snapshots consistent.
+ def setup
+ @previous_default_external = Encoding.default_external
+ ignore_warnings { Encoding.default_external = Encoding::UTF_8 }
+ end
+
+ def teardown
+ ignore_warnings { Encoding.default_external = @previous_default_external }
+ end
+
+ def test_empty_string
+ result = YARP.parse("")
+ assert_equal [], result.value.statements.body
+ end
+
+ def test_parse_takes_file_path
+ filepath = "filepath.rb"
+ result = YARP.parse("def foo; __FILE__; end", filepath)
+
+ assert_equal filepath, find_source_file_node(result.value).filepath
+ end
+
+ def test_parse_lex
+ node, tokens = YARP.parse_lex("def foo; end").value
+
+ assert_kind_of ProgramNode, node
+ assert_equal 5, tokens.length
+ end
+
+ def test_parse_lex_file
+ node, tokens = YARP.parse_lex_file(__FILE__).value
+
+ assert_kind_of ProgramNode, node
+ refute_empty tokens
+ end
+
+ # To accurately compare against Ripper, we need to make sure that we're
+ # running on CRuby 3.2+.
+ ripper_enabled = RUBY_ENGINE == "ruby" && RUBY_VERSION >= "3.2.0"
+
+ # The FOCUS environment variable allows you to specify one particular fixture
+ # to test, instead of all of them.
+ base = File.join(__dir__, "fixtures")
+ relatives = ENV["FOCUS"] ? [ENV["FOCUS"]] : Dir["**/*.txt", base: base]
+
+ relatives.each do |relative|
+ # These fail on TruffleRuby due to a difference in Symbol#inspect: :测试 vs :"测试"
+ next if RUBY_ENGINE == "truffleruby" and %w[seattlerb/bug202.txt seattlerb/magic_encoding_comment.txt].include?(relative)
+
+ filepath = File.join(base, relative)
+ snapshot = File.expand_path(File.join("snapshots", relative), __dir__)
+
+ directory = File.dirname(snapshot)
+ FileUtils.mkdir_p(directory) unless File.directory?(directory)
+
+ ripper_should_parse = ripper_should_match = ripper_enabled
+
+ # This file has changed behavior in Ripper in Ruby 3.3, so we skip it if
+ # we're on an earlier version.
+ ripper_should_match = false if relative == "seattlerb/pct_w_heredoc_interp_nested.txt" && RUBY_VERSION < "3.3.0"
+
+ # It seems like there are some oddities with nested heredocs and ripper.
+ # Waiting for feedback on https://bugs.ruby-lang.org/issues/19838.
+ ripper_should_match = false if relative == "seattlerb/heredoc_nested.txt"
+
+ # Ripper seems to have a bug that the regex portions before and after the heredoc are combined
+ # into a single token. See https://bugs.ruby-lang.org/issues/19838.
+ #
+ # Additionally, Ripper cannot parse the %w[] fixture in this file, so set ripper_should_parse to false.
+ ripper_should_parse = false if relative == "spanning_heredoc.txt"
+
+ define_method "test_filepath_#{relative}" do
+ # First, read the source from the filepath. Use binmode to avoid converting CRLF on Windows,
+ # and explicitly set the external encoding to UTF-8 to override the binmode default.
+ source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
+
+ if ripper_should_parse
+ src = source
+
+ case relative
+ when /break|next|redo|if|unless|rescue|control|keywords|retry/
+ # Uncaught syntax errors: Invalid break, Invalid next
+ src = "->do\nrescue\n#{src}\nend"
+ ripper_should_match = false
+ end
+
+ # Make sure that it can be correctly parsed by Ripper. If it can't, then we have a fixture
+ # that is invalid Ruby.
+ refute_nil(Ripper.sexp_raw(src), "Ripper failed to parse")
+ end
+
+ # Next, assert that there were no errors during parsing.
+ result = YARP.parse(source, relative)
+ assert_empty result.errors
+
+ # Next, pretty print the source.
+ printed = PP.pp(result.value, +"", 79)
+
+ if File.exist?(snapshot)
+ saved = File.read(snapshot)
+
+ # If the snapshot file exists, but the printed value does not match the
+ # snapshot, then update the snapshot file.
+ if printed != saved
+ File.write(snapshot, printed)
+ warn("Updated snapshot at #{snapshot}.")
+ end
+
+ # If the snapshot file exists, then assert that the printed value
+ # matches the snapshot.
+ assert_equal(saved, printed)
+ else
+ # If the snapshot file does not yet exist, then write it out now.
+ File.write(snapshot, printed)
+ warn("Created snapshot at #{snapshot}.")
+ end
+
+ # Next, assert that the value can be serialized and deserialized without
+ # changing the shape of the tree.
+ assert_equal_nodes(result.value, YARP.load(source, YARP.dump(source, relative)).value)
+
+ # Next, check that the location ranges of each node in the tree are a
+ # superset of their respective child nodes.
+ assert_non_overlapping_locations(result.value)
+
+ # Next, assert that the newlines are in the expected places.
+ expected_newlines = [0]
+ source.b.scan("\n") { expected_newlines << $~.offset(0)[0] + 1 }
+ assert_equal expected_newlines, Debug.newlines(source)
+
+ if ripper_should_parse && ripper_should_match
+ # Finally, assert that we can lex the source and get the same tokens as
+ # Ripper.
+ lex_result = YARP.lex_compat(source)
+ assert_equal [], lex_result.errors
+ tokens = lex_result.value
+
+ begin
+ YARP.lex_ripper(source).zip(tokens).each do |(ripper, yarp)|
+ assert_equal ripper, yarp
+ end
+ rescue SyntaxError
+ raise ArgumentError, "Test file has invalid syntax #{filepath}"
+ end
+ end
+ end
+ end
+
+ Dir["*.txt", base: base].each do |relative|
+ next if relative == "newline_terminated.txt"
+
+ # We test every snippet (separated by \n\n) in isolation
+ # to ensure the parser does not try to read bytes further than the end of each snippet
+ define_method "test_individual_snippets_#{relative}" do
+ filepath = File.join(base, relative)
+
+ # First, read the source from the filepath. Use binmode to avoid converting CRLF on Windows,
+ # and explicitly set the external encoding to UTF-8 to override the binmode default.
+ file_contents = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
+
+ file_contents.split(/(?<=\S)\n\n(?=\S)/).each do |snippet|
+ snippet = snippet.rstrip
+ result = YARP.parse(snippet, relative)
+ assert_empty result.errors
+
+ assert_equal_nodes(result.value, YARP.load(snippet, YARP.dump(snippet, relative)).value)
+ end
+ end
+ end
+
+ private
+
+ # Check that the location ranges of each node in the tree are a superset of
+ # their respective child nodes.
+ def assert_non_overlapping_locations(node)
+ queue = [node]
+
+ while (current = queue.shift)
+ # We only want to compare parent/child location overlap in the case that
+ # we are not looking at a heredoc. That's because heredoc locations are
+ # special in that they only use the declaration of the heredoc.
+ compare = !(current.is_a?(StringNode) ||
+ current.is_a?(XStringNode) ||
+ current.is_a?(InterpolatedStringNode) ||
+ current.is_a?(InterpolatedXStringNode)) ||
+ !current.opening&.start_with?("<<")
+
+ current.child_nodes.each do |child|
+ # child_nodes can return nil values, so we need to skip those.
+ next unless child
+
+ # Now that we know we have a child node, add that to the queue.
+ queue << child
+
+ if compare
+ assert_operator current.location.start_offset, :<=, child.location.start_offset
+ assert_operator current.location.end_offset, :>=, child.location.end_offset
+ end
+ end
+ end
+ end
+
+ def find_source_file_node(program)
+ queue = [program]
+ while (node = queue.shift)
+ return node if node.is_a?(SourceFileNode)
+ queue.concat(node.compact_child_nodes)
+ end
+ end
+
+ def ignore_warnings
+ previous_verbosity = $VERBOSE
+ $VERBOSE = nil
+ yield
+ ensure
+ $VERBOSE = previous_verbosity
+ end
+ end
+end
diff --git a/test/prism/pattern_test.rb b/test/prism/pattern_test.rb
new file mode 100644
index 0000000000..d34fe84458
--- /dev/null
+++ b/test/prism/pattern_test.rb
@@ -0,0 +1,132 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class PatternTest < TestCase
+ def test_invalid_syntax
+ assert_raise(Pattern::CompilationError) { scan("", "<>") }
+ end
+
+ def test_invalid_constant
+ assert_raise(Pattern::CompilationError) { scan("", "Foo") }
+ end
+
+ def test_invalid_nested_constant
+ assert_raise(Pattern::CompilationError) { scan("", "Foo::Bar") }
+ end
+
+ def test_regexp_with_interpolation
+ assert_raise(Pattern::CompilationError) { scan("", "/\#{foo}/") }
+ end
+
+ def test_string_with_interpolation
+ assert_raise(Pattern::CompilationError) { scan("", '"#{foo}"') }
+ end
+
+ def test_symbol_with_interpolation
+ assert_raise(Pattern::CompilationError) { scan("", ":\"\#{foo}\"") }
+ end
+
+ def test_invalid_node
+ assert_raise(Pattern::CompilationError) { scan("", "IntegerNode[^foo]") }
+ end
+
+ def test_self
+ assert_raise(Pattern::CompilationError) { scan("", "self") }
+ end
+
+ def test_array_pattern_no_constant
+ results = scan("1 + 2", "[IntegerNode]")
+
+ assert_equal 1, results.length
+ end
+
+ def test_array_pattern
+ results = scan("1 + 2", "CallNode[name: \"+\", receiver: IntegerNode, arguments: [IntegerNode]]")
+
+ assert_equal 1, results.length
+ end
+
+ def test_alternation_pattern
+ results = scan("Foo + Bar + 1", "ConstantReadNode | IntegerNode")
+
+ assert_equal 3, results.length
+ assert_equal 1, results.grep(IntegerNode).first.value
+ end
+
+ def test_constant_read_node
+ results = scan("Foo + Bar + Baz", "ConstantReadNode")
+
+ assert_equal 3, results.length
+ assert_equal %w[Bar Baz Foo], results.map(&:slice).sort
+ end
+
+ def test_object_const
+ results = scan("1 + 2 + 3", "IntegerNode[]")
+
+ assert_equal 3, results.length
+ end
+
+ def test_constant_path
+ results = scan("Foo + Bar + Baz", "YARP::ConstantReadNode")
+
+ assert_equal 3, results.length
+ end
+
+ def test_hash_pattern_no_constant
+ results = scan("Foo + Bar + Baz", "{ name: \"+\" }")
+
+ assert_equal 2, results.length
+ end
+
+ def test_hash_pattern_regexp
+ results = scan("Foo + Bar + Baz", "{ name: /^[[:punct:]]$/ }")
+
+ assert_equal 2, results.length
+ assert_equal ["YARP::CallNode"], results.map { |node| node.class.name }.uniq
+ end
+
+ def test_nil
+ results = scan("foo", "{ receiver: nil }")
+
+ assert_equal 1, results.length
+ end
+
+ def test_regexp_options
+ results = scan("@foo + @bar + @baz", "InstanceVariableReadNode[name: /^@B/i]")
+
+ assert_equal 2, results.length
+ end
+
+ def test_string_empty
+ results = scan("", "''")
+
+ assert_empty results
+ end
+
+ def test_symbol_empty
+ results = scan("", ":''")
+
+ assert_empty results
+ end
+
+ def test_symbol_plain
+ results = scan("@foo", "{ name: :\"@foo\" }")
+
+ assert_equal 1, results.length
+ end
+
+ def test_symbol
+ results = scan("@foo", "{ name: :@foo }")
+
+ assert_equal 1, results.length
+ end
+
+ private
+
+ def scan(source, query)
+ YARP::Pattern.new(query).scan(YARP.parse(source).value).to_a
+ end
+ end
+end
diff --git a/test/prism/regexp_test.rb b/test/prism/regexp_test.rb
new file mode 100644
index 0000000000..865c70a2c8
--- /dev/null
+++ b/test/prism/regexp_test.rb
@@ -0,0 +1,251 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if YARP::BACKEND == :FFI
+
+module YARP
+ class RegexpTest < TestCase
+ ##############################################################################
+ # These tests test the actual use case of extracting named capture groups
+ ##############################################################################
+
+ def test_named_captures_with_arrows
+ assert_equal(["foo"], named_captures("(?<foo>bar)"))
+ end
+
+ def test_named_captures_with_single_quotes
+ assert_equal(["foo"], named_captures("(?'foo'bar)"))
+ end
+
+ def test_nested_named_captures_with_arrows
+ assert_equal(["foo", "bar"], named_captures("(?<foo>(?<bar>baz))"))
+ end
+
+ def test_nested_named_captures_with_single_quotes
+ assert_equal(["foo", "bar"], named_captures("(?'foo'(?'bar'baz))"))
+ end
+
+ def test_allows_duplicate_named_captures
+ assert_equal(["foo", "foo"], named_captures("(?<foo>bar)(?<foo>baz)"))
+ end
+
+ def test_named_capture_inside_fake_range_quantifier
+ assert_equal(["foo"], named_captures("foo{1, (?<foo>2)}"))
+ end
+
+ ##############################################################################
+ # These tests test the rest of the AST. They are not exhaustive, but they
+ # should cover the most common cases. We test these to make sure we don't
+ # accidentally regress and stop being able to extract named captures.
+ ##############################################################################
+
+ def test_alternation
+ refute_nil(named_captures("foo|bar"))
+ end
+
+ def test_anchors
+ refute_nil(named_captures("^foo$"))
+ end
+
+ def test_any
+ refute_nil(named_captures("."))
+ end
+
+ def test_posix_character_classes
+ refute_nil(named_captures("[[:digit:]]"))
+ end
+
+ def test_negated_posix_character_classes
+ refute_nil(named_captures("[[:^digit:]]"))
+ end
+
+ def test_invalid_posix_character_classes_should_fall_back_to_regular_classes
+ refute_nil(named_captures("[[:foo]]"))
+ end
+
+ def test_character_sets
+ refute_nil(named_captures("[abc]"))
+ end
+
+ def test_nested_character_sets
+ refute_nil(named_captures("[[abc]]"))
+ end
+
+ def test_nested_character_sets_with_operators
+ refute_nil(named_captures("[[abc] && [def]]"))
+ end
+
+ def test_named_capture_inside_nested_character_set
+ assert_equal([], named_captures("[foo (?<foo>bar)]"))
+ end
+
+ def test_negated_character_sets
+ refute_nil(named_captures("[^abc]"))
+ end
+
+ def test_character_ranges
+ refute_nil(named_captures("[a-z]"))
+ end
+
+ def test_negated_character_ranges
+ refute_nil(named_captures("[^a-z]"))
+ end
+
+ def test_fake_named_captures_inside_character_sets
+ assert_equal([], named_captures("[a-z(?<foo>)]"))
+ end
+
+ def test_fake_named_capture_inside_character_set_with_escaped_ending
+ assert_equal([], named_captures("[a-z\\](?<foo>)]"))
+ end
+
+ def test_comments
+ refute_nil(named_captures("(?#foo)"))
+ end
+
+ def test_comments_with_escaped_parentheses
+ refute_nil(named_captures("(?#foo\\)\\))"))
+ end
+
+ def test_non_capturing_groups
+ refute_nil(named_captures("(?:foo)"))
+ end
+
+ def test_positive_lookaheads
+ refute_nil(named_captures("(?=foo)"))
+ end
+
+ def test_negative_lookaheads
+ refute_nil(named_captures("(?!foo)"))
+ end
+
+ def test_positive_lookbehinds
+ refute_nil(named_captures("(?<=foo)"))
+ end
+
+ def test_negative_lookbehinds
+ refute_nil(named_captures("(?<!foo)"))
+ end
+
+ def test_atomic_groups
+ refute_nil(named_captures("(?>foo)"))
+ end
+
+ def test_absence_operator
+ refute_nil(named_captures("(?~foo)"))
+ end
+
+ def test_conditional_expression_with_index
+ refute_nil(named_captures("(?(1)foo)"))
+ end
+
+ def test_conditional_expression_with_name
+ refute_nil(named_captures("(?(foo)bar)"))
+ end
+
+ def test_conditional_expression_with_group
+ refute_nil(named_captures("(?(<foo>)bar)"))
+ end
+
+ def test_options_on_groups
+ refute_nil(named_captures("(?imxdau:foo)"))
+ end
+
+ def test_options_on_groups_with_invalid_options
+ assert_nil(named_captures("(?z:bar)"))
+ end
+
+ def test_options_on_groups_getting_turned_off
+ refute_nil(named_captures("(?-imx:foo)"))
+ end
+
+ def test_options_on_groups_some_getting_turned_on_some_getting_turned_off
+ refute_nil(named_captures("(?im-x:foo)"))
+ end
+
+ def test_star_quantifier
+ refute_nil(named_captures("foo*"))
+ end
+
+ def test_plus_quantifier
+ refute_nil(named_captures("foo+"))
+ end
+
+ def test_question_mark_quantifier
+ refute_nil(named_captures("foo?"))
+ end
+
+ def test_endless_range_quantifier
+ refute_nil(named_captures("foo{1,}"))
+ end
+
+ def test_beginless_range_quantifier
+ refute_nil(named_captures("foo{,1}"))
+ end
+
+ def test_range_quantifier
+ refute_nil(named_captures("foo{1,2}"))
+ end
+
+ def test_fake_range_quantifier_because_of_spaces
+ refute_nil(named_captures("foo{1, 2}"))
+ end
+
+ ##############################################################################
+ # These test that flag values are correct.
+ ##############################################################################
+
+ def test_flag_ignorecase
+ assert_equal(Regexp::IGNORECASE, options("i"))
+ end
+
+ def test_flag_extended
+ assert_equal(Regexp::EXTENDED, options("x"))
+ end
+
+ def test_flag_multiline
+ assert_equal(Regexp::MULTILINE, options("m"))
+ end
+
+ def test_flag_fixedencoding
+ assert_equal(Regexp::FIXEDENCODING, options("e"))
+ assert_equal(Regexp::FIXEDENCODING, options("u"))
+ assert_equal(Regexp::FIXEDENCODING, options("s"))
+ end
+
+ def test_flag_noencoding
+ assert_equal(Regexp::NOENCODING, options("n"))
+ end
+
+ def test_flag_once
+ assert_equal(0, options("o"))
+ end
+
+ def test_flag_combined
+ value = Regexp::IGNORECASE | Regexp::MULTILINE | Regexp::EXTENDED
+ assert_equal(value, options("mix"))
+ end
+
+ private
+
+ def named_captures(source)
+ Debug.named_captures(source)
+ end
+
+ def options(flags)
+ options =
+ ["/foo/#{flags}", "/foo\#{1}/#{flags}"].map do |source|
+ YARP.parse(source).value.statements.body.first.options
+ end
+
+ # Check that we get the same set of options from both regular expressions
+ # and interpolated regular expressions.
+ assert_equal(1, options.uniq.length)
+
+ # Return the options from the first regular expression since we know they
+ # are the same.
+ options.first
+ end
+ end
+end
diff --git a/test/prism/ripper_compat_test.rb b/test/prism/ripper_compat_test.rb
new file mode 100644
index 0000000000..9fcdfe63c6
--- /dev/null
+++ b/test/prism/ripper_compat_test.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class RipperCompatTest < TestCase
+ def test_1_plus_2
+ assert_equivalent("1 + 2")
+ end
+
+ def test_2_minus_3
+ assert_equivalent("2 - 3")
+ end
+
+ private
+
+ def assert_equivalent(source)
+ assert_equal Ripper.sexp_raw(source), RipperCompat.sexp_raw(source)
+ end
+ end
+end
diff --git a/test/prism/ruby_api_test.rb b/test/prism/ruby_api_test.rb
new file mode 100644
index 0000000000..dc12012f44
--- /dev/null
+++ b/test/prism/ruby_api_test.rb
@@ -0,0 +1,64 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class RubyAPITest < TestCase
+ def test_ruby_api
+ filepath = __FILE__
+ source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
+
+ assert_equal YARP.lex(source, filepath).value, YARP.lex_file(filepath).value
+ assert_equal YARP.dump(source, filepath), YARP.dump_file(filepath)
+
+ serialized = YARP.dump(source, filepath)
+ ast1 = YARP.load(source, serialized).value
+ ast2 = YARP.parse(source, filepath).value
+ ast3 = YARP.parse_file(filepath).value
+
+ assert_equal_nodes ast1, ast2
+ assert_equal_nodes ast2, ast3
+ end
+
+ def test_literal_value_method
+ assert_equal 123, parse_expression("123").value
+ assert_equal 3.14, parse_expression("3.14").value
+ assert_equal 42i, parse_expression("42i").value
+ assert_equal 42.1ri, parse_expression("42.1ri").value
+ assert_equal 3.14i, parse_expression("3.14i").value
+ assert_equal 42r, parse_expression("42r").value
+ assert_equal 0.5r, parse_expression("0.5r").value
+ assert_equal 42ri, parse_expression("42ri").value
+ assert_equal 0.5ri, parse_expression("0.5ri").value
+ end
+
+ def test_location_join
+ recv, args_node, _ = parse_expression("1234 + 567").child_nodes
+ arg = args_node.arguments[0]
+
+ joined = recv.location.join(arg.location)
+ assert_equal 0, joined.start_offset
+ assert_equal 10, joined.length
+
+ assert_raise RuntimeError, "Incompatible locations" do
+ arg.location.join(recv.location)
+ end
+
+ other_arg = parse_expression("1234 + 567").arguments.arguments[0]
+
+ assert_raise RuntimeError, "Incompatible sources" do
+ other_arg.location.join(recv.location)
+ end
+
+ assert_raise RuntimeError, "Incompatible sources" do
+ recv.location.join(other_arg.location)
+ end
+ end
+
+ private
+
+ def parse_expression(source)
+ YARP.parse(source).value.statements.body.first
+ end
+ end
+end
diff --git a/test/prism/snapshots/alias.txt b/test/prism/snapshots/alias.txt
new file mode 100644
index 0000000000..732c69b4d1
--- /dev/null
+++ b/test/prism/snapshots/alias.txt
@@ -0,0 +1,173 @@
+@ ProgramNode (location: (1,0)-(23,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(23,11))
+ └── body: (length: 12)
+ ├── @ AliasMethodNode (location: (1,0)-(1,15))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (1,6)-(1,10))
+ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ ├── value_loc: (1,7)-(1,10) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (1,11)-(1,15))
+ │ │ ├── opening_loc: (1,11)-(1,12) = ":"
+ │ │ ├── value_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── keyword_loc: (1,0)-(1,5) = "alias"
+ ├── @ AliasMethodNode (location: (3,0)-(3,21))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (3,6)-(3,13))
+ │ │ ├── opening_loc: (3,6)-(3,9) = "%s["
+ │ │ ├── value_loc: (3,9)-(3,12) = "abc"
+ │ │ ├── closing_loc: (3,12)-(3,13) = "]"
+ │ │ └── unescaped: "abc"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (3,14)-(3,21))
+ │ │ ├── opening_loc: (3,14)-(3,17) = "%s["
+ │ │ ├── value_loc: (3,17)-(3,20) = "def"
+ │ │ ├── closing_loc: (3,20)-(3,21) = "]"
+ │ │ └── unescaped: "def"
+ │ └── keyword_loc: (3,0)-(3,5) = "alias"
+ ├── @ AliasMethodNode (location: (5,0)-(5,19))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (5,6)-(5,12))
+ │ │ ├── opening_loc: (5,6)-(5,8) = ":'"
+ │ │ ├── value_loc: (5,8)-(5,11) = "abc"
+ │ │ ├── closing_loc: (5,11)-(5,12) = "'"
+ │ │ └── unescaped: "abc"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (5,13)-(5,19))
+ │ │ ├── opening_loc: (5,13)-(5,15) = ":'"
+ │ │ ├── value_loc: (5,15)-(5,18) = "def"
+ │ │ ├── closing_loc: (5,18)-(5,19) = "'"
+ │ │ └── unescaped: "def"
+ │ └── keyword_loc: (5,0)-(5,5) = "alias"
+ ├── @ AliasMethodNode (location: (7,0)-(7,23))
+ │ ├── new_name:
+ │ │ @ InterpolatedSymbolNode (location: (7,6)-(7,16))
+ │ │ ├── opening_loc: (7,6)-(7,8) = ":\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (7,8)-(7,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (7,8)-(7,11) = "abc"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "abc"
+ │ │ │ └── @ EmbeddedStatementsNode (location: (7,11)-(7,15))
+ │ │ │ ├── opening_loc: (7,11)-(7,13) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (7,13)-(7,14))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (7,13)-(7,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (7,14)-(7,15) = "}"
+ │ │ └── closing_loc: (7,15)-(7,16) = "\""
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (7,17)-(7,23))
+ │ │ ├── opening_loc: (7,17)-(7,19) = ":'"
+ │ │ ├── value_loc: (7,19)-(7,22) = "def"
+ │ │ ├── closing_loc: (7,22)-(7,23) = "'"
+ │ │ └── unescaped: "def"
+ │ └── keyword_loc: (7,0)-(7,5) = "alias"
+ ├── @ AliasGlobalVariableNode (location: (9,0)-(9,11))
+ │ ├── new_name:
+ │ │ @ GlobalVariableReadNode (location: (9,6)-(9,8))
+ │ │ └── name: :$a
+ │ ├── old_name:
+ │ │ @ BackReferenceReadNode (location: (9,9)-(9,11))
+ │ └── keyword_loc: (9,0)-(9,5) = "alias"
+ ├── @ AliasMethodNode (location: (11,0)-(11,13))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (11,6)-(11,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (11,6)-(11,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (11,10)-(11,13))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (11,10)-(11,13) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── keyword_loc: (11,0)-(11,5) = "alias"
+ ├── @ AliasGlobalVariableNode (location: (13,0)-(13,15))
+ │ ├── new_name:
+ │ │ @ GlobalVariableReadNode (location: (13,6)-(13,10))
+ │ │ └── name: :$foo
+ │ ├── old_name:
+ │ │ @ GlobalVariableReadNode (location: (13,11)-(13,15))
+ │ │ └── name: :$bar
+ │ └── keyword_loc: (13,0)-(13,5) = "alias"
+ ├── @ AliasMethodNode (location: (15,0)-(15,12))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (15,6)-(15,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (15,6)-(15,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (15,10)-(15,12))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (15,10)-(15,12) = "if"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "if"
+ │ └── keyword_loc: (15,0)-(15,5) = "alias"
+ ├── @ AliasMethodNode (location: (17,0)-(17,13))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (17,6)-(17,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (17,6)-(17,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (17,10)-(17,13))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (17,10)-(17,13) = "<=>"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "<=>"
+ │ └── keyword_loc: (17,0)-(17,5) = "alias"
+ ├── @ AliasMethodNode (location: (19,0)-(19,15))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (19,6)-(19,9))
+ │ │ ├── opening_loc: (19,6)-(19,7) = ":"
+ │ │ ├── value_loc: (19,7)-(19,9) = "=="
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "=="
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (19,10)-(19,15))
+ │ │ ├── opening_loc: (19,10)-(19,11) = ":"
+ │ │ ├── value_loc: (19,11)-(19,15) = "eql?"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "eql?"
+ │ └── keyword_loc: (19,0)-(19,5) = "alias"
+ ├── @ AliasMethodNode (location: (21,0)-(21,9))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (21,6)-(21,7))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (21,6)-(21,7) = "A"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "A"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (21,8)-(21,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (21,8)-(21,9) = "B"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "B"
+ │ └── keyword_loc: (21,0)-(21,5) = "alias"
+ └── @ AliasMethodNode (location: (23,0)-(23,11))
+ ├── new_name:
+ │ @ SymbolNode (location: (23,6)-(23,8))
+ │ ├── opening_loc: (23,6)-(23,7) = ":"
+ │ ├── value_loc: (23,7)-(23,8) = "A"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "A"
+ ├── old_name:
+ │ @ SymbolNode (location: (23,9)-(23,11))
+ │ ├── opening_loc: (23,9)-(23,10) = ":"
+ │ ├── value_loc: (23,10)-(23,11) = "B"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "B"
+ └── keyword_loc: (23,0)-(23,5) = "alias"
diff --git a/test/prism/snapshots/arithmetic.txt b/test/prism/snapshots/arithmetic.txt
new file mode 100644
index 0000000000..5ff36ffe84
--- /dev/null
+++ b/test/prism/snapshots/arithmetic.txt
@@ -0,0 +1,245 @@
+@ ProgramNode (location: (1,0)-(13,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,8))
+ └── body: (length: 7)
+ ├── @ CallNode (location: (1,0)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,8))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,5)-(1,8) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,4))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (3,1)-(3,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,1)-(3,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,1) = "-"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "-@"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,4)-(3,5) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,5)-(3,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,5)-(3,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,5)-(3,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "*"
+ ├── @ CallNode (location: (5,0)-(5,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,4))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (5,1)-(5,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,1)-(5,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,0)-(5,1) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+@"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,4)-(5,6) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (5,6)-(5,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,6)-(5,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "**"
+ ├── @ CallNode (location: (7,0)-(7,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,4)-(7,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,4)-(7,8))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (7,5)-(7,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,5)-(7,8) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,4)-(7,5) = "~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "~"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (9,0)-(9,17))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,10))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (9,0)-(9,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,4)-(9,6) = "<<"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,7)-(9,10))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (9,7)-(9,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,7)-(9,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "<<"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,11)-(9,13) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,14)-(9,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (9,14)-(9,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,14)-(9,17) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<<"
+ ├── @ CallNode (location: (11,0)-(11,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,1)-(11,5))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (11,1)-(11,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,2)-(11,4) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "**"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "-@"
+ └── @ CallNode (location: (13,0)-(13,8))
+ ├── receiver:
+ │ @ IntegerNode (location: (13,0)-(13,2))
+ │ └── flags: decimal
+ ├── call_operator_loc: (13,2)-(13,3) = "."
+ ├── message_loc: (13,3)-(13,8) = "zero?"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "zero?"
diff --git a/test/prism/snapshots/arrays.txt b/test/prism/snapshots/arrays.txt
new file mode 100644
index 0000000000..8a7c98a839
--- /dev/null
+++ b/test/prism/snapshots/arrays.txt
@@ -0,0 +1,873 @@
+@ ProgramNode (location: (1,0)-(82,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(82,7))
+ └── body: (length: 30)
+ ├── @ ArrayNode (location: (1,0)-(1,4))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SplatNode (location: (1,1)-(1,3))
+ │ │ ├── operator_loc: (1,1)-(1,2) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,3)-(1,4) = "]"
+ ├── @ CallNode (location: (3,0)-(3,23))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,3)-(3,13) = "[bar, baz]"
+ │ ├── opening_loc: (3,3)-(3,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,23))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ CallNode (location: (3,4)-(3,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,4)-(3,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── @ CallNode (location: (3,9)-(3,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,9)-(3,12) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── @ ArrayNode (location: (3,16)-(3,23))
+ │ │ ├── elements: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (3,16)-(3,17))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── @ IntegerNode (location: (3,19)-(3,20))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (3,22)-(3,23))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── closing_loc: (3,12)-(3,13) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ ArrayNode (location: (5,0)-(5,13))
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (5,1)-(5,12))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,1)-(5,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,1)-(5,3))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (5,1)-(5,2) = "a"
+ │ │ │ ├── closing_loc: (5,2)-(5,3) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ ArrayNode (location: (5,4)-(5,12))
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (5,5)-(5,7))
+ │ │ │ │ │ ├── opening_loc: (5,5)-(5,6) = ":"
+ │ │ │ │ │ ├── value_loc: (5,6)-(5,7) = "b"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ └── @ SymbolNode (location: (5,9)-(5,11))
+ │ │ │ │ ├── opening_loc: (5,9)-(5,10) = ":"
+ │ │ │ │ ├── value_loc: (5,10)-(5,11) = "c"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "c"
+ │ │ │ ├── opening_loc: (5,4)-(5,5) = "["
+ │ │ │ └── closing_loc: (5,11)-(5,12) = "]"
+ │ │ └── operator_loc: ∅
+ │ ├── opening_loc: (5,0)-(5,1) = "["
+ │ └── closing_loc: (5,12)-(5,13) = "]"
+ ├── @ ArrayNode (location: (9,0)-(15,1))
+ │ ├── elements: (length: 5)
+ │ │ ├── @ SymbolNode (location: (9,1)-(9,3))
+ │ │ │ ├── opening_loc: (9,1)-(9,2) = ":"
+ │ │ │ ├── value_loc: (9,2)-(9,3) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (9,5)-(9,7))
+ │ │ │ ├── opening_loc: (9,5)-(9,6) = ":"
+ │ │ │ ├── value_loc: (9,6)-(9,7) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── @ SymbolNode (location: (10,0)-(10,2))
+ │ │ │ ├── opening_loc: (10,0)-(10,1) = ":"
+ │ │ │ ├── value_loc: (10,1)-(10,2) = "c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "c"
+ │ │ ├── @ IntegerNode (location: (10,3)-(10,4))
+ │ │ │ └── flags: decimal
+ │ │ └── @ SymbolNode (location: (14,0)-(14,2))
+ │ │ ├── opening_loc: (14,0)-(14,1) = ":"
+ │ │ ├── value_loc: (14,1)-(14,2) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── opening_loc: (9,0)-(9,1) = "["
+ │ └── closing_loc: (15,0)-(15,1) = "]"
+ ├── @ ArrayNode (location: (18,0)-(26,1))
+ │ ├── elements: (length: 5)
+ │ │ ├── @ SymbolNode (location: (18,1)-(18,3))
+ │ │ │ ├── opening_loc: (18,1)-(18,2) = ":"
+ │ │ │ ├── value_loc: (18,2)-(18,3) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (18,5)-(18,7))
+ │ │ │ ├── opening_loc: (18,5)-(18,6) = ":"
+ │ │ │ ├── value_loc: (18,6)-(18,7) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── @ SymbolNode (location: (19,0)-(19,2))
+ │ │ │ ├── opening_loc: (19,0)-(19,1) = ":"
+ │ │ │ ├── value_loc: (19,1)-(19,2) = "c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "c"
+ │ │ ├── @ IntegerNode (location: (19,3)-(19,4))
+ │ │ │ └── flags: decimal
+ │ │ └── @ SymbolNode (location: (23,0)-(23,2))
+ │ │ ├── opening_loc: (23,0)-(23,1) = ":"
+ │ │ ├── value_loc: (23,1)-(23,2) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── opening_loc: (18,0)-(18,1) = "["
+ │ └── closing_loc: (26,0)-(26,1) = "]"
+ ├── @ ArrayNode (location: (28,0)-(28,12))
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (28,1)-(28,11))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (28,1)-(28,11))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (28,1)-(28,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (28,1)-(28,4) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (28,8)-(28,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (28,8)-(28,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (28,5)-(28,7) = "=>"
+ │ ├── opening_loc: (28,0)-(28,1) = "["
+ │ └── closing_loc: (28,11)-(28,12) = "]"
+ ├── @ CallNode (location: (30,0)-(30,19))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (30,0)-(30,8))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (30,3)-(30,8) = "[bar]"
+ │ │ ├── opening_loc: (30,3)-(30,4) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (30,4)-(30,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (30,4)-(30,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (30,4)-(30,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: (30,7)-(30,8) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (30,8)-(30,13) = "[baz]"
+ │ ├── opening_loc: (30,8)-(30,9) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (30,9)-(30,19))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (30,9)-(30,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (30,9)-(30,12) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── @ CallNode (location: (30,16)-(30,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (30,16)-(30,19) = "qux"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "qux"
+ │ ├── closing_loc: (30,12)-(30,13) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (32,0)-(32,13))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (32,0)-(32,8))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (32,0)-(32,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (32,0)-(32,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (32,3)-(32,8) = "[bar]"
+ │ │ ├── opening_loc: (32,3)-(32,4) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (32,4)-(32,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (32,4)-(32,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (32,4)-(32,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: (32,7)-(32,8) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (32,8)-(32,13) = "[baz]"
+ │ ├── opening_loc: (32,8)-(32,9) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (32,9)-(32,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (32,9)-(32,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (32,9)-(32,12) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── closing_loc: (32,12)-(32,13) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ ArrayNode (location: (34,0)-(35,1))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (34,0)-(34,1) = "["
+ │ └── closing_loc: (35,0)-(35,1) = "]"
+ ├── @ CallNode (location: (37,0)-(37,13))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (37,0)-(37,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,0)-(37,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,3)-(37,13) = "[bar, baz]"
+ │ ├── opening_loc: (37,3)-(37,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,4)-(37,12))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (37,4)-(37,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,4)-(37,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── @ CallNode (location: (37,9)-(37,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,9)-(37,12) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── closing_loc: (37,12)-(37,13) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (39,0)-(39,19))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (39,0)-(39,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,0)-(39,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (39,3)-(39,13) = "[bar, baz]"
+ │ ├── opening_loc: (39,3)-(39,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,4)-(39,19))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ CallNode (location: (39,4)-(39,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (39,4)-(39,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── @ CallNode (location: (39,9)-(39,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (39,9)-(39,12) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── @ CallNode (location: (39,16)-(39,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,16)-(39,19) = "qux"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "qux"
+ │ ├── closing_loc: (39,12)-(39,13) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ MultiWriteNode (location: (41,0)-(41,21))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ CallNode (location: (41,0)-(41,6))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (41,3)-(41,6) = "[0]"
+ │ │ │ ├── opening_loc: (41,3)-(41,4) = "["
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (41,4)-(41,5))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (41,4)-(41,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── closing_loc: (41,5)-(41,6) = "]"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "[]="
+ │ │ └── @ CallNode (location: (41,8)-(41,14))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (41,8)-(41,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (41,8)-(41,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (41,11)-(41,14) = "[0]"
+ │ │ ├── opening_loc: (41,11)-(41,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (41,12)-(41,13))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (41,12)-(41,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (41,13)-(41,14) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]="
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (41,15)-(41,16) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (41,17)-(41,21))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (41,17)-(41,18))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (41,20)-(41,21))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ CallNode (location: (43,0)-(43,19))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (43,0)-(43,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (43,0)-(43,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (43,3)-(43,19) = "[bar[baz] = qux]"
+ │ ├── opening_loc: (43,3)-(43,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (43,4)-(43,18))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (43,4)-(43,18))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (43,4)-(43,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (43,4)-(43,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (43,7)-(43,12) = "[baz]"
+ │ │ ├── opening_loc: (43,7)-(43,8) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (43,8)-(43,18))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ CallNode (location: (43,8)-(43,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (43,8)-(43,11) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ └── @ CallNode (location: (43,15)-(43,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (43,15)-(43,18) = "qux"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "qux"
+ │ │ ├── closing_loc: (43,11)-(43,12) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]="
+ │ ├── closing_loc: (43,18)-(43,19) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (45,0)-(45,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (45,0)-(45,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,0)-(45,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (45,3)-(45,8) = "[bar]"
+ │ ├── opening_loc: (45,3)-(45,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,4)-(45,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (45,4)-(45,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,4)-(45,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (45,7)-(45,8) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (47,0)-(47,14))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (47,0)-(47,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (47,3)-(47,8) = "[bar]"
+ │ ├── opening_loc: (47,3)-(47,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (47,4)-(47,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (47,4)-(47,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (47,4)-(47,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── @ CallNode (location: (47,11)-(47,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (47,11)-(47,14) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── closing_loc: (47,7)-(47,8) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ ArrayNode (location: (49,0)-(49,6))
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (49,1)-(49,5))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (49,1)-(49,5))
+ │ │ ├── value:
+ │ │ │ @ HashNode (location: (49,3)-(49,5))
+ │ │ │ ├── opening_loc: (49,3)-(49,4) = "{"
+ │ │ │ ├── elements: (length: 0)
+ │ │ │ └── closing_loc: (49,4)-(49,5) = "}"
+ │ │ └── operator_loc: (49,1)-(49,3) = "**"
+ │ ├── opening_loc: (49,0)-(49,1) = "["
+ │ └── closing_loc: (49,5)-(49,6) = "]"
+ ├── @ ArrayNode (location: (51,0)-(51,6))
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (51,1)-(51,5))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (51,1)-(51,5))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (51,3)-(51,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (51,3)-(51,5) = "kw"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "kw"
+ │ │ └── operator_loc: (51,1)-(51,3) = "**"
+ │ ├── opening_loc: (51,0)-(51,1) = "["
+ │ └── closing_loc: (51,5)-(51,6) = "]"
+ ├── @ ArrayNode (location: (53,0)-(53,9))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (53,1)-(53,2))
+ │ │ │ └── flags: decimal
+ │ │ └── @ KeywordHashNode (location: (53,4)-(53,8))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (53,4)-(53,8))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (53,6)-(53,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (53,6)-(53,8) = "kw"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "kw"
+ │ │ └── operator_loc: (53,4)-(53,6) = "**"
+ │ ├── opening_loc: (53,0)-(53,1) = "["
+ │ └── closing_loc: (53,8)-(53,9) = "]"
+ ├── @ ArrayNode (location: (55,0)-(55,21))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (55,1)-(55,2))
+ │ │ │ └── flags: decimal
+ │ │ └── @ KeywordHashNode (location: (55,4)-(55,20))
+ │ │ └── elements: (length: 3)
+ │ │ ├── @ AssocSplatNode (location: (55,4)-(55,8))
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (55,6)-(55,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (55,6)-(55,8) = "kw"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "kw"
+ │ │ │ └── operator_loc: (55,4)-(55,6) = "**"
+ │ │ ├── @ AssocSplatNode (location: (55,10)-(55,14))
+ │ │ │ ├── value:
+ │ │ │ │ @ HashNode (location: (55,12)-(55,14))
+ │ │ │ │ ├── opening_loc: (55,12)-(55,13) = "{"
+ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ └── closing_loc: (55,13)-(55,14) = "}"
+ │ │ │ └── operator_loc: (55,10)-(55,12) = "**"
+ │ │ └── @ AssocSplatNode (location: (55,16)-(55,20))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (55,18)-(55,20))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (55,18)-(55,20) = "kw"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "kw"
+ │ │ └── operator_loc: (55,16)-(55,18) = "**"
+ │ ├── opening_loc: (55,0)-(55,1) = "["
+ │ └── closing_loc: (55,20)-(55,21) = "]"
+ ├── @ ArrayNode (location: (57,0)-(59,1))
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (58,2)-(58,12))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (58,2)-(58,12))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (58,2)-(58,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (58,2)-(58,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (58,9)-(58,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (58,9)-(58,12) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (58,6)-(58,8) = "=>"
+ │ ├── opening_loc: (57,0)-(57,1) = "["
+ │ └── closing_loc: (59,0)-(59,1) = "]"
+ ├── @ ArrayNode (location: (62,0)-(62,17))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (62,3)-(62,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (62,3)-(62,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ SymbolNode (location: (62,7)-(62,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (62,7)-(62,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ SymbolNode (location: (62,11)-(62,16))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (62,11)-(62,16) = "three"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "three"
+ │ ├── opening_loc: (62,0)-(62,3) = "%i#"
+ │ └── closing_loc: (62,16)-(62,17) = "#"
+ ├── @ ArrayNode (location: (64,0)-(64,17))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (64,3)-(64,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (64,3)-(64,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ StringNode (location: (64,7)-(64,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (64,7)-(64,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ StringNode (location: (64,11)-(64,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (64,11)-(64,16) = "three"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "three"
+ │ ├── opening_loc: (64,0)-(64,3) = "%w#"
+ │ └── closing_loc: (64,16)-(64,17) = "#"
+ ├── @ XStringNode (location: (66,0)-(66,17))
+ │ ├── opening_loc: (66,0)-(66,3) = "%x#"
+ │ ├── content_loc: (66,3)-(66,16) = "one two three"
+ │ ├── closing_loc: (66,16)-(66,17) = "#"
+ │ └── unescaped: "one two three"
+ ├── @ ArrayNode (location: (69,0)-(69,17))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (69,3)-(69,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (69,3)-(69,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ SymbolNode (location: (69,7)-(69,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (69,7)-(69,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ SymbolNode (location: (69,11)-(69,16))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (69,11)-(69,16) = "three"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "three"
+ │ ├── opening_loc: (69,0)-(69,3) = "%i@"
+ │ └── closing_loc: (69,16)-(69,17) = "@"
+ ├── @ ArrayNode (location: (71,0)-(71,17))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (71,3)-(71,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (71,3)-(71,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ StringNode (location: (71,7)-(71,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (71,7)-(71,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ StringNode (location: (71,11)-(71,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (71,11)-(71,16) = "three"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "three"
+ │ ├── opening_loc: (71,0)-(71,3) = "%w@"
+ │ └── closing_loc: (71,16)-(71,17) = "@"
+ ├── @ XStringNode (location: (73,0)-(73,17))
+ │ ├── opening_loc: (73,0)-(73,3) = "%x@"
+ │ ├── content_loc: (73,3)-(73,16) = "one two three"
+ │ ├── closing_loc: (73,16)-(73,17) = "@"
+ │ └── unescaped: "one two three"
+ ├── @ ArrayNode (location: (76,0)-(76,17))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (76,3)-(76,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (76,3)-(76,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ SymbolNode (location: (76,7)-(76,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (76,7)-(76,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ SymbolNode (location: (76,11)-(76,16))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (76,11)-(76,16) = "three"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "three"
+ │ ├── opening_loc: (76,0)-(76,3) = "%i{"
+ │ └── closing_loc: (76,16)-(76,17) = "}"
+ ├── @ ArrayNode (location: (78,0)-(78,17))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (78,3)-(78,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (78,3)-(78,6) = "one"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "one"
+ │ │ ├── @ StringNode (location: (78,7)-(78,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (78,7)-(78,10) = "two"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "two"
+ │ │ └── @ StringNode (location: (78,11)-(78,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (78,11)-(78,16) = "three"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "three"
+ │ ├── opening_loc: (78,0)-(78,3) = "%w{"
+ │ └── closing_loc: (78,16)-(78,17) = "}"
+ ├── @ XStringNode (location: (80,0)-(80,17))
+ │ ├── opening_loc: (80,0)-(80,3) = "%x{"
+ │ ├── content_loc: (80,3)-(80,16) = "one two three"
+ │ ├── closing_loc: (80,16)-(80,17) = "}"
+ │ └── unescaped: "one two three"
+ └── @ ArrayNode (location: (82,0)-(82,7))
+ ├── elements: (length: 1)
+ │ └── @ StringNode (location: (82,3)-(82,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (82,3)-(82,6) = "\\C:"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\\C:"
+ ├── opening_loc: (82,0)-(82,3) = "%w["
+ └── closing_loc: (82,6)-(82,7) = "]"
diff --git a/test/prism/snapshots/begin_ensure.txt b/test/prism/snapshots/begin_ensure.txt
new file mode 100644
index 0000000000..42b97cd609
--- /dev/null
+++ b/test/prism/snapshots/begin_ensure.txt
@@ -0,0 +1,249 @@
+@ ProgramNode (location: (1,0)-(21,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(21,15))
+ └── body: (length: 5)
+ ├── @ BeginNode (location: (1,0)-(5,3))
+ │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,0)-(2,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,0)-(2,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (3,0)-(5,3))
+ │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (4,0)-(4,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (4,0)-(4,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (4,0)-(4,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ BeginNode (location: (7,0)-(7,24))
+ │ ├── begin_keyword_loc: (7,0)-(7,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (7,7)-(7,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,7)-(7,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,7)-(7,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (7,10)-(7,24))
+ │ │ ├── ensure_keyword_loc: (7,10)-(7,16) = "ensure"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (7,18)-(7,19))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (7,18)-(7,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,18)-(7,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── end_keyword_loc: (7,21)-(7,24) = "end"
+ │ └── end_keyword_loc: (7,21)-(7,24) = "end"
+ ├── @ BeginNode (location: (9,0)-(11,4))
+ │ ├── begin_keyword_loc: (9,0)-(9,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (9,6)-(9,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (9,6)-(9,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,6)-(9,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (10,1)-(11,4))
+ │ │ ├── ensure_keyword_loc: (10,1)-(10,7) = "ensure"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (10,8)-(10,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (10,8)-(10,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (10,8)-(10,9) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── end_keyword_loc: (11,1)-(11,4) = "end"
+ │ └── end_keyword_loc: (11,1)-(11,4) = "end"
+ ├── @ BeginNode (location: (13,0)-(13,22))
+ │ ├── begin_keyword_loc: (13,0)-(13,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (13,6)-(13,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (13,6)-(13,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,6)-(13,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (13,9)-(13,22))
+ │ │ ├── ensure_keyword_loc: (13,9)-(13,15) = "ensure"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (13,16)-(13,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (13,16)-(13,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,16)-(13,17) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── end_keyword_loc: (13,19)-(13,22) = "end"
+ │ └── end_keyword_loc: (13,19)-(13,22) = "end"
+ └── @ BeginNode (location: (15,0)-(21,15))
+ ├── begin_keyword_loc: (15,0)-(15,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (15,6)-(21,11))
+ │ └── body: (length: 1)
+ │ └── @ BeginNode (location: (15,6)-(21,11))
+ │ ├── begin_keyword_loc: (15,6)-(15,11) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (15,11)-(21,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (15,11)-(21,7))
+ │ │ ├── receiver:
+ │ │ │ @ SymbolNode (location: (15,11)-(15,13))
+ │ │ │ ├── opening_loc: (15,11)-(15,12) = ":"
+ │ │ │ ├── value_loc: (15,12)-(15,13) = "s"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "s"
+ │ │ ├── call_operator_loc: (15,13)-(15,14) = "."
+ │ │ ├── message_loc: (15,14)-(15,15) = "l"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,16)-(21,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ BeginNode (location: (15,16)-(21,7))
+ │ │ │ ├── begin_keyword_loc: (15,16)-(15,21) = "begin"
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause:
+ │ │ │ │ @ EnsureNode (location: (15,22)-(21,7))
+ │ │ │ │ ├── ensure_keyword_loc: (15,22)-(15,28) = "ensure"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (15,29)-(21,3))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (15,29)-(21,3))
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ ConstantReadNode (location: (15,29)-(15,35))
+ │ │ │ │ │ │ └── name: :Module
+ │ │ │ │ │ ├── call_operator_loc: (15,35)-(15,36) = "."
+ │ │ │ │ │ ├── message_loc: (15,36)-(15,39) = "new"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (15,40)-(21,3))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body:
+ │ │ │ │ │ │ │ @ StatementsNode (location: (16,2)-(20,5))
+ │ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ │ └── @ BeginNode (location: (16,2)-(20,5))
+ │ │ │ │ │ │ │ ├── begin_keyword_loc: (16,2)-(16,7) = "begin"
+ │ │ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ │ │ @ StatementsNode (location: (17,4)-(17,9))
+ │ │ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ │ │ └── @ BreakNode (location: (17,4)-(17,9))
+ │ │ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ │ │ └── keyword_loc: (17,4)-(17,9) = "break"
+ │ │ │ │ │ │ │ ├── rescue_clause: ∅
+ │ │ │ │ │ │ │ ├── else_clause: ∅
+ │ │ │ │ │ │ │ ├── ensure_clause:
+ │ │ │ │ │ │ │ │ @ EnsureNode (location: (18,4)-(20,5))
+ │ │ │ │ │ │ │ │ ├── ensure_keyword_loc: (18,4)-(18,10) = "ensure"
+ │ │ │ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ │ │ │ @ StatementsNode (location: (18,11)-(19,7))
+ │ │ │ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ │ │ │ └── @ CallNode (location: (18,11)-(19,7))
+ │ │ │ │ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ │ │ │ │ @ ConstantReadNode (location: (18,11)-(18,17))
+ │ │ │ │ │ │ │ │ │ │ └── name: :Module
+ │ │ │ │ │ │ │ │ │ ├── call_operator_loc: (18,17)-(18,18) = "."
+ │ │ │ │ │ │ │ │ │ ├── message_loc: (18,18)-(18,21) = "new"
+ │ │ │ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ │ │ │ │ @ BlockNode (location: (18,22)-(19,7))
+ │ │ │ │ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ │ │ │ │ ├── opening_loc: (18,22)-(18,24) = "do"
+ │ │ │ │ │ │ │ │ │ │ └── closing_loc: (19,4)-(19,7) = "end"
+ │ │ │ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ │ │ │ └── name: "new"
+ │ │ │ │ │ │ │ │ └── end_keyword_loc: (20,2)-(20,5) = "end"
+ │ │ │ │ │ │ │ └── end_keyword_loc: (20,2)-(20,5) = "end"
+ │ │ │ │ │ │ ├── opening_loc: (15,40)-(15,42) = "do"
+ │ │ │ │ │ │ └── closing_loc: (21,0)-(21,3) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "new"
+ │ │ │ │ └── end_keyword_loc: (21,4)-(21,7) = "end"
+ │ │ │ └── end_keyword_loc: (21,4)-(21,7) = "end"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "l"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (21,8)-(21,11) = "end"
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (21,12)-(21,15) = "end"
diff --git a/test/prism/snapshots/begin_rescue.txt b/test/prism/snapshots/begin_rescue.txt
new file mode 100644
index 0000000000..3812134fd1
--- /dev/null
+++ b/test/prism/snapshots/begin_rescue.txt
@@ -0,0 +1,699 @@
+@ ProgramNode (location: (1,0)-(78,3))
+├── locals: [:ex]
+└── statements:
+ @ StatementsNode (location: (1,0)-(78,3))
+ └── body: (length: 17)
+ ├── @ BeginNode (location: (1,0)-(1,33))
+ │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,7)-(1,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,7)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (1,10)-(1,19))
+ │ │ ├── keyword_loc: (1,10)-(1,16) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,18)-(1,19))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,18)-(1,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,18)-(1,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause:
+ │ │ @ ElseNode (location: (1,21)-(1,33))
+ │ │ ├── else_keyword_loc: (1,21)-(1,25) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,27)-(1,28))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,27)-(1,28))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,27)-(1,28) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── end_keyword_loc: (1,30)-(1,33) = "end"
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (1,30)-(1,33) = "end"
+ ├── @ BeginNode (location: (3,0)-(3,44))
+ │ ├── begin_keyword_loc: (3,0)-(3,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,7)-(3,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,7)-(3,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,7)-(3,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (3,10)-(3,19))
+ │ │ ├── keyword_loc: (3,10)-(3,16) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,18)-(3,19))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,18)-(3,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,18)-(3,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause:
+ │ │ @ ElseNode (location: (3,21)-(3,36))
+ │ │ ├── else_keyword_loc: (3,21)-(3,25) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,27)-(3,28))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,27)-(3,28))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,27)-(3,28) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── end_keyword_loc: (3,30)-(3,36) = "ensure"
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (3,30)-(3,44))
+ │ │ ├── ensure_keyword_loc: (3,30)-(3,36) = "ensure"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,38)-(3,39))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,38)-(3,39))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,38)-(3,39) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ └── end_keyword_loc: (3,41)-(3,44) = "end"
+ │ └── end_keyword_loc: (3,41)-(3,44) = "end"
+ ├── @ BeginNode (location: (5,0)-(7,3))
+ │ ├── begin_keyword_loc: (5,0)-(5,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (6,0)-(6,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (6,0)-(6,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (7,0)-(7,3) = "end"
+ ├── @ BeginNode (location: (9,0)-(9,13))
+ │ ├── begin_keyword_loc: (9,0)-(9,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (9,7)-(9,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (9,7)-(9,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,7)-(9,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (9,10)-(9,13) = "end"
+ ├── @ BeginNode (location: (11,0)-(12,4))
+ │ ├── begin_keyword_loc: (11,0)-(11,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (11,6)-(11,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (11,6)-(11,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,6)-(11,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (12,1)-(12,4) = "end"
+ ├── @ BeginNode (location: (14,0)-(14,12))
+ │ ├── begin_keyword_loc: (14,0)-(14,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (14,6)-(14,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (14,6)-(14,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (14,6)-(14,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (14,9)-(14,12) = "end"
+ ├── @ BeginNode (location: (16,0)-(24,3))
+ │ ├── begin_keyword_loc: (16,0)-(16,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (17,0)-(17,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (17,0)-(17,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (18,0)-(23,1))
+ │ │ ├── keyword_loc: (18,0)-(18,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (19,0)-(19,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (19,0)-(19,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,0)-(19,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent:
+ │ │ @ RescueNode (location: (20,0)-(23,1))
+ │ │ ├── keyword_loc: (20,0)-(20,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (21,0)-(21,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (21,0)-(21,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,0)-(21,1) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── consequent:
+ │ │ @ RescueNode (location: (22,0)-(23,1))
+ │ │ ├── keyword_loc: (22,0)-(22,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (23,0)-(23,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (23,0)-(23,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (23,0)-(23,1) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (24,0)-(24,3) = "end"
+ ├── @ BeginNode (location: (26,0)-(32,3))
+ │ ├── begin_keyword_loc: (26,0)-(26,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (27,2)-(27,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (27,2)-(27,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (27,2)-(27,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (28,0)-(31,3))
+ │ │ ├── keyword_loc: (28,0)-(28,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (28,7)-(28,16))
+ │ │ │ └── name: :Exception
+ │ │ ├── operator_loc: (28,17)-(28,19) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (28,20)-(28,22))
+ │ │ │ ├── name: :ex
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (29,2)-(29,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (29,2)-(29,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,2)-(29,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent:
+ │ │ @ RescueNode (location: (30,0)-(31,3))
+ │ │ ├── keyword_loc: (30,0)-(30,6) = "rescue"
+ │ │ ├── exceptions: (length: 2)
+ │ │ │ ├── @ ConstantReadNode (location: (30,7)-(30,23))
+ │ │ │ │ └── name: :AnotherException
+ │ │ │ └── @ ConstantReadNode (location: (30,25)-(30,41))
+ │ │ │ └── name: :OneMoreException
+ │ │ ├── operator_loc: (30,42)-(30,44) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (30,45)-(30,47))
+ │ │ │ ├── name: :ex
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (31,2)-(31,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (31,2)-(31,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (31,2)-(31,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (32,0)-(32,3) = "end"
+ ├── @ BeginNode (location: (34,0)-(40,3))
+ │ ├── begin_keyword_loc: (34,0)-(34,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (35,2)-(35,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (35,2)-(35,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (35,2)-(35,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (36,0)-(37,3))
+ │ │ ├── keyword_loc: (36,0)-(36,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (36,7)-(36,16))
+ │ │ │ └── name: :Exception
+ │ │ ├── operator_loc: (36,17)-(36,19) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (36,20)-(36,22))
+ │ │ │ ├── name: :ex
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (37,2)-(37,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (37,2)-(37,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (38,0)-(40,3))
+ │ │ ├── ensure_keyword_loc: (38,0)-(38,6) = "ensure"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (39,2)-(39,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (39,2)-(39,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (39,2)-(39,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── end_keyword_loc: (40,0)-(40,3) = "end"
+ │ └── end_keyword_loc: (40,0)-(40,3) = "end"
+ ├── @ StringNode (location: (42,0)-(42,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (42,0)-(42,2) = "%!"
+ │ ├── content_loc: (42,2)-(42,5) = "abc"
+ │ ├── closing_loc: (42,5)-(42,6) = "!"
+ │ └── unescaped: "abc"
+ ├── @ BeginNode (location: (44,0)-(48,3))
+ │ ├── begin_keyword_loc: (44,0)-(44,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (45,0)-(45,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (45,0)-(45,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,0)-(45,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (46,0)-(47,1))
+ │ │ ├── keyword_loc: (46,0)-(46,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (47,0)-(47,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (47,0)-(47,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (47,0)-(47,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (48,0)-(48,3) = "end"
+ ├── @ BeginNode (location: (50,0)-(50,20))
+ │ ├── begin_keyword_loc: (50,0)-(50,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (50,6)-(50,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (50,6)-(50,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (50,6)-(50,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (50,8)-(50,16))
+ │ │ ├── keyword_loc: (50,8)-(50,14) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (50,15)-(50,16))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (50,15)-(50,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (50,15)-(50,16) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (50,17)-(50,20) = "end"
+ ├── @ BeginNode (location: (52,0)-(54,5))
+ │ ├── begin_keyword_loc: (52,0)-(52,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (53,0)-(53,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (53,0)-(53,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (53,0)-(53,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (53,2)-(54,1))
+ │ │ ├── keyword_loc: (53,2)-(53,8) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (54,0)-(54,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (54,0)-(54,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (54,0)-(54,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (54,2)-(54,5) = "end"
+ ├── @ BeginNode (location: (56,0)-(60,3))
+ │ ├── begin_keyword_loc: (56,0)-(56,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (57,0)-(57,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (57,0)-(57,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (57,0)-(57,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (58,0)-(59,1))
+ │ │ ├── keyword_loc: (58,0)-(58,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (58,7)-(58,16))
+ │ │ │ └── name: :Exception
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (59,0)-(59,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (59,0)-(59,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (59,0)-(59,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (60,0)-(60,3) = "end"
+ ├── @ BeginNode (location: (62,0)-(66,3))
+ │ ├── begin_keyword_loc: (62,0)-(62,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (63,0)-(63,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (63,0)-(63,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (63,0)-(63,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (64,0)-(65,1))
+ │ │ ├── keyword_loc: (64,0)-(64,6) = "rescue"
+ │ │ ├── exceptions: (length: 2)
+ │ │ │ ├── @ ConstantReadNode (location: (64,7)-(64,16))
+ │ │ │ │ └── name: :Exception
+ │ │ │ └── @ ConstantReadNode (location: (64,18)-(64,33))
+ │ │ │ └── name: :CustomException
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (65,0)-(65,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (65,0)-(65,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (65,0)-(65,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (66,0)-(66,3) = "end"
+ ├── @ BeginNode (location: (68,0)-(72,3))
+ │ ├── begin_keyword_loc: (68,0)-(68,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (69,2)-(69,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (69,2)-(69,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (69,2)-(69,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (70,0)-(71,3))
+ │ │ ├── keyword_loc: (70,0)-(70,6) = "rescue"
+ │ │ ├── exceptions: (length: 2)
+ │ │ │ ├── @ ConstantReadNode (location: (70,7)-(70,16))
+ │ │ │ │ └── name: :Exception
+ │ │ │ └── @ ConstantReadNode (location: (70,18)-(70,33))
+ │ │ │ └── name: :CustomException
+ │ │ ├── operator_loc: (70,34)-(70,36) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (70,37)-(70,39))
+ │ │ │ ├── name: :ex
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (71,2)-(71,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (71,2)-(71,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (71,2)-(71,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (72,0)-(72,3) = "end"
+ └── @ BeginNode (location: (74,0)-(78,3))
+ ├── begin_keyword_loc: (74,0)-(74,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (75,2)-(75,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (75,2)-(75,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (75,2)-(75,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (76,0)-(77,3))
+ │ ├── keyword_loc: (76,0)-(76,6) = "rescue"
+ │ ├── exceptions: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (76,7)-(76,16))
+ │ │ └── name: :Exception
+ │ ├── operator_loc: (76,17)-(76,19) = "=>"
+ │ ├── reference:
+ │ │ @ LocalVariableTargetNode (location: (76,20)-(76,22))
+ │ │ ├── name: :ex
+ │ │ └── depth: 0
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (77,2)-(77,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (77,2)-(77,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (77,2)-(77,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (78,0)-(78,3) = "end"
diff --git a/test/prism/snapshots/blocks.txt b/test/prism/snapshots/blocks.txt
new file mode 100644
index 0000000000..9a6fbbb925
--- /dev/null
+++ b/test/prism/snapshots/blocks.txt
@@ -0,0 +1,750 @@
+@ ProgramNode (location: (1,0)-(54,17))
+├── locals: [:fork]
+└── statements:
+ @ StatementsNode (location: (1,0)-(54,17))
+ └── body: (length: 20)
+ ├── @ CallNode (location: (1,0)-(1,16))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,3)-(1,8) = "[bar]"
+ │ ├── opening_loc: (1,3)-(1,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (1,7)-(1,8) = "]"
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,9)-(1,16))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,11)-(1,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,11)-(1,14) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ ├── opening_loc: (1,9)-(1,10) = "{"
+ │ │ └── closing_loc: (1,15)-(1,16) = "}"
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (3,0)-(5,3))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,3)-(3,8) = "[bar]"
+ │ ├── opening_loc: (3,3)-(3,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,4)-(3,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,4)-(3,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (3,7)-(3,8) = "]"
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,9)-(5,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (4,0)-(4,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (4,0)-(4,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (4,0)-(4,3) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ ├── opening_loc: (3,9)-(3,11) = "do"
+ │ │ └── closing_loc: (5,0)-(5,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (7,0)-(7,35))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,0)-(7,1) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "x"
+ │ ├── call_operator_loc: (7,1)-(7,2) = "."
+ │ ├── message_loc: (7,2)-(7,8) = "reduce"
+ │ ├── opening_loc: (7,8)-(7,9) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,9)-(7,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,9)-(7,10))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (7,10)-(7,11) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (7,12)-(7,35))
+ │ │ ├── locals: [:x, :memo]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (7,14)-(7,23))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (7,15)-(7,22))
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (7,15)-(7,16))
+ │ │ │ │ │ │ └── name: :x
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (7,18)-(7,22))
+ │ │ │ │ │ └── name: :memo
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (7,14)-(7,15) = "|"
+ │ │ │ └── closing_loc: (7,22)-(7,23) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (7,24)-(7,33))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableOperatorWriteNode (location: (7,24)-(7,33))
+ │ │ │ ├── name_loc: (7,24)-(7,28) = "memo"
+ │ │ │ ├── operator_loc: (7,29)-(7,31) = "+="
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableReadNode (location: (7,32)-(7,33))
+ │ │ │ │ ├── name: :x
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── name: :memo
+ │ │ │ ├── operator: :+
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (7,12)-(7,13) = "{"
+ │ │ └── closing_loc: (7,34)-(7,35) = "}"
+ │ ├── flags: ∅
+ │ └── name: "reduce"
+ ├── @ CallNode (location: (9,0)-(9,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (9,4)-(9,10))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (9,4)-(9,6) = "do"
+ │ │ └── closing_loc: (9,7)-(9,10) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (11,0)-(11,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,21))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (11,4)-(11,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,4)-(11,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── @ ParenthesesNode (location: (11,9)-(11,21))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (11,10)-(11,20))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (11,10)-(11,20))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,10)-(11,13) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (11,14)-(11,20))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (11,14)-(11,16) = "do"
+ │ │ │ │ └── closing_loc: (11,17)-(11,20) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "baz"
+ │ │ ├── opening_loc: (11,9)-(11,10) = "("
+ │ │ └── closing_loc: (11,20)-(11,21) = ")"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (13,0)-(13,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,4)-(13,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (13,4)-(13,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,4)-(13,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (13,8)-(13,14))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (13,8)-(13,10) = "do"
+ │ │ └── closing_loc: (13,11)-(13,14) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (15,0)-(15,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,0)-(15,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,4)-(15,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (15,4)-(15,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,4)-(15,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,8)-(15,11))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (15,8)-(15,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (15,8)-(15,11) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (15,12)-(15,18))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (15,12)-(15,14) = "do"
+ │ │ └── closing_loc: (15,15)-(15,18) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (17,0)-(18,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,0)-(17,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (17,4)-(18,3))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (17,7)-(17,17))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (17,8)-(17,16))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (17,8)-(17,16))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ ├── name_loc: (17,8)-(17,9) = "a"
+ │ │ │ │ │ ├── operator_loc: (17,10)-(17,11) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ CallNode (location: (17,12)-(17,16))
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ CallNode (location: (17,12)-(17,13))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (17,12)-(17,13) = "b"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "b"
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (17,13)-(17,16) = "[1]"
+ │ │ │ │ │ ├── opening_loc: (17,13)-(17,14) = "["
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (17,14)-(17,15))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (17,14)-(17,15))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ ├── closing_loc: (17,15)-(17,16) = "]"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "[]"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (17,7)-(17,8) = "|"
+ │ │ │ └── closing_loc: (17,16)-(17,17) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (17,4)-(17,6) = "do"
+ │ │ └── closing_loc: (18,0)-(18,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (20,0)-(22,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (20,0)-(20,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (20,4)-(22,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (21,0)-(22,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (21,0)-(21,6))
+ │ │ │ │ ├── keyword_loc: (21,0)-(21,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (22,0)-(22,3) = "end"
+ │ │ ├── opening_loc: (20,4)-(20,6) = "do"
+ │ │ └── closing_loc: (22,0)-(22,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (24,0)-(29,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (24,0)-(24,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (24,4)-(29,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (25,2)-(28,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (25,2)-(28,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (25,2)-(25,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (25,6)-(28,5))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (26,4)-(27,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (26,4)-(27,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (26,4)-(26,7) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (26,8)-(27,7))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── opening_loc: (26,8)-(26,10) = "do"
+ │ │ │ │ │ │ └── closing_loc: (27,4)-(27,7) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ ├── opening_loc: (25,6)-(25,8) = "do"
+ │ │ │ │ └── closing_loc: (28,2)-(28,5) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "bar"
+ │ │ ├── opening_loc: (24,4)-(24,6) = "do"
+ │ │ └── closing_loc: (29,0)-(29,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (31,0)-(31,16))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (31,0)-(31,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,3)-(31,8) = "[bar]"
+ │ ├── opening_loc: (31,3)-(31,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,4)-(31,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (31,4)-(31,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (31,4)-(31,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (31,7)-(31,8) = "]"
+ │ ├── block:
+ │ │ @ BlockNode (location: (31,9)-(31,16))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (31,11)-(31,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (31,11)-(31,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (31,11)-(31,14) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ ├── opening_loc: (31,9)-(31,10) = "{"
+ │ │ └── closing_loc: (31,15)-(31,16) = "}"
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (33,0)-(33,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (33,0)-(33,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (33,4)-(33,24))
+ │ │ ├── locals: [:x, :y, :z]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (33,6)-(33,20))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (33,7)-(33,19))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (33,7)-(33,8))
+ │ │ │ │ │ └── name: :x
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (33,10)-(33,15))
+ │ │ │ │ │ ├── name: :y
+ │ │ │ │ │ ├── name_loc: (33,10)-(33,11) = "y"
+ │ │ │ │ │ ├── operator_loc: (33,12)-(33,13) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (33,14)-(33,15))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ │ └── @ KeywordParameterNode (location: (33,17)-(33,19))
+ │ │ │ │ │ ├── name: :z
+ │ │ │ │ │ ├── name_loc: (33,17)-(33,19) = "z:"
+ │ │ │ │ │ └── value: ∅
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (33,6)-(33,7) = "|"
+ │ │ │ └── closing_loc: (33,19)-(33,20) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (33,21)-(33,22))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (33,21)-(33,22))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (33,4)-(33,5) = "{"
+ │ │ └── closing_loc: (33,23)-(33,24) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (35,0)-(35,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,0)-(35,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (35,4)-(35,11))
+ │ │ ├── locals: [:x]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (35,6)-(35,9))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (35,7)-(35,8))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (35,7)-(35,8))
+ │ │ │ │ │ └── name: :x
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (35,6)-(35,7) = "|"
+ │ │ │ └── closing_loc: (35,8)-(35,9) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (35,4)-(35,5) = "{"
+ │ │ └── closing_loc: (35,10)-(35,11) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ LocalVariableWriteNode (location: (37,0)-(37,8))
+ │ ├── name: :fork
+ │ ├── depth: 0
+ │ ├── name_loc: (37,0)-(37,4) = "fork"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (37,7)-(37,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (37,5)-(37,6) = "="
+ ├── @ CallNode (location: (38,0)-(39,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (38,0)-(38,4) = "fork"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (38,5)-(39,3))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (38,8)-(38,11))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (38,9)-(38,10))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (38,9)-(38,10))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (38,8)-(38,9) = "|"
+ │ │ │ └── closing_loc: (38,10)-(38,11) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (38,5)-(38,7) = "do"
+ │ │ └── closing_loc: (39,0)-(39,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "fork"
+ ├── @ CallNode (location: (41,0)-(41,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (41,0)-(41,4) = "fork"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (41,5)-(41,12))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (41,7)-(41,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (41,8)-(41,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (41,8)-(41,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (41,7)-(41,8) = "|"
+ │ │ │ └── closing_loc: (41,9)-(41,10) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (41,5)-(41,6) = "{"
+ │ │ └── closing_loc: (41,11)-(41,12) = "}"
+ │ ├── flags: ∅
+ │ └── name: "fork"
+ ├── @ CallNode (location: (43,0)-(44,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (43,0)-(43,1) = "C"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (43,2)-(44,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (43,2)-(43,4) = "do"
+ │ │ └── closing_loc: (44,0)-(44,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "C"
+ ├── @ CallNode (location: (46,0)-(46,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (46,0)-(46,1) = "C"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (46,2)-(46,4))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (46,2)-(46,3) = "{"
+ │ │ └── closing_loc: (46,3)-(46,4) = "}"
+ │ ├── flags: ∅
+ │ └── name: "C"
+ ├── @ CallNode (location: (48,0)-(52,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (48,0)-(48,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (48,4)-(52,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (48,4)-(52,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (48,4)-(48,10) = "lambda"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (48,11)-(52,1))
+ │ │ │ ├── locals: [:a, :b]
+ │ │ │ ├── parameters:
+ │ │ │ │ @ BlockParametersNode (location: (48,13)-(51,3))
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ ParametersNode (location: (49,2)-(50,6))
+ │ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ │ │ ├── @ KeywordParameterNode (location: (49,2)-(49,6))
+ │ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ │ ├── name_loc: (49,2)-(49,4) = "a:"
+ │ │ │ │ │ │ │ └── value:
+ │ │ │ │ │ │ │ @ IntegerNode (location: (49,5)-(49,6))
+ │ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ │ └── @ KeywordParameterNode (location: (50,2)-(50,6))
+ │ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ │ ├── name_loc: (50,2)-(50,4) = "b:"
+ │ │ │ │ │ │ └── value:
+ │ │ │ │ │ │ @ IntegerNode (location: (50,5)-(50,6))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ ├── opening_loc: (48,13)-(48,14) = "|"
+ │ │ │ │ └── closing_loc: (51,2)-(51,3) = "|"
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (48,11)-(48,12) = "{"
+ │ │ │ └── closing_loc: (52,0)-(52,1) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "lambda"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── @ CallNode (location: (54,0)-(54,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (54,0)-(54,3) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (54,4)-(54,17))
+ │ ├── locals: [:bar]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (54,7)-(54,13))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (54,8)-(54,12))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (54,8)-(54,11))
+ │ │ │ │ └── name: :bar
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (54,11)-(54,12))
+ │ │ │ │ ├── name: nil
+ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ └── operator_loc: (54,11)-(54,12) = ","
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (54,7)-(54,8) = "|"
+ │ │ └── closing_loc: (54,12)-(54,13) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (54,4)-(54,6) = "do"
+ │ └── closing_loc: (54,14)-(54,17) = "end"
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/boolean_operators.txt b/test/prism/snapshots/boolean_operators.txt
new file mode 100644
index 0000000000..4ed94c368d
--- /dev/null
+++ b/test/prism/snapshots/boolean_operators.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(5,7))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,7))
+ └── body: (length: 3)
+ ├── @ LocalVariableAndWriteNode (location: (1,0)-(1,7))
+ │ ├── name_loc: (1,0)-(1,1) = "a"
+ │ ├── operator_loc: (1,2)-(1,5) = "&&="
+ │ ├── value:
+ │ │ @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,6))
+ │ ├── name_loc: (3,0)-(3,1) = "a"
+ │ ├── operator_loc: (3,2)-(3,4) = "+="
+ │ ├── value:
+ │ │ @ CallNode (location: (3,5)-(3,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,5)-(3,6) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── name: :a
+ │ ├── operator: :+
+ │ └── depth: 0
+ └── @ LocalVariableOrWriteNode (location: (5,0)-(5,7))
+ ├── name_loc: (5,0)-(5,1) = "a"
+ ├── operator_loc: (5,2)-(5,5) = "||="
+ ├── value:
+ │ @ CallNode (location: (5,6)-(5,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,6)-(5,7) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── name: :a
+ └── depth: 0
diff --git a/test/prism/snapshots/booleans.txt b/test/prism/snapshots/booleans.txt
new file mode 100644
index 0000000000..4731966243
--- /dev/null
+++ b/test/prism/snapshots/booleans.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ FalseNode (location: (1,0)-(1,5))
+ └── @ TrueNode (location: (3,0)-(3,4))
diff --git a/test/prism/snapshots/break.txt b/test/prism/snapshots/break.txt
new file mode 100644
index 0000000000..49e74d0904
--- /dev/null
+++ b/test/prism/snapshots/break.txt
@@ -0,0 +1,207 @@
+@ ProgramNode (location: (1,0)-(25,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(25,23))
+ └── body: (length: 11)
+ ├── @ BreakNode (location: (1,0)-(1,5))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (1,0)-(1,5) = "break"
+ ├── @ BreakNode (location: (3,0)-(3,19))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,6)-(3,19))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ ParenthesesNode (location: (3,6)-(3,9))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (3,7)-(3,8))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (3,7)-(3,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── opening_loc: (3,6)-(3,7) = "("
+ │ │ │ └── closing_loc: (3,8)-(3,9) = ")"
+ │ │ ├── @ ParenthesesNode (location: (3,11)-(3,14))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (3,12)-(3,13))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (3,12)-(3,13))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── opening_loc: (3,11)-(3,12) = "("
+ │ │ │ └── closing_loc: (3,13)-(3,14) = ")"
+ │ │ └── @ ParenthesesNode (location: (3,16)-(3,19))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,17)-(3,18))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,17)-(3,18))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (3,16)-(3,17) = "("
+ │ │ └── closing_loc: (3,18)-(3,19) = ")"
+ │ └── keyword_loc: (3,0)-(3,5) = "break"
+ ├── @ BreakNode (location: (5,0)-(5,7))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ └── flags: decimal
+ │ └── keyword_loc: (5,0)-(5,5) = "break"
+ ├── @ BreakNode (location: (7,0)-(8,1))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,6)-(8,1))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (7,6)-(7,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (7,9)-(7,10))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
+ │ │ └── flags: decimal
+ │ └── keyword_loc: (7,0)-(7,5) = "break"
+ ├── @ BreakNode (location: (10,0)-(10,13))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (10,6)-(10,13))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (10,6)-(10,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (10,9)-(10,10))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (10,12)-(10,13))
+ │ │ └── flags: decimal
+ │ └── keyword_loc: (10,0)-(10,5) = "break"
+ ├── @ BreakNode (location: (12,0)-(12,15))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (12,6)-(12,15))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ArrayNode (location: (12,6)-(12,15))
+ │ │ ├── elements: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (12,7)-(12,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── @ IntegerNode (location: (12,10)-(12,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (12,13)-(12,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (12,6)-(12,7) = "["
+ │ │ └── closing_loc: (12,14)-(12,15) = "]"
+ │ └── keyword_loc: (12,0)-(12,5) = "break"
+ ├── @ BreakNode (location: (14,0)-(17,1))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (14,5)-(17,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (14,5)-(17,1))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (15,2)-(16,3))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (15,2)-(15,3))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (14,5)-(14,6) = "("
+ │ │ └── closing_loc: (17,0)-(17,1) = ")"
+ │ └── keyword_loc: (14,0)-(14,5) = "break"
+ ├── @ BreakNode (location: (19,0)-(19,7))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,5)-(19,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (19,5)-(19,7))
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (19,5)-(19,6) = "("
+ │ │ └── closing_loc: (19,6)-(19,7) = ")"
+ │ └── keyword_loc: (19,0)-(19,5) = "break"
+ ├── @ BreakNode (location: (21,0)-(21,8))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,5)-(21,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (21,5)-(21,8))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (21,6)-(21,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (21,6)-(21,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (21,5)-(21,6) = "("
+ │ │ └── closing_loc: (21,7)-(21,8) = ")"
+ │ └── keyword_loc: (21,0)-(21,5) = "break"
+ ├── @ CallNode (location: (23,0)-(23,22))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,0)-(23,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (23,4)-(23,16))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (23,6)-(23,14))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ BreakNode (location: (23,6)-(23,14))
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (23,12)-(23,14))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (23,12)-(23,14))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── keyword_loc: (23,6)-(23,11) = "break"
+ │ │ │ ├── opening_loc: (23,4)-(23,5) = "{"
+ │ │ │ └── closing_loc: (23,15)-(23,16) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (23,17)-(23,19) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,20)-(23,22))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (23,20)-(23,22))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=="
+ └── @ CallNode (location: (25,0)-(25,23))
+ ├── receiver:
+ │ @ CallNode (location: (25,0)-(25,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,0)-(25,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (25,4)-(25,17))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (25,6)-(25,9))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (25,7)-(25,8))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (25,7)-(25,8))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (25,6)-(25,7) = "|"
+ │ │ │ └── closing_loc: (25,8)-(25,9) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (25,10)-(25,15))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ BreakNode (location: (25,10)-(25,15))
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── keyword_loc: (25,10)-(25,15) = "break"
+ │ │ ├── opening_loc: (25,4)-(25,5) = "{"
+ │ │ └── closing_loc: (25,16)-(25,17) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (25,18)-(25,20) = "=="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (25,21)-(25,23))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (25,21)-(25,23))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "=="
diff --git a/test/prism/snapshots/case.txt b/test/prism/snapshots/case.txt
new file mode 100644
index 0000000000..15386a794f
--- /dev/null
+++ b/test/prism/snapshots/case.txt
@@ -0,0 +1,265 @@
+@ ProgramNode (location: (1,0)-(32,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(32,25))
+ └── body: (length: 9)
+ ├── @ CaseNode (location: (1,0)-(3,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (1,5)-(1,8))
+ │ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ │ ├── value_loc: (1,6)-(1,8) = "hi"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "hi"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (2,0)-(2,8))
+ │ │ ├── keyword_loc: (2,0)-(2,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,5)-(2,8))
+ │ │ │ ├── opening_loc: (2,5)-(2,6) = ":"
+ │ │ │ ├── value_loc: (2,6)-(2,8) = "hi"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "hi"
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── @ CaseNode (location: (5,0)-(5,58))
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (5,5)-(5,9))
+ │ ├── conditions: (length: 2)
+ │ │ ├── @ WhenNode (location: (5,11)-(5,30))
+ │ │ │ ├── keyword_loc: (5,11)-(5,15) = "when"
+ │ │ │ ├── conditions: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (5,16)-(5,20))
+ │ │ │ └── statements:
+ │ │ │ @ StatementsNode (location: (5,22)-(5,30))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,22)-(5,30))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,22)-(5,26) = "puts"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,27)-(5,30))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (5,27)-(5,30))
+ │ │ │ │ ├── opening_loc: (5,27)-(5,28) = ":"
+ │ │ │ │ ├── value_loc: (5,28)-(5,30) = "hi"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "hi"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "puts"
+ │ │ └── @ WhenNode (location: (5,32)-(5,53))
+ │ │ ├── keyword_loc: (5,32)-(5,36) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ FalseNode (location: (5,37)-(5,42))
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (5,44)-(5,53))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,44)-(5,53))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,44)-(5,48) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,49)-(5,53))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (5,49)-(5,53))
+ │ │ │ ├── opening_loc: (5,49)-(5,50) = ":"
+ │ │ │ ├── value_loc: (5,50)-(5,53) = "bye"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "bye"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (5,0)-(5,4) = "case"
+ │ └── end_keyword_loc: (5,55)-(5,58) = "end"
+ ├── @ CaseNode (location: (7,0)-(7,20))
+ │ ├── predicate: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (7,6)-(7,15))
+ │ │ ├── keyword_loc: (7,6)-(7,10) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ SplatNode (location: (7,11)-(7,15))
+ │ │ │ ├── operator_loc: (7,11)-(7,12) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (7,12)-(7,15))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,12)-(7,15) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (7,0)-(7,4) = "case"
+ │ └── end_keyword_loc: (7,17)-(7,20) = "end"
+ ├── @ CaseNode (location: (9,0)-(13,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (9,5)-(9,8))
+ │ │ ├── opening_loc: (9,5)-(9,6) = ":"
+ │ │ ├── value_loc: (9,6)-(9,8) = "hi"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "hi"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (10,0)-(10,8))
+ │ │ ├── keyword_loc: (10,0)-(10,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (10,5)-(10,8))
+ │ │ │ ├── opening_loc: (10,5)-(10,6) = ":"
+ │ │ │ ├── value_loc: (10,6)-(10,8) = "hi"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "hi"
+ │ │ └── statements: ∅
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (11,0)-(13,3))
+ │ │ ├── else_keyword_loc: (11,0)-(11,4) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (12,0)-(12,2))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (12,0)-(12,2))
+ │ │ │ ├── opening_loc: (12,0)-(12,1) = ":"
+ │ │ │ ├── value_loc: (12,1)-(12,2) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── end_keyword_loc: (13,0)-(13,3) = "end"
+ │ ├── case_keyword_loc: (9,0)-(9,4) = "case"
+ │ └── end_keyword_loc: (13,0)-(13,3) = "end"
+ ├── @ CaseNode (location: (15,0)-(15,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (15,5)-(15,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,5)-(15,9) = "this"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "this"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (15,11)-(15,31))
+ │ │ ├── keyword_loc: (15,11)-(15,15) = "when"
+ │ │ ├── conditions: (length: 2)
+ │ │ │ ├── @ ConstantReadNode (location: (15,16)-(15,22))
+ │ │ │ │ └── name: :FooBar
+ │ │ │ └── @ ConstantReadNode (location: (15,24)-(15,31))
+ │ │ │ └── name: :BazBonk
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (15,0)-(15,4) = "case"
+ │ └── end_keyword_loc: (15,33)-(15,36) = "end"
+ ├── @ CaseNode (location: (17,0)-(19,3))
+ │ ├── predicate: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (18,0)-(18,15))
+ │ │ ├── keyword_loc: (18,0)-(18,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (18,5)-(18,15))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (18,5)-(18,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,5)-(18,8) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (18,9)-(18,11) = "=="
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (18,12)-(18,15))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (18,12)-(18,15))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,12)-(18,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "=="
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (17,0)-(17,4) = "case"
+ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ ├── @ CaseNode (location: (21,0)-(25,3))
+ │ ├── predicate: ∅
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (22,0)-(22,6))
+ │ │ ├── keyword_loc: (22,0)-(22,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (22,5)-(22,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (22,5)-(22,6) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ └── statements: ∅
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (23,0)-(25,3))
+ │ │ ├── else_keyword_loc: (23,0)-(23,4) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (25,0)-(25,3) = "end"
+ │ ├── case_keyword_loc: (21,0)-(21,4) = "case"
+ │ └── end_keyword_loc: (25,0)-(25,3) = "end"
+ ├── @ CaseNode (location: (27,0)-(30,6))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (27,5)-(27,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (27,5)-(27,9) = "type"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "type"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (28,3)-(28,10))
+ │ │ ├── keyword_loc: (28,3)-(28,7) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (28,8)-(28,10))
+ │ │ │ ├── opening_loc: (28,8)-(28,9) = ":"
+ │ │ │ ├── value_loc: (28,9)-(28,10) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── statements: ∅
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (29,5)-(30,6))
+ │ │ ├── else_keyword_loc: (29,5)-(29,9) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (30,3)-(30,6) = "end"
+ │ ├── case_keyword_loc: (27,0)-(27,4) = "case"
+ │ └── end_keyword_loc: (30,3)-(30,6) = "end"
+ └── @ CaseNode (location: (32,0)-(32,25))
+ ├── predicate: ∅
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (32,14)-(32,20))
+ │ ├── keyword_loc: (32,14)-(32,18) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ IntegerNode (location: (32,19)-(32,20))
+ │ │ └── flags: decimal
+ │ └── statements: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (32,0)-(32,4) = "case"
+ └── end_keyword_loc: (32,22)-(32,25) = "end"
diff --git a/test/prism/snapshots/classes.txt b/test/prism/snapshots/classes.txt
new file mode 100644
index 0000000000..e349da627d
--- /dev/null
+++ b/test/prism/snapshots/classes.txt
@@ -0,0 +1,355 @@
+@ ProgramNode (location: (1,0)-(35,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(35,3))
+ └── body: (length: 14)
+ ├── @ ClassNode (location: (1,0)-(1,17))
+ │ ├── locals: [:a]
+ │ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (1,6)-(1,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,8)-(1,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (1,8)-(1,13))
+ │ │ ├── name: :a
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (1,8)-(1,9) = "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,10)-(1,11) = "="
+ │ ├── end_keyword_loc: (1,14)-(1,17) = "end"
+ │ └── name: :A
+ ├── @ ClassNode (location: (3,0)-(3,20))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (3,0)-(3,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (3,6)-(3,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (3,9)-(3,20))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (3,9)-(3,20))
+ │ │ │ ├── ensure_keyword_loc: (3,9)-(3,15) = "ensure"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── end_keyword_loc: (3,17)-(3,20) = "end"
+ │ │ └── end_keyword_loc: (3,17)-(3,20) = "end"
+ │ ├── end_keyword_loc: (3,17)-(3,20) = "end"
+ │ └── name: :A
+ ├── @ ClassNode (location: (5,0)-(5,34))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (5,0)-(5,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (5,6)-(5,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (5,9)-(5,34))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (5,9)-(5,15))
+ │ │ │ ├── keyword_loc: (5,9)-(5,15) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause:
+ │ │ │ @ ElseNode (location: (5,17)-(5,29))
+ │ │ │ ├── else_keyword_loc: (5,17)-(5,21) = "else"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── end_keyword_loc: (5,23)-(5,29) = "ensure"
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (5,23)-(5,34))
+ │ │ │ ├── ensure_keyword_loc: (5,23)-(5,29) = "ensure"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── end_keyword_loc: (5,31)-(5,34) = "end"
+ │ │ └── end_keyword_loc: (5,31)-(5,34) = "end"
+ │ ├── end_keyword_loc: (5,31)-(5,34) = "end"
+ │ └── name: :A
+ ├── @ ClassNode (location: (7,0)-(9,3))
+ │ ├── locals: [:a]
+ │ ├── class_keyword_loc: (7,0)-(7,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (7,6)-(7,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: (7,8)-(7,9) = "<"
+ │ ├── superclass:
+ │ │ @ ConstantReadNode (location: (7,10)-(7,11))
+ │ │ └── name: :B
+ │ ├── body:
+ │ │ @ StatementsNode (location: (8,0)-(8,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (8,0)-(8,5))
+ │ │ ├── name: :a
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (8,0)-(8,1) = "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (8,4)-(8,5))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (8,2)-(8,3) = "="
+ │ ├── end_keyword_loc: (9,0)-(9,3) = "end"
+ │ └── name: :A
+ ├── @ SingletonClassNode (location: (11,0)-(12,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (11,0)-(11,5) = "class"
+ │ ├── operator_loc: (11,6)-(11,8) = "<<"
+ │ ├── expression:
+ │ │ @ CallNode (location: (11,9)-(11,16))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (11,13)-(11,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,13)-(11,16) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,9)-(11,12) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ ├── body: ∅
+ │ └── end_keyword_loc: (12,0)-(12,3) = "end"
+ ├── @ ClassNode (location: (14,0)-(14,40))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (14,0)-(14,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (14,6)-(14,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (14,9)-(14,35))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SingletonClassNode (location: (14,9)-(14,35))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (14,9)-(14,14) = "class"
+ │ │ ├── operator_loc: (14,15)-(14,17) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (14,18)-(14,22))
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (14,24)-(14,35))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause:
+ │ │ │ │ @ EnsureNode (location: (14,24)-(14,35))
+ │ │ │ │ ├── ensure_keyword_loc: (14,24)-(14,30) = "ensure"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── end_keyword_loc: (14,32)-(14,35) = "end"
+ │ │ │ └── end_keyword_loc: (14,32)-(14,35) = "end"
+ │ │ └── end_keyword_loc: (14,32)-(14,35) = "end"
+ │ ├── end_keyword_loc: (14,37)-(14,40) = "end"
+ │ └── name: :A
+ ├── @ ClassNode (location: (16,0)-(16,54))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (16,0)-(16,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (16,6)-(16,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (16,9)-(16,49))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SingletonClassNode (location: (16,9)-(16,49))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (16,9)-(16,14) = "class"
+ │ │ ├── operator_loc: (16,15)-(16,17) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (16,18)-(16,22))
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (16,24)-(16,49))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (16,24)-(16,30))
+ │ │ │ │ ├── keyword_loc: (16,24)-(16,30) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause:
+ │ │ │ │ @ ElseNode (location: (16,32)-(16,44))
+ │ │ │ │ ├── else_keyword_loc: (16,32)-(16,36) = "else"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── end_keyword_loc: (16,38)-(16,44) = "ensure"
+ │ │ │ ├── ensure_clause:
+ │ │ │ │ @ EnsureNode (location: (16,38)-(16,49))
+ │ │ │ │ ├── ensure_keyword_loc: (16,38)-(16,44) = "ensure"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── end_keyword_loc: (16,46)-(16,49) = "end"
+ │ │ │ └── end_keyword_loc: (16,46)-(16,49) = "end"
+ │ │ └── end_keyword_loc: (16,46)-(16,49) = "end"
+ │ ├── end_keyword_loc: (16,51)-(16,54) = "end"
+ │ └── name: :A
+ ├── @ SingletonClassNode (location: (18,0)-(19,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (18,0)-(18,5) = "class"
+ │ ├── operator_loc: (18,6)-(18,8) = "<<"
+ │ ├── expression:
+ │ │ @ CallNode (location: (18,9)-(18,16))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (18,9)-(18,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (18,9)-(18,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: (18,12)-(18,13) = "."
+ │ │ ├── message_loc: (18,13)-(18,16) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── body: ∅
+ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ ├── @ SingletonClassNode (location: (21,0)-(21,20))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (21,0)-(21,5) = "class"
+ │ ├── operator_loc: (21,6)-(21,8) = "<<"
+ │ ├── expression:
+ │ │ @ CallNode (location: (21,9)-(21,16))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (21,9)-(21,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,9)-(21,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: (21,12)-(21,13) = "."
+ │ │ ├── message_loc: (21,13)-(21,16) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── body: ∅
+ │ └── end_keyword_loc: (21,17)-(21,20) = "end"
+ ├── @ SingletonClassNode (location: (23,0)-(24,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (23,0)-(23,5) = "class"
+ │ ├── operator_loc: (23,6)-(23,8) = "<<"
+ │ ├── expression:
+ │ │ @ SelfNode (location: (23,9)-(23,13))
+ │ ├── body: ∅
+ │ └── end_keyword_loc: (24,0)-(24,3) = "end"
+ ├── @ SingletonClassNode (location: (26,0)-(26,17))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (26,0)-(26,5) = "class"
+ │ ├── operator_loc: (26,6)-(26,8) = "<<"
+ │ ├── expression:
+ │ │ @ SelfNode (location: (26,9)-(26,13))
+ │ ├── body: ∅
+ │ └── end_keyword_loc: (26,14)-(26,17) = "end"
+ ├── @ SingletonClassNode (location: (28,0)-(30,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (28,0)-(28,5) = "class"
+ │ ├── operator_loc: (28,6)-(28,8) = "<<"
+ │ ├── expression:
+ │ │ @ SelfNode (location: (28,9)-(28,13))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (29,0)-(29,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (29,0)-(29,5))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (29,0)-(29,1))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (29,2)-(29,3) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (29,4)-(29,5))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (29,4)-(29,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ └── end_keyword_loc: (30,0)-(30,3) = "end"
+ ├── @ SingletonClassNode (location: (32,0)-(32,23))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (32,0)-(32,5) = "class"
+ │ ├── operator_loc: (32,6)-(32,8) = "<<"
+ │ ├── expression:
+ │ │ @ SelfNode (location: (32,9)-(32,13))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (32,14)-(32,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (32,14)-(32,19))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (32,14)-(32,15))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (32,16)-(32,17) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (32,18)-(32,19))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (32,18)-(32,19))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ └── end_keyword_loc: (32,20)-(32,23) = "end"
+ └── @ ClassNode (location: (34,0)-(35,3))
+ ├── locals: []
+ ├── class_keyword_loc: (34,0)-(34,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (34,6)-(34,7))
+ │ └── name: :A
+ ├── inheritance_operator_loc: (34,8)-(34,9) = "<"
+ ├── superclass:
+ │ @ CallNode (location: (34,10)-(34,14))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (34,10)-(34,11))
+ │ │ └── name: :B
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (34,11)-(34,14) = "[1]"
+ │ ├── opening_loc: (34,11)-(34,12) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (34,12)-(34,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (34,12)-(34,13))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (34,13)-(34,14) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── body: ∅
+ ├── end_keyword_loc: (35,0)-(35,3) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/comments.txt b/test/prism/snapshots/comments.txt
new file mode 100644
index 0000000000..84cd210bb9
--- /dev/null
+++ b/test/prism/snapshots/comments.txt
@@ -0,0 +1,145 @@
+@ ProgramNode (location: (1,0)-(24,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(24,5))
+ └── body: (length: 9)
+ ├── @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── @ CallNode (location: (3,0)-(3,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── @ CallNode (location: (5,0)-(5,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "c"
+ ├── @ CallNode (location: (6,0)-(6,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,0)-(6,1) = "d"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "d"
+ ├── @ CallNode (location: (8,0)-(10,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (8,0)-(8,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (8,0)-(8,1) = "e"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "e"
+ │ ├── call_operator_loc: (10,2)-(10,3) = "."
+ │ ├── message_loc: (10,3)-(10,4) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (12,0)-(14,2))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (12,0)-(12,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (12,0)-(12,1) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "g"
+ │ ├── call_operator_loc: (14,0)-(14,1) = "."
+ │ ├── message_loc: (14,1)-(14,2) = "h"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "h"
+ ├── @ CallNode (location: (16,0)-(17,2))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (16,0)-(16,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,0)-(16,1) = "i"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "i"
+ │ ├── call_operator_loc: (17,0)-(17,1) = "."
+ │ ├── message_loc: (17,1)-(17,2) = "j"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "j"
+ ├── @ CallNode (location: (19,0)-(20,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (19,0)-(19,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,0)-(19,1) = "k"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "k"
+ │ ├── call_operator_loc: (20,2)-(20,3) = "."
+ │ ├── message_loc: (20,3)-(20,4) = "l"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "l"
+ └── @ CallNode (location: (22,0)-(24,5))
+ ├── receiver:
+ │ @ CallNode (location: (22,0)-(22,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (22,0)-(22,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "m"
+ ├── call_operator_loc: (24,2)-(24,4) = "&."
+ ├── message_loc: (24,4)-(24,5) = "n"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "n"
diff --git a/test/prism/snapshots/constants.txt b/test/prism/snapshots/constants.txt
new file mode 100644
index 0000000000..9b3105880b
--- /dev/null
+++ b/test/prism/snapshots/constants.txt
@@ -0,0 +1,1225 @@
+@ ProgramNode (location: (1,0)-(184,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(184,10))
+ └── body: (length: 90)
+ ├── @ ConstantPathNode (location: (1,0)-(1,4))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ │ └── name: :A
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,3)-(1,4))
+ │ │ └── name: :B
+ │ └── delimiter_loc: (1,1)-(1,3) = "::"
+ ├── @ ConstantPathNode (location: (3,0)-(3,7))
+ │ ├── parent:
+ │ │ @ ConstantPathNode (location: (3,0)-(3,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (3,0)-(3,1))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (3,3)-(3,4))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (3,1)-(3,3) = "::"
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (3,6)-(3,7))
+ │ │ └── name: :C
+ │ └── delimiter_loc: (3,4)-(3,6) = "::"
+ ├── @ ConstantPathNode (location: (5,0)-(5,4))
+ │ ├── parent:
+ │ │ @ CallNode (location: (5,0)-(5,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (5,3)-(5,4))
+ │ │ └── name: :B
+ │ └── delimiter_loc: (5,1)-(5,3) = "::"
+ ├── @ ConstantPathWriteNode (location: (7,0)-(7,8))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (7,0)-(7,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (7,0)-(7,1))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (7,3)-(7,4))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (7,1)-(7,3) = "::"
+ │ ├── operator_loc: (7,5)-(7,6) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (7,7)-(7,8))
+ │ └── flags: decimal
+ ├── @ ConstantWriteNode (location: (9,0)-(9,5))
+ │ ├── name: :A
+ │ ├── name_loc: (9,0)-(9,1) = "A"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (9,4)-(9,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (9,2)-(9,3) = "="
+ ├── @ ConstantReadNode (location: (11,0)-(11,3))
+ │ └── name: :ABC
+ ├── @ CallNode (location: (13,0)-(13,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,3) = "Foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,4)-(13,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,4)-(13,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Foo"
+ ├── @ CallNode (location: (15,0)-(15,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,0)-(15,3) = "Foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,4)-(15,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (15,4)-(15,8))
+ │ │ ├── operator_loc: (15,4)-(15,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (15,5)-(15,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,5)-(15,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Foo"
+ ├── @ CallNode (location: (17,0)-(17,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,0)-(17,3) = "Foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,4)-(17,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (17,4)-(17,9))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (17,4)-(17,9))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (17,6)-(17,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (17,6)-(17,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (17,4)-(17,6) = "**"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Foo"
+ ├── @ CallNode (location: (19,0)-(19,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,0)-(19,3) = "Foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (19,4)-(19,8))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (19,5)-(19,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,5)-(19,8) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (19,4)-(19,5) = "&"
+ │ ├── flags: ∅
+ │ └── name: "Foo"
+ ├── @ CallNode (location: (21,0)-(21,13))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (21,0)-(21,3))
+ │ │ └── name: :Foo
+ │ ├── call_operator_loc: (21,3)-(21,5) = "::"
+ │ ├── message_loc: (21,5)-(21,8) = "Bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,9)-(21,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (21,9)-(21,13))
+ │ │ ├── operator_loc: (21,9)-(21,10) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (21,10)-(21,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (21,10)-(21,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Bar"
+ ├── @ CallNode (location: (23,0)-(23,14))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (23,0)-(23,3))
+ │ │ └── name: :Foo
+ │ ├── call_operator_loc: (23,3)-(23,5) = "::"
+ │ ├── message_loc: (23,5)-(23,8) = "Bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,9)-(23,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (23,9)-(23,14))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (23,9)-(23,14))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (23,11)-(23,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (23,11)-(23,14) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (23,9)-(23,11) = "**"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Bar"
+ ├── @ CallNode (location: (25,0)-(25,13))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (25,0)-(25,3))
+ │ │ └── name: :Foo
+ │ ├── call_operator_loc: (25,3)-(25,5) = "::"
+ │ ├── message_loc: (25,5)-(25,8) = "Bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (25,9)-(25,13))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (25,10)-(25,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (25,10)-(25,13) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (25,9)-(25,10) = "&"
+ │ ├── flags: ∅
+ │ └── name: "Bar"
+ ├── @ CallNode (location: (27,0)-(27,8))
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (27,0)-(27,3))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (27,2)-(27,3))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (27,0)-(27,2) = "::"
+ │ ├── call_operator_loc: (27,3)-(27,5) = "::"
+ │ ├── message_loc: (27,5)-(27,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ ConstantPathWriteNode (location: (29,0)-(29,7))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (29,0)-(29,3))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (29,2)-(29,3))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (29,0)-(29,2) = "::"
+ │ ├── operator_loc: (29,4)-(29,5) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (29,6)-(29,7))
+ │ └── flags: decimal
+ ├── @ ConstantPathWriteNode (location: (31,0)-(31,10))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (31,0)-(31,6))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (31,0)-(31,3))
+ │ │ │ ├── parent: ∅
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (31,2)-(31,3))
+ │ │ │ │ └── name: :A
+ │ │ │ └── delimiter_loc: (31,0)-(31,2) = "::"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (31,5)-(31,6))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (31,3)-(31,5) = "::"
+ │ ├── operator_loc: (31,7)-(31,8) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (31,9)-(31,10))
+ │ └── flags: decimal
+ ├── @ ConstantPathNode (location: (33,0)-(33,6))
+ │ ├── parent:
+ │ │ @ ConstantPathNode (location: (33,0)-(33,3))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (33,2)-(33,3))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (33,0)-(33,2) = "::"
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (33,5)-(33,6))
+ │ │ └── name: :B
+ │ └── delimiter_loc: (33,3)-(33,5) = "::"
+ ├── @ ConstantPathNode (location: (35,0)-(35,3))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (35,2)-(35,3))
+ │ │ └── name: :A
+ │ └── delimiter_loc: (35,0)-(35,2) = "::"
+ ├── @ CallNode (location: (37,0)-(37,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (37,0)-(37,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (37,1)-(37,3) = "::"
+ │ ├── message_loc: (37,3)-(37,8) = "false"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "false"
+ ├── @ CallNode (location: (39,0)-(39,10))
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (39,0)-(39,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (39,0)-(39,1))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (39,3)-(39,4))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (39,1)-(39,3) = "::"
+ │ ├── call_operator_loc: (39,4)-(39,6) = "::"
+ │ ├── message_loc: (39,6)-(39,10) = "true"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "true"
+ ├── @ CallNode (location: (41,0)-(41,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (41,0)-(41,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (41,1)-(41,3) = "::"
+ │ ├── message_loc: (41,3)-(41,4) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "&"
+ ├── @ CallNode (location: (43,0)-(43,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (43,0)-(43,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (43,1)-(43,3) = "::"
+ │ ├── message_loc: (43,3)-(43,4) = "`"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "`"
+ ├── @ CallNode (location: (45,0)-(45,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (45,0)-(45,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (45,1)-(45,3) = "::"
+ │ ├── message_loc: (45,3)-(45,4) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (47,0)-(47,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (47,0)-(47,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (47,1)-(47,3) = "::"
+ │ ├── message_loc: (47,3)-(47,5) = "!="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!="
+ ├── @ CallNode (location: (49,0)-(49,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (49,0)-(49,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (49,1)-(49,3) = "::"
+ │ ├── message_loc: (49,3)-(49,4) = "^"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "^"
+ ├── @ CallNode (location: (51,0)-(51,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (51,0)-(51,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (51,1)-(51,3) = "::"
+ │ ├── message_loc: (51,3)-(51,5) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=="
+ ├── @ CallNode (location: (53,0)-(53,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (53,0)-(53,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (53,1)-(53,3) = "::"
+ │ ├── message_loc: (53,3)-(53,6) = "==="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "==="
+ ├── @ CallNode (location: (55,0)-(55,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (55,0)-(55,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (55,1)-(55,3) = "::"
+ │ ├── message_loc: (55,3)-(55,5) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=~"
+ ├── @ CallNode (location: (57,0)-(57,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (57,0)-(57,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (57,1)-(57,3) = "::"
+ │ ├── message_loc: (57,3)-(57,4) = ">"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">"
+ ├── @ CallNode (location: (59,0)-(59,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (59,0)-(59,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (59,1)-(59,3) = "::"
+ │ ├── message_loc: (59,3)-(59,5) = ">="
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">="
+ ├── @ CallNode (location: (61,0)-(61,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (61,0)-(61,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (61,1)-(61,3) = "::"
+ │ ├── message_loc: (61,3)-(61,5) = ">>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">>"
+ ├── @ CallNode (location: (63,0)-(63,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (63,0)-(63,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (63,1)-(63,3) = "::"
+ │ ├── message_loc: (63,3)-(63,5) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<<"
+ ├── @ ConstantPathNode (location: (65,0)-(67,1))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (65,0)-(65,1))
+ │ │ └── name: :A
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (67,0)-(67,1))
+ │ │ └── name: :C
+ │ └── delimiter_loc: (65,1)-(65,3) = "::"
+ ├── @ CallNode (location: (69,0)-(69,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (69,0)-(69,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (69,1)-(69,3) = "::"
+ │ ├── message_loc: (69,3)-(69,8) = "alias"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "alias"
+ ├── @ CallNode (location: (71,0)-(71,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (71,0)-(71,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (71,1)-(71,3) = "::"
+ │ ├── message_loc: (71,3)-(71,6) = "and"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "and"
+ ├── @ CallNode (location: (73,0)-(73,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (73,0)-(73,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (73,1)-(73,3) = "::"
+ │ ├── message_loc: (73,3)-(73,8) = "begin"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "begin"
+ ├── @ ConstantPathNode (location: (75,0)-(75,8))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (75,0)-(75,1))
+ │ │ └── name: :A
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (75,3)-(75,8))
+ │ │ └── name: :BEGIN
+ │ └── delimiter_loc: (75,1)-(75,3) = "::"
+ ├── @ CallNode (location: (77,0)-(77,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (77,0)-(77,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (77,1)-(77,3) = "::"
+ │ ├── message_loc: (77,3)-(77,8) = "break"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "break"
+ ├── @ CallNode (location: (79,0)-(79,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (79,0)-(79,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (79,1)-(79,3) = "::"
+ │ ├── message_loc: (79,3)-(79,8) = "class"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "class"
+ ├── @ CallNode (location: (81,0)-(81,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (81,0)-(81,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (81,1)-(81,3) = "::"
+ │ ├── message_loc: (81,3)-(81,6) = "def"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "def"
+ ├── @ CallNode (location: (83,0)-(83,10))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (83,0)-(83,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (83,1)-(83,3) = "::"
+ │ ├── message_loc: (83,3)-(83,10) = "defined"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "defined"
+ ├── @ CallNode (location: (85,0)-(85,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (85,0)-(85,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (85,1)-(85,3) = "::"
+ │ ├── message_loc: (85,3)-(85,5) = "do"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "do"
+ ├── @ CallNode (location: (87,0)-(87,7))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (87,0)-(87,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (87,1)-(87,3) = "::"
+ │ ├── message_loc: (87,3)-(87,7) = "else"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "else"
+ ├── @ CallNode (location: (89,0)-(89,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (89,0)-(89,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (89,1)-(89,3) = "::"
+ │ ├── message_loc: (89,3)-(89,8) = "elsif"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "elsif"
+ ├── @ CallNode (location: (91,0)-(91,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (91,0)-(91,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (91,1)-(91,3) = "::"
+ │ ├── message_loc: (91,3)-(91,6) = "end"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "end"
+ ├── @ ConstantPathNode (location: (93,0)-(93,6))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (93,0)-(93,1))
+ │ │ └── name: :A
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (93,3)-(93,6))
+ │ │ └── name: :END
+ │ └── delimiter_loc: (93,1)-(93,3) = "::"
+ ├── @ CallNode (location: (95,0)-(95,9))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (95,0)-(95,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (95,1)-(95,3) = "::"
+ │ ├── message_loc: (95,3)-(95,9) = "ensure"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "ensure"
+ ├── @ CallNode (location: (97,0)-(97,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (97,0)-(97,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (97,1)-(97,3) = "::"
+ │ ├── message_loc: (97,3)-(97,8) = "false"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "false"
+ ├── @ CallNode (location: (99,0)-(99,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (99,0)-(99,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (99,1)-(99,3) = "::"
+ │ ├── message_loc: (99,3)-(99,6) = "for"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "for"
+ ├── @ CallNode (location: (101,0)-(101,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (101,0)-(101,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (101,1)-(101,3) = "::"
+ │ ├── message_loc: (101,3)-(101,5) = "if"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "if"
+ ├── @ CallNode (location: (103,0)-(103,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (103,0)-(103,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (103,1)-(103,3) = "::"
+ │ ├── message_loc: (103,3)-(103,5) = "in"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "in"
+ ├── @ CallNode (location: (105,0)-(105,7))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (105,0)-(105,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (105,1)-(105,3) = "::"
+ │ ├── message_loc: (105,3)-(105,7) = "next"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "next"
+ ├── @ CallNode (location: (107,0)-(107,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (107,0)-(107,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (107,1)-(107,3) = "::"
+ │ ├── message_loc: (107,3)-(107,6) = "nil"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "nil"
+ ├── @ CallNode (location: (109,0)-(109,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (109,0)-(109,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (109,1)-(109,3) = "::"
+ │ ├── message_loc: (109,3)-(109,6) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "not"
+ ├── @ CallNode (location: (111,0)-(111,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (111,0)-(111,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (111,1)-(111,3) = "::"
+ │ ├── message_loc: (111,3)-(111,5) = "or"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "or"
+ ├── @ CallNode (location: (113,0)-(113,7))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (113,0)-(113,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (113,1)-(113,3) = "::"
+ │ ├── message_loc: (113,3)-(113,7) = "redo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "redo"
+ ├── @ CallNode (location: (115,0)-(115,9))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (115,0)-(115,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (115,1)-(115,3) = "::"
+ │ ├── message_loc: (115,3)-(115,9) = "rescue"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "rescue"
+ ├── @ CallNode (location: (117,0)-(117,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (117,0)-(117,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (117,1)-(117,3) = "::"
+ │ ├── message_loc: (117,3)-(117,8) = "retry"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "retry"
+ ├── @ CallNode (location: (119,0)-(119,9))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (119,0)-(119,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (119,1)-(119,3) = "::"
+ │ ├── message_loc: (119,3)-(119,9) = "return"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "return"
+ ├── @ CallNode (location: (121,0)-(121,7))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (121,0)-(121,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (121,1)-(121,3) = "::"
+ │ ├── message_loc: (121,3)-(121,7) = "self"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "self"
+ ├── @ CallNode (location: (123,0)-(123,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (123,0)-(123,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (123,1)-(123,3) = "::"
+ │ ├── message_loc: (123,3)-(123,8) = "super"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "super"
+ ├── @ CallNode (location: (125,0)-(125,7))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (125,0)-(125,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (125,1)-(125,3) = "::"
+ │ ├── message_loc: (125,3)-(125,7) = "then"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "then"
+ ├── @ CallNode (location: (127,0)-(127,7))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (127,0)-(127,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (127,1)-(127,3) = "::"
+ │ ├── message_loc: (127,3)-(127,7) = "true"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "true"
+ ├── @ CallNode (location: (129,0)-(129,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (129,0)-(129,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (129,1)-(129,3) = "::"
+ │ ├── message_loc: (129,3)-(129,8) = "undef"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "undef"
+ ├── @ CallNode (location: (131,0)-(131,9))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (131,0)-(131,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (131,1)-(131,3) = "::"
+ │ ├── message_loc: (131,3)-(131,9) = "unless"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "unless"
+ ├── @ CallNode (location: (133,0)-(133,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (133,0)-(133,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (133,1)-(133,3) = "::"
+ │ ├── message_loc: (133,3)-(133,8) = "until"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "until"
+ ├── @ CallNode (location: (135,0)-(135,7))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (135,0)-(135,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (135,1)-(135,3) = "::"
+ │ ├── message_loc: (135,3)-(135,7) = "when"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "when"
+ ├── @ CallNode (location: (137,0)-(137,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (137,0)-(137,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (137,1)-(137,3) = "::"
+ │ ├── message_loc: (137,3)-(137,8) = "while"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "while"
+ ├── @ CallNode (location: (139,0)-(139,8))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (139,0)-(139,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (139,1)-(139,3) = "::"
+ │ ├── message_loc: (139,3)-(139,8) = "yield"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "yield"
+ ├── @ CallNode (location: (141,0)-(141,15))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (141,0)-(141,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (141,1)-(141,3) = "::"
+ │ ├── message_loc: (141,3)-(141,15) = "__ENCODING__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "__ENCODING__"
+ ├── @ CallNode (location: (143,0)-(143,11))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (143,0)-(143,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (143,1)-(143,3) = "::"
+ │ ├── message_loc: (143,3)-(143,11) = "__FILE__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "__FILE__"
+ ├── @ CallNode (location: (145,0)-(145,11))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (145,0)-(145,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (145,1)-(145,3) = "::"
+ │ ├── message_loc: (145,3)-(145,11) = "__LINE__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "__LINE__"
+ ├── @ CallNode (location: (147,0)-(147,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (147,0)-(147,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (147,1)-(147,3) = "::"
+ │ ├── message_loc: (147,3)-(147,4) = "<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<"
+ ├── @ CallNode (location: (149,0)-(149,6))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (149,0)-(149,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (149,1)-(149,3) = "::"
+ │ ├── message_loc: (149,3)-(149,6) = "<=>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<=>"
+ ├── @ CallNode (location: (151,0)-(151,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (151,0)-(151,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (151,1)-(151,3) = "::"
+ │ ├── message_loc: (151,3)-(151,5) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<<"
+ ├── @ CallNode (location: (153,0)-(153,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (153,0)-(153,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (153,1)-(153,3) = "::"
+ │ ├── message_loc: (153,3)-(153,4) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "-"
+ ├── @ CallNode (location: (155,0)-(155,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (155,0)-(155,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (155,1)-(155,3) = "::"
+ │ ├── message_loc: (155,3)-(155,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (157,0)-(157,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (157,0)-(157,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (157,1)-(157,3) = "::"
+ │ ├── message_loc: (157,3)-(157,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (157,4)-(157,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (157,4)-(157,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (157,4)-(157,5) = "i"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "i"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (159,0)-(159,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (159,0)-(159,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (159,1)-(159,3) = "::"
+ │ ├── message_loc: (159,3)-(159,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (159,4)-(159,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (159,4)-(159,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (159,4)-(159,5) = "w"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "w"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (161,0)-(161,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (161,0)-(161,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (161,1)-(161,3) = "::"
+ │ ├── message_loc: (161,3)-(161,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (161,4)-(161,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (161,4)-(161,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (161,4)-(161,5) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "x"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (163,0)-(163,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (163,0)-(163,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (163,1)-(163,3) = "::"
+ │ ├── message_loc: (163,3)-(163,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (163,4)-(163,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (163,4)-(163,5))
+ │ │ └── name: :I
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (165,0)-(165,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (165,0)-(165,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (165,1)-(165,3) = "::"
+ │ ├── message_loc: (165,3)-(165,4) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (165,4)-(165,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (165,4)-(165,5))
+ │ │ └── name: :W
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (167,0)-(167,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (167,0)-(167,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (167,1)-(167,3) = "::"
+ │ ├── message_loc: (167,3)-(167,4) = "|"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "|"
+ ├── @ CallNode (location: (169,0)-(169,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (169,0)-(169,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (169,1)-(169,3) = "::"
+ │ ├── message_loc: (169,3)-(169,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ CallNode (location: (171,0)-(171,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (171,0)-(171,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (171,1)-(171,3) = "::"
+ │ ├── message_loc: (171,3)-(171,4) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "/"
+ ├── @ CallNode (location: (173,0)-(173,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (173,0)-(173,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (173,1)-(173,3) = "::"
+ │ ├── message_loc: (173,3)-(173,4) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "*"
+ ├── @ CallNode (location: (175,0)-(175,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (175,0)-(175,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (175,1)-(175,3) = "::"
+ │ ├── message_loc: (175,3)-(175,5) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "**"
+ ├── @ CallNode (location: (177,0)-(177,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (177,0)-(177,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (177,1)-(177,3) = "::"
+ │ ├── message_loc: (177,3)-(177,4) = "~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "~"
+ ├── @ ConstantPathNode (location: (179,0)-(180,1))
+ │ ├── parent:
+ │ │ @ CallNode (location: (179,0)-(179,4))
+ │ │ ├── receiver:
+ │ │ │ @ ConstantReadNode (location: (179,0)-(179,1))
+ │ │ │ └── name: :A
+ │ │ ├── call_operator_loc: (179,1)-(179,3) = "::"
+ │ │ ├── message_loc: (179,3)-(179,4) = "_"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "_"
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (180,0)-(180,1))
+ │ │ └── name: :C
+ │ └── delimiter_loc: (179,4)-(179,6) = "::"
+ └── @ RangeNode (location: (182,0)-(184,10))
+ ├── left:
+ │ @ CallNode (location: (182,0)-(182,4))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (182,0)-(182,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (182,1)-(182,3) = "::"
+ │ ├── message_loc: (182,3)-(182,4) = "_"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "_"
+ ├── right:
+ │ @ CallNode (location: (184,0)-(184,10))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (184,0)-(184,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (184,1)-(184,3) = "::"
+ │ ├── message_loc: (184,3)-(184,10) = "__END__"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "__END__"
+ ├── operator_loc: (182,4)-(182,6) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/dash_heredocs.txt b/test/prism/snapshots/dash_heredocs.txt
new file mode 100644
index 0000000000..929aa6c067
--- /dev/null
+++ b/test/prism/snapshots/dash_heredocs.txt
@@ -0,0 +1,251 @@
+@ ProgramNode (location: (1,0)-(57,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(57,11))
+ └── body: (length: 13)
+ ├── @ StringNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,6) = "<<-EOF"
+ │ ├── content_loc: (2,0)-(2,0) = " a\n"
+ │ ├── closing_loc: (3,0)-(3,0) = "EOF\n"
+ │ └── unescaped: " a\n"
+ ├── @ CallNode (location: (5,0)-(5,20))
+ │ ├── receiver:
+ │ │ @ StringNode (location: (5,0)-(5,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (5,0)-(5,8) = "<<-FIRST"
+ │ │ ├── content_loc: (6,0)-(6,0) = " a\n"
+ │ │ ├── closing_loc: (7,0)-(7,0) = "FIRST\n"
+ │ │ └── unescaped: " a\n"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,9)-(5,10) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,11)-(5,20))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (5,11)-(5,20))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (5,11)-(5,20) = "<<-SECOND"
+ │ │ ├── content_loc: (8,0)-(8,0) = " b\n"
+ │ │ ├── closing_loc: (9,0)-(9,0) = "SECOND\n"
+ │ │ └── unescaped: " b\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ InterpolatedXStringNode (location: (11,0)-(11,8))
+ │ ├── opening_loc: (11,0)-(11,8) = "<<-`EOF`"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (12,0)-(12,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (12,0)-(12,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (13,0)-(13,4))
+ │ │ │ ├── opening_loc: (13,0)-(13,2) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (13,2)-(13,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (13,2)-(13,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (13,2)-(13,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── closing_loc: (13,3)-(13,4) = "}"
+ │ │ └── @ StringNode (location: (13,4)-(13,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (13,4)-(13,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (14,0)-(14,0) = "EOF\n"
+ ├── @ StringNode (location: (16,0)-(16,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (16,0)-(16,6) = "<<-EOF"
+ │ ├── content_loc: (17,0)-(17,0) = " a\n"
+ │ ├── closing_loc: (18,0)-(18,0) = "EOF\n"
+ │ └── unescaped: " a\n"
+ ├── @ StringNode (location: (20,0)-(20,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (20,0)-(20,6) = "<<-EOF"
+ │ ├── content_loc: (21,0)-(22,0) = " a\n b\n"
+ │ ├── closing_loc: (23,0)-(23,0) = " EOF\n"
+ │ └── unescaped: " a\n b\n"
+ ├── @ InterpolatedStringNode (location: (25,0)-(25,8))
+ │ ├── opening_loc: (25,0)-(25,8) = "<<-\"EOF\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (26,0)-(26,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (26,0)-(26,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (27,0)-(27,4))
+ │ │ │ ├── opening_loc: (27,0)-(27,2) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (27,2)-(27,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (27,2)-(27,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (27,2)-(27,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── closing_loc: (27,3)-(27,4) = "}"
+ │ │ └── @ StringNode (location: (27,4)-(27,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (27,4)-(27,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (28,0)-(28,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (30,0)-(30,6))
+ │ ├── opening_loc: (30,0)-(30,6) = "<<-EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (31,0)-(31,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (31,0)-(31,0) = " a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (32,0)-(32,4))
+ │ │ │ ├── opening_loc: (32,0)-(32,2) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (32,2)-(32,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (32,2)-(32,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (32,2)-(32,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── closing_loc: (32,3)-(32,4) = "}"
+ │ │ └── @ StringNode (location: (32,4)-(32,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (32,4)-(32,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (33,0)-(33,0) = "EOF\n"
+ ├── @ StringNode (location: (35,0)-(35,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (35,0)-(35,2) = "%#"
+ │ ├── content_loc: (35,2)-(35,5) = "abc"
+ │ ├── closing_loc: (35,5)-(35,6) = "#"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (37,0)-(37,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (37,0)-(37,6) = "<<-EOF"
+ │ ├── content_loc: (38,0)-(39,0) = " a\n b\n"
+ │ ├── closing_loc: (40,0)-(40,0) = "EOF\n"
+ │ └── unescaped: " a\n b\n"
+ ├── @ StringNode (location: (42,0)-(42,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (42,0)-(42,5) = "<<-''"
+ │ ├── content_loc: (43,0)-(42,0) = ""
+ │ ├── closing_loc: (43,0)-(43,0) = "\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (45,0)-(45,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (45,0)-(45,8) = "<<-'EOF'"
+ │ ├── content_loc: (46,0)-(46,0) = " a \#{1}\n"
+ │ ├── closing_loc: (47,0)-(47,0) = "EOF\n"
+ │ └── unescaped: " a \#{1}\n"
+ ├── @ CallNode (location: (49,0)-(49,11))
+ │ ├── receiver:
+ │ │ @ StringNode (location: (49,0)-(49,4))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (49,0)-(49,4) = "<<-A"
+ │ │ ├── content_loc: (50,0)-(50,0) = " a\n"
+ │ │ ├── closing_loc: (51,0)-(51,0) = "A\n"
+ │ │ └── unescaped: " a\n"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (49,5)-(49,6) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (49,7)-(49,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (49,7)-(49,11))
+ │ │ ├── opening_loc: (49,7)-(49,11) = "<<-B"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (52,0)-(53,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (52,0)-(53,2) = " b\n "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " b\n "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (53,2)-(54,3))
+ │ │ │ │ ├── opening_loc: (53,2)-(53,4) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (53,4)-(53,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (53,4)-(53,5))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── closing_loc: (54,2)-(54,3) = "}"
+ │ │ │ └── @ StringNode (location: (54,3)-(54,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (54,3)-(54,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (55,0)-(55,0) = "B\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ └── @ CallNode (location: (57,0)-(57,11))
+ ├── receiver:
+ │ @ StringNode (location: (57,0)-(57,4))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (57,0)-(57,4) = "<<-A"
+ │ ├── content_loc: (58,0)-(58,0) = " a\n"
+ │ ├── closing_loc: (59,0)-(59,0) = "A\n"
+ │ └── unescaped: " a\n"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (57,5)-(57,6) = "+"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (57,7)-(57,11))
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (57,7)-(57,11))
+ │ ├── opening_loc: (57,7)-(57,11) = "<<-B"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (60,0)-(61,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (60,0)-(61,2) = " b\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " b\n "
+ │ │ ├── @ EmbeddedStatementsNode (location: (61,2)-(62,4))
+ │ │ │ ├── opening_loc: (61,2)-(61,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (62,2)-(62,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (62,2)-(62,3))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (62,3)-(62,4) = "}"
+ │ │ └── @ StringNode (location: (62,4)-(62,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (62,4)-(62,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (63,0)-(63,0) = "B\n"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "+"
diff --git a/test/prism/snapshots/defined.txt b/test/prism/snapshots/defined.txt
new file mode 100644
index 0000000000..c6537b860c
--- /dev/null
+++ b/test/prism/snapshots/defined.txt
@@ -0,0 +1,73 @@
+@ ProgramNode (location: (1,0)-(7,10))
+├── locals: [:x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,10))
+ └── body: (length: 4)
+ ├── @ AndNode (location: (1,0)-(1,25))
+ │ ├── left:
+ │ │ @ DefinedNode (location: (1,0)-(1,10))
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── rparen_loc: ∅
+ │ │ └── keyword_loc: (1,0)-(1,8) = "defined?"
+ │ ├── right:
+ │ │ @ DefinedNode (location: (1,15)-(1,25))
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,24)-(1,25))
+ │ │ │ └── flags: decimal
+ │ │ ├── rparen_loc: ∅
+ │ │ └── keyword_loc: (1,15)-(1,23) = "defined?"
+ │ └── operator_loc: (1,11)-(1,14) = "and"
+ ├── @ DefinedNode (location: (3,0)-(3,16))
+ │ ├── lparen_loc: (3,8)-(3,9) = "("
+ │ ├── value:
+ │ │ @ LocalVariableOperatorWriteNode (location: (3,9)-(3,15))
+ │ │ ├── name_loc: (3,9)-(3,10) = "x"
+ │ │ ├── operator_loc: (3,11)-(3,13) = "%="
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,14)-(3,15))
+ │ │ │ └── flags: decimal
+ │ │ ├── name: :x
+ │ │ ├── operator: :%
+ │ │ └── depth: 0
+ │ ├── rparen_loc: (3,15)-(3,16) = ")"
+ │ └── keyword_loc: (3,0)-(3,8) = "defined?"
+ ├── @ DefinedNode (location: (5,0)-(5,21))
+ │ ├── lparen_loc: (5,8)-(5,9) = "("
+ │ ├── value:
+ │ │ @ AndNode (location: (5,9)-(5,20))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (5,9)-(5,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (5,17)-(5,20))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,17)-(5,20) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (5,13)-(5,16) = "and"
+ │ ├── rparen_loc: (5,20)-(5,21) = ")"
+ │ └── keyword_loc: (5,0)-(5,8) = "defined?"
+ └── @ DefinedNode (location: (7,0)-(7,10))
+ ├── lparen_loc: ∅
+ ├── value:
+ │ @ IntegerNode (location: (7,9)-(7,10))
+ │ └── flags: decimal
+ ├── rparen_loc: ∅
+ └── keyword_loc: (7,0)-(7,8) = "defined?"
diff --git a/test/prism/snapshots/dos_endings.txt b/test/prism/snapshots/dos_endings.txt
new file mode 100644
index 0000000000..fd9bc95609
--- /dev/null
+++ b/test/prism/snapshots/dos_endings.txt
@@ -0,0 +1,93 @@
+@ ProgramNode (location: (1,0)-(17,20))
+├── locals: [:x, :a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(17,20))
+ └── body: (length: 5)
+ ├── @ CallNode (location: (1,0)-(2,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "puts"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(2,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringConcatNode (location: (1,5)-(2,12))
+ │ │ ├── left:
+ │ │ │ @ StringNode (location: (1,5)-(1,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,5)-(1,6) = "\""
+ │ │ │ ├── content_loc: (1,6)-(1,8) = "hi"
+ │ │ │ ├── closing_loc: (1,8)-(1,9) = "\""
+ │ │ │ └── unescaped: "hi"
+ │ │ └── right:
+ │ │ @ StringNode (location: (2,5)-(2,12))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (2,5)-(2,6) = "\""
+ │ │ ├── content_loc: (2,6)-(2,11) = "there"
+ │ │ ├── closing_loc: (2,11)-(2,12) = "\""
+ │ │ └── unescaped: "there"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "puts"
+ ├── @ ArrayNode (location: (4,0)-(5,2))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (4,3)-(5,1))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (4,3)-(5,1) = "a\\\r\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "ab"
+ │ ├── opening_loc: (4,0)-(4,3) = "%I{"
+ │ └── closing_loc: (5,1)-(5,2) = "}"
+ ├── @ StringNode (location: (7,0)-(7,4))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,4) = "<<-E"
+ │ ├── content_loc: (8,0)-(10,0) = " 1 \\\r\n 2\r\n 3\r\n"
+ │ ├── closing_loc: (11,0)-(11,0) = "E\r\n"
+ │ └── unescaped: " 1 2\r\n 3\r\n"
+ ├── @ LocalVariableWriteNode (location: (13,0)-(14,0))
+ │ ├── name: :x
+ │ ├── depth: 0
+ │ ├── name_loc: (13,0)-(13,1) = "x"
+ │ ├── value:
+ │ │ @ StringNode (location: (13,4)-(14,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (13,4)-(13,0) = "%\r\n"
+ │ │ ├── content_loc: (14,0)-(13,0) = ""
+ │ │ ├── closing_loc: (14,0)-(14,0) = "\r\n"
+ │ │ └── unescaped: ""
+ │ └── operator_loc: (13,2)-(13,3) = "="
+ └── @ LocalVariableWriteNode (location: (17,0)-(17,20))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (17,0)-(17,1) = "a"
+ ├── value:
+ │ @ CallNode (location: (17,4)-(17,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,4)-(17,7) = "foo"
+ │ ├── opening_loc: (17,7)-(17,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,8)-(17,19))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (17,8)-(17,19))
+ │ │ ├── receiver:
+ │ │ │ @ StringNode (location: (17,8)-(17,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (17,8)-(17,14) = "<<~EOF"
+ │ │ │ ├── content_loc: (18,0)-(19,0) = "\r\n baz\r\n"
+ │ │ │ ├── closing_loc: (20,0)-(20,0) = " EOF\r\n"
+ │ │ │ └── unescaped: "\nbaz\r\n"
+ │ │ ├── call_operator_loc: (17,14)-(17,15) = "."
+ │ │ ├── message_loc: (17,15)-(17,19) = "chop"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "chop"
+ │ ├── closing_loc: (17,19)-(17,20) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── operator_loc: (17,2)-(17,3) = "="
diff --git a/test/prism/snapshots/embdoc_no_newline_at_end.txt b/test/prism/snapshots/embdoc_no_newline_at_end.txt
new file mode 100644
index 0000000000..870bdb6ad5
--- /dev/null
+++ b/test/prism/snapshots/embdoc_no_newline_at_end.txt
@@ -0,0 +1,5 @@
+@ ProgramNode (location: (1,0)-(0,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(0,0))
+ └── body: (length: 0)
diff --git a/test/prism/snapshots/endless_methods.txt b/test/prism/snapshots/endless_methods.txt
new file mode 100644
index 0000000000..36d52673a8
--- /dev/null
+++ b/test/prism/snapshots/endless_methods.txt
@@ -0,0 +1,100 @@
+@ ProgramNode (location: (1,0)-(5,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,22))
+ └── body: (length: 3)
+ ├── @ DefNode (location: (1,0)-(1,11))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,10)-(1,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (1,8)-(1,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (3,0)-(3,14))
+ │ ├── name: :bar
+ │ ├── name_loc: (3,4)-(3,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,10)-(3,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,10)-(3,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,10)-(3,11) = "A"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,12)-(3,14))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (3,12)-(3,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (3,12)-(3,13) = "\""
+ │ │ │ ├── content_loc: (3,13)-(3,13) = ""
+ │ │ │ ├── closing_loc: (3,13)-(3,14) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "A"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (3,8)-(3,9) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (5,0)-(5,22))
+ ├── name: :method
+ ├── name_loc: (5,4)-(5,10) = "method"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (5,13)-(5,22))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (5,13)-(5,22))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,13)-(5,18))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (5,13)-(5,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,15)-(5,16) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,17)-(5,18))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,17)-(5,18))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,19)-(5,20) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,21)-(5,22))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,21)-(5,22))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── locals: []
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: (5,11)-(5,12) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/endless_range_in_conditional.txt b/test/prism/snapshots/endless_range_in_conditional.txt
new file mode 100644
index 0000000000..27447e9522
--- /dev/null
+++ b/test/prism/snapshots/endless_range_in_conditional.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(3,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,12))
+ └── body: (length: 3)
+ ├── @ IfNode (location: (1,0)-(1,13))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ FlipFlopNode (location: (1,3)-(1,7))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (1,3)-(1,4))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (1,4)-(1,6) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (1,10)-(1,13) = "end"
+ ├── @ IfNode (location: (2,0)-(2,12))
+ │ ├── if_keyword_loc: (2,0)-(2,2) = "if"
+ │ ├── predicate:
+ │ │ @ FlipFlopNode (location: (2,3)-(2,6))
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (2,5)-(2,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (2,3)-(2,5) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (2,9)-(2,12) = "end"
+ └── @ IfNode (location: (3,0)-(3,12))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (3,3)-(3,6))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (3,3)-(3,4))
+ │ │ └── flags: decimal
+ │ ├── right: ∅
+ │ ├── operator_loc: (3,4)-(3,6) = ".."
+ │ └── flags: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,9)-(3,12) = "end"
diff --git a/test/prism/snapshots/for.txt b/test/prism/snapshots/for.txt
new file mode 100644
index 0000000000..a0485a57ff
--- /dev/null
+++ b/test/prism/snapshots/for.txt
@@ -0,0 +1,172 @@
+@ ProgramNode (location: (1,0)-(19,22))
+├── locals: [:i, :j, :k]
+└── statements:
+ @ StatementsNode (location: (1,0)-(19,22))
+ └── body: (length: 6)
+ ├── @ ForNode (location: (1,0)-(3,3))
+ │ ├── index:
+ │ │ @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── collection:
+ │ │ @ RangeNode (location: (1,9)-(1,14))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (1,10)-(1,12) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,0)-(2,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (2,0)-(2,1))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── for_keyword_loc: (1,0)-(1,3) = "for"
+ │ ├── in_keyword_loc: (1,6)-(1,8) = "in"
+ │ ├── do_keyword_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── @ ForNode (location: (5,0)-(5,22))
+ │ ├── index:
+ │ │ @ LocalVariableTargetNode (location: (5,4)-(5,5))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── collection:
+ │ │ @ RangeNode (location: (5,9)-(5,14))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (5,9)-(5,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (5,12)-(5,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (5,10)-(5,12) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,16)-(5,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (5,16)-(5,17))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── for_keyword_loc: (5,0)-(5,3) = "for"
+ │ ├── in_keyword_loc: (5,6)-(5,8) = "in"
+ │ ├── do_keyword_loc: ∅
+ │ └── end_keyword_loc: (5,19)-(5,22) = "end"
+ ├── @ ForNode (location: (7,0)-(9,3))
+ │ ├── index:
+ │ │ @ MultiTargetNode (location: (7,4)-(7,7))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (7,4)-(7,5))
+ │ │ │ │ ├── name: :i
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (7,6)-(7,7))
+ │ │ │ ├── name: :j
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── collection:
+ │ │ @ RangeNode (location: (7,11)-(7,16))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (7,11)-(7,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (7,14)-(7,16))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (7,12)-(7,14) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,0)-(8,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (8,0)-(8,1))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── for_keyword_loc: (7,0)-(7,3) = "for"
+ │ ├── in_keyword_loc: (7,8)-(7,10) = "in"
+ │ ├── do_keyword_loc: ∅
+ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ ├── @ ForNode (location: (11,0)-(13,3))
+ │ ├── index:
+ │ │ @ MultiTargetNode (location: (11,4)-(11,9))
+ │ │ ├── targets: (length: 3)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (11,4)-(11,5))
+ │ │ │ │ ├── name: :i
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── @ LocalVariableTargetNode (location: (11,6)-(11,7))
+ │ │ │ │ ├── name: :j
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (11,8)-(11,9))
+ │ │ │ ├── name: :k
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── collection:
+ │ │ @ RangeNode (location: (11,13)-(11,18))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (11,13)-(11,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (11,16)-(11,18))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (11,14)-(11,16) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (12,0)-(12,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (12,0)-(12,1))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── for_keyword_loc: (11,0)-(11,3) = "for"
+ │ ├── in_keyword_loc: (11,10)-(11,12) = "in"
+ │ ├── do_keyword_loc: ∅
+ │ └── end_keyword_loc: (13,0)-(13,3) = "end"
+ ├── @ ForNode (location: (15,0)-(17,3))
+ │ ├── index:
+ │ │ @ LocalVariableTargetNode (location: (15,4)-(15,5))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── collection:
+ │ │ @ RangeNode (location: (15,9)-(15,14))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (15,9)-(15,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (15,12)-(15,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (15,10)-(15,12) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (16,0)-(16,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (16,0)-(16,1))
+ │ │ ├── name: :i
+ │ │ └── depth: 0
+ │ ├── for_keyword_loc: (15,0)-(15,3) = "for"
+ │ ├── in_keyword_loc: (15,6)-(15,8) = "in"
+ │ ├── do_keyword_loc: (15,15)-(15,17) = "do"
+ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ └── @ ForNode (location: (19,0)-(19,22))
+ ├── index:
+ │ @ LocalVariableTargetNode (location: (19,4)-(19,5))
+ │ ├── name: :i
+ │ └── depth: 0
+ ├── collection:
+ │ @ RangeNode (location: (19,9)-(19,14))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (19,9)-(19,10))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (19,12)-(19,14))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (19,10)-(19,12) = ".."
+ │ └── flags: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (19,16)-(19,17))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (19,16)-(19,17))
+ │ ├── name: :i
+ │ └── depth: 0
+ ├── for_keyword_loc: (19,0)-(19,3) = "for"
+ ├── in_keyword_loc: (19,6)-(19,8) = "in"
+ ├── do_keyword_loc: ∅
+ └── end_keyword_loc: (19,19)-(19,22) = "end"
diff --git a/test/prism/snapshots/global_variables.txt b/test/prism/snapshots/global_variables.txt
new file mode 100644
index 0000000000..bb2e7d53b9
--- /dev/null
+++ b/test/prism/snapshots/global_variables.txt
@@ -0,0 +1,164 @@
+@ ProgramNode (location: (1,0)-(93,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(93,4))
+ └── body: (length: 47)
+ ├── @ GlobalVariableReadNode (location: (1,0)-(1,16))
+ │ └── name: :$global_variable
+ ├── @ GlobalVariableReadNode (location: (3,0)-(3,2))
+ │ └── name: :$_
+ ├── @ GlobalVariableReadNode (location: (5,0)-(5,3))
+ │ └── name: :$-w
+ ├── @ GlobalVariableReadNode (location: (7,0)-(7,10))
+ │ └── name: :$LOAD_PATH
+ ├── @ GlobalVariableReadNode (location: (9,0)-(9,6))
+ │ └── name: :$stdin
+ ├── @ GlobalVariableReadNode (location: (11,0)-(11,7))
+ │ └── name: :$stdout
+ ├── @ GlobalVariableReadNode (location: (13,0)-(13,7))
+ │ └── name: :$stderr
+ ├── @ GlobalVariableReadNode (location: (15,0)-(15,2))
+ │ └── name: :$!
+ ├── @ GlobalVariableReadNode (location: (17,0)-(17,2))
+ │ └── name: :$?
+ ├── @ GlobalVariableReadNode (location: (19,0)-(19,2))
+ │ └── name: :$~
+ ├── @ BackReferenceReadNode (location: (21,0)-(21,2))
+ ├── @ BackReferenceReadNode (location: (23,0)-(23,2))
+ ├── @ BackReferenceReadNode (location: (25,0)-(25,2))
+ ├── @ BackReferenceReadNode (location: (27,0)-(27,2))
+ ├── @ GlobalVariableReadNode (location: (29,0)-(29,2))
+ │ └── name: :$:
+ ├── @ GlobalVariableReadNode (location: (31,0)-(31,2))
+ │ └── name: :$;
+ ├── @ GlobalVariableReadNode (location: (33,0)-(33,2))
+ │ └── name: :$,
+ ├── @ GlobalVariableReadNode (location: (35,0)-(35,6))
+ │ └── name: :$DEBUG
+ ├── @ GlobalVariableReadNode (location: (37,0)-(37,9))
+ │ └── name: :$FILENAME
+ ├── @ GlobalVariableReadNode (location: (39,0)-(39,2))
+ │ └── name: :$0
+ ├── @ GlobalVariableReadNode (location: (41,0)-(41,3))
+ │ └── name: :$-0
+ ├── @ GlobalVariableReadNode (location: (43,0)-(43,16))
+ │ └── name: :$LOADED_FEATURES
+ ├── @ GlobalVariableReadNode (location: (45,0)-(45,8))
+ │ └── name: :$VERBOSE
+ ├── @ GlobalVariableReadNode (location: (47,0)-(47,3))
+ │ └── name: :$-K
+ ├── @ SymbolNode (location: (49,0)-(49,17))
+ │ ├── opening_loc: (49,0)-(49,1) = ":"
+ │ ├── value_loc: (49,1)-(49,17) = "$global_variable"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$global_variable"
+ ├── @ SymbolNode (location: (51,0)-(51,3))
+ │ ├── opening_loc: (51,0)-(51,1) = ":"
+ │ ├── value_loc: (51,1)-(51,3) = "$_"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$_"
+ ├── @ SymbolNode (location: (53,0)-(53,4))
+ │ ├── opening_loc: (53,0)-(53,1) = ":"
+ │ ├── value_loc: (53,1)-(53,4) = "$-w"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$-w"
+ ├── @ SymbolNode (location: (55,0)-(55,11))
+ │ ├── opening_loc: (55,0)-(55,1) = ":"
+ │ ├── value_loc: (55,1)-(55,11) = "$LOAD_PATH"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$LOAD_PATH"
+ ├── @ SymbolNode (location: (57,0)-(57,7))
+ │ ├── opening_loc: (57,0)-(57,1) = ":"
+ │ ├── value_loc: (57,1)-(57,7) = "$stdin"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$stdin"
+ ├── @ SymbolNode (location: (59,0)-(59,8))
+ │ ├── opening_loc: (59,0)-(59,1) = ":"
+ │ ├── value_loc: (59,1)-(59,8) = "$stdout"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$stdout"
+ ├── @ SymbolNode (location: (61,0)-(61,8))
+ │ ├── opening_loc: (61,0)-(61,1) = ":"
+ │ ├── value_loc: (61,1)-(61,8) = "$stderr"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$stderr"
+ ├── @ SymbolNode (location: (63,0)-(63,3))
+ │ ├── opening_loc: (63,0)-(63,1) = ":"
+ │ ├── value_loc: (63,1)-(63,3) = "$!"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$!"
+ ├── @ SymbolNode (location: (65,0)-(65,3))
+ │ ├── opening_loc: (65,0)-(65,1) = ":"
+ │ ├── value_loc: (65,1)-(65,3) = "$?"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$?"
+ ├── @ SymbolNode (location: (67,0)-(67,3))
+ │ ├── opening_loc: (67,0)-(67,1) = ":"
+ │ ├── value_loc: (67,1)-(67,3) = "$~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$~"
+ ├── @ SymbolNode (location: (69,0)-(69,3))
+ │ ├── opening_loc: (69,0)-(69,1) = ":"
+ │ ├── value_loc: (69,1)-(69,3) = "$&"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$&"
+ ├── @ SymbolNode (location: (71,0)-(71,3))
+ │ ├── opening_loc: (71,0)-(71,1) = ":"
+ │ ├── value_loc: (71,1)-(71,3) = "$`"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$`"
+ ├── @ SymbolNode (location: (73,0)-(73,3))
+ │ ├── opening_loc: (73,0)-(73,1) = ":"
+ │ ├── value_loc: (73,1)-(73,3) = "$'"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$'"
+ ├── @ SymbolNode (location: (75,0)-(75,3))
+ │ ├── opening_loc: (75,0)-(75,1) = ":"
+ │ ├── value_loc: (75,1)-(75,3) = "$+"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$+"
+ ├── @ SymbolNode (location: (77,0)-(77,3))
+ │ ├── opening_loc: (77,0)-(77,1) = ":"
+ │ ├── value_loc: (77,1)-(77,3) = "$:"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$:"
+ ├── @ SymbolNode (location: (79,0)-(79,3))
+ │ ├── opening_loc: (79,0)-(79,1) = ":"
+ │ ├── value_loc: (79,1)-(79,3) = "$;"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$;"
+ ├── @ SymbolNode (location: (81,0)-(81,7))
+ │ ├── opening_loc: (81,0)-(81,1) = ":"
+ │ ├── value_loc: (81,1)-(81,7) = "$DEBUG"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$DEBUG"
+ ├── @ SymbolNode (location: (83,0)-(83,10))
+ │ ├── opening_loc: (83,0)-(83,1) = ":"
+ │ ├── value_loc: (83,1)-(83,10) = "$FILENAME"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$FILENAME"
+ ├── @ SymbolNode (location: (85,0)-(85,3))
+ │ ├── opening_loc: (85,0)-(85,1) = ":"
+ │ ├── value_loc: (85,1)-(85,3) = "$0"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$0"
+ ├── @ SymbolNode (location: (87,0)-(87,4))
+ │ ├── opening_loc: (87,0)-(87,1) = ":"
+ │ ├── value_loc: (87,1)-(87,4) = "$-0"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$-0"
+ ├── @ SymbolNode (location: (89,0)-(89,17))
+ │ ├── opening_loc: (89,0)-(89,1) = ":"
+ │ ├── value_loc: (89,1)-(89,17) = "$LOADED_FEATURES"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$LOADED_FEATURES"
+ ├── @ SymbolNode (location: (91,0)-(91,9))
+ │ ├── opening_loc: (91,0)-(91,1) = ":"
+ │ ├── value_loc: (91,1)-(91,9) = "$VERBOSE"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$VERBOSE"
+ └── @ SymbolNode (location: (93,0)-(93,4))
+ ├── opening_loc: (93,0)-(93,1) = ":"
+ ├── value_loc: (93,1)-(93,4) = "$-K"
+ ├── closing_loc: ∅
+ └── unescaped: "$-K"
diff --git a/test/prism/snapshots/hashes.txt b/test/prism/snapshots/hashes.txt
new file mode 100644
index 0000000000..ea8400635b
--- /dev/null
+++ b/test/prism/snapshots/hashes.txt
@@ -0,0 +1,355 @@
+@ ProgramNode (location: (1,0)-(26,3))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(26,3))
+ └── body: (length: 9)
+ ├── @ HashNode (location: (1,0)-(1,2))
+ │ ├── opening_loc: (1,0)-(1,1) = "{"
+ │ ├── elements: (length: 0)
+ │ └── closing_loc: (1,1)-(1,2) = "}"
+ ├── @ HashNode (location: (3,0)-(4,1))
+ │ ├── opening_loc: (3,0)-(3,1) = "{"
+ │ ├── elements: (length: 0)
+ │ └── closing_loc: (4,0)-(4,1) = "}"
+ ├── @ HashNode (location: (6,0)-(6,18))
+ │ ├── opening_loc: (6,0)-(6,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (6,2)-(6,8))
+ │ │ │ ├── key:
+ │ │ │ │ @ CallNode (location: (6,2)-(6,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (6,2)-(6,3) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (6,7)-(6,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (6,7)-(6,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: (6,4)-(6,6) = "=>"
+ │ │ └── @ AssocNode (location: (6,10)-(6,16))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (6,10)-(6,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (6,10)-(6,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (6,15)-(6,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (6,15)-(6,16) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ └── operator_loc: (6,12)-(6,14) = "=>"
+ │ └── closing_loc: (6,17)-(6,18) = "}"
+ ├── @ HashNode (location: (8,0)-(8,15))
+ │ ├── opening_loc: (8,0)-(8,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (8,2)-(8,8))
+ │ │ │ ├── key:
+ │ │ │ │ @ CallNode (location: (8,2)-(8,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (8,2)-(8,3) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (8,7)-(8,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (8,7)-(8,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: (8,4)-(8,6) = "=>"
+ │ │ └── @ AssocSplatNode (location: (8,10)-(8,13))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (8,12)-(8,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (8,12)-(8,13) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── operator_loc: (8,10)-(8,12) = "**"
+ │ └── closing_loc: (8,14)-(8,15) = "}"
+ ├── @ HashNode (location: (10,0)-(16,5))
+ │ ├── opening_loc: (10,0)-(10,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (11,6)-(11,10))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (11,6)-(11,8))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (11,6)-(11,7) = "a"
+ │ │ │ │ ├── closing_loc: (11,7)-(11,8) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (11,9)-(11,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (11,9)-(11,10) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (12,6)-(12,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (12,6)-(12,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (12,6)-(12,7) = "c"
+ │ │ │ ├── closing_loc: (12,7)-(12,8) = ":"
+ │ │ │ └── unescaped: "c"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (12,9)-(12,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (12,9)-(12,10) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (16,4)-(16,5) = "}"
+ ├── @ HashNode (location: (18,0)-(18,25))
+ │ ├── opening_loc: (18,0)-(18,1) = "{"
+ │ ├── elements: (length: 4)
+ │ │ ├── @ AssocNode (location: (18,2)-(18,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (18,2)-(18,4))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (18,2)-(18,3) = "a"
+ │ │ │ │ ├── closing_loc: (18,3)-(18,4) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (18,5)-(18,6))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,5)-(18,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── @ AssocNode (location: (18,8)-(18,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (18,8)-(18,10))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (18,8)-(18,9) = "c"
+ │ │ │ │ ├── closing_loc: (18,9)-(18,10) = ":"
+ │ │ │ │ └── unescaped: "c"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (18,11)-(18,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,11)-(18,12) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "d"
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── @ AssocSplatNode (location: (18,14)-(18,17))
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (18,16)-(18,17))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,16)-(18,17) = "e"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "e"
+ │ │ │ └── operator_loc: (18,14)-(18,16) = "**"
+ │ │ └── @ AssocNode (location: (18,19)-(18,23))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (18,19)-(18,21))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (18,19)-(18,20) = "f"
+ │ │ │ ├── closing_loc: (18,20)-(18,21) = ":"
+ │ │ │ └── unescaped: "f"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (18,22)-(18,23))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (18,22)-(18,23) = "g"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "g"
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (18,24)-(18,25) = "}"
+ ├── @ HashNode (location: (20,0)-(20,12))
+ │ ├── opening_loc: (20,0)-(20,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (20,2)-(20,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (20,2)-(20,6))
+ │ │ │ ├── opening_loc: (20,2)-(20,3) = "\""
+ │ │ │ ├── value_loc: (20,3)-(20,4) = "a"
+ │ │ │ ├── closing_loc: (20,4)-(20,6) = "\":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (20,7)-(20,10))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (20,8)-(20,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (20,8)-(20,10) = "b?"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "b?"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (20,7)-(20,8) = "!"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "!"
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (20,11)-(20,12) = "}"
+ ├── @ LocalVariableWriteNode (location: (22,0)-(22,5))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (22,0)-(22,1) = "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (22,4)-(22,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (22,2)-(22,3) = "="
+ └── @ CallNode (location: (23,0)-(26,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (23,0)-(23,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (23,4)-(26,3))
+ │ ├── locals: [:b]
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (24,2)-(25,20))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ LocalVariableWriteNode (location: (24,2)-(24,7))
+ │ │ │ ├── name: :b
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (24,2)-(24,3) = "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (24,6)-(24,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (24,4)-(24,5) = "="
+ │ │ └── @ HashNode (location: (25,2)-(25,20))
+ │ │ ├── opening_loc: (25,2)-(25,3) = "{"
+ │ │ ├── elements: (length: 4)
+ │ │ │ ├── @ AssocNode (location: (25,4)-(25,6))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (25,4)-(25,6))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (25,4)-(25,5) = "a"
+ │ │ │ │ │ ├── closing_loc: (25,5)-(25,6) = ":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ ImplicitNode (location: (25,4)-(25,6))
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ LocalVariableReadNode (location: (25,4)-(25,6))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 1
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── @ AssocNode (location: (25,8)-(25,10))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (25,8)-(25,10))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (25,8)-(25,9) = "b"
+ │ │ │ │ │ ├── closing_loc: (25,9)-(25,10) = ":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ ImplicitNode (location: (25,8)-(25,10))
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ LocalVariableReadNode (location: (25,8)-(25,10))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── @ AssocNode (location: (25,12)-(25,14))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (25,12)-(25,14))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (25,12)-(25,13) = "c"
+ │ │ │ │ │ ├── closing_loc: (25,13)-(25,14) = ":"
+ │ │ │ │ │ └── unescaped: "c"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ ImplicitNode (location: (25,12)-(25,14))
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ CallNode (location: (25,12)-(25,14))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (25,12)-(25,13) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (25,16)-(25,18))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (25,16)-(25,18))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (25,16)-(25,17) = "D"
+ │ │ │ │ ├── closing_loc: (25,17)-(25,18) = ":"
+ │ │ │ │ └── unescaped: "D"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (25,16)-(25,18))
+ │ │ │ │ └── value:
+ │ │ │ │ @ ConstantReadNode (location: (25,16)-(25,18))
+ │ │ │ │ └── name: :D
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (25,19)-(25,20) = "}"
+ │ ├── opening_loc: (23,4)-(23,6) = "do"
+ │ └── closing_loc: (26,0)-(26,3) = "end"
+ ├── flags: ∅
+ └── name: "tap"
diff --git a/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt b/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt
new file mode 100644
index 0000000000..c4ec0d86ce
--- /dev/null
+++ b/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(5,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,25))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,25))
+ │ ├── receiver:
+ │ │ @ StringNode (location: (1,0)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,0)-(1,9) = "<<-TARGET"
+ │ │ ├── content_loc: (2,0)-(1,0) = ""
+ │ │ ├── closing_loc: (2,0)-(2,0) = "TARGET\n"
+ │ │ └── unescaped: ""
+ │ ├── call_operator_loc: (1,9)-(1,10) = "."
+ │ ├── message_loc: (1,10)-(1,14) = "gsub"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,15)-(1,25))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ RegularExpressionNode (location: (1,15)-(1,21))
+ │ │ │ ├── opening_loc: (1,15)-(1,16) = "/"
+ │ │ │ ├── content_loc: (1,16)-(1,20) = "^\\s{"
+ │ │ │ ├── closing_loc: (1,20)-(1,21) = "/"
+ │ │ │ ├── unescaped: "^ {"
+ │ │ │ └── flags: ∅
+ │ │ └── @ StringNode (location: (1,23)-(1,25))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,23)-(1,24) = "'"
+ │ │ ├── content_loc: (1,24)-(1,24) = ""
+ │ │ ├── closing_loc: (1,24)-(1,25) = "'"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "gsub"
+ └── @ CallNode (location: (5,0)-(5,25))
+ ├── receiver:
+ │ @ StringNode (location: (5,0)-(5,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,0)-(5,9) = "<<-TARGET"
+ │ ├── content_loc: (6,0)-(5,0) = ""
+ │ ├── closing_loc: (6,0)-(6,0) = "TARGET\r\n"
+ │ └── unescaped: ""
+ ├── call_operator_loc: (5,9)-(5,10) = "."
+ ├── message_loc: (5,10)-(5,14) = "gsub"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,15)-(5,25))
+ │ └── arguments: (length: 2)
+ │ ├── @ RegularExpressionNode (location: (5,15)-(5,21))
+ │ │ ├── opening_loc: (5,15)-(5,16) = "/"
+ │ │ ├── content_loc: (5,16)-(5,20) = "^\\s{"
+ │ │ ├── closing_loc: (5,20)-(5,21) = "/"
+ │ │ ├── unescaped: "^ {"
+ │ │ └── flags: ∅
+ │ └── @ StringNode (location: (5,23)-(5,25))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,23)-(5,24) = "'"
+ │ ├── content_loc: (5,24)-(5,24) = ""
+ │ ├── closing_loc: (5,24)-(5,25) = "'"
+ │ └── unescaped: ""
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "gsub"
diff --git a/test/prism/snapshots/heredoc_with_trailing_newline.txt b/test/prism/snapshots/heredoc_with_trailing_newline.txt
new file mode 100644
index 0000000000..01178042d6
--- /dev/null
+++ b/test/prism/snapshots/heredoc_with_trailing_newline.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,6) = "<<-END"
+ ├── content_loc: (2,0)-(1,0) = ""
+ ├── closing_loc: (2,0)-(2,3) = "END"
+ └── unescaped: ""
diff --git a/test/prism/snapshots/heredocs_nested.txt b/test/prism/snapshots/heredocs_nested.txt
new file mode 100644
index 0000000000..8680dd2346
--- /dev/null
+++ b/test/prism/snapshots/heredocs_nested.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,7))
+ ├── opening_loc: (1,0)-(1,7) = "<<~RUBY"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (2,0)-(2,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(2,0) = "pre\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "pre\n"
+ │ ├── @ EmbeddedStatementsNode (location: (3,0)-(7,1))
+ │ │ ├── opening_loc: (3,0)-(3,2) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (4,0)-(4,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ StringNode (location: (4,0)-(4,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (4,0)-(4,6) = "<<RUBY"
+ │ │ │ ├── content_loc: (5,0)-(5,0) = " hello\n"
+ │ │ │ ├── closing_loc: (6,0)-(6,0) = "RUBY\n"
+ │ │ │ └── unescaped: " hello\n"
+ │ │ └── closing_loc: (7,0)-(7,1) = "}"
+ │ └── @ StringNode (location: (7,1)-(8,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (7,1)-(8,0) = "\npost\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\npost\n"
+ └── closing_loc: (9,0)-(9,0) = "RUBY\n"
diff --git a/test/prism/snapshots/heredocs_with_ignored_newlines.txt b/test/prism/snapshots/heredocs_with_ignored_newlines.txt
new file mode 100644
index 0000000000..280a01f879
--- /dev/null
+++ b/test/prism/snapshots/heredocs_with_ignored_newlines.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(4,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,8))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(1,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,7) = "<<-HERE"
+ │ ├── content_loc: (2,0)-(1,0) = ""
+ │ ├── closing_loc: (2,0)-(2,0) = "HERE\n"
+ │ └── unescaped: ""
+ └── @ StringNode (location: (4,0)-(4,8))
+ ├── flags: ∅
+ ├── opening_loc: (4,0)-(4,8) = "<<~THERE"
+ ├── content_loc: (5,0)-(13,0) = " way over\n <<HERE\n not here\n HERE\n\n <<~BUT\\\n but\n BUT\n there\n"
+ ├── closing_loc: (14,0)-(14,0) = "THERE\n"
+ └── unescaped: "way over\n<<HERE\n not here\nHERE\n\n<<~BUT but\nBUT\n there\n"
diff --git a/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt b/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt
new file mode 100644
index 0000000000..f4b4ec2044
--- /dev/null
+++ b/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,6) = "<<-EOE"
+ ├── content_loc: (2,0)-(3,0) = " some\n heredocs\n"
+ ├── closing_loc: (4,0)-(4,3) = "EOE"
+ └── unescaped: " some\n heredocs\n"
diff --git a/test/prism/snapshots/if.txt b/test/prism/snapshots/if.txt
new file mode 100644
index 0000000000..541549459f
--- /dev/null
+++ b/test/prism/snapshots/if.txt
@@ -0,0 +1,429 @@
+@ ProgramNode (location: (1,0)-(42,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(42,3))
+ └── body: (length: 13)
+ ├── @ IfNode (location: (1,0)-(1,15))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (1,3)-(1,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,9)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,9)-(1,10))
+ │ │ └── flags: decimal
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (1,12)-(1,15) = "end"
+ ├── @ IfNode (location: (3,0)-(4,12))
+ │ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (3,3)-(3,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (4,0)-(4,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (4,0)-(4,1))
+ │ │ └── flags: decimal
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (4,2)-(4,12))
+ │ │ ├── else_keyword_loc: (4,2)-(4,6) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (4,7)-(4,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (4,7)-(4,8))
+ │ │ │ └── flags: decimal
+ │ │ └── end_keyword_loc: (4,9)-(4,12) = "end"
+ │ └── end_keyword_loc: (4,9)-(4,12) = "end"
+ ├── @ IfNode (location: (6,0)-(6,73))
+ │ ├── if_keyword_loc: (6,0)-(6,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (6,3)-(6,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (6,13)-(6,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ TrueNode (location: (6,13)-(6,17))
+ │ ├── consequent:
+ │ │ @ IfNode (location: (6,18)-(6,73))
+ │ │ ├── if_keyword_loc: (6,18)-(6,23) = "elsif"
+ │ │ ├── predicate:
+ │ │ │ @ FalseNode (location: (6,24)-(6,29))
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (6,35)-(6,40))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FalseNode (location: (6,35)-(6,40))
+ │ │ ├── consequent:
+ │ │ │ @ IfNode (location: (6,41)-(6,73))
+ │ │ │ ├── if_keyword_loc: (6,41)-(6,46) = "elsif"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ NilNode (location: (6,47)-(6,50))
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (6,56)-(6,59))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ NilNode (location: (6,56)-(6,59))
+ │ │ │ ├── consequent:
+ │ │ │ │ @ ElseNode (location: (6,60)-(6,73))
+ │ │ │ │ ├── else_keyword_loc: (6,60)-(6,64) = "else"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (6,65)-(6,69))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ SelfNode (location: (6,65)-(6,69))
+ │ │ │ │ └── end_keyword_loc: (6,70)-(6,73) = "end"
+ │ │ │ └── end_keyword_loc: (6,70)-(6,73) = "end"
+ │ │ └── end_keyword_loc: (6,70)-(6,73) = "end"
+ │ └── end_keyword_loc: (6,70)-(6,73) = "end"
+ ├── @ IfNode (location: (8,0)-(8,9))
+ │ ├── if_keyword_loc: (8,2)-(8,4) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (8,5)-(8,9))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,0)-(8,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
+ │ │ └── flags: decimal
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (10,0)-(10,13))
+ │ ├── if_keyword_loc: (10,6)-(10,8) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (10,9)-(10,13))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (10,0)-(10,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (10,0)-(10,5))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (10,0)-(10,5) = "break"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (12,0)-(12,12))
+ │ ├── if_keyword_loc: (12,5)-(12,7) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (12,8)-(12,12))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (12,0)-(12,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (12,0)-(12,4))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (12,0)-(12,4) = "next"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (14,0)-(14,14))
+ │ ├── if_keyword_loc: (14,7)-(14,9) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (14,10)-(14,14))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (14,0)-(14,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (14,0)-(14,6))
+ │ │ ├── keyword_loc: (14,0)-(14,6) = "return"
+ │ │ └── arguments: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (16,0)-(16,30))
+ │ ├── if_keyword_loc: (16,0)-(16,2) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (16,3)-(16,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,3)-(16,12) = "exit_loop"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "exit_loop"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (16,18)-(16,26))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (16,18)-(16,26))
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (16,24)-(16,26))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (16,24)-(16,26))
+ │ │ │ └── flags: decimal
+ │ │ └── keyword_loc: (16,18)-(16,23) = "break"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (16,27)-(16,30) = "end"
+ ├── @ IfNode (location: (18,0)-(20,3))
+ │ ├── if_keyword_loc: (18,0)-(18,2) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (18,3)-(18,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (18,3)-(18,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (19,5)-(19,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (19,5)-(19,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,5)-(19,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (20,0)-(20,3) = "end"
+ ├── @ IfNode (location: (22,0)-(22,11))
+ │ ├── if_keyword_loc: (22,7)-(22,9) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (22,10)-(22,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (22,10)-(22,11) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (22,0)-(22,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IfNode (location: (22,0)-(22,6))
+ │ │ ├── if_keyword_loc: (22,2)-(22,4) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (22,5)-(22,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (22,5)-(22,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (22,0)-(22,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (22,0)-(22,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (22,0)-(22,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (24,0)-(27,3))
+ │ ├── if_keyword_loc: (24,0)-(24,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (24,3)-(24,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (25,2)-(25,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (25,2)-(25,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (25,2)-(25,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (25,4)-(25,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (25,4)-(25,6))
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (25,4)-(25,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (25,4)-(25,6))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (25,4)-(25,5) = "b"
+ │ │ │ │ ├── closing_loc: (25,5)-(25,6) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (25,4)-(25,6))
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (25,4)-(25,6))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (25,4)-(25,5) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (26,0)-(27,3))
+ │ │ ├── else_keyword_loc: (26,0)-(26,4) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (27,0)-(27,3) = "end"
+ │ └── end_keyword_loc: (27,0)-(27,3) = "end"
+ ├── @ IfNode (location: (29,0)-(31,3))
+ │ ├── if_keyword_loc: (29,0)-(29,2) = "if"
+ │ ├── predicate:
+ │ │ @ MatchPredicateNode (location: (29,3)-(29,12))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (29,3)-(29,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,3)-(29,7) = "type"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "type"
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (29,11)-(29,12))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (29,8)-(29,10) = "in"
+ │ ├── statements: ∅
+ │ ├── consequent:
+ │ │ @ IfNode (location: (30,0)-(31,3))
+ │ │ ├── if_keyword_loc: (30,0)-(30,5) = "elsif"
+ │ │ ├── predicate:
+ │ │ │ @ MatchPredicateNode (location: (30,6)-(30,15))
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (30,6)-(30,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (30,6)-(30,10) = "type"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "type"
+ │ │ │ ├── pattern:
+ │ │ │ │ @ ConstantReadNode (location: (30,14)-(30,15))
+ │ │ │ │ └── name: :B
+ │ │ │ └── operator_loc: (30,11)-(30,13) = "in"
+ │ │ ├── statements: ∅
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
+ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
+ └── @ IfNode (location: (33,0)-(42,3))
+ ├── if_keyword_loc: (33,0)-(33,2) = "if"
+ ├── predicate:
+ │ @ IntegerNode (location: (33,3)-(33,4))
+ │ └── flags: decimal
+ ├── statements:
+ │ @ StatementsNode (location: (34,2)-(35,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (34,2)-(35,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (34,2)-(34,8) = "lambda"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (34,9)-(35,5))
+ │ │ ├── locals: [:_]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (34,12)-(34,15))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (34,13)-(34,14))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (34,13)-(34,14))
+ │ │ │ │ │ └── name: :_
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (34,12)-(34,13) = "|"
+ │ │ │ └── closing_loc: (34,14)-(34,15) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (34,9)-(34,11) = "do"
+ │ │ └── closing_loc: (35,2)-(35,5) = "end"
+ │ ├── flags: ∅
+ │ └── name: "lambda"
+ ├── consequent:
+ │ @ IfNode (location: (36,0)-(42,3))
+ │ ├── if_keyword_loc: (36,0)-(36,5) = "elsif"
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (36,6)-(36,7))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (37,2)-(38,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (37,2)-(38,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,2)-(37,8) = "lambda"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (37,9)-(38,5))
+ │ │ │ ├── locals: [:_]
+ │ │ │ ├── parameters:
+ │ │ │ │ @ BlockParametersNode (location: (37,12)-(37,15))
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ ParametersNode (location: (37,13)-(37,14))
+ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (37,13)-(37,14))
+ │ │ │ │ │ │ └── name: :_
+ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ ├── opening_loc: (37,12)-(37,13) = "|"
+ │ │ │ │ └── closing_loc: (37,14)-(37,15) = "|"
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (37,9)-(37,11) = "do"
+ │ │ │ └── closing_loc: (38,2)-(38,5) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "lambda"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (39,0)-(42,3))
+ │ │ ├── else_keyword_loc: (39,0)-(39,4) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (40,2)-(41,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (40,2)-(41,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (40,2)-(40,8) = "lambda"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (40,9)-(41,5))
+ │ │ │ │ ├── locals: [:_]
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ BlockParametersNode (location: (40,12)-(40,15))
+ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ @ ParametersNode (location: (40,13)-(40,14))
+ │ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (40,13)-(40,14))
+ │ │ │ │ │ │ │ └── name: :_
+ │ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ │ ├── opening_loc: (40,12)-(40,13) = "|"
+ │ │ │ │ │ └── closing_loc: (40,14)-(40,15) = "|"
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (40,9)-(40,11) = "do"
+ │ │ │ │ └── closing_loc: (41,2)-(41,5) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "lambda"
+ │ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
+ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
+ └── end_keyword_loc: (42,0)-(42,3) = "end"
diff --git a/test/prism/snapshots/indented_file_end.txt b/test/prism/snapshots/indented_file_end.txt
new file mode 100644
index 0000000000..aa43ec5a1e
--- /dev/null
+++ b/test/prism/snapshots/indented_file_end.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,4)-(3,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,4)-(3,7))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,4)-(3,7))
+ ├── name: :hi
+ ├── name_loc: (1,8)-(1,10) = "hi"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (1,4)-(1,7) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (3,4)-(3,7) = "end"
diff --git a/test/prism/snapshots/integer_operations.txt b/test/prism/snapshots/integer_operations.txt
new file mode 100644
index 0000000000..74f02b9600
--- /dev/null
+++ b/test/prism/snapshots/integer_operations.txt
@@ -0,0 +1,539 @@
+@ ProgramNode (location: (1,0)-(63,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(63,7))
+ └── body: (length: 32)
+ ├── @ CallNode (location: (1,0)-(1,2))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (3,0)-(3,2))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (3,1)-(3,2))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "~"
+ ├── @ CallNode (location: (5,0)-(5,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (5,0)-(5,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,2)-(5,4) = "!="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,5)-(5,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,5)-(5,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!="
+ ├── @ CallNode (location: (7,0)-(7,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (7,0)-(7,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,2)-(7,4) = "!~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,5)-(7,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,5)-(7,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!~"
+ ├── @ CallNode (location: (9,0)-(9,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (9,0)-(9,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,2)-(9,3) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,4)-(9,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (9,4)-(9,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (11,0)-(11,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (11,0)-(11,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,2)-(11,3) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "&"
+ ├── @ CallNode (location: (13,0)-(13,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (13,0)-(13,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,2)-(13,3) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,4)-(13,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,4)-(13,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "*"
+ ├── @ CallNode (location: (15,0)-(15,4))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (15,0)-(15,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,1)-(15,3) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,3)-(15,4))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (15,3)-(15,4))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "**"
+ ├── @ CallNode (location: (17,0)-(17,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (17,0)-(17,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,2)-(17,3) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,4)-(17,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (17,4)-(17,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ CallNode (location: (19,0)-(19,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (19,0)-(19,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,2)-(19,3) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,4)-(19,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (19,4)-(19,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "-"
+ ├── @ CallNode (location: (21,0)-(21,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (21,0)-(21,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (21,2)-(21,3) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,4)-(21,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (21,4)-(21,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "/"
+ ├── @ CallNode (location: (23,0)-(23,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,3))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (23,0)-(23,1))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,1)-(23,2) = "/"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (23,2)-(23,3))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (23,2)-(23,3))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "/"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (23,3)-(23,4) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,4)-(23,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (23,4)-(23,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "/"
+ ├── @ CallNode (location: (25,0)-(25,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (25,0)-(25,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,2)-(25,3) = "<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,4)-(25,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (25,4)-(25,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<"
+ ├── @ CallNode (location: (27,0)-(27,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (27,0)-(27,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,2)-(27,4) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,5)-(27,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (27,5)-(27,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<<"
+ ├── @ CallNode (location: (29,0)-(29,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (29,0)-(29,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (29,2)-(29,4) = "<="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,5)-(29,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (29,5)-(29,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<="
+ ├── @ CallNode (location: (31,0)-(31,7))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (31,0)-(31,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,2)-(31,5) = "<=>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,6)-(31,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,6)-(31,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<=>"
+ ├── @ CallNode (location: (33,0)-(33,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (33,0)-(33,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (33,2)-(33,4) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,5)-(33,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (33,5)-(33,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=="
+ ├── @ CallNode (location: (35,0)-(35,7))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (35,0)-(35,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,2)-(35,5) = "==="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,6)-(35,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (35,6)-(35,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "==="
+ ├── @ CallNode (location: (37,0)-(37,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (37,0)-(37,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,2)-(37,4) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,5)-(37,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (37,5)-(37,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=~"
+ ├── @ CallNode (location: (39,0)-(39,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (39,0)-(39,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (39,2)-(39,3) = ">"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,4)-(39,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (39,4)-(39,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">"
+ ├── @ CallNode (location: (41,0)-(41,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (41,0)-(41,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (41,2)-(41,4) = ">="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,5)-(41,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (41,5)-(41,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">="
+ ├── @ CallNode (location: (43,0)-(43,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (43,0)-(43,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (43,2)-(43,4) = ">>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (43,5)-(43,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (43,5)-(43,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">>"
+ ├── @ CallNode (location: (45,0)-(45,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (45,0)-(45,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (45,2)-(45,3) = "^"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,4)-(45,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (45,4)-(45,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "^"
+ ├── @ CallNode (location: (47,0)-(47,5))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (47,0)-(47,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (47,2)-(47,3) = "|"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (47,4)-(47,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (47,4)-(47,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "|"
+ ├── @ AndNode (location: (49,0)-(49,6))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (49,0)-(49,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (49,5)-(49,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (49,2)-(49,4) = "&&"
+ ├── @ AndNode (location: (51,0)-(51,7))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (51,0)-(51,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (51,6)-(51,7))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (51,2)-(51,5) = "and"
+ ├── @ CallNode (location: (53,0)-(53,10))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (53,0)-(53,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (53,2)-(53,3) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (53,4)-(53,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (53,4)-(53,10))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (53,4)-(53,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (53,6)-(53,8) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (53,9)-(53,10))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (53,9)-(53,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "**"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "*"
+ ├── @ CallNode (location: (55,0)-(55,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (55,0)-(55,5))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (55,0)-(55,1))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (55,2)-(55,3) = "*"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (55,4)-(55,5))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (55,4)-(55,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "*"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (55,6)-(55,7) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (55,8)-(55,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (55,8)-(55,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ OrNode (location: (57,0)-(57,6))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (57,0)-(57,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (57,5)-(57,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (57,2)-(57,4) = "or"
+ ├── @ OrNode (location: (59,0)-(59,6))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (59,0)-(59,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (59,5)-(59,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (59,2)-(59,4) = "||"
+ ├── @ CallNode (location: (61,0)-(61,9))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (61,0)-(61,1))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (61,2)-(61,3) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (61,4)-(61,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (61,4)-(61,9))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (61,4)-(61,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (61,6)-(61,7) = "*"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (61,8)-(61,9))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (61,8)-(61,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "*"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ └── @ ParenthesesNode (location: (63,0)-(63,7))
+ ├── body:
+ │ @ StatementsNode (location: (63,1)-(63,6))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (63,1)-(63,6))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (63,1)-(63,2))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (63,3)-(63,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (63,5)-(63,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (63,5)-(63,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── opening_loc: (63,0)-(63,1) = "("
+ └── closing_loc: (63,6)-(63,7) = ")"
diff --git a/test/prism/snapshots/keyword_method_names.txt b/test/prism/snapshots/keyword_method_names.txt
new file mode 100644
index 0000000000..9ecd52585a
--- /dev/null
+++ b/test/prism/snapshots/keyword_method_names.txt
@@ -0,0 +1,170 @@
+@ ProgramNode (location: (1,0)-(29,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(29,3))
+ └── body: (length: 10)
+ ├── @ DefNode (location: (1,0)-(2,3))
+ │ ├── name: :def
+ │ ├── name_loc: (1,4)-(1,7) = "def"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (2,0)-(2,3) = "end"
+ ├── @ DefNode (location: (4,0)-(5,3))
+ │ ├── name: :ensure
+ │ ├── name_loc: (4,9)-(4,15) = "ensure"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (4,4)-(4,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ │ ├── operator_loc: (4,8)-(4,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ CallNode (location: (7,0)-(10,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,7) = "private"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,8)-(10,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ DefNode (location: (7,8)-(10,3))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (7,12)-(7,15) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (8,2)-(9,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (8,2)-(9,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (8,2)-(8,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (8,6)-(9,5))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (8,6)-(8,8) = "do"
+ │ │ │ │ └── closing_loc: (9,2)-(9,5) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "bar"
+ │ │ ├── locals: []
+ │ │ ├── def_keyword_loc: (7,8)-(7,11) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (10,0)-(10,3) = "end"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "private"
+ ├── @ DefNode (location: (12,0)-(13,3))
+ │ ├── name: :m
+ │ ├── name_loc: (12,4)-(12,5) = "m"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (12,6)-(12,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (12,6)-(12,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ NoKeywordsParameterNode (location: (12,9)-(12,14))
+ │ │ │ ├── operator_loc: (12,9)-(12,11) = "**"
+ │ │ │ └── keyword_loc: (12,11)-(12,14) = "nil"
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (12,0)-(12,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (12,5)-(12,6) = "("
+ │ ├── rparen_loc: (12,14)-(12,15) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (13,0)-(13,3) = "end"
+ ├── @ DefNode (location: (15,0)-(16,3))
+ │ ├── name: :a
+ │ ├── name_loc: (15,17)-(15,18) = "a"
+ │ ├── receiver:
+ │ │ @ SourceEncodingNode (location: (15,4)-(15,16))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (15,0)-(15,3) = "def"
+ │ ├── operator_loc: (15,16)-(15,17) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (16,0)-(16,3) = "end"
+ ├── @ StringNode (location: (18,0)-(18,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (18,0)-(18,2) = "%{"
+ │ ├── content_loc: (18,2)-(18,5) = "abc"
+ │ ├── closing_loc: (18,5)-(18,6) = "}"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (20,0)-(20,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (20,0)-(20,2) = "%\""
+ │ ├── content_loc: (20,2)-(20,5) = "abc"
+ │ ├── closing_loc: (20,5)-(20,6) = "\""
+ │ └── unescaped: "abc"
+ ├── @ DefNode (location: (22,0)-(23,3))
+ │ ├── name: :a
+ │ ├── name_loc: (22,13)-(22,14) = "a"
+ │ ├── receiver:
+ │ │ @ SourceFileNode (location: (22,4)-(22,12))
+ │ │ └── filepath: "keyword_method_names.txt"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
+ │ ├── operator_loc: (22,12)-(22,13) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (23,0)-(23,3) = "end"
+ ├── @ DefNode (location: (25,0)-(26,3))
+ │ ├── name: :a
+ │ ├── name_loc: (25,13)-(25,14) = "a"
+ │ ├── receiver:
+ │ │ @ SourceLineNode (location: (25,4)-(25,12))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
+ │ ├── operator_loc: (25,12)-(25,13) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (26,0)-(26,3) = "end"
+ └── @ DefNode (location: (28,0)-(29,3))
+ ├── name: :a
+ ├── name_loc: (28,9)-(28,10) = "a"
+ ├── receiver:
+ │ @ NilNode (location: (28,4)-(28,7))
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (28,0)-(28,3) = "def"
+ ├── operator_loc: (28,7)-(28,9) = "::"
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (29,0)-(29,3) = "end"
diff --git a/test/prism/snapshots/keywords.txt b/test/prism/snapshots/keywords.txt
new file mode 100644
index 0000000000..6df11487d7
--- /dev/null
+++ b/test/prism/snapshots/keywords.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(11,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,8))
+ └── body: (length: 6)
+ ├── @ RedoNode (location: (1,0)-(1,4))
+ ├── @ RetryNode (location: (3,0)-(3,5))
+ ├── @ SelfNode (location: (5,0)-(5,4))
+ ├── @ SourceEncodingNode (location: (7,0)-(7,12))
+ ├── @ SourceFileNode (location: (9,0)-(9,8))
+ │ └── filepath: "keywords.txt"
+ └── @ SourceLineNode (location: (11,0)-(11,8))
diff --git a/test/prism/snapshots/lambda.txt b/test/prism/snapshots/lambda.txt
new file mode 100644
index 0000000000..ed622f6739
--- /dev/null
+++ b/test/prism/snapshots/lambda.txt
@@ -0,0 +1,194 @@
+@ ProgramNode (location: (1,0)-(11,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,18))
+ └── body: (length: 5)
+ ├── @ LambdaNode (location: (1,0)-(3,4))
+ │ ├── locals: [:foo]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (3,2)-(3,3) = "{"
+ │ ├── closing_loc: (3,3)-(3,4) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,2)-(3,1))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (2,2)-(2,5))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (2,2)-(2,5))
+ │ │ │ │ └── name: :foo
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ │ └── closing_loc: (3,0)-(3,1) = ")"
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (5,0)-(5,18))
+ │ ├── locals: [:x]
+ │ ├── operator_loc: (5,0)-(5,2) = "->"
+ │ ├── opening_loc: (5,15)-(5,16) = "{"
+ │ ├── closing_loc: (5,17)-(5,18) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (5,2)-(5,14))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (5,3)-(5,13))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (5,3)-(5,13))
+ │ │ │ │ ├── name: :x
+ │ │ │ │ ├── name_loc: (5,3)-(5,5) = "x:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ InterpolatedStringNode (location: (5,6)-(5,13))
+ │ │ │ │ ├── opening_loc: (5,6)-(5,7) = "\""
+ │ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ │ ├── @ StringNode (location: (5,7)-(5,8))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── content_loc: (5,7)-(5,8) = "b"
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ │ └── @ EmbeddedStatementsNode (location: (5,8)-(5,12))
+ │ │ │ │ │ ├── opening_loc: (5,8)-(5,10) = "\#{"
+ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ @ StatementsNode (location: (5,10)-(5,11))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (5,10)-(5,11))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (5,10)-(5,11) = "a"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "a"
+ │ │ │ │ │ └── closing_loc: (5,11)-(5,12) = "}"
+ │ │ │ │ └── closing_loc: (5,12)-(5,13) = "\""
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (5,2)-(5,3) = "("
+ │ │ └── closing_loc: (5,13)-(5,14) = ")"
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (7,0)-(7,15))
+ │ ├── locals: [:a]
+ │ ├── operator_loc: (7,0)-(7,2) = "->"
+ │ ├── opening_loc: (7,13)-(7,14) = "{"
+ │ ├── closing_loc: (7,14)-(7,15) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (7,2)-(7,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (7,3)-(7,11))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (7,3)-(7,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (7,3)-(7,5) = "a:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (7,6)-(7,11))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (7,6)-(7,7) = "b"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "b"
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (7,8)-(7,9) = "*"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (7,10)-(7,11))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (7,10)-(7,11))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "*"
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (7,2)-(7,3) = "("
+ │ │ └── closing_loc: (7,11)-(7,12) = ")"
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (9,0)-(9,19))
+ │ ├── locals: [:foo]
+ │ ├── operator_loc: (9,0)-(9,2) = "->"
+ │ ├── opening_loc: (9,13)-(9,15) = "do"
+ │ ├── closing_loc: (9,16)-(9,19) = "end"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (9,3)-(9,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (9,3)-(9,12))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (9,3)-(9,12))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── name_loc: (9,3)-(9,6) = "foo"
+ │ │ │ │ ├── operator_loc: (9,7)-(9,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (9,9)-(9,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── body: ∅
+ └── @ LambdaNode (location: (11,0)-(11,18))
+ ├── locals: [:foo]
+ ├── operator_loc: (11,0)-(11,2) = "->"
+ ├── opening_loc: (11,12)-(11,14) = "do"
+ ├── closing_loc: (11,15)-(11,18) = "end"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (11,3)-(11,11))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (11,3)-(11,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (11,3)-(11,11))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (11,3)-(11,7) = "foo:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (11,8)-(11,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,8)-(11,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── body: ∅
diff --git a/test/prism/snapshots/method_calls.txt b/test/prism/snapshots/method_calls.txt
new file mode 100644
index 0000000000..9019ef1798
--- /dev/null
+++ b/test/prism/snapshots/method_calls.txt
@@ -0,0 +1,2171 @@
+@ ProgramNode (location: (1,0)-(147,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(147,8))
+ └── body: (length: 62)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,8)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,8)-(1,10) = "%{"
+ │ │ ├── content_loc: (1,10)-(1,13) = "baz"
+ │ │ ├── closing_loc: (1,13)-(1,14) = "}"
+ │ │ └── unescaped: "baz"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (3,0)-(3,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (3,1)-(3,2) = "."
+ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (3,4)-(3,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,4)-(3,5) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── @ CallNode (location: (3,7)-(3,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,7)-(3,8) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "d"
+ │ ├── closing_loc: (3,8)-(3,9) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── @ CallNode (location: (5,0)-(5,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (5,1)-(5,2) = "."
+ │ ├── message_loc: (5,2)-(5,3) = "b"
+ │ ├── opening_loc: (5,3)-(5,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (5,4)-(5,5) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── @ CallNode (location: (7,0)-(9,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(8,6))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (7,0)-(7,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: (8,2)-(8,3) = "."
+ │ │ ├── message_loc: (8,3)-(8,6) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── call_operator_loc: (9,2)-(9,4) = "&."
+ │ ├── message_loc: (9,4)-(9,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "baz"
+ ├── @ CallNode (location: (11,0)-(11,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,2) = "a!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a!"
+ ├── @ CallNode (location: (13,0)-(13,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (13,0)-(13,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (13,1)-(13,2) = "."
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (13,2)-(13,3) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (13,3)-(13,4) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "call"
+ ├── @ CallNode (location: (15,0)-(15,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (15,0)-(15,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,0)-(15,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (15,1)-(15,2) = "."
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (15,2)-(15,3) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,3)-(15,10))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (15,3)-(15,4))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (15,6)-(15,7))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (15,9)-(15,10))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (15,10)-(15,11) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "call"
+ ├── @ CallNode (location: (17,0)-(17,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (17,0)-(17,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (17,1)-(17,3) = "::"
+ │ ├── message_loc: (17,3)-(17,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── @ CallNode (location: (19,0)-(19,6))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (19,0)-(19,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,0)-(19,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (19,1)-(19,3) = "::"
+ │ ├── message_loc: (19,3)-(19,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,5)-(19,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (19,5)-(19,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,5)-(19,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── @ CallNode (location: (21,0)-(21,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (21,0)-(21,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (21,0)-(21,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (21,3)-(21,4) = "."
+ │ ├── message_loc: (21,4)-(21,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,10)-(21,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (21,10)-(21,11))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar="
+ ├── @ CallNode (location: (23,0)-(23,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (23,0)-(23,2) = "a?"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a?"
+ ├── @ CallNode (location: (25,0)-(25,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,0)-(25,1) = "a"
+ │ ├── opening_loc: (25,1)-(25,2) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (25,8)-(25,9) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (25,2)-(25,8))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (25,3)-(25,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (25,3)-(25,8) = "block"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "block"
+ │ │ └── operator_loc: (25,2)-(25,3) = "&"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (27,0)-(27,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,0)-(27,1) = "a"
+ │ ├── opening_loc: (27,1)-(27,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,2)-(27,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (27,2)-(27,10))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (27,2)-(27,10))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (27,4)-(27,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (27,4)-(27,10) = "kwargs"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "kwargs"
+ │ │ └── operator_loc: (27,2)-(27,4) = "**"
+ │ ├── closing_loc: (27,10)-(27,11) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (29,0)-(29,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (29,0)-(29,3))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (29,0)-(29,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,0)-(29,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── call_operator_loc: (29,1)-(29,2) = "."
+ │ │ ├── message_loc: (29,2)-(29,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── call_operator_loc: (29,3)-(29,4) = "."
+ │ ├── message_loc: (29,4)-(29,5) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "c"
+ ├── @ CallNode (location: (31,0)-(31,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,0)-(31,1) = "a"
+ │ ├── opening_loc: (31,1)-(31,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,2)-(31,6))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (31,2)-(31,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (31,2)-(31,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── @ CallNode (location: (31,5)-(31,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (31,5)-(31,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── closing_loc: (31,6)-(31,7) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (33,0)-(33,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (33,0)-(33,1) = "a"
+ │ ├── opening_loc: (33,1)-(33,2) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (33,2)-(33,3) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (35,0)-(35,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,0)-(35,1) = "a"
+ │ ├── opening_loc: (35,1)-(35,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,2)-(35,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (35,2)-(35,7))
+ │ │ ├── operator_loc: (35,2)-(35,3) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (35,3)-(35,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (35,3)-(35,7) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "args"
+ │ ├── closing_loc: (35,7)-(35,8) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (37,0)-(37,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,0)-(37,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,2)-(37,6))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (37,2)-(37,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── @ CallNode (location: (37,5)-(37,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,5)-(37,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (39,0)-(39,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (39,0)-(39,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,0)-(39,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (39,1)-(39,2) = "."
+ │ ├── message_loc: (39,2)-(39,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,4)-(39,8))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (39,4)-(39,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (39,4)-(39,5) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── @ CallNode (location: (39,7)-(39,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,7)-(39,8) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "d"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── @ MultiWriteNode (location: (41,0)-(41,23))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ CallNode (location: (41,0)-(41,7))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── call_operator_loc: (41,3)-(41,4) = "."
+ │ │ │ ├── message_loc: (41,4)-(41,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "foo="
+ │ │ └── @ CallNode (location: (41,9)-(41,16))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (41,9)-(41,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (41,9)-(41,12) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: (41,12)-(41,13) = "."
+ │ │ ├── message_loc: (41,13)-(41,16) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar="
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (41,17)-(41,18) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (41,19)-(41,23))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (41,19)-(41,20))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (41,22)-(41,23))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ CallNode (location: (43,0)-(43,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (43,0)-(43,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (43,0)-(43,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (43,1)-(43,3) = "&."
+ │ ├── message_loc: (43,3)-(43,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "b"
+ ├── @ CallNode (location: (45,0)-(45,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (45,0)-(45,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,0)-(45,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (45,1)-(45,3) = "&."
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (45,3)-(45,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (45,4)-(45,5) = ")"
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "call"
+ ├── @ CallNode (location: (47,0)-(47,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (47,0)-(47,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (47,0)-(47,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (47,1)-(47,3) = "&."
+ │ ├── message_loc: (47,3)-(47,4) = "b"
+ │ ├── opening_loc: (47,4)-(47,5) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (47,5)-(47,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (47,5)-(47,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (47,5)-(47,6) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── closing_loc: (47,6)-(47,7) = ")"
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "b"
+ ├── @ CallNode (location: (49,0)-(49,6))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (49,0)-(49,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (49,0)-(49,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (49,1)-(49,3) = "&."
+ │ ├── message_loc: (49,3)-(49,4) = "b"
+ │ ├── opening_loc: (49,4)-(49,5) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (49,5)-(49,6) = ")"
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "b"
+ ├── @ IfNode (location: (51,0)-(51,33))
+ │ ├── if_keyword_loc: (51,11)-(51,13) = "if"
+ │ ├── predicate:
+ │ │ @ AndNode (location: (51,14)-(51,33))
+ │ │ ├── left:
+ │ │ │ @ OrNode (location: (51,14)-(51,25))
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (51,14)-(51,18))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (51,14)-(51,18) = "bar?"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "bar?"
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (51,22)-(51,25))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (51,22)-(51,25) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ └── operator_loc: (51,19)-(51,21) = "or"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (51,30)-(51,33))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (51,30)-(51,33) = "qux"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "qux"
+ │ │ └── operator_loc: (51,26)-(51,29) = "and"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (51,0)-(51,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (51,0)-(51,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (51,0)-(51,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (51,4)-(51,10))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (51,4)-(51,6))
+ │ │ │ │ ├── opening_loc: (51,4)-(51,5) = ":"
+ │ │ │ │ ├── value_loc: (51,5)-(51,6) = "a"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ └── @ SymbolNode (location: (51,8)-(51,10))
+ │ │ │ ├── opening_loc: (51,8)-(51,9) = ":"
+ │ │ │ ├── value_loc: (51,9)-(51,10) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ CallNode (location: (53,0)-(56,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (53,0)-(53,3) = "foo"
+ │ ├── opening_loc: (53,3)-(53,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (53,4)-(55,4))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (53,4)-(53,6))
+ │ │ │ ├── opening_loc: (53,4)-(53,5) = ":"
+ │ │ │ ├── value_loc: (53,5)-(53,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (55,2)-(55,4))
+ │ │ ├── opening_loc: (55,2)-(55,3) = ":"
+ │ │ ├── value_loc: (55,3)-(55,4) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: (56,0)-(56,1) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (58,0)-(58,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (58,0)-(58,3) = "foo"
+ │ ├── opening_loc: (58,3)-(58,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (58,4)-(58,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (58,4)-(58,9))
+ │ │ ├── operator_loc: (58,4)-(58,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (58,5)-(58,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (58,5)-(58,9) = "rest"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "rest"
+ │ ├── closing_loc: (58,9)-(58,10) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (60,0)-(60,39))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (60,0)-(60,3) = "foo"
+ │ ├── opening_loc: (60,3)-(60,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (60,4)-(60,32))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (60,4)-(60,6))
+ │ │ │ ├── opening_loc: (60,4)-(60,5) = ":"
+ │ │ │ ├── value_loc: (60,5)-(60,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ KeywordHashNode (location: (60,8)-(60,32))
+ │ │ └── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (60,8)-(60,22))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (60,8)-(60,10))
+ │ │ │ │ ├── opening_loc: (60,8)-(60,9) = ":"
+ │ │ │ │ ├── value_loc: (60,9)-(60,10) = "h"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "h"
+ │ │ │ ├── value:
+ │ │ │ │ @ ArrayNode (location: (60,14)-(60,22))
+ │ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ │ ├── @ SymbolNode (location: (60,15)-(60,17))
+ │ │ │ │ │ │ ├── opening_loc: (60,15)-(60,16) = ":"
+ │ │ │ │ │ │ ├── value_loc: (60,16)-(60,17) = "x"
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: "x"
+ │ │ │ │ │ └── @ SymbolNode (location: (60,19)-(60,21))
+ │ │ │ │ │ ├── opening_loc: (60,19)-(60,20) = ":"
+ │ │ │ │ │ ├── value_loc: (60,20)-(60,21) = "y"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "y"
+ │ │ │ │ ├── opening_loc: (60,14)-(60,15) = "["
+ │ │ │ │ └── closing_loc: (60,21)-(60,22) = "]"
+ │ │ │ └── operator_loc: (60,11)-(60,13) = "=>"
+ │ │ └── @ AssocNode (location: (60,24)-(60,32))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (60,24)-(60,26))
+ │ │ │ ├── opening_loc: (60,24)-(60,25) = ":"
+ │ │ │ ├── value_loc: (60,25)-(60,26) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (60,30)-(60,32))
+ │ │ │ ├── opening_loc: (60,30)-(60,31) = ":"
+ │ │ │ ├── value_loc: (60,31)-(60,32) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── operator_loc: (60,27)-(60,29) = "=>"
+ │ ├── closing_loc: (60,39)-(60,40) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (60,34)-(60,39))
+ │ │ ├── expression:
+ │ │ │ @ SymbolNode (location: (60,35)-(60,39))
+ │ │ │ ├── opening_loc: (60,35)-(60,36) = ":"
+ │ │ │ ├── value_loc: (60,36)-(60,39) = "bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "bar"
+ │ │ └── operator_loc: (60,34)-(60,35) = "&"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (62,0)-(62,49))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (62,0)-(62,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (62,3)-(62,49))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (62,3)-(62,6))
+ │ │ │ └── flags: decimal
+ │ │ └── @ HashNode (location: (62,8)-(62,49))
+ │ │ ├── opening_loc: (62,8)-(62,9) = "{"
+ │ │ ├── elements: (length: 3)
+ │ │ │ ├── @ AssocNode (location: (62,10)-(62,27))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (62,10)-(62,16))
+ │ │ │ │ │ ├── opening_loc: (62,10)-(62,11) = ":"
+ │ │ │ │ │ ├── value_loc: (62,11)-(62,16) = "there"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "there"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ SymbolNode (location: (62,20)-(62,27))
+ │ │ │ │ │ ├── opening_loc: (62,20)-(62,21) = ":"
+ │ │ │ │ │ ├── value_loc: (62,21)-(62,27) = "friend"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "friend"
+ │ │ │ │ └── operator_loc: (62,17)-(62,19) = "=>"
+ │ │ │ ├── @ AssocSplatNode (location: (62,29)-(62,33))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ HashNode (location: (62,31)-(62,33))
+ │ │ │ │ │ ├── opening_loc: (62,31)-(62,32) = "{"
+ │ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ │ └── closing_loc: (62,32)-(62,33) = "}"
+ │ │ │ │ └── operator_loc: (62,29)-(62,31) = "**"
+ │ │ │ └── @ AssocNode (location: (62,35)-(62,47))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (62,35)-(62,42))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (62,35)-(62,41) = "whatup"
+ │ │ │ │ ├── closing_loc: (62,41)-(62,42) = ":"
+ │ │ │ │ └── unescaped: "whatup"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (62,43)-(62,47))
+ │ │ │ │ ├── opening_loc: (62,43)-(62,44) = ":"
+ │ │ │ │ ├── value_loc: (62,44)-(62,47) = "dog"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "dog"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (62,48)-(62,49) = "}"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "hi"
+ ├── @ CallNode (location: (64,0)-(64,36))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (64,0)-(64,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (64,4)-(64,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (64,4)-(64,6))
+ │ │ │ ├── opening_loc: (64,4)-(64,5) = ":"
+ │ │ │ ├── value_loc: (64,5)-(64,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ KeywordHashNode (location: (64,8)-(64,15))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (64,8)-(64,15))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (64,8)-(64,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (64,8)-(64,9) = "b"
+ │ │ │ ├── closing_loc: (64,9)-(64,10) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ TrueNode (location: (64,11)-(64,15))
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (64,16)-(64,36))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (64,19)-(64,25))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (64,20)-(64,24))
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (64,20)-(64,21))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (64,23)-(64,24))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (64,19)-(64,20) = "|"
+ │ │ │ └── closing_loc: (64,24)-(64,25) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (64,26)-(64,32))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (64,26)-(64,32))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (64,26)-(64,30) = "puts"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (64,31)-(64,32))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (64,31)-(64,32))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "puts"
+ │ │ ├── opening_loc: (64,16)-(64,18) = "do"
+ │ │ └── closing_loc: (64,33)-(64,36) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (66,0)-(66,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (66,0)-(66,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (66,3)-(66,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (66,3)-(66,17))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (66,3)-(66,17))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (66,3)-(66,9))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (66,3)-(66,8) = "there"
+ │ │ │ ├── closing_loc: (66,8)-(66,9) = ":"
+ │ │ │ └── unescaped: "there"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (66,10)-(66,17))
+ │ │ │ ├── opening_loc: (66,10)-(66,11) = ":"
+ │ │ │ ├── value_loc: (66,11)-(66,17) = "friend"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "friend"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "hi"
+ ├── @ CallNode (location: (68,0)-(68,40))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (68,0)-(68,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (68,3)-(68,40))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (68,3)-(68,40))
+ │ │ └── elements: (length: 3)
+ │ │ ├── @ AssocNode (location: (68,3)-(68,20))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (68,3)-(68,9))
+ │ │ │ │ ├── opening_loc: (68,3)-(68,4) = ":"
+ │ │ │ │ ├── value_loc: (68,4)-(68,9) = "there"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "there"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (68,13)-(68,20))
+ │ │ │ │ ├── opening_loc: (68,13)-(68,14) = ":"
+ │ │ │ │ ├── value_loc: (68,14)-(68,20) = "friend"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "friend"
+ │ │ │ └── operator_loc: (68,10)-(68,12) = "=>"
+ │ │ ├── @ AssocSplatNode (location: (68,22)-(68,26))
+ │ │ │ ├── value:
+ │ │ │ │ @ HashNode (location: (68,24)-(68,26))
+ │ │ │ │ ├── opening_loc: (68,24)-(68,25) = "{"
+ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ └── closing_loc: (68,25)-(68,26) = "}"
+ │ │ │ └── operator_loc: (68,22)-(68,24) = "**"
+ │ │ └── @ AssocNode (location: (68,28)-(68,40))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (68,28)-(68,35))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (68,28)-(68,34) = "whatup"
+ │ │ │ ├── closing_loc: (68,34)-(68,35) = ":"
+ │ │ │ └── unescaped: "whatup"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (68,36)-(68,40))
+ │ │ │ ├── opening_loc: (68,36)-(68,37) = ":"
+ │ │ │ ├── value_loc: (68,37)-(68,40) = "dog"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "dog"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "hi"
+ ├── @ CallNode (location: (70,0)-(70,41))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (70,0)-(70,2) = "hi"
+ │ ├── opening_loc: (70,2)-(70,3) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (70,3)-(70,40))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (70,3)-(70,40))
+ │ │ └── elements: (length: 3)
+ │ │ ├── @ AssocNode (location: (70,3)-(70,20))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (70,3)-(70,9))
+ │ │ │ │ ├── opening_loc: (70,3)-(70,4) = ":"
+ │ │ │ │ ├── value_loc: (70,4)-(70,9) = "there"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "there"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (70,13)-(70,20))
+ │ │ │ │ ├── opening_loc: (70,13)-(70,14) = ":"
+ │ │ │ │ ├── value_loc: (70,14)-(70,20) = "friend"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "friend"
+ │ │ │ └── operator_loc: (70,10)-(70,12) = "=>"
+ │ │ ├── @ AssocSplatNode (location: (70,22)-(70,26))
+ │ │ │ ├── value:
+ │ │ │ │ @ HashNode (location: (70,24)-(70,26))
+ │ │ │ │ ├── opening_loc: (70,24)-(70,25) = "{"
+ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ └── closing_loc: (70,25)-(70,26) = "}"
+ │ │ │ └── operator_loc: (70,22)-(70,24) = "**"
+ │ │ └── @ AssocNode (location: (70,28)-(70,40))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (70,28)-(70,35))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (70,28)-(70,34) = "whatup"
+ │ │ │ ├── closing_loc: (70,34)-(70,35) = ":"
+ │ │ │ └── unescaped: "whatup"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (70,36)-(70,40))
+ │ │ │ ├── opening_loc: (70,36)-(70,37) = ":"
+ │ │ │ ├── value_loc: (70,37)-(70,40) = "dog"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "dog"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (70,40)-(70,41) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "hi"
+ ├── @ CallNode (location: (72,0)-(72,35))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (72,0)-(72,3) = "foo"
+ │ ├── opening_loc: (72,3)-(72,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (72,4)-(72,26))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ HashNode (location: (72,4)-(72,26))
+ │ │ ├── opening_loc: (72,4)-(72,5) = "{"
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (72,6)-(72,13))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (72,6)-(72,8))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (72,6)-(72,7) = "a"
+ │ │ │ │ │ ├── closing_loc: (72,7)-(72,8) = ":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ TrueNode (location: (72,9)-(72,13))
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (72,15)-(72,23))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (72,15)-(72,17))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (72,15)-(72,16) = "b"
+ │ │ │ │ ├── closing_loc: (72,16)-(72,17) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ FalseNode (location: (72,18)-(72,23))
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (72,25)-(72,26) = "}"
+ │ ├── closing_loc: (72,35)-(72,36) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (72,28)-(72,35))
+ │ │ ├── expression:
+ │ │ │ @ SymbolNode (location: (72,29)-(72,35))
+ │ │ │ ├── opening_loc: (72,29)-(72,30) = ":"
+ │ │ │ ├── value_loc: (72,30)-(72,35) = "block"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "block"
+ │ │ └── operator_loc: (72,28)-(72,29) = "&"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (74,0)-(74,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (74,0)-(74,2) = "hi"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (74,3)-(74,20))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (74,3)-(74,20))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (74,3)-(74,20))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (74,3)-(74,9))
+ │ │ │ ├── opening_loc: (74,3)-(74,4) = ":"
+ │ │ │ ├── value_loc: (74,4)-(74,9) = "there"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "there"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (74,13)-(74,20))
+ │ │ │ ├── opening_loc: (74,13)-(74,14) = ":"
+ │ │ │ ├── value_loc: (74,14)-(74,20) = "friend"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "friend"
+ │ │ └── operator_loc: (74,10)-(74,12) = "=>"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "hi"
+ ├── @ CallNode (location: (76,0)-(78,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (76,0)-(76,3) = "foo"
+ │ ├── opening_loc: (76,3)-(76,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (76,4)-(77,2))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (76,4)-(76,6))
+ │ │ │ ├── opening_loc: (76,4)-(76,5) = ":"
+ │ │ │ ├── value_loc: (76,5)-(76,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (77,0)-(77,2))
+ │ │ ├── opening_loc: (77,0)-(77,1) = ":"
+ │ │ ├── value_loc: (77,1)-(77,2) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: (78,0)-(78,1) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (80,0)-(83,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (80,0)-(80,3) = "foo"
+ │ ├── opening_loc: (80,3)-(80,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (81,0)-(82,5))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (81,0)-(81,2))
+ │ │ │ ├── opening_loc: (81,0)-(81,1) = ":"
+ │ │ │ ├── value_loc: (81,1)-(81,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ KeywordHashNode (location: (82,0)-(82,5))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (82,0)-(82,5))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (82,0)-(82,2))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (82,0)-(82,1) = "b"
+ │ │ │ ├── closing_loc: (82,1)-(82,2) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (82,3)-(82,5))
+ │ │ │ ├── opening_loc: (82,3)-(82,4) = ":"
+ │ │ │ ├── value_loc: (82,4)-(82,5) = "c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "c"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (83,0)-(83,1) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (85,0)-(85,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (85,0)-(85,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (85,4)-(85,11))
+ │ │ ├── expression:
+ │ │ │ @ SymbolNode (location: (85,5)-(85,11))
+ │ │ │ ├── opening_loc: (85,5)-(85,6) = ":"
+ │ │ │ ├── value_loc: (85,6)-(85,11) = "block"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "block"
+ │ │ └── operator_loc: (85,4)-(85,5) = "&"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (87,0)-(87,30))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (87,0)-(87,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (87,4)-(87,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (87,4)-(87,21))
+ │ │ └── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (87,4)-(87,11))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (87,4)-(87,6))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (87,4)-(87,5) = "a"
+ │ │ │ │ ├── closing_loc: (87,5)-(87,6) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ TrueNode (location: (87,7)-(87,11))
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (87,13)-(87,21))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (87,13)-(87,15))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (87,13)-(87,14) = "b"
+ │ │ │ ├── closing_loc: (87,14)-(87,15) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ FalseNode (location: (87,16)-(87,21))
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (87,23)-(87,30))
+ │ │ ├── expression:
+ │ │ │ @ SymbolNode (location: (87,24)-(87,30))
+ │ │ │ ├── opening_loc: (87,24)-(87,25) = ":"
+ │ │ │ ├── value_loc: (87,25)-(87,30) = "block"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "block"
+ │ │ └── operator_loc: (87,23)-(87,24) = "&"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (89,0)-(89,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (89,0)-(89,9) = "some_func"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (89,10)-(89,21))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (89,10)-(89,11))
+ │ │ │ └── flags: decimal
+ │ │ └── @ KeywordHashNode (location: (89,13)-(89,21))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (89,13)-(89,21))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (89,13)-(89,19))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (89,13)-(89,18) = "kwarg"
+ │ │ │ ├── closing_loc: (89,18)-(89,19) = ":"
+ │ │ │ └── unescaped: "kwarg"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (89,20)-(89,21))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "some_func"
+ ├── @ CallNode (location: (91,0)-(91,18))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (91,0)-(91,6))
+ │ │ └── name: :Kernel
+ │ ├── call_operator_loc: (91,6)-(91,7) = "."
+ │ ├── message_loc: (91,7)-(91,14) = "Integer"
+ │ ├── opening_loc: (91,14)-(91,15) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (91,15)-(91,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (91,15)-(91,17))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (91,17)-(91,18) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Integer"
+ ├── @ CallNode (location: (93,0)-(93,10))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (93,0)-(93,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (93,0)-(93,1) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "x"
+ │ ├── call_operator_loc: (93,1)-(93,2) = "."
+ │ ├── message_loc: (93,2)-(93,6) = "each"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (93,7)-(93,10))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (93,7)-(93,8) = "{"
+ │ │ └── closing_loc: (93,9)-(93,10) = "}"
+ │ ├── flags: ∅
+ │ └── name: "each"
+ ├── @ CallNode (location: (95,0)-(95,14))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (95,0)-(95,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (95,0)-(95,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (95,3)-(95,4) = "."
+ │ ├── message_loc: (95,4)-(95,7) = "map"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (95,8)-(95,14))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (95,10)-(95,12))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ BackReferenceReadNode (location: (95,10)-(95,12))
+ │ │ ├── opening_loc: (95,8)-(95,9) = "{"
+ │ │ └── closing_loc: (95,13)-(95,14) = "}"
+ │ ├── flags: ∅
+ │ └── name: "map"
+ ├── @ CallNode (location: (97,0)-(97,12))
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (97,0)-(97,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (97,0)-(97,1))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (97,3)-(97,4))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (97,1)-(97,3) = "::"
+ │ ├── call_operator_loc: (97,4)-(97,6) = "::"
+ │ ├── message_loc: (97,6)-(97,7) = "C"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (97,8)-(97,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (97,8)-(97,12))
+ │ │ ├── opening_loc: (97,8)-(97,9) = ":"
+ │ │ ├── value_loc: (97,9)-(97,12) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "C"
+ ├── @ CallNode (location: (99,0)-(99,13))
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (99,0)-(99,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (99,0)-(99,1))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (99,3)-(99,4))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (99,1)-(99,3) = "::"
+ │ ├── call_operator_loc: (99,4)-(99,6) = "::"
+ │ ├── message_loc: (99,6)-(99,7) = "C"
+ │ ├── opening_loc: (99,7)-(99,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (99,8)-(99,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (99,8)-(99,12))
+ │ │ ├── opening_loc: (99,8)-(99,9) = ":"
+ │ │ ├── value_loc: (99,9)-(99,12) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── closing_loc: (99,12)-(99,13) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "C"
+ ├── @ CallNode (location: (101,0)-(101,17))
+ │ ├── receiver:
+ │ │ @ ConstantPathNode (location: (101,0)-(101,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (101,0)-(101,1))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (101,3)-(101,4))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (101,1)-(101,3) = "::"
+ │ ├── call_operator_loc: (101,4)-(101,6) = "::"
+ │ ├── message_loc: (101,6)-(101,7) = "C"
+ │ ├── opening_loc: (101,7)-(101,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (101,8)-(101,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (101,8)-(101,12))
+ │ │ ├── opening_loc: (101,8)-(101,9) = ":"
+ │ │ ├── value_loc: (101,9)-(101,12) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── closing_loc: (101,12)-(101,13) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (101,14)-(101,17))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (101,14)-(101,15) = "{"
+ │ │ └── closing_loc: (101,16)-(101,17) = "}"
+ │ ├── flags: ∅
+ │ └── name: "C"
+ ├── @ CallNode (location: (103,0)-(103,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (103,0)-(103,3) = "foo"
+ │ ├── opening_loc: (103,3)-(103,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (103,4)-(103,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (103,4)-(103,11))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (103,4)-(103,11))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (103,4)-(103,8))
+ │ │ │ ├── opening_loc: (103,4)-(103,5) = "\""
+ │ │ │ ├── value_loc: (103,5)-(103,6) = "a"
+ │ │ │ ├── closing_loc: (103,6)-(103,8) = "\":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (103,9)-(103,11))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (103,11)-(103,12) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (105,0)-(105,28))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (105,0)-(105,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (105,4)-(105,28))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (105,4)-(105,28))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (105,4)-(105,28))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (105,4)-(105,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (105,4)-(105,7) = "bar"
+ │ │ │ ├── closing_loc: (105,7)-(105,8) = ":"
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── value:
+ │ │ │ @ HashNode (location: (105,9)-(105,28))
+ │ │ │ ├── opening_loc: (105,9)-(105,10) = "{"
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (105,11)-(105,26))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (105,11)-(105,15))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (105,11)-(105,14) = "baz"
+ │ │ │ │ │ ├── closing_loc: (105,14)-(105,15) = ":"
+ │ │ │ │ │ └── unescaped: "baz"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (105,16)-(105,26))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (105,16)-(105,19) = "qux"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (105,20)-(105,26))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── opening_loc: (105,20)-(105,22) = "do"
+ │ │ │ │ │ │ └── closing_loc: (105,23)-(105,26) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "qux"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── closing_loc: (105,27)-(105,28) = "}"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (107,0)-(107,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (107,0)-(107,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (107,4)-(107,24))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (107,4)-(107,24))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (107,4)-(107,24))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (107,4)-(107,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (107,4)-(107,7) = "bar"
+ │ │ │ ├── closing_loc: (107,7)-(107,8) = ":"
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── value:
+ │ │ │ @ HashNode (location: (107,9)-(107,24))
+ │ │ │ ├── opening_loc: (107,9)-(107,10) = "{"
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ AssocSplatNode (location: (107,11)-(107,22))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (107,13)-(107,22))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (107,13)-(107,15) = "kw"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (107,16)-(107,22))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── opening_loc: (107,16)-(107,18) = "do"
+ │ │ │ │ │ │ └── closing_loc: (107,19)-(107,22) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "kw"
+ │ │ │ │ └── operator_loc: (107,11)-(107,13) = "**"
+ │ │ │ └── closing_loc: (107,23)-(107,24) = "}"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (109,0)-(109,36))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (109,0)-(109,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (109,4)-(109,29))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (109,4)-(109,29))
+ │ │ ├── opening_loc: (109,4)-(109,5) = "\""
+ │ │ ├── parts: (length: 1)
+ │ │ │ └── @ EmbeddedStatementsNode (location: (109,5)-(109,28))
+ │ │ │ ├── opening_loc: (109,5)-(109,7) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (109,7)-(109,27))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (109,7)-(109,27))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (109,7)-(109,10))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (109,7)-(109,10) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ ├── call_operator_loc: (109,10)-(109,11) = "."
+ │ │ │ │ ├── message_loc: (109,11)-(109,14) = "map"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (109,15)-(109,27))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body:
+ │ │ │ │ │ │ @ StatementsNode (location: (109,18)-(109,23))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ StringNode (location: (109,18)-(109,23))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ ├── opening_loc: (109,18)-(109,19) = "\""
+ │ │ │ │ │ │ ├── content_loc: (109,19)-(109,22) = "baz"
+ │ │ │ │ │ │ ├── closing_loc: (109,22)-(109,23) = "\""
+ │ │ │ │ │ │ └── unescaped: "baz"
+ │ │ │ │ │ ├── opening_loc: (109,15)-(109,17) = "do"
+ │ │ │ │ │ └── closing_loc: (109,24)-(109,27) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "map"
+ │ │ │ └── closing_loc: (109,27)-(109,28) = "}"
+ │ │ └── closing_loc: (109,28)-(109,29) = "\""
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (109,30)-(109,36))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (109,30)-(109,32) = "do"
+ │ │ └── closing_loc: (109,33)-(109,36) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (111,0)-(111,28))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (111,0)-(111,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (111,4)-(111,28))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ClassNode (location: (111,4)-(111,28))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (111,4)-(111,9) = "class"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (111,10)-(111,13))
+ │ │ │ └── name: :Bar
+ │ │ ├── inheritance_operator_loc: ∅
+ │ │ ├── superclass: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (111,14)-(111,24))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (111,14)-(111,24))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (111,14)-(111,17) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (111,18)-(111,24))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (111,18)-(111,20) = "do"
+ │ │ │ │ └── closing_loc: (111,21)-(111,24) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "baz"
+ │ │ ├── end_keyword_loc: (111,25)-(111,28) = "end"
+ │ │ └── name: :Bar
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (113,0)-(113,29))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (113,0)-(113,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (113,4)-(113,29))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ModuleNode (location: (113,4)-(113,29))
+ │ │ ├── locals: []
+ │ │ ├── module_keyword_loc: (113,4)-(113,10) = "module"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (113,11)-(113,14))
+ │ │ │ └── name: :Bar
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (113,15)-(113,25))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (113,15)-(113,25))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (113,15)-(113,18) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (113,19)-(113,25))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (113,19)-(113,21) = "do"
+ │ │ │ │ └── closing_loc: (113,22)-(113,25) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "baz"
+ │ │ ├── end_keyword_loc: (113,26)-(113,29) = "end"
+ │ │ └── name: :Bar
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (115,0)-(115,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (115,0)-(115,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (115,4)-(115,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ArrayNode (location: (115,4)-(115,16))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ CallNode (location: (115,5)-(115,15))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (115,5)-(115,8) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (115,9)-(115,15))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (115,9)-(115,11) = "do"
+ │ │ │ │ └── closing_loc: (115,12)-(115,15) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "baz"
+ │ │ ├── opening_loc: (115,4)-(115,5) = "["
+ │ │ └── closing_loc: (115,15)-(115,16) = "]"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (117,0)-(117,28))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (117,0)-(117,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (117,2)-(117,28))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ BeginNode (location: (117,2)-(117,28))
+ │ │ ├── begin_keyword_loc: (117,2)-(117,7) = "begin"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (117,8)-(117,24))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (117,8)-(117,24))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ IntegerNode (location: (117,8)-(117,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── call_operator_loc: (117,9)-(117,10) = "."
+ │ │ │ ├── message_loc: (117,10)-(117,15) = "times"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (117,16)-(117,24))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (117,19)-(117,20))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (117,19)-(117,20))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── opening_loc: (117,16)-(117,18) = "do"
+ │ │ │ │ └── closing_loc: (117,21)-(117,24) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "times"
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (117,25)-(117,28) = "end"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (119,0)-(124,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (119,0)-(119,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (119,4)-(124,5))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (119,4)-(119,6))
+ │ │ │ ├── opening_loc: (119,4)-(119,5) = ":"
+ │ │ │ ├── value_loc: (119,5)-(119,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ IfNode (location: (120,2)-(124,5))
+ │ │ ├── if_keyword_loc: (120,2)-(120,4) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (120,5)-(120,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (120,5)-(120,6) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "x"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (121,4)-(123,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (121,4)-(123,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (121,4)-(121,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (121,8)-(123,7))
+ │ │ │ │ ├── locals: [:a]
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ BlockParametersNode (location: (121,11)-(121,14))
+ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ @ ParametersNode (location: (121,12)-(121,13))
+ │ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (121,12)-(121,13))
+ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ │ ├── opening_loc: (121,11)-(121,12) = "|"
+ │ │ │ │ │ └── closing_loc: (121,13)-(121,14) = "|"
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (122,6)-(122,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ LocalVariableReadNode (location: (122,6)-(122,7))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── opening_loc: (121,8)-(121,10) = "do"
+ │ │ │ │ └── closing_loc: (123,4)-(123,7) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "bar"
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: (124,2)-(124,5) = "end"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (126,0)-(135,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (126,0)-(126,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (126,4)-(135,5))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ SymbolNode (location: (126,4)-(126,6))
+ │ │ │ ├── opening_loc: (126,4)-(126,5) = ":"
+ │ │ │ ├── value_loc: (126,5)-(126,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ WhileNode (location: (127,2)-(131,5))
+ │ │ │ ├── keyword_loc: (127,2)-(127,7) = "while"
+ │ │ │ ├── closing_loc: (131,2)-(131,5) = "end"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ CallNode (location: (127,8)-(127,9))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (127,8)-(127,9) = "x"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "x"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (128,4)-(130,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (128,4)-(130,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (128,4)-(128,7) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (128,8)-(130,7))
+ │ │ │ │ │ ├── locals: [:a]
+ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ @ BlockParametersNode (location: (128,11)-(128,14))
+ │ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ │ @ ParametersNode (location: (128,12)-(128,13))
+ │ │ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (128,12)-(128,13))
+ │ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ │ │ ├── opening_loc: (128,11)-(128,12) = "|"
+ │ │ │ │ │ │ └── closing_loc: (128,13)-(128,14) = "|"
+ │ │ │ │ │ ├── body:
+ │ │ │ │ │ │ @ StatementsNode (location: (129,6)-(129,7))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ LocalVariableReadNode (location: (129,6)-(129,7))
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ ├── opening_loc: (128,8)-(128,10) = "do"
+ │ │ │ │ │ └── closing_loc: (130,4)-(130,7) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── flags: ∅
+ │ │ └── @ UntilNode (location: (132,2)-(135,5))
+ │ │ ├── keyword_loc: (132,2)-(132,7) = "until"
+ │ │ ├── closing_loc: (135,2)-(135,5) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (132,8)-(132,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (132,8)-(132,9) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "x"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (133,4)-(134,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (133,4)-(134,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (133,4)-(133,7) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (133,8)-(134,7))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (133,8)-(133,10) = "do"
+ │ │ │ │ └── closing_loc: (134,4)-(134,7) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "baz"
+ │ │ └── flags: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (137,0)-(137,9))
+ │ ├── receiver:
+ │ │ @ HashNode (location: (137,0)-(137,2))
+ │ │ ├── opening_loc: (137,0)-(137,1) = "{"
+ │ │ ├── elements: (length: 0)
+ │ │ └── closing_loc: (137,1)-(137,2) = "}"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (137,3)-(137,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (137,5)-(137,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (137,5)-(137,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (137,5)-(137,6) = "A"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (137,7)-(137,9))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (137,7)-(137,8) = "{"
+ │ │ │ └── closing_loc: (137,8)-(137,9) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "A"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ CallNode (location: (139,0)-(139,16))
+ │ ├── receiver:
+ │ │ @ HashNode (location: (139,0)-(139,2))
+ │ │ ├── opening_loc: (139,0)-(139,1) = "{"
+ │ │ ├── elements: (length: 0)
+ │ │ └── closing_loc: (139,1)-(139,2) = "}"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (139,3)-(139,4) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (139,5)-(139,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (139,5)-(139,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (139,5)-(139,6) = "A"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (139,7)-(139,16))
+ │ │ │ ├── locals: [:a]
+ │ │ │ ├── parameters:
+ │ │ │ │ @ BlockParametersNode (location: (139,9)-(139,12))
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ ParametersNode (location: (139,10)-(139,11))
+ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (139,10)-(139,11))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ ├── opening_loc: (139,9)-(139,10) = "|"
+ │ │ │ │ └── closing_loc: (139,11)-(139,12) = "|"
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (139,13)-(139,14))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (139,13)-(139,14))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── opening_loc: (139,7)-(139,8) = "{"
+ │ │ │ └── closing_loc: (139,15)-(139,16) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "A"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ CallNode (location: (141,0)-(141,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (141,0)-(141,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (141,0)-(141,1) = "A"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (141,2)-(141,4))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (141,2)-(141,3) = "{"
+ │ │ │ └── closing_loc: (141,3)-(141,4) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "A"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (141,5)-(141,6) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (141,7)-(141,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (141,7)-(141,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (141,7)-(141,8) = "A"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (141,9)-(141,11))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (141,9)-(141,10) = "{"
+ │ │ │ └── closing_loc: (141,10)-(141,11) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "A"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ CallNode (location: (143,0)-(143,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (143,0)-(143,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (143,0)-(143,3) = "lst"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "lst"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (143,4)-(143,6) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (143,7)-(143,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (143,7)-(143,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (143,7)-(143,8) = "A"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (143,9)-(143,11))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (143,9)-(143,10) = "{"
+ │ │ │ └── closing_loc: (143,10)-(143,11) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "A"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<<"
+ ├── @ InterpolatedStringNode (location: (145,0)-(145,17))
+ │ ├── opening_loc: (145,0)-(145,1) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (145,1)-(145,16))
+ │ │ ├── opening_loc: (145,1)-(145,3) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (145,4)-(145,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (145,4)-(145,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (145,4)-(145,8) = "join"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (145,9)-(145,14))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ParenthesesNode (location: (145,9)-(145,14))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (145,10)-(145,13))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (145,10)-(145,13))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: (145,10)-(145,11) = "\""
+ │ │ │ │ │ ├── content_loc: (145,11)-(145,12) = " "
+ │ │ │ │ │ ├── closing_loc: (145,12)-(145,13) = "\""
+ │ │ │ │ │ └── unescaped: " "
+ │ │ │ │ ├── opening_loc: (145,9)-(145,10) = "("
+ │ │ │ │ └── closing_loc: (145,13)-(145,14) = ")"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "join"
+ │ │ └── closing_loc: (145,15)-(145,16) = "}"
+ │ └── closing_loc: (145,16)-(145,17) = "\""
+ └── @ InterpolatedStringNode (location: (147,0)-(147,8))
+ ├── opening_loc: (147,0)-(147,1) = "\""
+ ├── parts: (length: 1)
+ │ └── @ EmbeddedStatementsNode (location: (147,1)-(147,7))
+ │ ├── opening_loc: (147,1)-(147,3) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (147,3)-(147,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (147,3)-(147,6))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (147,4)-(147,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (147,4)-(147,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (147,4)-(147,5) = "v"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "v"
+ │ │ ├── opening_loc: (147,3)-(147,4) = "("
+ │ │ └── closing_loc: (147,5)-(147,6) = ")"
+ │ └── closing_loc: (147,6)-(147,7) = "}"
+ └── closing_loc: (147,7)-(147,8) = "\""
diff --git a/test/prism/snapshots/methods.txt b/test/prism/snapshots/methods.txt
new file mode 100644
index 0000000000..7e8091b4d5
--- /dev/null
+++ b/test/prism/snapshots/methods.txt
@@ -0,0 +1,1642 @@
+@ ProgramNode (location: (1,0)-(168,16))
+├── locals: [:a, :c, :foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(168,16))
+ └── body: (length: 62)
+ ├── @ DefNode (location: (1,0)-(2,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,8)-(1,18))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,18))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,12))
+ │ │ │ │ │ └── name: :bar
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,17))
+ │ │ │ │ └── name: :baz
+ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ └── closing_loc: (1,17)-(1,18) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar, :baz]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ ├── rparen_loc: (1,18)-(1,19) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (2,0)-(2,3) = "end"
+ ├── @ DefNode (location: (4,0)-(5,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (4,4)-(4,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (4,8)-(4,44))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (4,8)-(4,18))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (4,9)-(4,12))
+ │ │ │ │ │ └── name: :bar
+ │ │ │ │ └── @ RequiredParameterNode (location: (4,14)-(4,17))
+ │ │ │ │ └── name: :baz
+ │ │ │ ├── opening_loc: (4,8)-(4,9) = "("
+ │ │ │ └── closing_loc: (4,17)-(4,18) = ")"
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (4,20)-(4,32))
+ │ │ │ ├── name: :optional
+ │ │ │ ├── name_loc: (4,20)-(4,28) = "optional"
+ │ │ │ ├── operator_loc: (4,29)-(4,30) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (4,31)-(4,32))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (4,34)-(4,44))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (4,35)-(4,38))
+ │ │ │ │ │ └── name: :bin
+ │ │ │ │ └── @ RequiredParameterNode (location: (4,40)-(4,43))
+ │ │ │ │ └── name: :bag
+ │ │ │ ├── opening_loc: (4,34)-(4,35) = "("
+ │ │ │ └── closing_loc: (4,43)-(4,44) = ")"
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar, :baz, :optional, :bin, :bag]
+ │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (4,7)-(4,8) = "("
+ │ ├── rparen_loc: (4,44)-(4,45) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ DefNode (location: (8,0)-(8,18))
+ │ ├── name: :a
+ │ ├── name_loc: (8,4)-(8,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (8,7)-(8,18))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (8,7)-(8,18))
+ │ │ │ ├── ensure_keyword_loc: (8,7)-(8,13) = "ensure"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── end_keyword_loc: (8,15)-(8,18) = "end"
+ │ │ └── end_keyword_loc: (8,15)-(8,18) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (8,15)-(8,18) = "end"
+ ├── @ DefNode (location: (10,0)-(11,3))
+ │ ├── name: :a
+ │ ├── name_loc: (10,8)-(10,9) = "a"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (10,4)-(10,7))
+ │ │ ├── body:
+ │ │ │ @ CallNode (location: (10,5)-(10,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (10,5)-(10,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── opening_loc: (10,4)-(10,5) = "("
+ │ │ └── closing_loc: (10,6)-(10,7) = ")"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (10,0)-(10,3) = "def"
+ │ ├── operator_loc: (10,7)-(10,8) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ DefNode (location: (13,0)-(14,3))
+ │ ├── name: :b
+ │ ├── name_loc: (13,9)-(13,10) = "b"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (13,4)-(13,7))
+ │ │ ├── body:
+ │ │ │ @ CallNode (location: (13,5)-(13,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,5)-(13,6) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── opening_loc: (13,4)-(13,5) = "("
+ │ │ └── closing_loc: (13,6)-(13,7) = ")"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ │ ├── operator_loc: (13,7)-(13,9) = "::"
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (14,0)-(14,3) = "end"
+ ├── @ DefNode (location: (16,0)-(17,3))
+ │ ├── name: :a
+ │ ├── name_loc: (16,10)-(16,11) = "a"
+ │ ├── receiver:
+ │ │ @ FalseNode (location: (16,4)-(16,9))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (16,0)-(16,3) = "def"
+ │ ├── operator_loc: (16,9)-(16,10) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ ├── @ DefNode (location: (19,0)-(20,3))
+ │ ├── name: :a
+ │ ├── name_loc: (19,4)-(19,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (19,6)-(19,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (19,6)-(19,9))
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (19,0)-(19,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (19,5)-(19,6) = "("
+ │ ├── rparen_loc: (19,9)-(19,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (20,0)-(20,3) = "end"
+ ├── @ DefNode (location: (22,0)-(23,3))
+ │ ├── name: :a
+ │ ├── name_loc: (22,9)-(22,10) = "a"
+ │ ├── receiver:
+ │ │ @ GlobalVariableReadNode (location: (22,4)-(22,8))
+ │ │ └── name: :$var
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
+ │ ├── operator_loc: (22,8)-(22,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (23,0)-(23,3) = "end"
+ ├── @ DefNode (location: (25,0)-(26,3))
+ │ ├── name: :b
+ │ ├── name_loc: (25,6)-(25,7) = "b"
+ │ ├── receiver:
+ │ │ @ CallNode (location: (25,4)-(25,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (25,4)-(25,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
+ │ ├── operator_loc: (25,5)-(25,6) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (26,0)-(26,3) = "end"
+ ├── @ DefNode (location: (28,0)-(29,3))
+ │ ├── name: :a
+ │ ├── name_loc: (28,9)-(28,10) = "a"
+ │ ├── receiver:
+ │ │ @ InstanceVariableReadNode (location: (28,4)-(28,8))
+ │ │ └── name: :@var
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (28,0)-(28,3) = "def"
+ │ ├── operator_loc: (28,8)-(28,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (29,0)-(29,3) = "end"
+ ├── @ DefNode (location: (31,0)-(31,13))
+ │ ├── name: :a
+ │ ├── name_loc: (31,4)-(31,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (31,6)-(31,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (31,6)-(31,8))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (31,6)-(31,8) = "b:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (31,0)-(31,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (31,10)-(31,13) = "end"
+ ├── @ StringNode (location: (33,0)-(33,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (33,0)-(33,2) = "%,"
+ │ ├── content_loc: (33,2)-(33,5) = "abc"
+ │ ├── closing_loc: (33,5)-(33,6) = ","
+ │ └── unescaped: "abc"
+ ├── @ DefNode (location: (35,0)-(36,3))
+ │ ├── name: :a
+ │ ├── name_loc: (35,4)-(35,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (35,6)-(35,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (35,6)-(35,8))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (35,6)-(35,8) = "b:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (35,0)-(35,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (35,5)-(35,6) = "("
+ │ ├── rparen_loc: (35,8)-(35,9) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (36,0)-(36,3) = "end"
+ ├── @ DefNode (location: (38,0)-(39,3))
+ │ ├── name: :a
+ │ ├── name_loc: (38,4)-(38,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (38,6)-(38,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (38,6)-(38,9))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (38,8)-(38,9) = "b"
+ │ │ │ └── operator_loc: (38,6)-(38,8) = "**"
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (38,0)-(38,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (38,5)-(38,6) = "("
+ │ ├── rparen_loc: (38,9)-(38,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (39,0)-(39,3) = "end"
+ ├── @ DefNode (location: (41,0)-(42,3))
+ │ ├── name: :a
+ │ ├── name_loc: (41,4)-(41,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (41,6)-(41,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (41,6)-(41,8))
+ │ │ │ ├── name: nil
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (41,6)-(41,8) = "**"
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:**]
+ │ ├── def_keyword_loc: (41,0)-(41,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (41,5)-(41,6) = "("
+ │ ├── rparen_loc: (41,8)-(41,9) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
+ ├── @ LocalVariableWriteNode (location: (44,0)-(44,5))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (44,0)-(44,1) = "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (44,4)-(44,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (44,2)-(44,3) = "="
+ ├── @ DefNode (location: (44,7)-(45,3))
+ │ ├── name: :a
+ │ ├── name_loc: (44,11)-(44,12) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (44,7)-(44,10) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (45,0)-(45,3) = "end"
+ ├── @ DefNode (location: (47,0)-(48,3))
+ │ ├── name: :a
+ │ ├── name_loc: (47,4)-(47,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (47,6)-(47,13))
+ │ │ ├── requireds: (length: 3)
+ │ │ │ ├── @ RequiredParameterNode (location: (47,6)-(47,7))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── @ RequiredParameterNode (location: (47,9)-(47,10))
+ │ │ │ │ └── name: :c
+ │ │ │ └── @ RequiredParameterNode (location: (47,12)-(47,13))
+ │ │ │ └── name: :d
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b, :c, :d]
+ │ ├── def_keyword_loc: (47,0)-(47,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (48,0)-(48,3) = "end"
+ ├── @ DefNode (location: (50,0)-(51,3))
+ │ ├── name: :a
+ │ ├── name_loc: (50,8)-(50,9) = "a"
+ │ ├── receiver:
+ │ │ @ NilNode (location: (50,4)-(50,7))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (50,0)-(50,3) = "def"
+ │ ├── operator_loc: (50,7)-(50,8) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
+ ├── @ DefNode (location: (53,0)-(54,3))
+ │ ├── name: :a
+ │ ├── name_loc: (53,4)-(53,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (53,6)-(53,14))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ KeywordParameterNode (location: (53,6)-(53,8))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (53,6)-(53,8) = "b:"
+ │ │ │ │ └── value: ∅
+ │ │ │ └── @ KeywordParameterNode (location: (53,10)-(53,14))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (53,10)-(53,12) = "c:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (53,13)-(53,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b, :c]
+ │ ├── def_keyword_loc: (53,0)-(53,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (54,0)-(54,3) = "end"
+ ├── @ DefNode (location: (56,0)-(57,3))
+ │ ├── name: :a
+ │ ├── name_loc: (56,4)-(56,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (56,6)-(56,14))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ KeywordParameterNode (location: (56,6)-(56,8))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (56,6)-(56,8) = "b:"
+ │ │ │ │ └── value: ∅
+ │ │ │ └── @ KeywordParameterNode (location: (56,10)-(56,14))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (56,10)-(56,12) = "c:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (56,13)-(56,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b, :c]
+ │ ├── def_keyword_loc: (56,0)-(56,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (56,5)-(56,6) = "("
+ │ ├── rparen_loc: (56,14)-(56,15) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (57,0)-(57,3) = "end"
+ ├── @ DefNode (location: (59,0)-(61,3))
+ │ ├── name: :a
+ │ ├── name_loc: (59,4)-(59,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (59,6)-(60,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ KeywordParameterNode (location: (59,6)-(60,3))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (59,6)-(59,8) = "b:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (60,2)-(60,3))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ KeywordParameterNode (location: (60,5)-(60,7))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (60,5)-(60,7) = "c:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b, :c]
+ │ ├── def_keyword_loc: (59,0)-(59,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (59,5)-(59,6) = "("
+ │ ├── rparen_loc: (60,7)-(60,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (61,0)-(61,3) = "end"
+ ├── @ StringNode (location: (63,0)-(63,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (63,0)-(63,2) = "%."
+ │ ├── content_loc: (63,2)-(63,5) = "abc"
+ │ ├── closing_loc: (63,5)-(63,6) = "."
+ │ └── unescaped: "abc"
+ ├── @ DefNode (location: (65,0)-(66,3))
+ │ ├── name: :a
+ │ ├── name_loc: (65,4)-(65,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (65,6)-(65,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 2)
+ │ │ │ ├── @ OptionalParameterNode (location: (65,6)-(65,11))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (65,6)-(65,7) = "b"
+ │ │ │ │ ├── operator_loc: (65,8)-(65,9) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (65,10)-(65,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ OptionalParameterNode (location: (65,13)-(65,18))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (65,13)-(65,14) = "c"
+ │ │ │ ├── operator_loc: (65,15)-(65,16) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (65,17)-(65,18))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b, :c]
+ │ ├── def_keyword_loc: (65,0)-(65,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (66,0)-(66,3) = "end"
+ ├── @ DefNode (location: (68,0)-(69,3))
+ │ ├── name: :a
+ │ ├── name_loc: (68,4)-(68,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (68,0)-(68,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (68,5)-(68,6) = "("
+ │ ├── rparen_loc: (68,6)-(68,7) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (69,0)-(69,3) = "end"
+ ├── @ DefNode (location: (71,0)-(72,3))
+ │ ├── name: :a
+ │ ├── name_loc: (71,4)-(71,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (71,6)-(71,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (71,6)-(71,7))
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (71,9)-(71,14))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (71,9)-(71,10) = "c"
+ │ │ │ ├── operator_loc: (71,11)-(71,12) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (71,13)-(71,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b, :c]
+ │ ├── def_keyword_loc: (71,0)-(71,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (72,0)-(72,3) = "end"
+ ├── @ DefNode (location: (74,0)-(75,3))
+ │ ├── name: :a
+ │ ├── name_loc: (74,4)-(74,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (74,6)-(74,7))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (74,6)-(74,7))
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (74,0)-(74,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (75,0)-(75,3) = "end"
+ ├── @ DefNode (location: (77,0)-(77,32))
+ │ ├── name: :a
+ │ ├── name_loc: (77,4)-(77,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (77,7)-(77,32))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (77,7)-(77,13))
+ │ │ │ ├── keyword_loc: (77,7)-(77,13) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause:
+ │ │ │ @ ElseNode (location: (77,15)-(77,27))
+ │ │ │ ├── else_keyword_loc: (77,15)-(77,19) = "else"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── end_keyword_loc: (77,21)-(77,27) = "ensure"
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (77,21)-(77,32))
+ │ │ │ ├── ensure_keyword_loc: (77,21)-(77,27) = "ensure"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── end_keyword_loc: (77,29)-(77,32) = "end"
+ │ │ └── end_keyword_loc: (77,29)-(77,32) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (77,0)-(77,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (77,29)-(77,32) = "end"
+ ├── @ DefNode (location: (79,0)-(80,3))
+ │ ├── name: :a
+ │ ├── name_loc: (79,4)-(79,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (79,6)-(79,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (79,6)-(79,8))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (79,7)-(79,8) = "b"
+ │ │ │ └── operator_loc: (79,6)-(79,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (79,0)-(79,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (80,0)-(80,3) = "end"
+ ├── @ DefNode (location: (82,0)-(83,3))
+ │ ├── name: :a
+ │ ├── name_loc: (82,4)-(82,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (82,6)-(82,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (82,6)-(82,7))
+ │ │ │ ├── name: nil
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (82,6)-(82,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:*]
+ │ ├── def_keyword_loc: (82,0)-(82,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (82,5)-(82,6) = "("
+ │ ├── rparen_loc: (82,7)-(82,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (83,0)-(83,3) = "end"
+ ├── @ DefNode (location: (85,0)-(87,3))
+ │ ├── name: :a
+ │ ├── name_loc: (85,4)-(85,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (86,0)-(86,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (86,0)-(86,5))
+ │ │ ├── name: :b
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (86,0)-(86,1) = "b"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (86,4)-(86,5))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (86,2)-(86,3) = "="
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (85,0)-(85,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (87,0)-(87,3) = "end"
+ ├── @ DefNode (location: (89,0)-(90,3))
+ │ ├── name: :a
+ │ ├── name_loc: (89,9)-(89,10) = "a"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (89,4)-(89,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (89,0)-(89,3) = "def"
+ │ ├── operator_loc: (89,8)-(89,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (90,0)-(90,3) = "end"
+ ├── @ DefNode (location: (92,0)-(93,3))
+ │ ├── name: :a
+ │ ├── name_loc: (92,9)-(92,10) = "a"
+ │ ├── receiver:
+ │ │ @ TrueNode (location: (92,4)-(92,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (92,0)-(92,3) = "def"
+ │ ├── operator_loc: (92,8)-(92,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
+ ├── @ DefNode (location: (95,0)-(96,3))
+ │ ├── name: :a
+ │ ├── name_loc: (95,4)-(95,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (95,0)-(95,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (96,0)-(96,3) = "end"
+ ├── @ DefNode (location: (98,0)-(101,3))
+ │ ├── name: :hi
+ │ ├── name_loc: (98,4)-(98,6) = "hi"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (99,0)-(100,4))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ IfNode (location: (99,0)-(99,18))
+ │ │ │ ├── if_keyword_loc: (99,11)-(99,13) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ TrueNode (location: (99,14)-(99,18))
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (99,0)-(99,10))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ReturnNode (location: (99,0)-(99,10))
+ │ │ │ │ ├── keyword_loc: (99,0)-(99,6) = "return"
+ │ │ │ │ └── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (99,7)-(99,10))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (99,7)-(99,10))
+ │ │ │ │ ├── opening_loc: (99,7)-(99,8) = ":"
+ │ │ │ │ ├── value_loc: (99,8)-(99,10) = "hi"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "hi"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ └── @ SymbolNode (location: (100,0)-(100,4))
+ │ │ ├── opening_loc: (100,0)-(100,1) = ":"
+ │ │ ├── value_loc: (100,1)-(100,4) = "bye"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bye"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (98,0)-(98,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (101,0)-(101,3) = "end"
+ ├── @ DefNode (location: (103,0)-(103,11))
+ │ ├── name: :foo
+ │ ├── name_loc: (103,4)-(103,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (103,10)-(103,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (103,10)-(103,11))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (103,0)-(103,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (103,8)-(103,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (104,0)-(104,11))
+ │ ├── name: :bar
+ │ ├── name_loc: (104,4)-(104,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (104,10)-(104,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (104,10)-(104,11))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (104,0)-(104,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (104,8)-(104,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (106,0)-(106,18))
+ │ ├── name: :foo
+ │ ├── name_loc: (106,4)-(106,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (106,8)-(106,11))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (106,8)-(106,11))
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (106,15)-(106,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (106,15)-(106,18))
+ │ │ └── flags: decimal
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (106,0)-(106,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (106,7)-(106,8) = "("
+ │ ├── rparen_loc: (106,11)-(106,12) = ")"
+ │ ├── equal_loc: (106,13)-(106,14) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (108,0)-(108,13))
+ │ ├── name: :foo
+ │ ├── name_loc: (108,4)-(108,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (108,10)-(108,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (108,10)-(108,13))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (108,0)-(108,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (108,8)-(108,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (110,0)-(110,19))
+ │ ├── name: :a
+ │ ├── name_loc: (110,4)-(110,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (110,6)-(110,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (110,6)-(110,7))
+ │ │ │ ├── name: nil
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (110,6)-(110,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (110,10)-(110,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (110,10)-(110,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (110,10)-(110,11) = "b"
+ │ │ ├── opening_loc: (110,11)-(110,12) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (110,12)-(110,13))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SplatNode (location: (110,12)-(110,13))
+ │ │ │ ├── operator_loc: (110,12)-(110,13) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── closing_loc: (110,13)-(110,14) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── locals: [:*]
+ │ ├── def_keyword_loc: (110,0)-(110,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (110,5)-(110,6) = "("
+ │ ├── rparen_loc: (110,7)-(110,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (110,16)-(110,19) = "end"
+ ├── @ DefNode (location: (112,0)-(112,23))
+ │ ├── name: :a
+ │ ├── name_loc: (112,4)-(112,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (112,6)-(112,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (112,6)-(112,9))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (112,12)-(112,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (112,12)-(112,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (112,12)-(112,13) = "b"
+ │ │ ├── opening_loc: (112,13)-(112,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (112,14)-(112,17))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (112,14)-(112,17))
+ │ │ ├── closing_loc: (112,17)-(112,18) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (112,0)-(112,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (112,5)-(112,6) = "("
+ │ ├── rparen_loc: (112,9)-(112,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (112,20)-(112,23) = "end"
+ ├── @ DefNode (location: (114,0)-(114,29))
+ │ ├── name: :a
+ │ ├── name_loc: (114,4)-(114,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (114,6)-(114,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (114,6)-(114,9))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (114,12)-(114,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (114,12)-(114,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (114,12)-(114,13) = "b"
+ │ │ ├── opening_loc: (114,13)-(114,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (114,14)-(114,23))
+ │ │ │ └── arguments: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (114,14)-(114,15))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── @ IntegerNode (location: (114,17)-(114,18))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ ForwardingArgumentsNode (location: (114,20)-(114,23))
+ │ │ ├── closing_loc: (114,23)-(114,24) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (114,0)-(114,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (114,5)-(114,6) = "("
+ │ ├── rparen_loc: (114,9)-(114,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (114,26)-(114,29) = "end"
+ ├── @ DefNode (location: (116,0)-(117,3))
+ │ ├── name: :a
+ │ ├── name_loc: (116,12)-(116,13) = "a"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (116,4)-(116,11))
+ │ │ ├── body:
+ │ │ │ @ LocalVariableWriteNode (location: (116,5)-(116,10))
+ │ │ │ ├── name: :c
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (116,5)-(116,6) = "c"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (116,9)-(116,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (116,9)-(116,10) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: (116,7)-(116,8) = "="
+ │ │ ├── opening_loc: (116,4)-(116,5) = "("
+ │ │ └── closing_loc: (116,10)-(116,11) = ")"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (116,0)-(116,3) = "def"
+ │ ├── operator_loc: (116,11)-(116,12) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (117,0)-(117,3) = "end"
+ ├── @ DefNode (location: (119,0)-(120,3))
+ │ ├── name: :a
+ │ ├── name_loc: (119,4)-(119,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (119,6)-(119,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (119,6)-(119,8))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (119,7)-(119,8) = "b"
+ │ │ └── operator_loc: (119,6)-(119,7) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (119,0)-(119,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (120,0)-(120,3) = "end"
+ ├── @ DefNode (location: (122,0)-(123,3))
+ │ ├── name: :a
+ │ ├── name_loc: (122,4)-(122,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (122,6)-(122,7))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (122,6)-(122,7))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (122,6)-(122,7) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:&]
+ │ ├── def_keyword_loc: (122,0)-(122,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (122,5)-(122,6) = "("
+ │ ├── rparen_loc: (122,7)-(122,8) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (123,0)-(123,3) = "end"
+ ├── @ DefNode (location: (125,0)-(126,3))
+ │ ├── name: :a
+ │ ├── name_loc: (125,10)-(125,11) = "a"
+ │ ├── receiver:
+ │ │ @ ClassVariableReadNode (location: (125,4)-(125,9))
+ │ │ └── name: :@@var
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (125,0)-(125,3) = "def"
+ │ ├── operator_loc: (125,9)-(125,10) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (126,0)-(126,3) = "end"
+ ├── @ DefNode (location: (128,0)-(129,3))
+ │ ├── name: :C
+ │ ├── name_loc: (128,12)-(128,13) = "C"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (128,4)-(128,11))
+ │ │ ├── body:
+ │ │ │ @ LocalVariableWriteNode (location: (128,5)-(128,10))
+ │ │ │ ├── name: :a
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (128,5)-(128,6) = "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (128,9)-(128,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (128,9)-(128,10) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: (128,7)-(128,8) = "="
+ │ │ ├── opening_loc: (128,4)-(128,5) = "("
+ │ │ └── closing_loc: (128,10)-(128,11) = ")"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (128,0)-(128,3) = "def"
+ │ ├── operator_loc: (128,11)-(128,12) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (129,0)-(129,3) = "end"
+ ├── @ DefNode (location: (131,0)-(131,28))
+ │ ├── name: :Array_function
+ │ ├── name_loc: (131,9)-(131,23) = "Array_function"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (131,4)-(131,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (131,0)-(131,3) = "def"
+ │ ├── operator_loc: (131,8)-(131,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (131,25)-(131,28) = "end"
+ ├── @ ConstantWriteNode (location: (133,0)-(133,9))
+ │ ├── name: :Const
+ │ ├── name_loc: (133,0)-(133,5) = "Const"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (133,8)-(133,9))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (133,6)-(133,7) = "="
+ ├── @ DefNode (location: (133,11)-(134,3))
+ │ ├── name: :a
+ │ ├── name_loc: (133,21)-(133,22) = "a"
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (133,15)-(133,20))
+ │ │ └── name: :Const
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (133,11)-(133,14) = "def"
+ │ ├── operator_loc: (133,20)-(133,21) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (134,0)-(134,3) = "end"
+ ├── @ DefNode (location: (136,0)-(136,31))
+ │ ├── name: :a
+ │ ├── name_loc: (136,4)-(136,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (136,6)-(136,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (136,6)-(136,9))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (136,12)-(136,26))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (136,12)-(136,26))
+ │ │ ├── opening_loc: (136,12)-(136,13) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (136,13)-(136,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (136,13)-(136,16) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ └── @ EmbeddedStatementsNode (location: (136,16)-(136,25))
+ │ │ │ ├── opening_loc: (136,16)-(136,18) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (136,18)-(136,24))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (136,18)-(136,24))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (136,18)-(136,19) = "b"
+ │ │ │ │ ├── opening_loc: (136,19)-(136,20) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (136,20)-(136,23))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ ForwardingArgumentsNode (location: (136,20)-(136,23))
+ │ │ │ │ ├── closing_loc: (136,23)-(136,24) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "b"
+ │ │ │ └── closing_loc: (136,24)-(136,25) = "}"
+ │ │ └── closing_loc: (136,25)-(136,26) = "\""
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (136,0)-(136,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (136,5)-(136,6) = "("
+ │ ├── rparen_loc: (136,9)-(136,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (136,28)-(136,31) = "end"
+ ├── @ DefNode (location: (138,0)-(140,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (138,4)-(138,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (139,2)-(139,30))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (139,2)-(139,30))
+ │ │ ├── receiver:
+ │ │ │ @ HashNode (location: (139,2)-(139,4))
+ │ │ │ ├── opening_loc: (139,2)-(139,3) = "{"
+ │ │ │ ├── elements: (length: 0)
+ │ │ │ └── closing_loc: (139,3)-(139,4) = "}"
+ │ │ ├── call_operator_loc: (139,4)-(139,5) = "."
+ │ │ ├── message_loc: (139,5)-(139,10) = "merge"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (139,11)-(139,30))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (139,11)-(139,30))
+ │ │ │ └── elements: (length: 3)
+ │ │ │ ├── @ AssocSplatNode (location: (139,11)-(139,16))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (139,13)-(139,16))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (139,13)-(139,16) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ └── operator_loc: (139,11)-(139,13) = "**"
+ │ │ │ ├── @ AssocSplatNode (location: (139,18)-(139,23))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (139,20)-(139,23))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (139,20)-(139,23) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ └── operator_loc: (139,18)-(139,20) = "**"
+ │ │ │ └── @ AssocSplatNode (location: (139,25)-(139,30))
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (139,27)-(139,30))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (139,27)-(139,30) = "qux"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "qux"
+ │ │ │ └── operator_loc: (139,25)-(139,27) = "**"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "merge"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (138,0)-(138,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (140,0)-(140,3) = "end"
+ ├── @ DefNode (location: (142,0)-(143,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (142,4)-(142,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (142,8)-(142,19))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (142,8)-(142,19))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (142,8)-(142,10) = "a:"
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (142,11)-(142,19))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (142,12)-(142,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RangeNode (location: (142,12)-(142,18))
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (142,12)-(142,13))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (142,16)-(142,18))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── operator_loc: (142,13)-(142,16) = "..."
+ │ │ │ │ └── flags: exclude_end
+ │ │ │ ├── opening_loc: (142,11)-(142,12) = "("
+ │ │ │ └── closing_loc: (142,18)-(142,19) = ")"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (142,0)-(142,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (142,7)-(142,8) = "("
+ │ ├── rparen_loc: (142,19)-(142,20) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (143,0)-(143,3) = "end"
+ ├── @ DefNode (location: (145,0)-(146,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (145,4)-(145,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (145,8)-(145,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (145,8)-(145,18))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (145,8)-(145,10) = "a:"
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (145,11)-(145,18))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (145,12)-(145,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RangeNode (location: (145,12)-(145,17))
+ │ │ │ │ ├── left: ∅
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (145,15)-(145,17))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── operator_loc: (145,12)-(145,15) = "..."
+ │ │ │ │ └── flags: exclude_end
+ │ │ │ ├── opening_loc: (145,11)-(145,12) = "("
+ │ │ │ └── closing_loc: (145,17)-(145,18) = ")"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (145,0)-(145,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (145,7)-(145,8) = "("
+ │ ├── rparen_loc: (145,18)-(145,19) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (146,0)-(146,3) = "end"
+ ├── @ DefNode (location: (148,0)-(149,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (148,4)-(148,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (148,8)-(148,17))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (148,8)-(148,17))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (148,8)-(148,10) = "a:"
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (148,11)-(148,17))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (148,12)-(148,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RangeNode (location: (148,12)-(148,16))
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (148,12)-(148,13))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── right: ∅
+ │ │ │ │ ├── operator_loc: (148,13)-(148,16) = "..."
+ │ │ │ │ └── flags: exclude_end
+ │ │ │ ├── opening_loc: (148,11)-(148,12) = "("
+ │ │ │ └── closing_loc: (148,16)-(148,17) = ")"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (148,0)-(148,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (148,7)-(148,8) = "("
+ │ ├── rparen_loc: (148,17)-(148,18) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (149,0)-(149,3) = "end"
+ ├── @ DefNode (location: (151,0)-(152,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (151,4)-(151,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (151,8)-(151,20))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (151,8)-(151,20))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (151,8)-(151,9) = "a"
+ │ │ │ ├── operator_loc: (151,10)-(151,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (151,12)-(151,20))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (151,13)-(151,19))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RangeNode (location: (151,13)-(151,19))
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (151,13)-(151,14))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (151,17)-(151,19))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── operator_loc: (151,14)-(151,17) = "..."
+ │ │ │ │ └── flags: exclude_end
+ │ │ │ ├── opening_loc: (151,12)-(151,13) = "("
+ │ │ │ └── closing_loc: (151,19)-(151,20) = ")"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (151,0)-(151,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (151,7)-(151,8) = "("
+ │ ├── rparen_loc: (151,20)-(151,21) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (152,0)-(152,3) = "end"
+ ├── @ DefNode (location: (154,0)-(155,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (154,4)-(154,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (154,8)-(154,19))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (154,8)-(154,19))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (154,8)-(154,9) = "a"
+ │ │ │ ├── operator_loc: (154,10)-(154,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (154,12)-(154,19))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (154,13)-(154,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RangeNode (location: (154,13)-(154,18))
+ │ │ │ │ ├── left: ∅
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (154,16)-(154,18))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── operator_loc: (154,13)-(154,16) = "..."
+ │ │ │ │ └── flags: exclude_end
+ │ │ │ ├── opening_loc: (154,12)-(154,13) = "("
+ │ │ │ └── closing_loc: (154,18)-(154,19) = ")"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (154,0)-(154,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (154,7)-(154,8) = "("
+ │ ├── rparen_loc: (154,19)-(154,20) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (155,0)-(155,3) = "end"
+ ├── @ DefNode (location: (157,0)-(158,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (157,4)-(157,7) = "bar"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (157,8)-(157,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (157,8)-(157,18))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (157,8)-(157,9) = "a"
+ │ │ │ ├── operator_loc: (157,10)-(157,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (157,12)-(157,18))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (157,13)-(157,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RangeNode (location: (157,13)-(157,17))
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (157,13)-(157,14))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── right: ∅
+ │ │ │ │ ├── operator_loc: (157,14)-(157,17) = "..."
+ │ │ │ │ └── flags: exclude_end
+ │ │ │ ├── opening_loc: (157,12)-(157,13) = "("
+ │ │ │ └── closing_loc: (157,17)-(157,18) = ")"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (157,0)-(157,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (157,7)-(157,8) = "("
+ │ ├── rparen_loc: (157,18)-(157,19) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (158,0)-(158,3) = "end"
+ ├── @ DefNode (location: (160,0)-(162,3))
+ │ ├── name: :method
+ │ ├── name_loc: (160,4)-(160,10) = "method"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (160,11)-(160,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (160,11)-(160,12))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (161,2)-(161,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (161,2)-(161,14))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (161,2)-(161,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (161,2)-(161,6) = "item"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "item"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (161,7)-(161,9) = ">>"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (161,10)-(161,14))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (161,10)-(161,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (161,10)-(161,11) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (161,12)-(161,14))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (161,12)-(161,13) = "{"
+ │ │ │ │ └── closing_loc: (161,13)-(161,14) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "a"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: ">>"
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (160,0)-(160,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (160,10)-(160,11) = "("
+ │ ├── rparen_loc: (160,12)-(160,13) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (162,0)-(162,3) = "end"
+ ├── @ DefNode (location: (164,0)-(165,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (164,4)-(164,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (164,8)-(164,20))
+ │ │ ├── requireds: (length: 4)
+ │ │ │ ├── @ RequiredParameterNode (location: (164,8)-(164,10))
+ │ │ │ │ └── name: :_a
+ │ │ │ ├── @ RequiredParameterNode (location: (164,12)-(164,14))
+ │ │ │ │ └── name: :_a
+ │ │ │ ├── @ RequiredParameterNode (location: (164,16)-(164,17))
+ │ │ │ │ └── name: :b
+ │ │ │ └── @ RequiredParameterNode (location: (164,19)-(164,20))
+ │ │ │ └── name: :c
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:_a, :b, :c]
+ │ ├── def_keyword_loc: (164,0)-(164,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (164,7)-(164,8) = "("
+ │ ├── rparen_loc: (164,20)-(164,21) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (165,0)-(165,3) = "end"
+ ├── @ LocalVariableWriteNode (location: (167,0)-(167,7))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (167,0)-(167,3) = "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (167,6)-(167,7))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (167,4)-(167,5) = "="
+ └── @ DefNode (location: (168,0)-(168,16))
+ ├── name: :bar
+ ├── name_loc: (168,8)-(168,11) = "bar"
+ ├── receiver:
+ │ @ LocalVariableReadNode (location: (168,4)-(168,7))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (168,0)-(168,3) = "def"
+ ├── operator_loc: (168,7)-(168,8) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (168,13)-(168,16) = "end"
diff --git a/test/prism/snapshots/modules.txt b/test/prism/snapshots/modules.txt
new file mode 100644
index 0000000000..94f4bdb8eb
--- /dev/null
+++ b/test/prism/snapshots/modules.txt
@@ -0,0 +1,179 @@
+@ ProgramNode (location: (1,0)-(18,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(18,3))
+ └── body: (length: 7)
+ ├── @ ModuleNode (location: (1,0)-(1,18))
+ │ ├── locals: [:a]
+ │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (1,7)-(1,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,9)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (1,9)-(1,14))
+ │ │ ├── name: :a
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (1,9)-(1,10) = "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,13)-(1,14))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,11)-(1,12) = "="
+ │ ├── end_keyword_loc: (1,15)-(1,18) = "end"
+ │ └── name: :A
+ ├── @ InterpolatedStringNode (location: (3,0)-(3,18))
+ │ ├── opening_loc: (3,0)-(3,3) = "%Q{"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (3,3)-(3,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,3)-(3,7) = "aaa "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "aaa "
+ │ │ ├── @ EmbeddedStatementsNode (location: (3,7)-(3,13))
+ │ │ │ ├── opening_loc: (3,7)-(3,9) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,9)-(3,12))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,9)-(3,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,9)-(3,12) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bbb"
+ │ │ │ └── closing_loc: (3,12)-(3,13) = "}"
+ │ │ └── @ StringNode (location: (3,13)-(3,17))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,13)-(3,17) = " ccc"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " ccc"
+ │ └── closing_loc: (3,17)-(3,18) = "}"
+ ├── @ ModuleNode (location: (5,0)-(6,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (5,0)-(5,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (5,7)-(5,11))
+ │ │ ├── parent:
+ │ │ │ @ CallNode (location: (5,7)-(5,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,7)-(5,8) = "m"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "m"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (5,10)-(5,11))
+ │ │ │ └── name: :M
+ │ │ └── delimiter_loc: (5,8)-(5,10) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (6,0)-(6,3) = "end"
+ │ └── name: :M
+ ├── @ ModuleNode (location: (8,0)-(9,19))
+ │ ├── locals: [:x]
+ │ ├── module_keyword_loc: (8,0)-(8,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (8,7)-(8,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ BeginNode (location: (9,1)-(9,19))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (9,1)-(9,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (9,1)-(9,6))
+ │ │ │ ├── name: :x
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (9,1)-(9,2) = "x"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (9,5)-(9,6))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (9,3)-(9,4) = "="
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (9,8)-(9,14))
+ │ │ │ ├── keyword_loc: (9,8)-(9,14) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (9,16)-(9,19) = "end"
+ │ ├── end_keyword_loc: (9,16)-(9,19) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (11,0)-(12,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (11,0)-(11,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (11,7)-(11,10))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (11,9)-(11,10))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (11,7)-(11,9) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (12,0)-(12,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (14,0)-(15,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (14,0)-(14,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (14,7)-(14,13))
+ │ │ ├── parent:
+ │ │ │ @ CallNode (location: (14,7)-(14,10))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ConstantReadNode (location: (14,7)-(14,8))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (14,8)-(14,10) = "[]"
+ │ │ │ ├── opening_loc: (14,8)-(14,9) = "["
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: (14,9)-(14,10) = "]"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "[]"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (14,12)-(14,13))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (14,10)-(14,12) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (15,0)-(15,3) = "end"
+ │ └── name: :B
+ └── @ ModuleNode (location: (17,0)-(18,3))
+ ├── locals: []
+ ├── module_keyword_loc: (17,0)-(17,6) = "module"
+ ├── constant_path:
+ │ @ ConstantPathNode (location: (17,7)-(17,14))
+ │ ├── parent:
+ │ │ @ CallNode (location: (17,7)-(17,11))
+ │ │ ├── receiver:
+ │ │ │ @ ConstantReadNode (location: (17,7)-(17,8))
+ │ │ │ └── name: :A
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,8)-(17,11) = "[1]"
+ │ │ ├── opening_loc: (17,8)-(17,9) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (17,9)-(17,10))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (17,9)-(17,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (17,10)-(17,11) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]"
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (17,13)-(17,14))
+ │ │ └── name: :B
+ │ └── delimiter_loc: (17,11)-(17,13) = "::"
+ ├── body: ∅
+ ├── end_keyword_loc: (18,0)-(18,3) = "end"
+ └── name: :B
diff --git a/test/prism/snapshots/newline_terminated.txt b/test/prism/snapshots/newline_terminated.txt
new file mode 100644
index 0000000000..bf75257104
--- /dev/null
+++ b/test/prism/snapshots/newline_terminated.txt
@@ -0,0 +1,107 @@
+@ ProgramNode (location: (3,0)-(40,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (3,0)-(40,0))
+ └── body: (length: 17)
+ ├── @ StringNode (location: (3,0)-(3,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (3,0)-(3,2) = "% "
+ │ ├── content_loc: (3,2)-(3,5) = "abc"
+ │ ├── closing_loc: (3,5)-(3,6) = " "
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (4,0)-(4,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (4,0)-(4,2) = "%\t"
+ │ ├── content_loc: (4,2)-(4,5) = "abc"
+ │ ├── closing_loc: (4,5)-(4,6) = "\t"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (5,0)-(5,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,0)-(5,2) = "%\v"
+ │ ├── content_loc: (5,2)-(5,5) = "abc"
+ │ ├── closing_loc: (5,5)-(5,6) = "\v"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (6,0)-(6,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (6,0)-(6,2) = "%\r"
+ │ ├── content_loc: (6,2)-(6,5) = "abc"
+ │ ├── closing_loc: (6,5)-(6,6) = "\r"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (7,0)-(8,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,0) = "%\n"
+ │ ├── content_loc: (8,0)-(8,3) = "abc"
+ │ ├── closing_loc: (8,3)-(8,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (10,0)-(10,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (10,0)-(10,2) = "%\u0000"
+ │ ├── content_loc: (10,2)-(10,5) = "abc"
+ │ ├── closing_loc: (10,5)-(10,6) = "\u0000"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (11,0)-(12,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,0)-(11,0) = "%\n"
+ │ ├── content_loc: (12,0)-(12,3) = "abc"
+ │ ├── closing_loc: (12,3)-(12,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (14,0)-(15,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (14,0)-(14,0) = "%\n"
+ │ ├── content_loc: (15,0)-(15,4) = "\rabc"
+ │ ├── closing_loc: (15,4)-(15,0) = "\n"
+ │ └── unescaped: "\rabc"
+ ├── @ StringNode (location: (17,0)-(18,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (17,0)-(17,0) = "%\n"
+ │ ├── content_loc: (18,0)-(18,4) = "\rabc"
+ │ ├── closing_loc: (18,4)-(18,0) = "\n"
+ │ └── unescaped: "\rabc"
+ ├── @ StringNode (location: (20,0)-(21,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (20,0)-(20,0) = "%\n"
+ │ ├── content_loc: (21,0)-(21,3) = "abc"
+ │ ├── closing_loc: (21,3)-(21,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (23,0)-(23,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (23,0)-(23,2) = "%\r"
+ │ ├── content_loc: (23,2)-(23,5) = "abc"
+ │ ├── closing_loc: (23,5)-(23,6) = "\r"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (24,0)-(25,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (24,0)-(24,0) = "%\n"
+ │ ├── content_loc: (25,0)-(25,3) = "abc"
+ │ ├── closing_loc: (25,3)-(25,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (27,0)-(28,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (27,0)-(27,0) = "%\n"
+ │ ├── content_loc: (28,0)-(28,3) = "abc"
+ │ ├── closing_loc: (28,3)-(28,0) = "\n"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (30,0)-(31,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (30,0)-(30,0) = "%\n"
+ │ ├── content_loc: (31,0)-(31,3) = "foo"
+ │ ├── closing_loc: (31,3)-(31,0) = "\n"
+ │ └── unescaped: "foo"
+ ├── @ StringNode (location: (33,0)-(34,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (33,0)-(33,0) = "%q\n"
+ │ ├── content_loc: (34,0)-(34,3) = "foo"
+ │ ├── closing_loc: (34,3)-(34,0) = "\n"
+ │ └── unescaped: "foo"
+ ├── @ StringNode (location: (36,0)-(37,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (36,0)-(36,0) = "%Q\n"
+ │ ├── content_loc: (37,0)-(37,3) = "foo"
+ │ ├── closing_loc: (37,3)-(37,0) = "\n"
+ │ └── unescaped: "foo"
+ └── @ RegularExpressionNode (location: (39,0)-(40,0))
+ ├── opening_loc: (39,0)-(39,0) = "%r\n"
+ ├── content_loc: (40,0)-(40,3) = "foo"
+ ├── closing_loc: (40,3)-(40,0) = "\n"
+ ├── unescaped: "foo"
+ └── flags: ∅
diff --git a/test/prism/snapshots/next.txt b/test/prism/snapshots/next.txt
new file mode 100644
index 0000000000..508cb1e539
--- /dev/null
+++ b/test/prism/snapshots/next.txt
@@ -0,0 +1,123 @@
+@ ProgramNode (location: (1,0)-(24,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(24,7))
+ └── body: (length: 11)
+ ├── @ NextNode (location: (1,0)-(1,4))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (1,0)-(1,4) = "next"
+ ├── @ NextNode (location: (3,0)-(3,18))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,5)-(3,18))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ ParenthesesNode (location: (3,5)-(3,8))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (3,6)-(3,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (3,6)-(3,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── opening_loc: (3,5)-(3,6) = "("
+ │ │ │ └── closing_loc: (3,7)-(3,8) = ")"
+ │ │ ├── @ ParenthesesNode (location: (3,10)-(3,13))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (3,11)-(3,12))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (3,11)-(3,12))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── opening_loc: (3,10)-(3,11) = "("
+ │ │ │ └── closing_loc: (3,12)-(3,13) = ")"
+ │ │ └── @ ParenthesesNode (location: (3,15)-(3,18))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,16)-(3,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,16)-(3,17))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (3,15)-(3,16) = "("
+ │ │ └── closing_loc: (3,17)-(3,18) = ")"
+ │ └── keyword_loc: (3,0)-(3,4) = "next"
+ ├── @ NextNode (location: (5,0)-(5,6))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,5)-(5,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,5)-(5,6))
+ │ │ └── flags: decimal
+ │ └── keyword_loc: (5,0)-(5,4) = "next"
+ ├── @ NextNode (location: (7,0)-(8,1))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,5)-(8,1))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (7,5)-(7,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (7,8)-(7,9))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (8,0)-(8,1))
+ │ │ └── flags: decimal
+ │ └── keyword_loc: (7,0)-(7,4) = "next"
+ ├── @ NextNode (location: (10,0)-(10,12))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (10,5)-(10,12))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ IntegerNode (location: (10,5)-(10,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (10,8)-(10,9))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (10,11)-(10,12))
+ │ │ └── flags: decimal
+ │ └── keyword_loc: (10,0)-(10,4) = "next"
+ ├── @ NextNode (location: (12,0)-(12,14))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (12,5)-(12,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ArrayNode (location: (12,5)-(12,14))
+ │ │ ├── elements: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (12,6)-(12,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── @ IntegerNode (location: (12,9)-(12,10))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (12,12)-(12,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (12,5)-(12,6) = "["
+ │ │ └── closing_loc: (12,13)-(12,14) = "]"
+ │ └── keyword_loc: (12,0)-(12,4) = "next"
+ ├── @ NextNode (location: (14,0)-(17,1))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (14,4)-(17,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (14,4)-(17,1))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (15,2)-(16,3))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (15,2)-(15,3))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (14,4)-(14,5) = "("
+ │ │ └── closing_loc: (17,0)-(17,1) = ")"
+ │ └── keyword_loc: (14,0)-(14,4) = "next"
+ ├── @ NextNode (location: (19,0)-(19,4))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (19,0)-(19,4) = "next"
+ ├── @ IntegerNode (location: (20,0)-(20,1))
+ │ └── flags: decimal
+ ├── @ NextNode (location: (22,0)-(22,6))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (22,4)-(22,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (22,4)-(22,6))
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (22,4)-(22,5) = "("
+ │ │ └── closing_loc: (22,5)-(22,6) = ")"
+ │ └── keyword_loc: (22,0)-(22,4) = "next"
+ └── @ NextNode (location: (24,0)-(24,7))
+ ├── arguments:
+ │ @ ArgumentsNode (location: (24,4)-(24,7))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (24,4)-(24,7))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (24,5)-(24,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (24,5)-(24,6))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (24,4)-(24,5) = "("
+ │ └── closing_loc: (24,6)-(24,7) = ")"
+ └── keyword_loc: (24,0)-(24,4) = "next"
diff --git a/test/prism/snapshots/nils.txt b/test/prism/snapshots/nils.txt
new file mode 100644
index 0000000000..cbadbcf911
--- /dev/null
+++ b/test/prism/snapshots/nils.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(12,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(12,11))
+ └── body: (length: 5)
+ ├── @ NilNode (location: (1,0)-(1,3))
+ ├── @ ParenthesesNode (location: (3,0)-(3,2))
+ │ ├── body: ∅
+ │ ├── opening_loc: (3,0)-(3,1) = "("
+ │ └── closing_loc: (3,1)-(3,2) = ")"
+ ├── @ ParenthesesNode (location: (5,0)-(8,1))
+ │ ├── body: ∅
+ │ ├── opening_loc: (5,0)-(5,1) = "("
+ │ └── closing_loc: (8,0)-(8,1) = ")"
+ ├── @ PostExecutionNode (location: (10,0)-(10,9))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (10,6)-(10,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (10,6)-(10,7))
+ │ │ └── flags: decimal
+ │ ├── keyword_loc: (10,0)-(10,3) = "END"
+ │ ├── opening_loc: (10,4)-(10,5) = "{"
+ │ └── closing_loc: (10,8)-(10,9) = "}"
+ └── @ PreExecutionNode (location: (12,0)-(12,11))
+ ├── statements:
+ │ @ StatementsNode (location: (12,8)-(12,9))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (12,8)-(12,9))
+ │ └── flags: decimal
+ ├── keyword_loc: (12,0)-(12,5) = "BEGIN"
+ ├── opening_loc: (12,6)-(12,7) = "{"
+ └── closing_loc: (12,10)-(12,11) = "}"
diff --git a/test/prism/snapshots/non_alphanumeric_methods.txt b/test/prism/snapshots/non_alphanumeric_methods.txt
new file mode 100644
index 0000000000..725b94c4e5
--- /dev/null
+++ b/test/prism/snapshots/non_alphanumeric_methods.txt
@@ -0,0 +1,501 @@
+@ ProgramNode (location: (1,0)-(105,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(105,3))
+ └── body: (length: 36)
+ ├── @ DefNode (location: (1,0)-(2,3))
+ │ ├── name: :!
+ │ ├── name_loc: (1,4)-(1,5) = "!"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (2,0)-(2,3) = "end"
+ ├── @ DefNode (location: (4,0)-(5,3))
+ │ ├── name: :!=
+ │ ├── name_loc: (4,4)-(4,6) = "!="
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ DefNode (location: (7,0)-(8,3))
+ │ ├── name: :!~
+ │ ├── name_loc: (7,4)-(7,6) = "!~"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
+ ├── @ DefNode (location: (10,0)-(11,3))
+ │ ├── name: :%
+ │ ├── name_loc: (10,4)-(10,5) = "%"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (10,0)-(10,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ DefNode (location: (13,0)-(14,3))
+ │ ├── name: :+
+ │ ├── name_loc: (13,9)-(13,10) = "+"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (13,4)-(13,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ │ ├── operator_loc: (13,8)-(13,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (14,0)-(14,3) = "end"
+ ├── @ DefNode (location: (16,0)-(17,3))
+ │ ├── name: :&
+ │ ├── name_loc: (16,4)-(16,5) = "&"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (16,0)-(16,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ ├── @ DefNode (location: (19,0)-(20,3))
+ │ ├── name: :*
+ │ ├── name_loc: (19,4)-(19,5) = "*"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (19,0)-(19,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (20,0)-(20,3) = "end"
+ ├── @ DefNode (location: (22,0)-(23,3))
+ │ ├── name: :**
+ │ ├── name_loc: (22,4)-(22,6) = "**"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (23,0)-(23,3) = "end"
+ ├── @ StringNode (location: (25,0)-(25,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (25,0)-(25,2) = "%|"
+ │ ├── content_loc: (25,2)-(25,5) = "abc"
+ │ ├── closing_loc: (25,5)-(25,6) = "|"
+ │ └── unescaped: "abc"
+ ├── @ DefNode (location: (27,0)-(28,3))
+ │ ├── name: :+
+ │ ├── name_loc: (27,4)-(27,5) = "+"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (27,6)-(27,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (27,6)-(27,9))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (27,8)-(27,9) = "b"
+ │ │ │ └── operator_loc: (27,6)-(27,8) = "**"
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (28,0)-(28,3) = "end"
+ ├── @ DefNode (location: (30,0)-(31,3))
+ │ ├── name: :+
+ │ ├── name_loc: (30,4)-(30,5) = "+"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (30,0)-(30,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (30,5)-(30,6) = "("
+ │ ├── rparen_loc: (30,6)-(30,7) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
+ ├── @ DefNode (location: (33,0)-(34,3))
+ │ ├── name: :+
+ │ ├── name_loc: (33,4)-(33,5) = "+"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (33,6)-(33,7))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (33,6)-(33,7))
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (33,0)-(33,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (34,0)-(34,3) = "end"
+ ├── @ DefNode (location: (36,0)-(37,3))
+ │ ├── name: :+
+ │ ├── name_loc: (36,9)-(36,10) = "+"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (36,4)-(36,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (36,0)-(36,3) = "def"
+ │ ├── operator_loc: (36,8)-(36,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
+ ├── @ DefNode (location: (39,0)-(40,3))
+ │ ├── name: :+
+ │ ├── name_loc: (39,4)-(39,5) = "+"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (39,0)-(39,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (40,0)-(40,3) = "end"
+ ├── @ DefNode (location: (42,0)-(43,3))
+ │ ├── name: :+@
+ │ ├── name_loc: (42,4)-(42,6) = "+@"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (42,0)-(42,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
+ ├── @ DefNode (location: (45,0)-(46,3))
+ │ ├── name: :-
+ │ ├── name_loc: (45,4)-(45,5) = "-"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (45,0)-(45,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (46,0)-(46,3) = "end"
+ ├── @ DefNode (location: (48,0)-(48,11))
+ │ ├── name: :-
+ │ ├── name_loc: (48,6)-(48,7) = "-"
+ │ ├── receiver:
+ │ │ @ CallNode (location: (48,4)-(48,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (48,4)-(48,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (48,0)-(48,3) = "def"
+ │ ├── operator_loc: (48,5)-(48,6) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (48,8)-(48,11) = "end"
+ ├── @ DefNode (location: (50,0)-(51,3))
+ │ ├── name: :-@
+ │ ├── name_loc: (50,4)-(50,6) = "-@"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (50,0)-(50,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
+ ├── @ DefNode (location: (53,0)-(54,3))
+ │ ├── name: :/
+ │ ├── name_loc: (53,4)-(53,5) = "/"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (53,0)-(53,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (54,0)-(54,3) = "end"
+ ├── @ DefNode (location: (56,0)-(57,3))
+ │ ├── name: :<
+ │ ├── name_loc: (56,4)-(56,5) = "<"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (56,0)-(56,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (57,0)-(57,3) = "end"
+ ├── @ DefNode (location: (59,0)-(60,3))
+ │ ├── name: :<<
+ │ ├── name_loc: (59,4)-(59,6) = "<<"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (59,0)-(59,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (60,0)-(60,3) = "end"
+ ├── @ DefNode (location: (62,0)-(63,3))
+ │ ├── name: :<=
+ │ ├── name_loc: (62,4)-(62,6) = "<="
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (62,0)-(62,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (63,0)-(63,3) = "end"
+ ├── @ DefNode (location: (65,0)-(66,3))
+ │ ├── name: :<=>
+ │ ├── name_loc: (65,4)-(65,7) = "<=>"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (65,0)-(65,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (66,0)-(66,3) = "end"
+ ├── @ DefNode (location: (68,0)-(69,3))
+ │ ├── name: :==
+ │ ├── name_loc: (68,4)-(68,6) = "=="
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (68,0)-(68,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (69,0)-(69,3) = "end"
+ ├── @ DefNode (location: (71,0)-(72,3))
+ │ ├── name: :===
+ │ ├── name_loc: (71,4)-(71,7) = "==="
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (71,0)-(71,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (72,0)-(72,3) = "end"
+ ├── @ DefNode (location: (74,0)-(75,3))
+ │ ├── name: :=~
+ │ ├── name_loc: (74,4)-(74,6) = "=~"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (74,0)-(74,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (75,0)-(75,3) = "end"
+ ├── @ DefNode (location: (77,0)-(78,3))
+ │ ├── name: :>
+ │ ├── name_loc: (77,4)-(77,5) = ">"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (77,0)-(77,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (78,0)-(78,3) = "end"
+ ├── @ DefNode (location: (80,0)-(81,3))
+ │ ├── name: :>=
+ │ ├── name_loc: (80,4)-(80,6) = ">="
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (80,0)-(80,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
+ ├── @ DefNode (location: (83,0)-(84,3))
+ │ ├── name: :>>
+ │ ├── name_loc: (83,4)-(83,6) = ">>"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (83,0)-(83,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (84,0)-(84,3) = "end"
+ ├── @ DefNode (location: (86,0)-(87,3))
+ │ ├── name: :[]
+ │ ├── name_loc: (86,4)-(86,6) = "[]"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (86,0)-(86,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (87,0)-(87,3) = "end"
+ ├── @ DefNode (location: (89,0)-(90,3))
+ │ ├── name: :[]=
+ │ ├── name_loc: (89,4)-(89,7) = "[]="
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (89,0)-(89,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (90,0)-(90,3) = "end"
+ ├── @ DefNode (location: (92,0)-(93,3))
+ │ ├── name: :^
+ │ ├── name_loc: (92,4)-(92,5) = "^"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (92,0)-(92,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
+ ├── @ DefNode (location: (95,0)-(96,3))
+ │ ├── name: :`
+ │ ├── name_loc: (95,4)-(95,5) = "`"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (95,0)-(95,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (96,0)-(96,3) = "end"
+ ├── @ DefNode (location: (98,0)-(99,3))
+ │ ├── name: :`
+ │ ├── name_loc: (98,9)-(98,10) = "`"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (98,4)-(98,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (98,0)-(98,3) = "def"
+ │ ├── operator_loc: (98,8)-(98,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (99,0)-(99,3) = "end"
+ ├── @ DefNode (location: (101,0)-(102,3))
+ │ ├── name: :|
+ │ ├── name_loc: (101,4)-(101,5) = "|"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (101,0)-(101,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (102,0)-(102,3) = "end"
+ └── @ DefNode (location: (104,0)-(105,3))
+ ├── name: :~
+ ├── name_loc: (104,4)-(104,5) = "~"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (104,0)-(104,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (105,0)-(105,3) = "end"
diff --git a/test/prism/snapshots/not.txt b/test/prism/snapshots/not.txt
new file mode 100644
index 0000000000..6f4255b48a
--- /dev/null
+++ b/test/prism/snapshots/not.txt
@@ -0,0 +1,351 @@
+@ ProgramNode (location: (1,0)-(37,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(37,16))
+ └── body: (length: 10)
+ ├── @ AndNode (location: (1,0)-(1,19))
+ │ ├── left:
+ │ │ @ CallNode (location: (1,0)-(1,7))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,4)-(1,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ ├── right:
+ │ │ @ CallNode (location: (1,12)-(1,19))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,16)-(1,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,16)-(1,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,12)-(1,15) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ └── operator_loc: (1,8)-(1,11) = "and"
+ ├── @ CallNode (location: (3,0)-(3,16))
+ │ ├── receiver:
+ │ │ @ AndNode (location: (3,4)-(3,15))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (3,4)-(3,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (3,12)-(3,15))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,12)-(3,15) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (3,8)-(3,11) = "and"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "not"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (3,15)-(3,16) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (5,0)-(5,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,4)-(5,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,4)-(5,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,3) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ AndNode (location: (7,0)-(8,5))
+ │ ├── left:
+ │ │ @ CallNode (location: (7,0)-(7,7))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (7,4)-(7,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,4)-(7,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,0)-(7,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ ├── right:
+ │ │ @ CallNode (location: (7,12)-(8,5))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (8,2)-(8,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (8,2)-(8,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,12)-(7,15) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ └── operator_loc: (7,8)-(7,11) = "and"
+ ├── @ AndNode (location: (11,0)-(13,5))
+ │ ├── left:
+ │ │ @ CallNode (location: (11,0)-(11,7))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (11,4)-(11,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,4)-(11,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,0)-(11,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ ├── right:
+ │ │ @ CallNode (location: (12,4)-(13,5))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (13,2)-(13,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,2)-(13,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (12,4)-(12,7) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ └── operator_loc: (11,8)-(11,11) = "and"
+ ├── @ AndNode (location: (16,0)-(20,5))
+ │ ├── left:
+ │ │ @ CallNode (location: (16,0)-(16,7))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (16,4)-(16,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (16,4)-(16,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,0)-(16,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ ├── right:
+ │ │ @ CallNode (location: (17,2)-(20,5))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (20,2)-(20,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (20,2)-(20,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,2)-(17,5) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ └── operator_loc: (16,8)-(16,11) = "and"
+ ├── @ CallNode (location: (22,0)-(25,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (22,4)-(22,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (22,4)-(22,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (22,0)-(22,3) = "not"
+ │ ├── opening_loc: (22,3)-(22,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (25,0)-(25,1) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (27,0)-(33,3))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,0)-(27,3) = "not"
+ │ ├── opening_loc: (27,3)-(27,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (33,2)-(33,3) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (35,0)-(35,14))
+ │ ├── receiver:
+ │ │ @ FlipFlopNode (location: (35,4)-(35,14))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (35,4)-(35,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (35,4)-(35,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (35,11)-(35,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (35,11)-(35,14) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── operator_loc: (35,8)-(35,10) = ".."
+ │ │ └── flags: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,0)-(35,3) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ └── @ CallNode (location: (37,0)-(37,16))
+ ├── receiver:
+ │ @ ParenthesesNode (location: (37,4)-(37,16))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (37,5)-(37,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ FlipFlopNode (location: (37,5)-(37,15))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (37,5)-(37,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,5)-(37,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (37,12)-(37,15))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,12)-(37,15) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── operator_loc: (37,9)-(37,11) = ".."
+ │ │ └── flags: ∅
+ │ ├── opening_loc: (37,4)-(37,5) = "("
+ │ └── closing_loc: (37,15)-(37,16) = ")"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (37,0)-(37,3) = "not"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/numbers.txt b/test/prism/snapshots/numbers.txt
new file mode 100644
index 0000000000..ca31480f67
--- /dev/null
+++ b/test/prism/snapshots/numbers.txt
@@ -0,0 +1,102 @@
+@ ProgramNode (location: (1,0)-(63,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(63,5))
+ └── body: (length: 32)
+ ├── @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (3,0)-(3,1))
+ │ └── flags: decimal
+ ├── @ FloatNode (location: (5,0)-(5,3))
+ ├── @ IntegerNode (location: (7,0)-(7,1))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (9,0)-(9,3))
+ │ └── flags: binary
+ ├── @ IntegerNode (location: (11,0)-(11,3))
+ │ └── flags: binary
+ ├── @ IntegerNode (location: (13,0)-(13,4))
+ │ └── flags: binary
+ ├── @ IntegerNode (location: (15,0)-(15,3))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (17,0)-(17,3))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (19,0)-(19,3))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (21,0)-(21,2))
+ │ └── flags: octal
+ ├── @ IntegerNode (location: (23,0)-(23,2))
+ │ └── flags: octal
+ ├── @ IntegerNode (location: (25,0)-(25,2))
+ │ └── flags: octal
+ ├── @ IntegerNode (location: (27,0)-(27,3))
+ │ └── flags: octal
+ ├── @ IntegerNode (location: (29,0)-(29,3))
+ │ └── flags: octal
+ ├── @ IntegerNode (location: (31,0)-(31,3))
+ │ └── flags: octal
+ ├── @ IntegerNode (location: (33,0)-(33,3))
+ │ └── flags: hexadecimal
+ ├── @ IntegerNode (location: (35,0)-(35,3))
+ │ └── flags: hexadecimal
+ ├── @ IntegerNode (location: (37,0)-(37,3))
+ │ └── flags: hexadecimal
+ ├── @ ImaginaryNode (location: (39,0)-(39,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (39,0)-(39,1))
+ │ └── flags: decimal
+ ├── @ RationalNode (location: (41,0)-(41,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (41,0)-(41,1))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (43,0)-(43,2))
+ │ └── flags: decimal
+ ├── @ ImaginaryNode (location: (45,0)-(45,3))
+ │ └── numeric:
+ │ @ RationalNode (location: (45,0)-(45,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (45,0)-(45,1))
+ │ └── flags: decimal
+ ├── @ ImaginaryNode (location: (47,0)-(47,5))
+ │ └── numeric:
+ │ @ RationalNode (location: (47,0)-(47,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (47,0)-(47,3))
+ ├── @ ImaginaryNode (location: (49,0)-(49,4))
+ │ └── numeric:
+ │ @ RationalNode (location: (49,0)-(49,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (49,0)-(49,2))
+ │ └── flags: decimal
+ ├── @ ImaginaryNode (location: (51,0)-(51,6))
+ │ └── numeric:
+ │ @ RationalNode (location: (51,0)-(51,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (51,0)-(51,4))
+ ├── @ RationalNode (location: (53,0)-(53,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (53,0)-(53,3))
+ │ └── flags: octal
+ ├── @ ImaginaryNode (location: (55,0)-(55,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (55,0)-(55,3))
+ │ └── flags: octal
+ ├── @ ImaginaryNode (location: (57,0)-(57,5))
+ │ └── numeric:
+ │ @ RationalNode (location: (57,0)-(57,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (57,0)-(57,3))
+ │ └── flags: octal
+ ├── @ RationalNode (location: (59,0)-(59,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (59,0)-(59,3))
+ │ └── flags: decimal
+ ├── @ ImaginaryNode (location: (61,0)-(61,4))
+ │ └── numeric:
+ │ @ IntegerNode (location: (61,0)-(61,3))
+ │ └── flags: decimal
+ └── @ ImaginaryNode (location: (63,0)-(63,5))
+ └── numeric:
+ @ RationalNode (location: (63,0)-(63,4))
+ └── numeric:
+ @ IntegerNode (location: (63,0)-(63,3))
+ └── flags: binary
diff --git a/test/prism/snapshots/patterns.txt b/test/prism/snapshots/patterns.txt
new file mode 100644
index 0000000000..2cb524e1e0
--- /dev/null
+++ b/test/prism/snapshots/patterns.txt
@@ -0,0 +1,4501 @@
+@ ProgramNode (location: (1,0)-(192,1))
+├── locals: [:bar, :baz, :qux, :b, :a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(192,1))
+ └── body: (length: 170)
+ ├── @ MatchRequiredNode (location: (1,0)-(1,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ LocalVariableTargetNode (location: (1,7)-(1,10))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ └── operator_loc: (1,4)-(1,6) = "=>"
+ ├── @ MatchRequiredNode (location: (2,0)-(2,8))
+ │ ├── value:
+ │ │ @ CallNode (location: (2,0)-(2,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (2,7)-(2,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (2,4)-(2,6) = "=>"
+ ├── @ MatchRequiredNode (location: (3,0)-(3,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FloatNode (location: (3,7)-(3,10))
+ │ └── operator_loc: (3,4)-(3,6) = "=>"
+ ├── @ MatchRequiredNode (location: (4,0)-(4,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (4,0)-(4,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,0)-(4,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ImaginaryNode (location: (4,7)-(4,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (4,7)-(4,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (4,4)-(4,6) = "=>"
+ ├── @ MatchRequiredNode (location: (5,0)-(5,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RationalNode (location: (5,7)-(5,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (5,7)-(5,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (5,4)-(5,6) = "=>"
+ ├── @ MatchRequiredNode (location: (6,0)-(6,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (6,0)-(6,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,0)-(6,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (6,7)-(6,11))
+ │ │ ├── opening_loc: (6,7)-(6,8) = ":"
+ │ │ ├── value_loc: (6,8)-(6,11) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (6,4)-(6,6) = "=>"
+ ├── @ MatchRequiredNode (location: (7,0)-(7,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (7,0)-(7,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (7,7)-(7,14))
+ │ │ ├── opening_loc: (7,7)-(7,10) = "%s["
+ │ │ ├── value_loc: (7,10)-(7,13) = "foo"
+ │ │ ├── closing_loc: (7,13)-(7,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (7,4)-(7,6) = "=>"
+ ├── @ MatchRequiredNode (location: (8,0)-(8,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (8,0)-(8,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (8,0)-(8,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (8,7)-(8,13))
+ │ │ ├── opening_loc: (8,7)-(8,9) = ":\""
+ │ │ ├── value_loc: (8,9)-(8,12) = "foo"
+ │ │ ├── closing_loc: (8,12)-(8,13) = "\""
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (8,4)-(8,6) = "=>"
+ ├── @ MatchRequiredNode (location: (9,0)-(9,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (9,0)-(9,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RegularExpressionNode (location: (9,7)-(9,12))
+ │ │ ├── opening_loc: (9,7)-(9,8) = "/"
+ │ │ ├── content_loc: (9,8)-(9,11) = "foo"
+ │ │ ├── closing_loc: (9,11)-(9,12) = "/"
+ │ │ ├── unescaped: "foo"
+ │ │ └── flags: ∅
+ │ └── operator_loc: (9,4)-(9,6) = "=>"
+ ├── @ MatchRequiredNode (location: (10,0)-(10,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (10,0)-(10,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (10,0)-(10,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (10,7)-(10,12))
+ │ │ ├── opening_loc: (10,7)-(10,8) = "`"
+ │ │ ├── content_loc: (10,8)-(10,11) = "foo"
+ │ │ ├── closing_loc: (10,11)-(10,12) = "`"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (10,4)-(10,6) = "=>"
+ ├── @ MatchRequiredNode (location: (11,0)-(11,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (11,0)-(11,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (11,7)-(11,14))
+ │ │ ├── opening_loc: (11,7)-(11,10) = "%x["
+ │ │ ├── content_loc: (11,10)-(11,13) = "foo"
+ │ │ ├── closing_loc: (11,13)-(11,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (11,4)-(11,6) = "=>"
+ ├── @ MatchRequiredNode (location: (12,0)-(12,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (12,0)-(12,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (12,0)-(12,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (12,7)-(12,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (12,10)-(12,13))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (12,10)-(12,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (12,7)-(12,10) = "%i["
+ │ │ └── closing_loc: (12,13)-(12,14) = "]"
+ │ └── operator_loc: (12,4)-(12,6) = "=>"
+ ├── @ MatchRequiredNode (location: (13,0)-(13,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (13,0)-(13,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (13,7)-(13,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (13,10)-(13,13))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (13,10)-(13,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (13,7)-(13,10) = "%I["
+ │ │ └── closing_loc: (13,13)-(13,14) = "]"
+ │ └── operator_loc: (13,4)-(13,6) = "=>"
+ ├── @ MatchRequiredNode (location: (14,0)-(14,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (14,0)-(14,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (14,0)-(14,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (14,7)-(14,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ StringNode (location: (14,10)-(14,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (14,10)-(14,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (14,7)-(14,10) = "%w["
+ │ │ └── closing_loc: (14,13)-(14,14) = "]"
+ │ └── operator_loc: (14,4)-(14,6) = "=>"
+ ├── @ MatchRequiredNode (location: (15,0)-(15,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (15,0)-(15,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,0)-(15,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (15,7)-(15,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ StringNode (location: (15,10)-(15,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (15,10)-(15,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (15,7)-(15,10) = "%W["
+ │ │ └── closing_loc: (15,13)-(15,14) = "]"
+ │ └── operator_loc: (15,4)-(15,6) = "=>"
+ ├── @ MatchRequiredNode (location: (16,0)-(16,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (16,0)-(16,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,0)-(16,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ StringNode (location: (16,7)-(16,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (16,7)-(16,10) = "%q["
+ │ │ ├── content_loc: (16,10)-(16,13) = "foo"
+ │ │ ├── closing_loc: (16,13)-(16,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (16,4)-(16,6) = "=>"
+ ├── @ MatchRequiredNode (location: (17,0)-(17,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (17,0)-(17,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,0)-(17,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ StringNode (location: (17,7)-(17,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (17,7)-(17,10) = "%Q["
+ │ │ ├── content_loc: (17,10)-(17,13) = "foo"
+ │ │ ├── closing_loc: (17,13)-(17,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (17,4)-(17,6) = "=>"
+ ├── @ MatchRequiredNode (location: (18,0)-(18,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (18,0)-(18,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (18,0)-(18,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ StringNode (location: (18,7)-(18,12))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (18,7)-(18,8) = "\""
+ │ │ ├── content_loc: (18,8)-(18,11) = "foo"
+ │ │ ├── closing_loc: (18,11)-(18,12) = "\""
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (18,4)-(18,6) = "=>"
+ ├── @ MatchRequiredNode (location: (19,0)-(19,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (19,0)-(19,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,0)-(19,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ NilNode (location: (19,7)-(19,10))
+ │ └── operator_loc: (19,4)-(19,6) = "=>"
+ ├── @ MatchRequiredNode (location: (20,0)-(20,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (20,0)-(20,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (20,0)-(20,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SelfNode (location: (20,7)-(20,11))
+ │ └── operator_loc: (20,4)-(20,6) = "=>"
+ ├── @ MatchRequiredNode (location: (21,0)-(21,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (21,0)-(21,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (21,0)-(21,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ TrueNode (location: (21,7)-(21,11))
+ │ └── operator_loc: (21,4)-(21,6) = "=>"
+ ├── @ MatchRequiredNode (location: (22,0)-(22,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (22,0)-(22,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (22,0)-(22,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FalseNode (location: (22,7)-(22,12))
+ │ └── operator_loc: (22,4)-(22,6) = "=>"
+ ├── @ MatchRequiredNode (location: (23,0)-(23,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (23,0)-(23,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,0)-(23,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SourceFileNode (location: (23,7)-(23,15))
+ │ │ └── filepath: "patterns.txt"
+ │ └── operator_loc: (23,4)-(23,6) = "=>"
+ ├── @ MatchRequiredNode (location: (24,0)-(24,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (24,0)-(24,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (24,0)-(24,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SourceLineNode (location: (24,7)-(24,15))
+ │ └── operator_loc: (24,4)-(24,6) = "=>"
+ ├── @ MatchRequiredNode (location: (25,0)-(25,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (25,0)-(25,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (25,0)-(25,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SourceEncodingNode (location: (25,7)-(25,19))
+ │ └── operator_loc: (25,4)-(25,6) = "=>"
+ ├── @ MatchRequiredNode (location: (26,0)-(26,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (26,0)-(26,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (26,0)-(26,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ LambdaNode (location: (26,7)-(26,17))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (26,7)-(26,9) = "->"
+ │ │ ├── opening_loc: (26,10)-(26,11) = "{"
+ │ │ ├── closing_loc: (26,16)-(26,17) = "}"
+ │ │ ├── parameters: ∅
+ │ │ └── body:
+ │ │ @ StatementsNode (location: (26,12)-(26,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (26,12)-(26,15))
+ │ │ ├── name: :bar
+ │ │ └── depth: 1
+ │ └── operator_loc: (26,4)-(26,6) = "=>"
+ ├── @ MatchRequiredNode (location: (28,0)-(28,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (28,0)-(28,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (28,0)-(28,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (28,7)-(28,13))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (28,7)-(28,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (28,12)-(28,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (28,9)-(28,11) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (28,4)-(28,6) = "=>"
+ ├── @ MatchRequiredNode (location: (29,0)-(29,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (29,0)-(29,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (29,0)-(29,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (29,7)-(29,17))
+ │ │ ├── left:
+ │ │ │ @ FloatNode (location: (29,7)-(29,10))
+ │ │ ├── right:
+ │ │ │ @ FloatNode (location: (29,14)-(29,17))
+ │ │ ├── operator_loc: (29,11)-(29,13) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (29,4)-(29,6) = "=>"
+ ├── @ MatchRequiredNode (location: (30,0)-(30,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (30,7)-(30,15))
+ │ │ ├── left:
+ │ │ │ @ ImaginaryNode (location: (30,7)-(30,9))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (30,7)-(30,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ ImaginaryNode (location: (30,13)-(30,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (30,13)-(30,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (30,10)-(30,12) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (30,4)-(30,6) = "=>"
+ ├── @ MatchRequiredNode (location: (31,0)-(31,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (31,0)-(31,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (31,7)-(31,15))
+ │ │ ├── left:
+ │ │ │ @ RationalNode (location: (31,7)-(31,9))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (31,7)-(31,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ RationalNode (location: (31,13)-(31,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (31,13)-(31,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (31,10)-(31,12) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (31,4)-(31,6) = "=>"
+ ├── @ MatchRequiredNode (location: (32,0)-(32,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (32,0)-(32,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (32,0)-(32,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (32,7)-(32,19))
+ │ │ ├── left:
+ │ │ │ @ SymbolNode (location: (32,7)-(32,11))
+ │ │ │ ├── opening_loc: (32,7)-(32,8) = ":"
+ │ │ │ ├── value_loc: (32,8)-(32,11) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ SymbolNode (location: (32,15)-(32,19))
+ │ │ │ ├── opening_loc: (32,15)-(32,16) = ":"
+ │ │ │ ├── value_loc: (32,16)-(32,19) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (32,12)-(32,14) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (32,4)-(32,6) = "=>"
+ ├── @ MatchRequiredNode (location: (33,0)-(33,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (33,0)-(33,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (33,0)-(33,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (33,7)-(33,25))
+ │ │ ├── left:
+ │ │ │ @ SymbolNode (location: (33,7)-(33,14))
+ │ │ │ ├── opening_loc: (33,7)-(33,10) = "%s["
+ │ │ │ ├── value_loc: (33,10)-(33,13) = "foo"
+ │ │ │ ├── closing_loc: (33,13)-(33,14) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ SymbolNode (location: (33,18)-(33,25))
+ │ │ │ ├── opening_loc: (33,18)-(33,21) = "%s["
+ │ │ │ ├── value_loc: (33,21)-(33,24) = "foo"
+ │ │ │ ├── closing_loc: (33,24)-(33,25) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (33,15)-(33,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (33,4)-(33,6) = "=>"
+ ├── @ MatchRequiredNode (location: (34,0)-(34,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (34,0)-(34,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (34,0)-(34,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (34,7)-(34,23))
+ │ │ ├── left:
+ │ │ │ @ SymbolNode (location: (34,7)-(34,13))
+ │ │ │ ├── opening_loc: (34,7)-(34,9) = ":\""
+ │ │ │ ├── value_loc: (34,9)-(34,12) = "foo"
+ │ │ │ ├── closing_loc: (34,12)-(34,13) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ SymbolNode (location: (34,17)-(34,23))
+ │ │ │ ├── opening_loc: (34,17)-(34,19) = ":\""
+ │ │ │ ├── value_loc: (34,19)-(34,22) = "foo"
+ │ │ │ ├── closing_loc: (34,22)-(34,23) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (34,14)-(34,16) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (34,4)-(34,6) = "=>"
+ ├── @ MatchRequiredNode (location: (35,0)-(35,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (35,0)-(35,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (35,0)-(35,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (35,7)-(35,21))
+ │ │ ├── left:
+ │ │ │ @ RegularExpressionNode (location: (35,7)-(35,12))
+ │ │ │ ├── opening_loc: (35,7)-(35,8) = "/"
+ │ │ │ ├── content_loc: (35,8)-(35,11) = "foo"
+ │ │ │ ├── closing_loc: (35,11)-(35,12) = "/"
+ │ │ │ ├── unescaped: "foo"
+ │ │ │ └── flags: ∅
+ │ │ ├── right:
+ │ │ │ @ RegularExpressionNode (location: (35,16)-(35,21))
+ │ │ │ ├── opening_loc: (35,16)-(35,17) = "/"
+ │ │ │ ├── content_loc: (35,17)-(35,20) = "foo"
+ │ │ │ ├── closing_loc: (35,20)-(35,21) = "/"
+ │ │ │ ├── unescaped: "foo"
+ │ │ │ └── flags: ∅
+ │ │ ├── operator_loc: (35,13)-(35,15) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (35,4)-(35,6) = "=>"
+ ├── @ MatchRequiredNode (location: (36,0)-(36,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (36,0)-(36,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (36,0)-(36,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (36,7)-(36,21))
+ │ │ ├── left:
+ │ │ │ @ XStringNode (location: (36,7)-(36,12))
+ │ │ │ ├── opening_loc: (36,7)-(36,8) = "`"
+ │ │ │ ├── content_loc: (36,8)-(36,11) = "foo"
+ │ │ │ ├── closing_loc: (36,11)-(36,12) = "`"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ XStringNode (location: (36,16)-(36,21))
+ │ │ │ ├── opening_loc: (36,16)-(36,17) = "`"
+ │ │ │ ├── content_loc: (36,17)-(36,20) = "foo"
+ │ │ │ ├── closing_loc: (36,20)-(36,21) = "`"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (36,13)-(36,15) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (36,4)-(36,6) = "=>"
+ ├── @ MatchRequiredNode (location: (37,0)-(37,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (37,0)-(37,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,0)-(37,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (37,7)-(37,25))
+ │ │ ├── left:
+ │ │ │ @ XStringNode (location: (37,7)-(37,14))
+ │ │ │ ├── opening_loc: (37,7)-(37,10) = "%x["
+ │ │ │ ├── content_loc: (37,10)-(37,13) = "foo"
+ │ │ │ ├── closing_loc: (37,13)-(37,14) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ XStringNode (location: (37,18)-(37,25))
+ │ │ │ ├── opening_loc: (37,18)-(37,21) = "%x["
+ │ │ │ ├── content_loc: (37,21)-(37,24) = "foo"
+ │ │ │ ├── closing_loc: (37,24)-(37,25) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (37,15)-(37,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (37,4)-(37,6) = "=>"
+ ├── @ MatchRequiredNode (location: (38,0)-(38,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (38,0)-(38,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (38,0)-(38,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (38,7)-(38,25))
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (38,7)-(38,14))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (38,10)-(38,13))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (38,10)-(38,13) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (38,7)-(38,10) = "%i["
+ │ │ │ └── closing_loc: (38,13)-(38,14) = "]"
+ │ │ ├── right:
+ │ │ │ @ ArrayNode (location: (38,18)-(38,25))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (38,21)-(38,24))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (38,21)-(38,24) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (38,18)-(38,21) = "%i["
+ │ │ │ └── closing_loc: (38,24)-(38,25) = "]"
+ │ │ ├── operator_loc: (38,15)-(38,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (38,4)-(38,6) = "=>"
+ ├── @ MatchRequiredNode (location: (39,0)-(39,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (39,0)-(39,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,0)-(39,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (39,7)-(39,25))
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (39,7)-(39,14))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (39,10)-(39,13))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (39,10)-(39,13) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (39,7)-(39,10) = "%I["
+ │ │ │ └── closing_loc: (39,13)-(39,14) = "]"
+ │ │ ├── right:
+ │ │ │ @ ArrayNode (location: (39,18)-(39,25))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (39,21)-(39,24))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (39,21)-(39,24) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (39,18)-(39,21) = "%I["
+ │ │ │ └── closing_loc: (39,24)-(39,25) = "]"
+ │ │ ├── operator_loc: (39,15)-(39,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (39,4)-(39,6) = "=>"
+ ├── @ MatchRequiredNode (location: (40,0)-(40,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (40,0)-(40,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (40,0)-(40,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (40,7)-(40,25))
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (40,7)-(40,14))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (40,10)-(40,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (40,10)-(40,13) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (40,7)-(40,10) = "%w["
+ │ │ │ └── closing_loc: (40,13)-(40,14) = "]"
+ │ │ ├── right:
+ │ │ │ @ ArrayNode (location: (40,18)-(40,25))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (40,21)-(40,24))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (40,21)-(40,24) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (40,18)-(40,21) = "%w["
+ │ │ │ └── closing_loc: (40,24)-(40,25) = "]"
+ │ │ ├── operator_loc: (40,15)-(40,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (40,4)-(40,6) = "=>"
+ ├── @ MatchRequiredNode (location: (41,0)-(41,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (41,7)-(41,25))
+ │ │ ├── left:
+ │ │ │ @ ArrayNode (location: (41,7)-(41,14))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (41,10)-(41,13))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (41,10)-(41,13) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (41,7)-(41,10) = "%W["
+ │ │ │ └── closing_loc: (41,13)-(41,14) = "]"
+ │ │ ├── right:
+ │ │ │ @ ArrayNode (location: (41,18)-(41,25))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (41,21)-(41,24))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (41,21)-(41,24) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (41,18)-(41,21) = "%W["
+ │ │ │ └── closing_loc: (41,24)-(41,25) = "]"
+ │ │ ├── operator_loc: (41,15)-(41,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (41,4)-(41,6) = "=>"
+ ├── @ MatchRequiredNode (location: (42,0)-(42,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (42,0)-(42,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (42,0)-(42,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (42,7)-(42,25))
+ │ │ ├── left:
+ │ │ │ @ StringNode (location: (42,7)-(42,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (42,7)-(42,10) = "%q["
+ │ │ │ ├── content_loc: (42,10)-(42,13) = "foo"
+ │ │ │ ├── closing_loc: (42,13)-(42,14) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ StringNode (location: (42,18)-(42,25))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (42,18)-(42,21) = "%q["
+ │ │ │ ├── content_loc: (42,21)-(42,24) = "foo"
+ │ │ │ ├── closing_loc: (42,24)-(42,25) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (42,15)-(42,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (42,4)-(42,6) = "=>"
+ ├── @ MatchRequiredNode (location: (43,0)-(43,25))
+ │ ├── value:
+ │ │ @ CallNode (location: (43,0)-(43,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (43,0)-(43,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (43,7)-(43,25))
+ │ │ ├── left:
+ │ │ │ @ StringNode (location: (43,7)-(43,14))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (43,7)-(43,10) = "%Q["
+ │ │ │ ├── content_loc: (43,10)-(43,13) = "foo"
+ │ │ │ ├── closing_loc: (43,13)-(43,14) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ StringNode (location: (43,18)-(43,25))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (43,18)-(43,21) = "%Q["
+ │ │ │ ├── content_loc: (43,21)-(43,24) = "foo"
+ │ │ │ ├── closing_loc: (43,24)-(43,25) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (43,15)-(43,17) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (43,4)-(43,6) = "=>"
+ ├── @ MatchRequiredNode (location: (44,0)-(44,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (44,0)-(44,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (44,0)-(44,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (44,7)-(44,21))
+ │ │ ├── left:
+ │ │ │ @ StringNode (location: (44,7)-(44,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (44,7)-(44,8) = "\""
+ │ │ │ ├── content_loc: (44,8)-(44,11) = "foo"
+ │ │ │ ├── closing_loc: (44,11)-(44,12) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── right:
+ │ │ │ @ StringNode (location: (44,16)-(44,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (44,16)-(44,17) = "\""
+ │ │ │ ├── content_loc: (44,17)-(44,20) = "foo"
+ │ │ │ ├── closing_loc: (44,20)-(44,21) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── operator_loc: (44,13)-(44,15) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (44,4)-(44,6) = "=>"
+ ├── @ MatchRequiredNode (location: (45,0)-(45,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (45,0)-(45,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,0)-(45,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (45,7)-(45,17))
+ │ │ ├── left:
+ │ │ │ @ NilNode (location: (45,7)-(45,10))
+ │ │ ├── right:
+ │ │ │ @ NilNode (location: (45,14)-(45,17))
+ │ │ ├── operator_loc: (45,11)-(45,13) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (45,4)-(45,6) = "=>"
+ ├── @ MatchRequiredNode (location: (46,0)-(46,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (46,0)-(46,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (46,0)-(46,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (46,7)-(46,19))
+ │ │ ├── left:
+ │ │ │ @ SelfNode (location: (46,7)-(46,11))
+ │ │ ├── right:
+ │ │ │ @ SelfNode (location: (46,15)-(46,19))
+ │ │ ├── operator_loc: (46,12)-(46,14) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (46,4)-(46,6) = "=>"
+ ├── @ MatchRequiredNode (location: (47,0)-(47,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (47,0)-(47,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (47,7)-(47,19))
+ │ │ ├── left:
+ │ │ │ @ TrueNode (location: (47,7)-(47,11))
+ │ │ ├── right:
+ │ │ │ @ TrueNode (location: (47,15)-(47,19))
+ │ │ ├── operator_loc: (47,12)-(47,14) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (47,4)-(47,6) = "=>"
+ ├── @ MatchRequiredNode (location: (48,0)-(48,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (48,0)-(48,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (48,0)-(48,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (48,7)-(48,21))
+ │ │ ├── left:
+ │ │ │ @ FalseNode (location: (48,7)-(48,12))
+ │ │ ├── right:
+ │ │ │ @ FalseNode (location: (48,16)-(48,21))
+ │ │ ├── operator_loc: (48,13)-(48,15) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (48,4)-(48,6) = "=>"
+ ├── @ MatchRequiredNode (location: (49,0)-(49,27))
+ │ ├── value:
+ │ │ @ CallNode (location: (49,0)-(49,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (49,0)-(49,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (49,7)-(49,27))
+ │ │ ├── left:
+ │ │ │ @ SourceFileNode (location: (49,7)-(49,15))
+ │ │ │ └── filepath: "patterns.txt"
+ │ │ ├── right:
+ │ │ │ @ SourceFileNode (location: (49,19)-(49,27))
+ │ │ │ └── filepath: "patterns.txt"
+ │ │ ├── operator_loc: (49,16)-(49,18) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (49,4)-(49,6) = "=>"
+ ├── @ MatchRequiredNode (location: (50,0)-(50,27))
+ │ ├── value:
+ │ │ @ CallNode (location: (50,0)-(50,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (50,0)-(50,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (50,7)-(50,27))
+ │ │ ├── left:
+ │ │ │ @ SourceLineNode (location: (50,7)-(50,15))
+ │ │ ├── right:
+ │ │ │ @ SourceLineNode (location: (50,19)-(50,27))
+ │ │ ├── operator_loc: (50,16)-(50,18) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (50,4)-(50,6) = "=>"
+ ├── @ MatchRequiredNode (location: (51,0)-(51,35))
+ │ ├── value:
+ │ │ @ CallNode (location: (51,0)-(51,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (51,0)-(51,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (51,7)-(51,35))
+ │ │ ├── left:
+ │ │ │ @ SourceEncodingNode (location: (51,7)-(51,19))
+ │ │ ├── right:
+ │ │ │ @ SourceEncodingNode (location: (51,23)-(51,35))
+ │ │ ├── operator_loc: (51,20)-(51,22) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (51,4)-(51,6) = "=>"
+ ├── @ MatchRequiredNode (location: (52,0)-(52,31))
+ │ ├── value:
+ │ │ @ CallNode (location: (52,0)-(52,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (52,0)-(52,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (52,7)-(52,31))
+ │ │ ├── left:
+ │ │ │ @ LambdaNode (location: (52,7)-(52,17))
+ │ │ │ ├── locals: []
+ │ │ │ ├── operator_loc: (52,7)-(52,9) = "->"
+ │ │ │ ├── opening_loc: (52,10)-(52,11) = "{"
+ │ │ │ ├── closing_loc: (52,16)-(52,17) = "}"
+ │ │ │ ├── parameters: ∅
+ │ │ │ └── body:
+ │ │ │ @ StatementsNode (location: (52,12)-(52,15))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (52,12)-(52,15))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 1
+ │ │ ├── right:
+ │ │ │ @ LambdaNode (location: (52,21)-(52,31))
+ │ │ │ ├── locals: []
+ │ │ │ ├── operator_loc: (52,21)-(52,23) = "->"
+ │ │ │ ├── opening_loc: (52,24)-(52,25) = "{"
+ │ │ │ ├── closing_loc: (52,30)-(52,31) = "}"
+ │ │ │ ├── parameters: ∅
+ │ │ │ └── body:
+ │ │ │ @ StatementsNode (location: (52,26)-(52,29))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (52,26)-(52,29))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 1
+ │ │ ├── operator_loc: (52,18)-(52,20) = ".."
+ │ │ └── flags: ∅
+ │ └── operator_loc: (52,4)-(52,6) = "=>"
+ ├── @ MatchRequiredNode (location: (54,0)-(54,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (54,0)-(54,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (54,0)-(54,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ PinnedVariableNode (location: (54,7)-(54,11))
+ │ │ ├── variable:
+ │ │ │ @ LocalVariableReadNode (location: (54,8)-(54,11))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ └── operator_loc: (54,7)-(54,8) = "^"
+ │ └── operator_loc: (54,4)-(54,6) = "=>"
+ ├── @ MatchRequiredNode (location: (55,0)-(55,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (55,0)-(55,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (55,0)-(55,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ PinnedVariableNode (location: (55,7)-(55,12))
+ │ │ ├── variable:
+ │ │ │ @ InstanceVariableReadNode (location: (55,8)-(55,12))
+ │ │ │ └── name: :@bar
+ │ │ └── operator_loc: (55,7)-(55,8) = "^"
+ │ └── operator_loc: (55,4)-(55,6) = "=>"
+ ├── @ MatchRequiredNode (location: (56,0)-(56,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (56,0)-(56,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (56,0)-(56,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ PinnedVariableNode (location: (56,7)-(56,13))
+ │ │ ├── variable:
+ │ │ │ @ ClassVariableReadNode (location: (56,8)-(56,13))
+ │ │ │ └── name: :@@bar
+ │ │ └── operator_loc: (56,7)-(56,8) = "^"
+ │ └── operator_loc: (56,4)-(56,6) = "=>"
+ ├── @ MatchRequiredNode (location: (57,0)-(57,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (57,0)-(57,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (57,0)-(57,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ PinnedVariableNode (location: (57,7)-(57,12))
+ │ │ ├── variable:
+ │ │ │ @ GlobalVariableReadNode (location: (57,8)-(57,12))
+ │ │ │ └── name: :$bar
+ │ │ └── operator_loc: (57,7)-(57,8) = "^"
+ │ └── operator_loc: (57,4)-(57,6) = "=>"
+ ├── @ MatchRequiredNode (location: (59,0)-(59,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (59,0)-(59,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (59,0)-(59,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ PinnedExpressionNode (location: (59,7)-(59,11))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (59,9)-(59,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (59,7)-(59,8) = "^"
+ │ │ ├── lparen_loc: (59,8)-(59,9) = "("
+ │ │ └── rparen_loc: (59,10)-(59,11) = ")"
+ │ └── operator_loc: (59,4)-(59,6) = "=>"
+ ├── @ MatchRequiredNode (location: (60,0)-(60,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (60,0)-(60,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (60,0)-(60,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ PinnedExpressionNode (location: (60,7)-(60,13))
+ │ │ ├── expression:
+ │ │ │ @ NilNode (location: (60,9)-(60,12))
+ │ │ ├── operator_loc: (60,7)-(60,8) = "^"
+ │ │ ├── lparen_loc: (60,8)-(60,9) = "("
+ │ │ └── rparen_loc: (60,12)-(60,13) = ")"
+ │ └── operator_loc: (60,4)-(60,6) = "=>"
+ ├── @ MatchRequiredNode (location: (61,0)-(61,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (61,0)-(61,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (61,0)-(61,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ PinnedExpressionNode (location: (61,7)-(61,23))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (61,9)-(61,22))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ StringNode (location: (61,9)-(61,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (61,9)-(61,10) = "\""
+ │ │ │ │ ├── content_loc: (61,10)-(61,13) = "bar"
+ │ │ │ │ ├── closing_loc: (61,13)-(61,14) = "\""
+ │ │ │ │ └── unescaped: "bar"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (61,15)-(61,16) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (61,17)-(61,22))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (61,17)-(61,22))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (61,17)-(61,18) = "\""
+ │ │ │ │ ├── content_loc: (61,18)-(61,21) = "baz"
+ │ │ │ │ ├── closing_loc: (61,21)-(61,22) = "\""
+ │ │ │ │ └── unescaped: "baz"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── operator_loc: (61,7)-(61,8) = "^"
+ │ │ ├── lparen_loc: (61,8)-(61,9) = "("
+ │ │ └── rparen_loc: (61,22)-(61,23) = ")"
+ │ └── operator_loc: (61,4)-(61,6) = "=>"
+ ├── @ MatchRequiredNode (location: (63,0)-(63,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (63,0)-(63,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (63,0)-(63,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ConstantReadNode (location: (63,7)-(63,10))
+ │ │ └── name: :Foo
+ │ └── operator_loc: (63,4)-(63,6) = "=>"
+ ├── @ MatchRequiredNode (location: (64,0)-(64,20))
+ │ ├── value:
+ │ │ @ CallNode (location: (64,0)-(64,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (64,0)-(64,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ConstantPathNode (location: (64,7)-(64,20))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (64,7)-(64,15))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (64,7)-(64,10))
+ │ │ │ │ └── name: :Foo
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (64,12)-(64,15))
+ │ │ │ │ └── name: :Bar
+ │ │ │ └── delimiter_loc: (64,10)-(64,12) = "::"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (64,17)-(64,20))
+ │ │ │ └── name: :Baz
+ │ │ └── delimiter_loc: (64,15)-(64,17) = "::"
+ │ └── operator_loc: (64,4)-(64,6) = "=>"
+ ├── @ MatchRequiredNode (location: (65,0)-(65,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (65,0)-(65,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (65,0)-(65,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ConstantPathNode (location: (65,7)-(65,12))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (65,9)-(65,12))
+ │ │ │ └── name: :Foo
+ │ │ └── delimiter_loc: (65,7)-(65,9) = "::"
+ │ └── operator_loc: (65,4)-(65,6) = "=>"
+ ├── @ MatchRequiredNode (location: (66,0)-(66,22))
+ │ ├── value:
+ │ │ @ CallNode (location: (66,0)-(66,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (66,0)-(66,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ConstantPathNode (location: (66,7)-(66,22))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (66,7)-(66,17))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantPathNode (location: (66,7)-(66,12))
+ │ │ │ │ ├── parent: ∅
+ │ │ │ │ ├── child:
+ │ │ │ │ │ @ ConstantReadNode (location: (66,9)-(66,12))
+ │ │ │ │ │ └── name: :Foo
+ │ │ │ │ └── delimiter_loc: (66,7)-(66,9) = "::"
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (66,14)-(66,17))
+ │ │ │ │ └── name: :Bar
+ │ │ │ └── delimiter_loc: (66,12)-(66,14) = "::"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (66,19)-(66,22))
+ │ │ │ └── name: :Baz
+ │ │ └── delimiter_loc: (66,17)-(66,19) = "::"
+ │ └── operator_loc: (66,4)-(66,6) = "=>"
+ ├── @ MatchRequiredNode (location: (68,0)-(68,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (68,0)-(68,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (68,0)-(68,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (68,7)-(68,12))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (68,7)-(68,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (68,10)-(68,11) = "("
+ │ │ └── closing_loc: (68,11)-(68,12) = ")"
+ │ └── operator_loc: (68,4)-(68,6) = "=>"
+ ├── @ MatchRequiredNode (location: (69,0)-(69,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (69,0)-(69,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (69,0)-(69,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (69,7)-(69,13))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (69,7)-(69,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (69,11)-(69,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (69,10)-(69,11) = "("
+ │ │ └── closing_loc: (69,12)-(69,13) = ")"
+ │ └── operator_loc: (69,4)-(69,6) = "=>"
+ ├── @ MatchRequiredNode (location: (70,0)-(70,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (70,0)-(70,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (70,0)-(70,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (70,7)-(70,19))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (70,7)-(70,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (70,11)-(70,12))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── @ IntegerNode (location: (70,14)-(70,15))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (70,17)-(70,18))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (70,10)-(70,11) = "("
+ │ │ └── closing_loc: (70,18)-(70,19) = ")"
+ │ └── operator_loc: (70,4)-(70,6) = "=>"
+ ├── @ MatchRequiredNode (location: (71,0)-(71,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (71,0)-(71,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (71,0)-(71,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (71,7)-(71,15))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (71,7)-(71,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (71,11)-(71,14))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (71,10)-(71,11) = "("
+ │ │ └── closing_loc: (71,14)-(71,15) = ")"
+ │ └── operator_loc: (71,4)-(71,6) = "=>"
+ ├── @ MatchRequiredNode (location: (72,0)-(72,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (72,0)-(72,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (72,0)-(72,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (72,7)-(72,21))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (72,7)-(72,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (72,11)-(72,15))
+ │ │ │ ├── operator_loc: (72,11)-(72,12) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (72,12)-(72,15))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (72,17)-(72,20))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (72,10)-(72,11) = "("
+ │ │ └── closing_loc: (72,20)-(72,21) = ")"
+ │ └── operator_loc: (72,4)-(72,6) = "=>"
+ ├── @ MatchRequiredNode (location: (73,0)-(73,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (73,0)-(73,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (73,0)-(73,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (73,7)-(73,21))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (73,7)-(73,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (73,11)-(73,14))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (73,16)-(73,20))
+ │ │ │ ├── operator_loc: (73,16)-(73,17) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (73,17)-(73,20))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (73,10)-(73,11) = "("
+ │ │ └── closing_loc: (73,20)-(73,21) = ")"
+ │ └── operator_loc: (73,4)-(73,6) = "=>"
+ ├── @ MatchRequiredNode (location: (74,0)-(74,27))
+ │ ├── value:
+ │ │ @ CallNode (location: (74,0)-(74,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (74,0)-(74,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (74,7)-(74,27))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (74,7)-(74,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (74,11)-(74,15))
+ │ │ │ ├── operator_loc: (74,11)-(74,12) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (74,12)-(74,15))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (74,17)-(74,20))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (74,22)-(74,26))
+ │ │ │ ├── operator_loc: (74,22)-(74,23) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (74,23)-(74,26))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (74,10)-(74,11) = "("
+ │ │ └── closing_loc: (74,26)-(74,27) = ")"
+ │ └── operator_loc: (74,4)-(74,6) = "=>"
+ ├── @ MatchRequiredNode (location: (76,0)-(76,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (76,0)-(76,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (76,0)-(76,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (76,7)-(76,12))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (76,7)-(76,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (76,10)-(76,11) = "["
+ │ │ └── closing_loc: (76,11)-(76,12) = "]"
+ │ └── operator_loc: (76,4)-(76,6) = "=>"
+ ├── @ MatchRequiredNode (location: (77,0)-(77,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (77,0)-(77,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (77,0)-(77,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (77,7)-(77,13))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (77,7)-(77,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (77,11)-(77,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (77,10)-(77,11) = "["
+ │ │ └── closing_loc: (77,12)-(77,13) = "]"
+ │ └── operator_loc: (77,4)-(77,6) = "=>"
+ ├── @ MatchRequiredNode (location: (78,0)-(78,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (78,0)-(78,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (78,0)-(78,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (78,7)-(78,19))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (78,7)-(78,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 3)
+ │ │ │ ├── @ IntegerNode (location: (78,11)-(78,12))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── @ IntegerNode (location: (78,14)-(78,15))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (78,17)-(78,18))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (78,10)-(78,11) = "["
+ │ │ └── closing_loc: (78,18)-(78,19) = "]"
+ │ └── operator_loc: (78,4)-(78,6) = "=>"
+ ├── @ MatchRequiredNode (location: (79,0)-(79,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (79,0)-(79,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (79,0)-(79,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (79,7)-(79,17))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (79,7)-(79,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ ArrayPatternNode (location: (79,11)-(79,16))
+ │ │ │ ├── constant:
+ │ │ │ │ @ ConstantReadNode (location: (79,11)-(79,14))
+ │ │ │ │ └── name: :Foo
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (79,14)-(79,15) = "["
+ │ │ │ └── closing_loc: (79,15)-(79,16) = "]"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (79,10)-(79,11) = "["
+ │ │ └── closing_loc: (79,16)-(79,17) = "]"
+ │ └── operator_loc: (79,4)-(79,6) = "=>"
+ ├── @ MatchRequiredNode (location: (80,0)-(80,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (80,0)-(80,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (80,0)-(80,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (80,7)-(80,15))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (80,7)-(80,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (80,11)-(80,14))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (80,10)-(80,11) = "["
+ │ │ └── closing_loc: (80,14)-(80,15) = "]"
+ │ └── operator_loc: (80,4)-(80,6) = "=>"
+ ├── @ MatchRequiredNode (location: (81,0)-(81,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (81,0)-(81,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (81,0)-(81,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (81,7)-(81,21))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (81,7)-(81,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (81,11)-(81,15))
+ │ │ │ ├── operator_loc: (81,11)-(81,12) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (81,12)-(81,15))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (81,17)-(81,20))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (81,10)-(81,11) = "["
+ │ │ └── closing_loc: (81,20)-(81,21) = "]"
+ │ └── operator_loc: (81,4)-(81,6) = "=>"
+ ├── @ MatchRequiredNode (location: (82,0)-(82,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (82,0)-(82,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (82,0)-(82,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (82,7)-(82,21))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (82,7)-(82,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (82,11)-(82,14))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (82,16)-(82,20))
+ │ │ │ ├── operator_loc: (82,16)-(82,17) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (82,17)-(82,20))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (82,10)-(82,11) = "["
+ │ │ └── closing_loc: (82,20)-(82,21) = "]"
+ │ └── operator_loc: (82,4)-(82,6) = "=>"
+ ├── @ MatchRequiredNode (location: (83,0)-(83,27))
+ │ ├── value:
+ │ │ @ CallNode (location: (83,0)-(83,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (83,0)-(83,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (83,7)-(83,27))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (83,7)-(83,10))
+ │ │ │ └── name: :Foo
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (83,11)-(83,15))
+ │ │ │ ├── operator_loc: (83,11)-(83,12) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (83,12)-(83,15))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (83,17)-(83,20))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (83,22)-(83,26))
+ │ │ │ ├── operator_loc: (83,22)-(83,23) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (83,23)-(83,26))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (83,10)-(83,11) = "["
+ │ │ └── closing_loc: (83,26)-(83,27) = "]"
+ │ └── operator_loc: (83,4)-(83,6) = "=>"
+ ├── @ MatchRequiredNode (location: (85,0)-(85,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (85,0)-(85,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (85,0)-(85,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (85,7)-(85,11))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (85,7)-(85,11))
+ │ │ │ ├── operator_loc: (85,7)-(85,8) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (85,8)-(85,11))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (85,4)-(85,6) = "=>"
+ ├── @ MatchRequiredNode (location: (86,0)-(86,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (86,0)-(86,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (86,0)-(86,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (86,7)-(86,21))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (86,7)-(86,11))
+ │ │ │ ├── operator_loc: (86,7)-(86,8) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (86,8)-(86,11))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (86,13)-(86,16))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (86,18)-(86,21))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (86,4)-(86,6) = "=>"
+ ├── @ MatchRequiredNode (location: (87,0)-(87,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (87,0)-(87,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (87,0)-(87,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (87,7)-(87,21))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (87,7)-(87,10))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (87,12)-(87,16))
+ │ │ │ ├── operator_loc: (87,12)-(87,13) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (87,13)-(87,16))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (87,18)-(87,21))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (87,4)-(87,6) = "=>"
+ ├── @ MatchRequiredNode (location: (88,0)-(88,21))
+ │ ├── value:
+ │ │ @ CallNode (location: (88,0)-(88,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (88,0)-(88,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (88,7)-(88,21))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (88,7)-(88,10))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (88,12)-(88,15))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (88,17)-(88,21))
+ │ │ │ ├── operator_loc: (88,17)-(88,18) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (88,18)-(88,21))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (88,4)-(88,6) = "=>"
+ ├── @ MatchRequiredNode (location: (89,0)-(89,22))
+ │ ├── value:
+ │ │ @ CallNode (location: (89,0)-(89,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (89,0)-(89,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (89,7)-(89,22))
+ │ │ ├── constant: ∅
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (89,7)-(89,11))
+ │ │ │ ├── operator_loc: (89,7)-(89,8) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (89,8)-(89,11))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (89,13)-(89,16))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (89,18)-(89,22))
+ │ │ │ ├── operator_loc: (89,18)-(89,19) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (89,19)-(89,22))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (89,4)-(89,6) = "=>"
+ ├── @ MatchRequiredNode (location: (91,0)-(91,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (91,0)-(91,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (91,0)-(91,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (91,7)-(91,9))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (91,7)-(91,8) = "["
+ │ │ └── closing_loc: (91,8)-(91,9) = "]"
+ │ └── operator_loc: (91,4)-(91,6) = "=>"
+ ├── @ MatchRequiredNode (location: (92,0)-(92,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (92,0)-(92,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (92,0)-(92,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (92,7)-(92,17))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ ArrayPatternNode (location: (92,8)-(92,16))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ ArrayPatternNode (location: (92,9)-(92,15))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ ArrayPatternNode (location: (92,10)-(92,14))
+ │ │ │ │ │ ├── constant: ∅
+ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ └── @ ArrayPatternNode (location: (92,11)-(92,13))
+ │ │ │ │ │ │ ├── constant: ∅
+ │ │ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ ├── opening_loc: (92,11)-(92,12) = "["
+ │ │ │ │ │ │ └── closing_loc: (92,12)-(92,13) = "]"
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── opening_loc: (92,10)-(92,11) = "["
+ │ │ │ │ │ └── closing_loc: (92,13)-(92,14) = "]"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (92,9)-(92,10) = "["
+ │ │ │ │ └── closing_loc: (92,14)-(92,15) = "]"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (92,8)-(92,9) = "["
+ │ │ │ └── closing_loc: (92,15)-(92,16) = "]"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (92,7)-(92,8) = "["
+ │ │ └── closing_loc: (92,16)-(92,17) = "]"
+ │ └── operator_loc: (92,4)-(92,6) = "=>"
+ ├── @ MatchRequiredNode (location: (94,0)-(94,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (94,0)-(94,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (94,0)-(94,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (94,7)-(94,13))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (94,8)-(94,12))
+ │ │ │ ├── operator_loc: (94,8)-(94,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (94,9)-(94,12))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (94,7)-(94,8) = "["
+ │ │ └── closing_loc: (94,12)-(94,13) = "]"
+ │ └── operator_loc: (94,4)-(94,6) = "=>"
+ ├── @ MatchRequiredNode (location: (95,0)-(95,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (95,0)-(95,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (95,0)-(95,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (95,7)-(95,23))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (95,8)-(95,12))
+ │ │ │ ├── operator_loc: (95,8)-(95,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (95,9)-(95,12))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (95,14)-(95,17))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (95,19)-(95,22))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (95,7)-(95,8) = "["
+ │ │ └── closing_loc: (95,22)-(95,23) = "]"
+ │ └── operator_loc: (95,4)-(95,6) = "=>"
+ ├── @ MatchRequiredNode (location: (96,0)-(96,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (96,0)-(96,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (96,0)-(96,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (96,7)-(96,23))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (96,8)-(96,11))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (96,13)-(96,17))
+ │ │ │ ├── operator_loc: (96,13)-(96,14) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (96,14)-(96,17))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (96,19)-(96,22))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (96,7)-(96,8) = "["
+ │ │ └── closing_loc: (96,22)-(96,23) = "]"
+ │ └── operator_loc: (96,4)-(96,6) = "=>"
+ ├── @ MatchRequiredNode (location: (97,0)-(97,23))
+ │ ├── value:
+ │ │ @ CallNode (location: (97,0)-(97,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (97,0)-(97,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (97,7)-(97,23))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (97,8)-(97,11))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (97,13)-(97,16))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (97,18)-(97,22))
+ │ │ │ ├── operator_loc: (97,18)-(97,19) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (97,19)-(97,22))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (97,7)-(97,8) = "["
+ │ │ └── closing_loc: (97,22)-(97,23) = "]"
+ │ └── operator_loc: (97,4)-(97,6) = "=>"
+ ├── @ MatchRequiredNode (location: (98,0)-(98,24))
+ │ ├── value:
+ │ │ @ CallNode (location: (98,0)-(98,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (98,0)-(98,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (98,7)-(98,24))
+ │ │ ├── constant: ∅
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (98,8)-(98,12))
+ │ │ │ ├── operator_loc: (98,8)-(98,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (98,9)-(98,12))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (98,14)-(98,17))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (98,19)-(98,23))
+ │ │ │ ├── operator_loc: (98,19)-(98,20) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (98,20)-(98,23))
+ │ │ │ ├── name: :qux
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (98,7)-(98,8) = "["
+ │ │ └── closing_loc: (98,23)-(98,24) = "]"
+ │ └── operator_loc: (98,4)-(98,6) = "=>"
+ ├── @ MatchPredicateNode (location: (100,0)-(100,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (100,0)-(100,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (100,0)-(100,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ LocalVariableTargetNode (location: (100,7)-(100,10))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ └── operator_loc: (100,4)-(100,6) = "in"
+ ├── @ MatchPredicateNode (location: (101,0)-(101,8))
+ │ ├── value:
+ │ │ @ CallNode (location: (101,0)-(101,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (101,0)-(101,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (101,7)-(101,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (101,4)-(101,6) = "in"
+ ├── @ MatchPredicateNode (location: (102,0)-(102,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (102,0)-(102,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (102,0)-(102,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FloatNode (location: (102,7)-(102,10))
+ │ └── operator_loc: (102,4)-(102,6) = "in"
+ ├── @ MatchPredicateNode (location: (103,0)-(103,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (103,0)-(103,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (103,0)-(103,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ImaginaryNode (location: (103,7)-(103,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (103,7)-(103,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (103,4)-(103,6) = "in"
+ ├── @ MatchPredicateNode (location: (104,0)-(104,9))
+ │ ├── value:
+ │ │ @ CallNode (location: (104,0)-(104,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (104,0)-(104,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RationalNode (location: (104,7)-(104,9))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (104,7)-(104,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (104,4)-(104,6) = "in"
+ ├── @ MatchPredicateNode (location: (105,0)-(105,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (105,0)-(105,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (105,0)-(105,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (105,7)-(105,11))
+ │ │ ├── opening_loc: (105,7)-(105,8) = ":"
+ │ │ ├── value_loc: (105,8)-(105,11) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (105,4)-(105,6) = "in"
+ ├── @ MatchPredicateNode (location: (106,0)-(106,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (106,0)-(106,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (106,0)-(106,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (106,7)-(106,14))
+ │ │ ├── opening_loc: (106,7)-(106,10) = "%s["
+ │ │ ├── value_loc: (106,10)-(106,13) = "foo"
+ │ │ ├── closing_loc: (106,13)-(106,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (106,4)-(106,6) = "in"
+ ├── @ MatchPredicateNode (location: (107,0)-(107,13))
+ │ ├── value:
+ │ │ @ CallNode (location: (107,0)-(107,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (107,0)-(107,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SymbolNode (location: (107,7)-(107,13))
+ │ │ ├── opening_loc: (107,7)-(107,9) = ":\""
+ │ │ ├── value_loc: (107,9)-(107,12) = "foo"
+ │ │ ├── closing_loc: (107,12)-(107,13) = "\""
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (107,4)-(107,6) = "in"
+ ├── @ MatchPredicateNode (location: (108,0)-(108,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (108,0)-(108,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (108,0)-(108,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ RegularExpressionNode (location: (108,7)-(108,12))
+ │ │ ├── opening_loc: (108,7)-(108,8) = "/"
+ │ │ ├── content_loc: (108,8)-(108,11) = "foo"
+ │ │ ├── closing_loc: (108,11)-(108,12) = "/"
+ │ │ ├── unescaped: "foo"
+ │ │ └── flags: ∅
+ │ └── operator_loc: (108,4)-(108,6) = "in"
+ ├── @ MatchPredicateNode (location: (109,0)-(109,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (109,0)-(109,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (109,0)-(109,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (109,7)-(109,12))
+ │ │ ├── opening_loc: (109,7)-(109,8) = "`"
+ │ │ ├── content_loc: (109,8)-(109,11) = "foo"
+ │ │ ├── closing_loc: (109,11)-(109,12) = "`"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (109,4)-(109,6) = "in"
+ ├── @ MatchPredicateNode (location: (110,0)-(110,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (110,0)-(110,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (110,0)-(110,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ XStringNode (location: (110,7)-(110,14))
+ │ │ ├── opening_loc: (110,7)-(110,10) = "%x["
+ │ │ ├── content_loc: (110,10)-(110,13) = "foo"
+ │ │ ├── closing_loc: (110,13)-(110,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (110,4)-(110,6) = "in"
+ ├── @ MatchPredicateNode (location: (111,0)-(111,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (111,0)-(111,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (111,0)-(111,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (111,7)-(111,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (111,10)-(111,13))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (111,10)-(111,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (111,7)-(111,10) = "%i["
+ │ │ └── closing_loc: (111,13)-(111,14) = "]"
+ │ └── operator_loc: (111,4)-(111,6) = "in"
+ ├── @ MatchPredicateNode (location: (112,0)-(112,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (112,0)-(112,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (112,0)-(112,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (112,7)-(112,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (112,10)-(112,13))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (112,10)-(112,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (112,7)-(112,10) = "%I["
+ │ │ └── closing_loc: (112,13)-(112,14) = "]"
+ │ └── operator_loc: (112,4)-(112,6) = "in"
+ ├── @ MatchPredicateNode (location: (113,0)-(113,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (113,0)-(113,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (113,0)-(113,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (113,7)-(113,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ StringNode (location: (113,10)-(113,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (113,10)-(113,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (113,7)-(113,10) = "%w["
+ │ │ └── closing_loc: (113,13)-(113,14) = "]"
+ │ └── operator_loc: (113,4)-(113,6) = "in"
+ ├── @ MatchPredicateNode (location: (114,0)-(114,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (114,0)-(114,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (114,0)-(114,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ ArrayNode (location: (114,7)-(114,14))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ StringNode (location: (114,10)-(114,13))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (114,10)-(114,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── opening_loc: (114,7)-(114,10) = "%W["
+ │ │ └── closing_loc: (114,13)-(114,14) = "]"
+ │ └── operator_loc: (114,4)-(114,6) = "in"
+ ├── @ MatchPredicateNode (location: (115,0)-(115,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (115,0)-(115,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (115,0)-(115,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ StringNode (location: (115,7)-(115,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (115,7)-(115,10) = "%q["
+ │ │ ├── content_loc: (115,10)-(115,13) = "foo"
+ │ │ ├── closing_loc: (115,13)-(115,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (115,4)-(115,6) = "in"
+ ├── @ MatchPredicateNode (location: (116,0)-(116,14))
+ │ ├── value:
+ │ │ @ CallNode (location: (116,0)-(116,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (116,0)-(116,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ StringNode (location: (116,7)-(116,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (116,7)-(116,10) = "%Q["
+ │ │ ├── content_loc: (116,10)-(116,13) = "foo"
+ │ │ ├── closing_loc: (116,13)-(116,14) = "]"
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (116,4)-(116,6) = "in"
+ ├── @ MatchPredicateNode (location: (117,0)-(117,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (117,0)-(117,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (117,0)-(117,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ StringNode (location: (117,7)-(117,12))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (117,7)-(117,8) = "\""
+ │ │ ├── content_loc: (117,8)-(117,11) = "foo"
+ │ │ ├── closing_loc: (117,11)-(117,12) = "\""
+ │ │ └── unescaped: "foo"
+ │ └── operator_loc: (117,4)-(117,6) = "in"
+ ├── @ MatchPredicateNode (location: (118,0)-(118,10))
+ │ ├── value:
+ │ │ @ CallNode (location: (118,0)-(118,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (118,0)-(118,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ NilNode (location: (118,7)-(118,10))
+ │ └── operator_loc: (118,4)-(118,6) = "in"
+ ├── @ MatchPredicateNode (location: (119,0)-(119,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (119,0)-(119,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (119,0)-(119,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SelfNode (location: (119,7)-(119,11))
+ │ └── operator_loc: (119,4)-(119,6) = "in"
+ ├── @ MatchPredicateNode (location: (120,0)-(120,11))
+ │ ├── value:
+ │ │ @ CallNode (location: (120,0)-(120,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (120,0)-(120,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ TrueNode (location: (120,7)-(120,11))
+ │ └── operator_loc: (120,4)-(120,6) = "in"
+ ├── @ MatchPredicateNode (location: (121,0)-(121,12))
+ │ ├── value:
+ │ │ @ CallNode (location: (121,0)-(121,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (121,0)-(121,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ FalseNode (location: (121,7)-(121,12))
+ │ └── operator_loc: (121,4)-(121,6) = "in"
+ ├── @ MatchPredicateNode (location: (122,0)-(122,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (122,0)-(122,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (122,0)-(122,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SourceFileNode (location: (122,7)-(122,15))
+ │ │ └── filepath: "patterns.txt"
+ │ └── operator_loc: (122,4)-(122,6) = "in"
+ ├── @ MatchPredicateNode (location: (123,0)-(123,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (123,0)-(123,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (123,0)-(123,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SourceLineNode (location: (123,7)-(123,15))
+ │ └── operator_loc: (123,4)-(123,6) = "in"
+ ├── @ MatchPredicateNode (location: (124,0)-(124,19))
+ │ ├── value:
+ │ │ @ CallNode (location: (124,0)-(124,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (124,0)-(124,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ SourceEncodingNode (location: (124,7)-(124,19))
+ │ └── operator_loc: (124,4)-(124,6) = "in"
+ ├── @ MatchPredicateNode (location: (125,0)-(125,17))
+ │ ├── value:
+ │ │ @ CallNode (location: (125,0)-(125,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (125,0)-(125,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── pattern:
+ │ │ @ LambdaNode (location: (125,7)-(125,17))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (125,7)-(125,9) = "->"
+ │ │ ├── opening_loc: (125,10)-(125,11) = "{"
+ │ │ ├── closing_loc: (125,16)-(125,17) = "}"
+ │ │ ├── parameters: ∅
+ │ │ └── body:
+ │ │ @ StatementsNode (location: (125,12)-(125,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (125,12)-(125,15))
+ │ │ ├── name: :bar
+ │ │ └── depth: 1
+ │ └── operator_loc: (125,4)-(125,6) = "in"
+ ├── @ CaseNode (location: (127,0)-(127,25))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (127,5)-(127,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (127,5)-(127,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (127,10)-(127,21))
+ │ │ ├── pattern:
+ │ │ │ @ LocalVariableTargetNode (location: (127,13)-(127,16))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (127,10)-(127,12) = "in"
+ │ │ └── then_loc: (127,17)-(127,21) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (127,0)-(127,4) = "case"
+ │ └── end_keyword_loc: (127,22)-(127,25) = "end"
+ ├── @ CaseNode (location: (128,0)-(128,23))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (128,5)-(128,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (128,5)-(128,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (128,10)-(128,19))
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (128,13)-(128,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (128,10)-(128,12) = "in"
+ │ │ └── then_loc: (128,15)-(128,19) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (128,0)-(128,4) = "case"
+ │ └── end_keyword_loc: (128,20)-(128,23) = "end"
+ ├── @ CaseNode (location: (129,0)-(129,25))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (129,5)-(129,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (129,5)-(129,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (129,10)-(129,21))
+ │ │ ├── pattern:
+ │ │ │ @ FloatNode (location: (129,13)-(129,16))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (129,10)-(129,12) = "in"
+ │ │ └── then_loc: (129,17)-(129,21) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (129,0)-(129,4) = "case"
+ │ └── end_keyword_loc: (129,22)-(129,25) = "end"
+ ├── @ CaseNode (location: (130,0)-(130,24))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (130,5)-(130,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (130,5)-(130,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (130,10)-(130,20))
+ │ │ ├── pattern:
+ │ │ │ @ ImaginaryNode (location: (130,13)-(130,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (130,13)-(130,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (130,10)-(130,12) = "in"
+ │ │ └── then_loc: (130,16)-(130,20) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (130,0)-(130,4) = "case"
+ │ └── end_keyword_loc: (130,21)-(130,24) = "end"
+ ├── @ CaseNode (location: (131,0)-(131,24))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (131,5)-(131,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (131,5)-(131,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (131,10)-(131,20))
+ │ │ ├── pattern:
+ │ │ │ @ RationalNode (location: (131,13)-(131,15))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (131,13)-(131,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (131,10)-(131,12) = "in"
+ │ │ └── then_loc: (131,16)-(131,20) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (131,0)-(131,4) = "case"
+ │ └── end_keyword_loc: (131,21)-(131,24) = "end"
+ ├── @ CaseNode (location: (132,0)-(132,26))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (132,5)-(132,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (132,5)-(132,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (132,10)-(132,22))
+ │ │ ├── pattern:
+ │ │ │ @ SymbolNode (location: (132,13)-(132,17))
+ │ │ │ ├── opening_loc: (132,13)-(132,14) = ":"
+ │ │ │ ├── value_loc: (132,14)-(132,17) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (132,10)-(132,12) = "in"
+ │ │ └── then_loc: (132,18)-(132,22) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (132,0)-(132,4) = "case"
+ │ └── end_keyword_loc: (132,23)-(132,26) = "end"
+ ├── @ CaseNode (location: (133,0)-(133,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (133,5)-(133,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (133,5)-(133,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (133,10)-(133,25))
+ │ │ ├── pattern:
+ │ │ │ @ SymbolNode (location: (133,13)-(133,20))
+ │ │ │ ├── opening_loc: (133,13)-(133,16) = "%s["
+ │ │ │ ├── value_loc: (133,16)-(133,19) = "foo"
+ │ │ │ ├── closing_loc: (133,19)-(133,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (133,10)-(133,12) = "in"
+ │ │ └── then_loc: (133,21)-(133,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (133,0)-(133,4) = "case"
+ │ └── end_keyword_loc: (133,26)-(133,29) = "end"
+ ├── @ CaseNode (location: (134,0)-(134,28))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (134,5)-(134,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (134,5)-(134,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (134,10)-(134,24))
+ │ │ ├── pattern:
+ │ │ │ @ SymbolNode (location: (134,13)-(134,19))
+ │ │ │ ├── opening_loc: (134,13)-(134,15) = ":\""
+ │ │ │ ├── value_loc: (134,15)-(134,18) = "foo"
+ │ │ │ ├── closing_loc: (134,18)-(134,19) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (134,10)-(134,12) = "in"
+ │ │ └── then_loc: (134,20)-(134,24) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (134,0)-(134,4) = "case"
+ │ └── end_keyword_loc: (134,25)-(134,28) = "end"
+ ├── @ CaseNode (location: (135,0)-(135,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (135,5)-(135,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (135,5)-(135,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (135,10)-(135,23))
+ │ │ ├── pattern:
+ │ │ │ @ RegularExpressionNode (location: (135,13)-(135,18))
+ │ │ │ ├── opening_loc: (135,13)-(135,14) = "/"
+ │ │ │ ├── content_loc: (135,14)-(135,17) = "foo"
+ │ │ │ ├── closing_loc: (135,17)-(135,18) = "/"
+ │ │ │ ├── unescaped: "foo"
+ │ │ │ └── flags: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (135,10)-(135,12) = "in"
+ │ │ └── then_loc: (135,19)-(135,23) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (135,0)-(135,4) = "case"
+ │ └── end_keyword_loc: (135,24)-(135,27) = "end"
+ ├── @ CaseNode (location: (136,0)-(136,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (136,5)-(136,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (136,5)-(136,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (136,10)-(136,23))
+ │ │ ├── pattern:
+ │ │ │ @ XStringNode (location: (136,13)-(136,18))
+ │ │ │ ├── opening_loc: (136,13)-(136,14) = "`"
+ │ │ │ ├── content_loc: (136,14)-(136,17) = "foo"
+ │ │ │ ├── closing_loc: (136,17)-(136,18) = "`"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (136,10)-(136,12) = "in"
+ │ │ └── then_loc: (136,19)-(136,23) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (136,0)-(136,4) = "case"
+ │ └── end_keyword_loc: (136,24)-(136,27) = "end"
+ ├── @ CaseNode (location: (137,0)-(137,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (137,5)-(137,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (137,5)-(137,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (137,10)-(137,25))
+ │ │ ├── pattern:
+ │ │ │ @ XStringNode (location: (137,13)-(137,20))
+ │ │ │ ├── opening_loc: (137,13)-(137,16) = "%x["
+ │ │ │ ├── content_loc: (137,16)-(137,19) = "foo"
+ │ │ │ ├── closing_loc: (137,19)-(137,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (137,10)-(137,12) = "in"
+ │ │ └── then_loc: (137,21)-(137,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (137,0)-(137,4) = "case"
+ │ └── end_keyword_loc: (137,26)-(137,29) = "end"
+ ├── @ CaseNode (location: (138,0)-(138,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (138,5)-(138,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (138,5)-(138,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (138,10)-(138,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (138,13)-(138,20))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (138,16)-(138,19))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (138,16)-(138,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (138,13)-(138,16) = "%i["
+ │ │ │ └── closing_loc: (138,19)-(138,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (138,10)-(138,12) = "in"
+ │ │ └── then_loc: (138,21)-(138,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (138,0)-(138,4) = "case"
+ │ └── end_keyword_loc: (138,26)-(138,29) = "end"
+ ├── @ CaseNode (location: (139,0)-(139,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (139,5)-(139,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (139,5)-(139,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (139,10)-(139,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (139,13)-(139,20))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (139,16)-(139,19))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (139,16)-(139,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (139,13)-(139,16) = "%I["
+ │ │ │ └── closing_loc: (139,19)-(139,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (139,10)-(139,12) = "in"
+ │ │ └── then_loc: (139,21)-(139,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (139,0)-(139,4) = "case"
+ │ └── end_keyword_loc: (139,26)-(139,29) = "end"
+ ├── @ CaseNode (location: (140,0)-(140,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (140,5)-(140,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (140,5)-(140,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (140,10)-(140,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (140,13)-(140,20))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (140,16)-(140,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (140,16)-(140,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (140,13)-(140,16) = "%w["
+ │ │ │ └── closing_loc: (140,19)-(140,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (140,10)-(140,12) = "in"
+ │ │ └── then_loc: (140,21)-(140,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (140,0)-(140,4) = "case"
+ │ └── end_keyword_loc: (140,26)-(140,29) = "end"
+ ├── @ CaseNode (location: (141,0)-(141,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (141,5)-(141,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (141,5)-(141,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (141,10)-(141,25))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (141,13)-(141,20))
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (141,16)-(141,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (141,16)-(141,19) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── opening_loc: (141,13)-(141,16) = "%W["
+ │ │ │ └── closing_loc: (141,19)-(141,20) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (141,10)-(141,12) = "in"
+ │ │ └── then_loc: (141,21)-(141,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (141,0)-(141,4) = "case"
+ │ └── end_keyword_loc: (141,26)-(141,29) = "end"
+ ├── @ CaseNode (location: (142,0)-(142,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (142,5)-(142,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (142,5)-(142,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (142,10)-(142,25))
+ │ │ ├── pattern:
+ │ │ │ @ StringNode (location: (142,13)-(142,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (142,13)-(142,16) = "%q["
+ │ │ │ ├── content_loc: (142,16)-(142,19) = "foo"
+ │ │ │ ├── closing_loc: (142,19)-(142,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (142,10)-(142,12) = "in"
+ │ │ └── then_loc: (142,21)-(142,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (142,0)-(142,4) = "case"
+ │ └── end_keyword_loc: (142,26)-(142,29) = "end"
+ ├── @ CaseNode (location: (143,0)-(143,29))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (143,5)-(143,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (143,5)-(143,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (143,10)-(143,25))
+ │ │ ├── pattern:
+ │ │ │ @ StringNode (location: (143,13)-(143,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (143,13)-(143,16) = "%Q["
+ │ │ │ ├── content_loc: (143,16)-(143,19) = "foo"
+ │ │ │ ├── closing_loc: (143,19)-(143,20) = "]"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (143,10)-(143,12) = "in"
+ │ │ └── then_loc: (143,21)-(143,25) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (143,0)-(143,4) = "case"
+ │ └── end_keyword_loc: (143,26)-(143,29) = "end"
+ ├── @ CaseNode (location: (144,0)-(144,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (144,5)-(144,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (144,5)-(144,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (144,10)-(144,23))
+ │ │ ├── pattern:
+ │ │ │ @ StringNode (location: (144,13)-(144,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (144,13)-(144,14) = "\""
+ │ │ │ ├── content_loc: (144,14)-(144,17) = "foo"
+ │ │ │ ├── closing_loc: (144,17)-(144,18) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (144,10)-(144,12) = "in"
+ │ │ └── then_loc: (144,19)-(144,23) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (144,0)-(144,4) = "case"
+ │ └── end_keyword_loc: (144,24)-(144,27) = "end"
+ ├── @ CaseNode (location: (145,0)-(145,25))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (145,5)-(145,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (145,5)-(145,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (145,10)-(145,21))
+ │ │ ├── pattern:
+ │ │ │ @ NilNode (location: (145,13)-(145,16))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (145,10)-(145,12) = "in"
+ │ │ └── then_loc: (145,17)-(145,21) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (145,0)-(145,4) = "case"
+ │ └── end_keyword_loc: (145,22)-(145,25) = "end"
+ ├── @ CaseNode (location: (146,0)-(146,26))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (146,5)-(146,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (146,5)-(146,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (146,10)-(146,22))
+ │ │ ├── pattern:
+ │ │ │ @ SelfNode (location: (146,13)-(146,17))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (146,10)-(146,12) = "in"
+ │ │ └── then_loc: (146,18)-(146,22) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (146,0)-(146,4) = "case"
+ │ └── end_keyword_loc: (146,23)-(146,26) = "end"
+ ├── @ CaseNode (location: (147,0)-(147,26))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (147,5)-(147,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (147,5)-(147,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (147,10)-(147,22))
+ │ │ ├── pattern:
+ │ │ │ @ TrueNode (location: (147,13)-(147,17))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (147,10)-(147,12) = "in"
+ │ │ └── then_loc: (147,18)-(147,22) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (147,0)-(147,4) = "case"
+ │ └── end_keyword_loc: (147,23)-(147,26) = "end"
+ ├── @ CaseNode (location: (148,0)-(148,27))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (148,5)-(148,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (148,5)-(148,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (148,10)-(148,23))
+ │ │ ├── pattern:
+ │ │ │ @ FalseNode (location: (148,13)-(148,18))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (148,10)-(148,12) = "in"
+ │ │ └── then_loc: (148,19)-(148,23) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (148,0)-(148,4) = "case"
+ │ └── end_keyword_loc: (148,24)-(148,27) = "end"
+ ├── @ CaseNode (location: (149,0)-(149,30))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (149,5)-(149,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (149,5)-(149,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (149,10)-(149,26))
+ │ │ ├── pattern:
+ │ │ │ @ SourceFileNode (location: (149,13)-(149,21))
+ │ │ │ └── filepath: "patterns.txt"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (149,10)-(149,12) = "in"
+ │ │ └── then_loc: (149,22)-(149,26) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (149,0)-(149,4) = "case"
+ │ └── end_keyword_loc: (149,27)-(149,30) = "end"
+ ├── @ CaseNode (location: (150,0)-(150,30))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (150,5)-(150,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (150,5)-(150,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (150,10)-(150,26))
+ │ │ ├── pattern:
+ │ │ │ @ SourceLineNode (location: (150,13)-(150,21))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (150,10)-(150,12) = "in"
+ │ │ └── then_loc: (150,22)-(150,26) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (150,0)-(150,4) = "case"
+ │ └── end_keyword_loc: (150,27)-(150,30) = "end"
+ ├── @ CaseNode (location: (151,0)-(151,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (151,5)-(151,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (151,5)-(151,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (151,10)-(151,30))
+ │ │ ├── pattern:
+ │ │ │ @ SourceEncodingNode (location: (151,13)-(151,25))
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (151,10)-(151,12) = "in"
+ │ │ └── then_loc: (151,26)-(151,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (151,0)-(151,4) = "case"
+ │ └── end_keyword_loc: (151,31)-(151,34) = "end"
+ ├── @ CaseNode (location: (152,0)-(152,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (152,5)-(152,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (152,5)-(152,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (152,10)-(152,28))
+ │ │ ├── pattern:
+ │ │ │ @ LambdaNode (location: (152,13)-(152,23))
+ │ │ │ ├── locals: []
+ │ │ │ ├── operator_loc: (152,13)-(152,15) = "->"
+ │ │ │ ├── opening_loc: (152,16)-(152,17) = "{"
+ │ │ │ ├── closing_loc: (152,22)-(152,23) = "}"
+ │ │ │ ├── parameters: ∅
+ │ │ │ └── body:
+ │ │ │ @ StatementsNode (location: (152,18)-(152,21))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (152,18)-(152,21))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 1
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (152,10)-(152,12) = "in"
+ │ │ └── then_loc: (152,24)-(152,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (152,0)-(152,4) = "case"
+ │ └── end_keyword_loc: (152,29)-(152,32) = "end"
+ ├── @ CaseNode (location: (154,0)-(154,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (154,5)-(154,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (154,5)-(154,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (154,10)-(154,28))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (154,13)-(154,23))
+ │ │ │ ├── if_keyword_loc: (154,17)-(154,19) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (154,20)-(154,23))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (154,13)-(154,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (154,13)-(154,16))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (154,10)-(154,12) = "in"
+ │ │ └── then_loc: (154,24)-(154,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (154,0)-(154,4) = "case"
+ │ └── end_keyword_loc: (154,29)-(154,32) = "end"
+ ├── @ CaseNode (location: (155,0)-(155,30))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (155,5)-(155,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (155,5)-(155,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (155,10)-(155,26))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (155,13)-(155,21))
+ │ │ │ ├── if_keyword_loc: (155,15)-(155,17) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (155,18)-(155,21))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (155,13)-(155,14))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (155,13)-(155,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (155,10)-(155,12) = "in"
+ │ │ └── then_loc: (155,22)-(155,26) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (155,0)-(155,4) = "case"
+ │ └── end_keyword_loc: (155,27)-(155,30) = "end"
+ ├── @ CaseNode (location: (156,0)-(156,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (156,5)-(156,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (156,5)-(156,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (156,10)-(156,28))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (156,13)-(156,23))
+ │ │ │ ├── if_keyword_loc: (156,17)-(156,19) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (156,20)-(156,23))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (156,13)-(156,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (156,13)-(156,16))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (156,10)-(156,12) = "in"
+ │ │ └── then_loc: (156,24)-(156,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (156,0)-(156,4) = "case"
+ │ └── end_keyword_loc: (156,29)-(156,32) = "end"
+ ├── @ CaseNode (location: (157,0)-(157,31))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (157,5)-(157,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (157,5)-(157,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (157,10)-(157,27))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (157,13)-(157,22))
+ │ │ │ ├── if_keyword_loc: (157,16)-(157,18) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (157,19)-(157,22))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (157,13)-(157,15))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ImaginaryNode (location: (157,13)-(157,15))
+ │ │ │ │ └── numeric:
+ │ │ │ │ @ IntegerNode (location: (157,13)-(157,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (157,10)-(157,12) = "in"
+ │ │ └── then_loc: (157,23)-(157,27) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (157,0)-(157,4) = "case"
+ │ └── end_keyword_loc: (157,28)-(157,31) = "end"
+ ├── @ CaseNode (location: (158,0)-(158,31))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (158,5)-(158,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (158,5)-(158,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (158,10)-(158,27))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (158,13)-(158,22))
+ │ │ │ ├── if_keyword_loc: (158,16)-(158,18) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (158,19)-(158,22))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (158,13)-(158,15))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RationalNode (location: (158,13)-(158,15))
+ │ │ │ │ └── numeric:
+ │ │ │ │ @ IntegerNode (location: (158,13)-(158,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (158,10)-(158,12) = "in"
+ │ │ └── then_loc: (158,23)-(158,27) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (158,0)-(158,4) = "case"
+ │ └── end_keyword_loc: (158,28)-(158,31) = "end"
+ ├── @ CaseNode (location: (159,0)-(159,33))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (159,5)-(159,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (159,5)-(159,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (159,10)-(159,29))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (159,13)-(159,24))
+ │ │ │ ├── if_keyword_loc: (159,18)-(159,20) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (159,21)-(159,24))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (159,13)-(159,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (159,13)-(159,17))
+ │ │ │ │ ├── opening_loc: (159,13)-(159,14) = ":"
+ │ │ │ │ ├── value_loc: (159,14)-(159,17) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (159,10)-(159,12) = "in"
+ │ │ └── then_loc: (159,25)-(159,29) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (159,0)-(159,4) = "case"
+ │ └── end_keyword_loc: (159,30)-(159,33) = "end"
+ ├── @ CaseNode (location: (160,0)-(160,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (160,5)-(160,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (160,5)-(160,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (160,10)-(160,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (160,13)-(160,27))
+ │ │ │ ├── if_keyword_loc: (160,21)-(160,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (160,24)-(160,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (160,13)-(160,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (160,13)-(160,20))
+ │ │ │ │ ├── opening_loc: (160,13)-(160,16) = "%s["
+ │ │ │ │ ├── value_loc: (160,16)-(160,19) = "foo"
+ │ │ │ │ ├── closing_loc: (160,19)-(160,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (160,10)-(160,12) = "in"
+ │ │ └── then_loc: (160,28)-(160,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (160,0)-(160,4) = "case"
+ │ └── end_keyword_loc: (160,33)-(160,36) = "end"
+ ├── @ CaseNode (location: (161,0)-(161,35))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (161,5)-(161,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (161,5)-(161,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (161,10)-(161,31))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (161,13)-(161,26))
+ │ │ │ ├── if_keyword_loc: (161,20)-(161,22) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (161,23)-(161,26))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (161,13)-(161,19))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (161,13)-(161,19))
+ │ │ │ │ ├── opening_loc: (161,13)-(161,15) = ":\""
+ │ │ │ │ ├── value_loc: (161,15)-(161,18) = "foo"
+ │ │ │ │ ├── closing_loc: (161,18)-(161,19) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (161,10)-(161,12) = "in"
+ │ │ └── then_loc: (161,27)-(161,31) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (161,0)-(161,4) = "case"
+ │ └── end_keyword_loc: (161,32)-(161,35) = "end"
+ ├── @ CaseNode (location: (162,0)-(162,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (162,5)-(162,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (162,5)-(162,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (162,10)-(162,30))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (162,13)-(162,25))
+ │ │ │ ├── if_keyword_loc: (162,19)-(162,21) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (162,22)-(162,25))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (162,13)-(162,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ RegularExpressionNode (location: (162,13)-(162,18))
+ │ │ │ │ ├── opening_loc: (162,13)-(162,14) = "/"
+ │ │ │ │ ├── content_loc: (162,14)-(162,17) = "foo"
+ │ │ │ │ ├── closing_loc: (162,17)-(162,18) = "/"
+ │ │ │ │ ├── unescaped: "foo"
+ │ │ │ │ └── flags: ∅
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (162,10)-(162,12) = "in"
+ │ │ └── then_loc: (162,26)-(162,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (162,0)-(162,4) = "case"
+ │ └── end_keyword_loc: (162,31)-(162,34) = "end"
+ ├── @ CaseNode (location: (163,0)-(163,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (163,5)-(163,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (163,5)-(163,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (163,10)-(163,30))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (163,13)-(163,25))
+ │ │ │ ├── if_keyword_loc: (163,19)-(163,21) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (163,22)-(163,25))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (163,13)-(163,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ XStringNode (location: (163,13)-(163,18))
+ │ │ │ │ ├── opening_loc: (163,13)-(163,14) = "`"
+ │ │ │ │ ├── content_loc: (163,14)-(163,17) = "foo"
+ │ │ │ │ ├── closing_loc: (163,17)-(163,18) = "`"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (163,10)-(163,12) = "in"
+ │ │ └── then_loc: (163,26)-(163,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (163,0)-(163,4) = "case"
+ │ └── end_keyword_loc: (163,31)-(163,34) = "end"
+ ├── @ CaseNode (location: (164,0)-(164,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (164,5)-(164,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (164,5)-(164,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (164,10)-(164,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (164,13)-(164,27))
+ │ │ │ ├── if_keyword_loc: (164,21)-(164,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (164,24)-(164,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (164,13)-(164,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ XStringNode (location: (164,13)-(164,20))
+ │ │ │ │ ├── opening_loc: (164,13)-(164,16) = "%x["
+ │ │ │ │ ├── content_loc: (164,16)-(164,19) = "foo"
+ │ │ │ │ ├── closing_loc: (164,19)-(164,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (164,10)-(164,12) = "in"
+ │ │ └── then_loc: (164,28)-(164,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (164,0)-(164,4) = "case"
+ │ └── end_keyword_loc: (164,33)-(164,36) = "end"
+ ├── @ CaseNode (location: (165,0)-(165,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (165,5)-(165,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (165,5)-(165,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (165,10)-(165,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (165,13)-(165,27))
+ │ │ │ ├── if_keyword_loc: (165,21)-(165,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (165,24)-(165,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (165,13)-(165,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (165,13)-(165,20))
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ SymbolNode (location: (165,16)-(165,19))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (165,16)-(165,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (165,13)-(165,16) = "%i["
+ │ │ │ │ └── closing_loc: (165,19)-(165,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (165,10)-(165,12) = "in"
+ │ │ └── then_loc: (165,28)-(165,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (165,0)-(165,4) = "case"
+ │ └── end_keyword_loc: (165,33)-(165,36) = "end"
+ ├── @ CaseNode (location: (166,0)-(166,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (166,5)-(166,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (166,5)-(166,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (166,10)-(166,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (166,13)-(166,27))
+ │ │ │ ├── if_keyword_loc: (166,21)-(166,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (166,24)-(166,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (166,13)-(166,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (166,13)-(166,20))
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ SymbolNode (location: (166,16)-(166,19))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (166,16)-(166,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (166,13)-(166,16) = "%I["
+ │ │ │ │ └── closing_loc: (166,19)-(166,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (166,10)-(166,12) = "in"
+ │ │ └── then_loc: (166,28)-(166,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (166,0)-(166,4) = "case"
+ │ └── end_keyword_loc: (166,33)-(166,36) = "end"
+ ├── @ CaseNode (location: (167,0)-(167,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (167,5)-(167,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (167,5)-(167,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (167,10)-(167,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (167,13)-(167,27))
+ │ │ │ ├── if_keyword_loc: (167,21)-(167,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (167,24)-(167,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (167,13)-(167,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (167,13)-(167,20))
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (167,16)-(167,19))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (167,16)-(167,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (167,13)-(167,16) = "%w["
+ │ │ │ │ └── closing_loc: (167,19)-(167,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (167,10)-(167,12) = "in"
+ │ │ └── then_loc: (167,28)-(167,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (167,0)-(167,4) = "case"
+ │ └── end_keyword_loc: (167,33)-(167,36) = "end"
+ ├── @ CaseNode (location: (168,0)-(168,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (168,5)-(168,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (168,5)-(168,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (168,10)-(168,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (168,13)-(168,27))
+ │ │ │ ├── if_keyword_loc: (168,21)-(168,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (168,24)-(168,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (168,13)-(168,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ArrayNode (location: (168,13)-(168,20))
+ │ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (168,16)-(168,19))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (168,16)-(168,19) = "foo"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── opening_loc: (168,13)-(168,16) = "%W["
+ │ │ │ │ └── closing_loc: (168,19)-(168,20) = "]"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (168,10)-(168,12) = "in"
+ │ │ └── then_loc: (168,28)-(168,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (168,0)-(168,4) = "case"
+ │ └── end_keyword_loc: (168,33)-(168,36) = "end"
+ ├── @ CaseNode (location: (169,0)-(169,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (169,5)-(169,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (169,5)-(169,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (169,10)-(169,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (169,13)-(169,27))
+ │ │ │ ├── if_keyword_loc: (169,21)-(169,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (169,24)-(169,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (169,13)-(169,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (169,13)-(169,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (169,13)-(169,16) = "%q["
+ │ │ │ │ ├── content_loc: (169,16)-(169,19) = "foo"
+ │ │ │ │ ├── closing_loc: (169,19)-(169,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (169,10)-(169,12) = "in"
+ │ │ └── then_loc: (169,28)-(169,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (169,0)-(169,4) = "case"
+ │ └── end_keyword_loc: (169,33)-(169,36) = "end"
+ ├── @ CaseNode (location: (170,0)-(170,36))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (170,5)-(170,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (170,5)-(170,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (170,10)-(170,32))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (170,13)-(170,27))
+ │ │ │ ├── if_keyword_loc: (170,21)-(170,23) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (170,24)-(170,27))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (170,13)-(170,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (170,13)-(170,20))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (170,13)-(170,16) = "%Q["
+ │ │ │ │ ├── content_loc: (170,16)-(170,19) = "foo"
+ │ │ │ │ ├── closing_loc: (170,19)-(170,20) = "]"
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (170,10)-(170,12) = "in"
+ │ │ └── then_loc: (170,28)-(170,32) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (170,0)-(170,4) = "case"
+ │ └── end_keyword_loc: (170,33)-(170,36) = "end"
+ ├── @ CaseNode (location: (171,0)-(171,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (171,5)-(171,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (171,5)-(171,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (171,10)-(171,30))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (171,13)-(171,25))
+ │ │ │ ├── if_keyword_loc: (171,19)-(171,21) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (171,22)-(171,25))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (171,13)-(171,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (171,13)-(171,18))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (171,13)-(171,14) = "\""
+ │ │ │ │ ├── content_loc: (171,14)-(171,17) = "foo"
+ │ │ │ │ ├── closing_loc: (171,17)-(171,18) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (171,10)-(171,12) = "in"
+ │ │ └── then_loc: (171,26)-(171,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (171,0)-(171,4) = "case"
+ │ └── end_keyword_loc: (171,31)-(171,34) = "end"
+ ├── @ CaseNode (location: (172,0)-(172,32))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (172,5)-(172,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (172,5)-(172,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (172,10)-(172,28))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (172,13)-(172,23))
+ │ │ │ ├── if_keyword_loc: (172,17)-(172,19) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (172,20)-(172,23))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (172,13)-(172,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ NilNode (location: (172,13)-(172,16))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (172,10)-(172,12) = "in"
+ │ │ └── then_loc: (172,24)-(172,28) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (172,0)-(172,4) = "case"
+ │ └── end_keyword_loc: (172,29)-(172,32) = "end"
+ ├── @ CaseNode (location: (173,0)-(173,33))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (173,5)-(173,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (173,5)-(173,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (173,10)-(173,29))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (173,13)-(173,24))
+ │ │ │ ├── if_keyword_loc: (173,18)-(173,20) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (173,21)-(173,24))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (173,13)-(173,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SelfNode (location: (173,13)-(173,17))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (173,10)-(173,12) = "in"
+ │ │ └── then_loc: (173,25)-(173,29) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (173,0)-(173,4) = "case"
+ │ └── end_keyword_loc: (173,30)-(173,33) = "end"
+ ├── @ CaseNode (location: (174,0)-(174,33))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (174,5)-(174,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (174,5)-(174,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (174,10)-(174,29))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (174,13)-(174,24))
+ │ │ │ ├── if_keyword_loc: (174,18)-(174,20) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (174,21)-(174,24))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (174,13)-(174,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (174,13)-(174,17))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (174,10)-(174,12) = "in"
+ │ │ └── then_loc: (174,25)-(174,29) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (174,0)-(174,4) = "case"
+ │ └── end_keyword_loc: (174,30)-(174,33) = "end"
+ ├── @ CaseNode (location: (175,0)-(175,34))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (175,5)-(175,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (175,5)-(175,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (175,10)-(175,30))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (175,13)-(175,25))
+ │ │ │ ├── if_keyword_loc: (175,19)-(175,21) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (175,22)-(175,25))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (175,13)-(175,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ FalseNode (location: (175,13)-(175,18))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (175,10)-(175,12) = "in"
+ │ │ └── then_loc: (175,26)-(175,30) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (175,0)-(175,4) = "case"
+ │ └── end_keyword_loc: (175,31)-(175,34) = "end"
+ ├── @ CaseNode (location: (176,0)-(176,37))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (176,5)-(176,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (176,5)-(176,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (176,10)-(176,33))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (176,13)-(176,28))
+ │ │ │ ├── if_keyword_loc: (176,22)-(176,24) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (176,25)-(176,28))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (176,13)-(176,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SourceFileNode (location: (176,13)-(176,21))
+ │ │ │ │ └── filepath: "patterns.txt"
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (176,10)-(176,12) = "in"
+ │ │ └── then_loc: (176,29)-(176,33) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (176,0)-(176,4) = "case"
+ │ └── end_keyword_loc: (176,34)-(176,37) = "end"
+ ├── @ CaseNode (location: (177,0)-(177,37))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (177,5)-(177,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (177,5)-(177,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (177,10)-(177,33))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (177,13)-(177,28))
+ │ │ │ ├── if_keyword_loc: (177,22)-(177,24) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (177,25)-(177,28))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (177,13)-(177,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SourceLineNode (location: (177,13)-(177,21))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (177,10)-(177,12) = "in"
+ │ │ └── then_loc: (177,29)-(177,33) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (177,0)-(177,4) = "case"
+ │ └── end_keyword_loc: (177,34)-(177,37) = "end"
+ ├── @ CaseNode (location: (178,0)-(178,41))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (178,5)-(178,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (178,5)-(178,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (178,10)-(178,37))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (178,13)-(178,32))
+ │ │ │ ├── if_keyword_loc: (178,26)-(178,28) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (178,29)-(178,32))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (178,13)-(178,25))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SourceEncodingNode (location: (178,13)-(178,25))
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (178,10)-(178,12) = "in"
+ │ │ └── then_loc: (178,33)-(178,37) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (178,0)-(178,4) = "case"
+ │ └── end_keyword_loc: (178,38)-(178,41) = "end"
+ ├── @ CaseNode (location: (179,0)-(179,39))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (179,5)-(179,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (179,5)-(179,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (179,10)-(179,35))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (179,13)-(179,30))
+ │ │ │ ├── if_keyword_loc: (179,24)-(179,26) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ LocalVariableReadNode (location: (179,27)-(179,30))
+ │ │ │ │ ├── name: :baz
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (179,13)-(179,23))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LambdaNode (location: (179,13)-(179,23))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── operator_loc: (179,13)-(179,15) = "->"
+ │ │ │ │ ├── opening_loc: (179,16)-(179,17) = "{"
+ │ │ │ │ ├── closing_loc: (179,22)-(179,23) = "}"
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ └── body:
+ │ │ │ │ @ StatementsNode (location: (179,18)-(179,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (179,18)-(179,21))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 1
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (179,10)-(179,12) = "in"
+ │ │ └── then_loc: (179,31)-(179,35) = "then"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (179,0)-(179,4) = "case"
+ │ └── end_keyword_loc: (179,36)-(179,39) = "end"
+ ├── @ IfNode (location: (181,0)-(182,3))
+ │ ├── if_keyword_loc: (181,0)-(181,2) = "if"
+ │ ├── predicate:
+ │ │ @ MatchPredicateNode (location: (181,3)-(181,10))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (181,3)-(181,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (181,3)-(181,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (181,8)-(181,10))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (181,8)-(181,9) = "["
+ │ │ │ └── closing_loc: (181,9)-(181,10) = "]"
+ │ │ └── operator_loc: (181,5)-(181,7) = "in"
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (182,0)-(182,3) = "end"
+ ├── @ MatchRequiredNode (location: (184,0)-(186,1))
+ │ ├── value:
+ │ │ @ CallNode (location: (184,0)-(184,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (184,0)-(184,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (184,5)-(186,1))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (185,2)-(185,3))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (184,5)-(184,6) = "["
+ │ │ └── closing_loc: (186,0)-(186,1) = "]"
+ │ └── operator_loc: (184,2)-(184,4) = "=>"
+ └── @ MatchPredicateNode (location: (188,0)-(192,1))
+ ├── value:
+ │ @ CallNode (location: (188,0)-(188,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (188,0)-(188,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── pattern:
+ │ @ HashPatternNode (location: (188,7)-(192,1))
+ │ ├── constant:
+ │ │ @ ConstantReadNode (location: (188,7)-(188,8))
+ │ │ └── name: :A
+ │ ├── assocs: (length: 1)
+ │ │ └── @ AssocNode (location: (189,2)-(191,3))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (189,2)-(189,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (189,2)-(189,5) = "bar"
+ │ │ │ ├── closing_loc: (189,5)-(189,6) = ":"
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── value:
+ │ │ │ @ HashPatternNode (location: (189,7)-(191,3))
+ │ │ │ ├── constant:
+ │ │ │ │ @ ConstantReadNode (location: (189,7)-(189,8))
+ │ │ │ │ └── name: :B
+ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (190,4)-(190,12))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (190,4)-(190,10))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (190,4)-(190,9) = "value"
+ │ │ │ │ │ ├── closing_loc: (190,9)-(190,10) = ":"
+ │ │ │ │ │ └── unescaped: "value"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (190,11)-(190,12))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── kwrest: ∅
+ │ │ │ ├── opening_loc: (189,8)-(189,9) = "["
+ │ │ │ └── closing_loc: (191,2)-(191,3) = "]"
+ │ │ └── operator_loc: ∅
+ │ ├── kwrest: ∅
+ │ ├── opening_loc: (188,8)-(188,9) = "["
+ │ └── closing_loc: (192,0)-(192,1) = "]"
+ └── operator_loc: (188,4)-(188,6) = "in"
diff --git a/test/prism/snapshots/procs.txt b/test/prism/snapshots/procs.txt
new file mode 100644
index 0000000000..8203cc08c8
--- /dev/null
+++ b/test/prism/snapshots/procs.txt
@@ -0,0 +1,375 @@
+@ ProgramNode (location: (1,0)-(27,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(27,19))
+ └── body: (length: 10)
+ ├── @ LambdaNode (location: (1,0)-(1,21))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,16)-(1,17) = "{"
+ │ ├── closing_loc: (1,20)-(1,21) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,3)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,4)-(1,5))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,4)-(1,5))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 3)
+ │ │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── @ BlockLocalVariableNode (location: (1,10)-(1,11))
+ │ │ │ │ └── name: :c
+ │ │ │ └── @ BlockLocalVariableNode (location: (1,13)-(1,14))
+ │ │ │ └── name: :d
+ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ └── closing_loc: (1,14)-(1,15) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (1,18)-(1,19))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (1,18)-(1,19))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── @ LambdaNode (location: (3,0)-(5,3))
+ │ ├── locals: []
+ │ ├── operator_loc: (3,0)-(3,2) = "->"
+ │ ├── opening_loc: (3,3)-(3,5) = "do"
+ │ ├── closing_loc: (5,0)-(5,3) = "end"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ BeginNode (location: (4,0)-(5,3))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements: ∅
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (4,0)-(5,3))
+ │ │ ├── ensure_keyword_loc: (4,0)-(4,6) = "ensure"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ LambdaNode (location: (7,0)-(11,3))
+ │ ├── locals: []
+ │ ├── operator_loc: (7,0)-(7,2) = "->"
+ │ ├── opening_loc: (7,3)-(7,5) = "do"
+ │ ├── closing_loc: (11,0)-(11,3) = "end"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ BeginNode (location: (8,0)-(11,3))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (8,0)-(8,6))
+ │ │ ├── keyword_loc: (8,0)-(8,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause:
+ │ │ @ ElseNode (location: (9,0)-(10,6))
+ │ │ ├── else_keyword_loc: (9,0)-(9,4) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (10,0)-(10,6) = "ensure"
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (10,0)-(11,3))
+ │ │ ├── ensure_keyword_loc: (10,0)-(10,6) = "ensure"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ LambdaNode (location: (13,0)-(13,10))
+ │ ├── locals: []
+ │ ├── operator_loc: (13,0)-(13,2) = "->"
+ │ ├── opening_loc: (13,3)-(13,4) = "{"
+ │ ├── closing_loc: (13,9)-(13,10) = "}"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (13,5)-(13,8))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (13,5)-(13,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,5)-(13,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── @ LambdaNode (location: (15,0)-(15,15))
+ │ ├── locals: []
+ │ ├── operator_loc: (15,0)-(15,2) = "->"
+ │ ├── opening_loc: (15,3)-(15,5) = "do"
+ │ ├── closing_loc: (15,12)-(15,15) = "end"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (15,7)-(15,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (15,7)-(15,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,7)-(15,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── @ LambdaNode (location: (17,0)-(17,29))
+ │ ├── locals: [:a, :b, :c, :d, :e]
+ │ ├── operator_loc: (17,0)-(17,2) = "->"
+ │ ├── opening_loc: (17,24)-(17,25) = "{"
+ │ ├── closing_loc: (17,28)-(17,29) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (17,3)-(17,23))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (17,3)-(17,23))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (17,3)-(17,4))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (17,6)-(17,11))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (17,6)-(17,7) = "b"
+ │ │ │ │ ├── operator_loc: (17,8)-(17,9) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (17,10)-(17,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ ├── @ KeywordParameterNode (location: (17,13)-(17,15))
+ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ ├── name_loc: (17,13)-(17,15) = "c:"
+ │ │ │ │ │ └── value: ∅
+ │ │ │ │ └── @ KeywordParameterNode (location: (17,17)-(17,19))
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── name_loc: (17,17)-(17,19) = "d:"
+ │ │ │ │ └── value: ∅
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (17,21)-(17,23))
+ │ │ │ ├── name: :e
+ │ │ │ ├── name_loc: (17,22)-(17,23) = "e"
+ │ │ │ └── operator_loc: (17,21)-(17,22) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (17,26)-(17,27))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (17,26)-(17,27))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ LambdaNode (location: (19,0)-(19,40))
+ │ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
+ │ ├── operator_loc: (19,0)-(19,2) = "->"
+ │ ├── opening_loc: (19,35)-(19,36) = "{"
+ │ ├── closing_loc: (19,39)-(19,40) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (19,3)-(19,34))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (19,4)-(19,33))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (19,4)-(19,5))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (19,7)-(19,12))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (19,7)-(19,8) = "b"
+ │ │ │ │ ├── operator_loc: (19,9)-(19,10) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (19,11)-(19,12))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (19,14)-(19,16))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (19,15)-(19,16) = "c"
+ │ │ │ │ └── operator_loc: (19,14)-(19,15) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ ├── @ KeywordParameterNode (location: (19,18)-(19,20))
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── name_loc: (19,18)-(19,20) = "d:"
+ │ │ │ │ │ └── value: ∅
+ │ │ │ │ └── @ KeywordParameterNode (location: (19,22)-(19,24))
+ │ │ │ │ ├── name: :e
+ │ │ │ │ ├── name_loc: (19,22)-(19,24) = "e:"
+ │ │ │ │ └── value: ∅
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (19,26)-(19,29))
+ │ │ │ │ ├── name: :f
+ │ │ │ │ ├── name_loc: (19,28)-(19,29) = "f"
+ │ │ │ │ └── operator_loc: (19,26)-(19,28) = "**"
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (19,31)-(19,33))
+ │ │ │ ├── name: :g
+ │ │ │ ├── name_loc: (19,32)-(19,33) = "g"
+ │ │ │ └── operator_loc: (19,31)-(19,32) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (19,3)-(19,4) = "("
+ │ │ └── closing_loc: (19,33)-(19,34) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (19,37)-(19,38))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (19,37)-(19,38))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ LambdaNode (location: (21,0)-(23,3))
+ │ ├── locals: [:a, :b, :c, :d, :e, :f, :g]
+ │ ├── operator_loc: (21,0)-(21,2) = "->"
+ │ ├── opening_loc: (21,35)-(21,37) = "do"
+ │ ├── closing_loc: (23,0)-(23,3) = "end"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (21,3)-(21,34))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (21,4)-(21,33))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (21,4)-(21,5))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (21,7)-(21,12))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (21,7)-(21,8) = "b"
+ │ │ │ │ ├── operator_loc: (21,9)-(21,10) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (21,11)-(21,12))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (21,14)-(21,16))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (21,15)-(21,16) = "c"
+ │ │ │ │ └── operator_loc: (21,14)-(21,15) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ ├── @ KeywordParameterNode (location: (21,18)-(21,20))
+ │ │ │ │ │ ├── name: :d
+ │ │ │ │ │ ├── name_loc: (21,18)-(21,20) = "d:"
+ │ │ │ │ │ └── value: ∅
+ │ │ │ │ └── @ KeywordParameterNode (location: (21,22)-(21,24))
+ │ │ │ │ ├── name: :e
+ │ │ │ │ ├── name_loc: (21,22)-(21,24) = "e:"
+ │ │ │ │ └── value: ∅
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (21,26)-(21,29))
+ │ │ │ │ ├── name: :f
+ │ │ │ │ ├── name_loc: (21,28)-(21,29) = "f"
+ │ │ │ │ └── operator_loc: (21,26)-(21,28) = "**"
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (21,31)-(21,33))
+ │ │ │ ├── name: :g
+ │ │ │ ├── name_loc: (21,32)-(21,33) = "g"
+ │ │ │ └── operator_loc: (21,31)-(21,32) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (21,3)-(21,4) = "("
+ │ │ └── closing_loc: (21,33)-(21,34) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (22,2)-(22,3))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (22,2)-(22,3))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ LambdaNode (location: (25,0)-(25,25))
+ │ ├── locals: [:a]
+ │ ├── operator_loc: (25,0)-(25,2) = "->"
+ │ ├── opening_loc: (25,7)-(25,8) = "{"
+ │ ├── closing_loc: (25,24)-(25,25) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (25,3)-(25,6))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (25,4)-(25,5))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (25,4)-(25,5))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (25,3)-(25,4) = "("
+ │ │ └── closing_loc: (25,5)-(25,6) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (25,9)-(25,23))
+ │ └── body: (length: 1)
+ │ └── @ LambdaNode (location: (25,9)-(25,23))
+ │ ├── locals: [:b]
+ │ ├── operator_loc: (25,9)-(25,11) = "->"
+ │ ├── opening_loc: (25,14)-(25,15) = "{"
+ │ ├── closing_loc: (25,22)-(25,23) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (25,12)-(25,13))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (25,12)-(25,13))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (25,12)-(25,13))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (25,16)-(25,21))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (25,16)-(25,21))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (25,16)-(25,17))
+ │ │ ├── name: :a
+ │ │ └── depth: 1
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,18)-(25,19) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,20)-(25,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (25,20)-(25,21))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "*"
+ └── @ LambdaNode (location: (27,0)-(27,19))
+ ├── locals: [:a, :b, :c]
+ ├── operator_loc: (27,0)-(27,2) = "->"
+ ├── opening_loc: (27,16)-(27,17) = "{"
+ ├── closing_loc: (27,18)-(27,19) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (27,3)-(27,15))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (27,4)-(27,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (27,4)-(27,10))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (27,5)-(27,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (27,8)-(27,9))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── opening_loc: (27,4)-(27,5) = "("
+ │ │ │ └── closing_loc: (27,9)-(27,10) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (27,12)-(27,14))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (27,13)-(27,14) = "c"
+ │ │ │ └── operator_loc: (27,12)-(27,13) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (27,3)-(27,4) = "("
+ │ └── closing_loc: (27,14)-(27,15) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/range_begin_open_exclusive.txt b/test/prism/snapshots/range_begin_open_exclusive.txt
new file mode 100644
index 0000000000..e4842729f1
--- /dev/null
+++ b/test/prism/snapshots/range_begin_open_exclusive.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,4))
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (1,3)-(1,4))
+ │ └── flags: decimal
+ ├── operator_loc: (1,0)-(1,3) = "..."
+ └── flags: exclude_end
diff --git a/test/prism/snapshots/range_begin_open_inclusive.txt b/test/prism/snapshots/range_begin_open_inclusive.txt
new file mode 100644
index 0000000000..1d9c64ec97
--- /dev/null
+++ b/test/prism/snapshots/range_begin_open_inclusive.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,3))
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ └── flags: decimal
+ ├── operator_loc: (1,0)-(1,2) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/range_end_open_exclusive.txt b/test/prism/snapshots/range_end_open_exclusive.txt
new file mode 100644
index 0000000000..defd76783e
--- /dev/null
+++ b/test/prism/snapshots/range_end_open_exclusive.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,4))
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── right: ∅
+ ├── operator_loc: (1,1)-(1,4) = "..."
+ └── flags: exclude_end
diff --git a/test/prism/snapshots/range_end_open_inclusive.txt b/test/prism/snapshots/range_end_open_inclusive.txt
new file mode 100644
index 0000000000..ee51b81e51
--- /dev/null
+++ b/test/prism/snapshots/range_end_open_inclusive.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,3))
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── right: ∅
+ ├── operator_loc: (1,1)-(1,3) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/ranges.txt b/test/prism/snapshots/ranges.txt
new file mode 100644
index 0000000000..65192ecc4b
--- /dev/null
+++ b/test/prism/snapshots/ranges.txt
@@ -0,0 +1,160 @@
+@ ProgramNode (location: (1,0)-(17,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(17,5))
+ └── body: (length: 9)
+ ├── @ ParenthesesNode (location: (1,0)-(1,6))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,1)-(1,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RangeNode (location: (1,1)-(1,5))
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (1,1)-(1,4) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── opening_loc: (1,0)-(1,1) = "("
+ │ └── closing_loc: (1,5)-(1,6) = ")"
+ ├── @ ParenthesesNode (location: (3,0)-(3,5))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,1)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RangeNode (location: (3,1)-(3,4))
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (3,3)-(3,4))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (3,1)-(3,3) = ".."
+ │ │ └── flags: ∅
+ │ ├── opening_loc: (3,0)-(3,1) = "("
+ │ └── closing_loc: (3,4)-(3,5) = ")"
+ ├── @ RangeNode (location: (5,0)-(5,5))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (5,0)-(5,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (5,4)-(5,5))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (5,1)-(5,4) = "..."
+ │ └── flags: exclude_end
+ ├── @ CallNode (location: (7,0)-(7,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,3)-(7,9) = "[...2]"
+ │ ├── opening_loc: (7,3)-(7,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,4)-(7,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RangeNode (location: (7,4)-(7,8))
+ │ │ ├── left: ∅
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (7,7)-(7,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (7,4)-(7,7) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── closing_loc: (7,8)-(7,9) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ HashNode (location: (9,0)-(9,15))
+ │ ├── opening_loc: (9,0)-(9,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (9,2)-(9,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,2)-(9,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (9,2)-(9,5) = "foo"
+ │ │ │ ├── closing_loc: (9,5)-(9,6) = ":"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ RangeNode (location: (9,7)-(9,13))
+ │ │ │ ├── left: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (9,10)-(9,13))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (9,10)-(9,13) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── operator_loc: (9,7)-(9,10) = "..."
+ │ │ │ └── flags: exclude_end
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (9,14)-(9,15) = "}"
+ ├── @ ParenthesesNode (location: (11,0)-(11,6))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (11,1)-(11,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RangeNode (location: (11,1)-(11,5))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (11,1)-(11,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── right: ∅
+ │ │ ├── operator_loc: (11,2)-(11,5) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── opening_loc: (11,0)-(11,1) = "("
+ │ └── closing_loc: (11,5)-(11,6) = ")"
+ ├── @ RangeNode (location: (13,0)-(13,4))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (13,0)-(13,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (13,3)-(13,4))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (13,1)-(13,3) = ".."
+ │ └── flags: ∅
+ ├── @ HashNode (location: (15,0)-(15,14))
+ │ ├── opening_loc: (15,0)-(15,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (15,2)-(15,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (15,2)-(15,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (15,2)-(15,5) = "foo"
+ │ │ │ ├── closing_loc: (15,5)-(15,6) = ":"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ RangeNode (location: (15,7)-(15,12))
+ │ │ │ ├── left: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (15,9)-(15,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (15,9)-(15,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── operator_loc: (15,7)-(15,9) = ".."
+ │ │ │ └── flags: ∅
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (15,13)-(15,14) = "}"
+ └── @ ParenthesesNode (location: (17,0)-(17,5))
+ ├── body:
+ │ @ StatementsNode (location: (17,1)-(17,4))
+ │ └── body: (length: 1)
+ │ └── @ RangeNode (location: (17,1)-(17,4))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (17,1)-(17,2))
+ │ │ └── flags: decimal
+ │ ├── right: ∅
+ │ ├── operator_loc: (17,2)-(17,4) = ".."
+ │ └── flags: ∅
+ ├── opening_loc: (17,0)-(17,1) = "("
+ └── closing_loc: (17,4)-(17,5) = ")"
diff --git a/test/prism/snapshots/regex.txt b/test/prism/snapshots/regex.txt
new file mode 100644
index 0000000000..a20a97c5eb
--- /dev/null
+++ b/test/prism/snapshots/regex.txt
@@ -0,0 +1,209 @@
+@ ProgramNode (location: (1,0)-(30,13))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(30,13))
+ └── body: (length: 14)
+ ├── @ CallNode (location: (1,0)-(1,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (1,4)-(1,9))
+ │ │ ├── opening_loc: (1,4)-(1,5) = "/"
+ │ │ ├── content_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── closing_loc: (1,8)-(1,9) = "/"
+ │ │ ├── unescaped: "bar"
+ │ │ └── flags: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ RegularExpressionNode (location: (3,0)-(3,8))
+ │ ├── opening_loc: (3,0)-(3,3) = "%r{"
+ │ ├── content_loc: (3,3)-(3,6) = "abc"
+ │ ├── closing_loc: (3,6)-(3,8) = "}i"
+ │ ├── unescaped: "abc"
+ │ └── flags: ignore_case
+ ├── @ RegularExpressionNode (location: (5,0)-(5,5))
+ │ ├── opening_loc: (5,0)-(5,1) = "/"
+ │ ├── content_loc: (5,1)-(5,4) = "a\\b"
+ │ ├── closing_loc: (5,4)-(5,5) = "/"
+ │ ├── unescaped: "a\b"
+ │ └── flags: ∅
+ ├── @ InterpolatedRegularExpressionNode (location: (7,0)-(7,11))
+ │ ├── opening_loc: (7,0)-(7,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (7,1)-(7,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (7,1)-(7,5) = "aaa "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "aaa "
+ │ │ └── @ EmbeddedVariableNode (location: (7,5)-(7,10))
+ │ │ ├── operator_loc: (7,5)-(7,6) = "#"
+ │ │ └── variable:
+ │ │ @ GlobalVariableReadNode (location: (7,6)-(7,10))
+ │ │ └── name: :$bbb
+ │ ├── closing_loc: (7,10)-(7,11) = "/"
+ │ └── flags: ∅
+ ├── @ InterpolatedRegularExpressionNode (location: (9,0)-(9,16))
+ │ ├── opening_loc: (9,0)-(9,1) = "/"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (9,1)-(9,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (9,1)-(9,5) = "aaa "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "aaa "
+ │ │ ├── @ EmbeddedStatementsNode (location: (9,5)-(9,11))
+ │ │ │ ├── opening_loc: (9,5)-(9,7) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (9,7)-(9,10))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (9,7)-(9,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (9,7)-(9,10) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bbb"
+ │ │ │ └── closing_loc: (9,10)-(9,11) = "}"
+ │ │ └── @ StringNode (location: (9,11)-(9,15))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (9,11)-(9,15) = " ccc"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " ccc"
+ │ ├── closing_loc: (9,15)-(9,16) = "/"
+ │ └── flags: ∅
+ ├── @ ArrayNode (location: (11,0)-(11,27))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ MatchWriteNode (location: (11,1)-(11,21))
+ │ │ │ ├── call:
+ │ │ │ │ @ CallNode (location: (11,1)-(11,21))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ RegularExpressionNode (location: (11,1)-(11,14))
+ │ │ │ │ │ ├── opening_loc: (11,1)-(11,2) = "/"
+ │ │ │ │ │ ├── content_loc: (11,2)-(11,13) = "(?<foo>bar)"
+ │ │ │ │ │ ├── closing_loc: (11,13)-(11,14) = "/"
+ │ │ │ │ │ ├── unescaped: "(?<foo>bar)"
+ │ │ │ │ │ └── flags: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (11,15)-(11,17) = "=~"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (11,18)-(11,21))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (11,18)-(11,21))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (11,18)-(11,21) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "=~"
+ │ │ │ └── locals: [:foo]
+ │ │ └── @ LocalVariableReadNode (location: (11,23)-(11,26))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── opening_loc: (11,0)-(11,1) = "["
+ │ └── closing_loc: (11,26)-(11,27) = "]"
+ ├── @ RegularExpressionNode (location: (13,0)-(13,6))
+ │ ├── opening_loc: (13,0)-(13,1) = "/"
+ │ ├── content_loc: (13,1)-(13,4) = "abc"
+ │ ├── closing_loc: (13,4)-(13,6) = "/i"
+ │ ├── unescaped: "abc"
+ │ └── flags: ignore_case
+ ├── @ RegularExpressionNode (location: (15,0)-(15,26))
+ │ ├── opening_loc: (15,0)-(15,3) = "%r/"
+ │ ├── content_loc: (15,3)-(15,24) = "[a-z$._?][\\w$.?\#@~]*:"
+ │ ├── closing_loc: (15,24)-(15,26) = "/i"
+ │ ├── unescaped: "[a-z$._?][w$.?\#@~]*:"
+ │ └── flags: ignore_case
+ ├── @ RegularExpressionNode (location: (17,0)-(17,37))
+ │ ├── opening_loc: (17,0)-(17,3) = "%r/"
+ │ ├── content_loc: (17,3)-(17,35) = "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)"
+ │ ├── closing_loc: (17,35)-(17,37) = "/i"
+ │ ├── unescaped: "([a-z$._?][w$.?\#@~]*)( +)(equ)"
+ │ └── flags: ignore_case
+ ├── @ RegularExpressionNode (location: (19,0)-(19,25))
+ │ ├── opening_loc: (19,0)-(19,3) = "%r/"
+ │ ├── content_loc: (19,3)-(19,23) = "[a-z$._?][\\w$.?\#@~]*"
+ │ ├── closing_loc: (19,23)-(19,25) = "/i"
+ │ ├── unescaped: "[a-z$._?][w$.?\#@~]*"
+ │ └── flags: ignore_case
+ ├── @ RegularExpressionNode (location: (21,0)-(24,1))
+ │ ├── opening_loc: (21,0)-(21,3) = "%r("
+ │ ├── content_loc: (21,3)-(23,0) = "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n"
+ │ ├── closing_loc: (24,0)-(24,1) = ")"
+ │ ├── unescaped: "\n(?:[w\#$%_']|()|(,)|[]|[0-9])*\n (?:[w\#$%_']+)\n"
+ │ └── flags: ∅
+ ├── @ CallNode (location: (26,0)-(26,16))
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (26,0)-(26,8))
+ │ │ ├── opening_loc: (26,0)-(26,1) = "/"
+ │ │ ├── content_loc: (26,1)-(26,7) = "(?#\\))"
+ │ │ ├── closing_loc: (26,7)-(26,8) = "/"
+ │ │ ├── unescaped: "(?#))"
+ │ │ └── flags: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (26,9)-(26,11) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (26,12)-(26,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (26,12)-(26,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (26,12)-(26,13) = "\""
+ │ │ ├── content_loc: (26,13)-(26,15) = "hi"
+ │ │ ├── closing_loc: (26,15)-(26,16) = "\""
+ │ │ └── unescaped: "hi"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=~"
+ ├── @ RegularExpressionNode (location: (28,0)-(28,9))
+ │ ├── opening_loc: (28,0)-(28,3) = "%r#"
+ │ ├── content_loc: (28,3)-(28,8) = "pound"
+ │ ├── closing_loc: (28,8)-(28,9) = "#"
+ │ ├── unescaped: "pound"
+ │ └── flags: ∅
+ └── @ InterpolatedRegularExpressionNode (location: (30,0)-(30,13))
+ ├── opening_loc: (30,0)-(30,1) = "/"
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (30,1)-(30,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (30,1)-(30,5) = "aaa "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "aaa "
+ │ └── @ EmbeddedStatementsNode (location: (30,5)-(30,11))
+ │ ├── opening_loc: (30,5)-(30,7) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (30,7)-(30,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (30,7)-(30,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (30,7)-(30,10) = "bbb"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bbb"
+ │ └── closing_loc: (30,10)-(30,11) = "}"
+ ├── closing_loc: (30,11)-(30,13) = "/o"
+ └── flags: once
diff --git a/test/prism/snapshots/rescue.txt b/test/prism/snapshots/rescue.txt
new file mode 100644
index 0000000000..b57f5de7a7
--- /dev/null
+++ b/test/prism/snapshots/rescue.txt
@@ -0,0 +1,378 @@
+@ ProgramNode (location: (1,0)-(31,3))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(31,3))
+ └── body: (length: 12)
+ ├── @ RescueModifierNode (location: (1,0)-(1,14))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── keyword_loc: (1,4)-(1,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (1,11)-(1,14))
+ ├── @ RescueModifierNode (location: (3,0)-(4,3))
+ │ ├── expression:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── keyword_loc: (3,4)-(3,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (4,0)-(4,3))
+ ├── @ RescueModifierNode (location: (6,0)-(6,16))
+ │ ├── expression:
+ │ │ @ BreakNode (location: (6,0)-(6,5))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (6,0)-(6,5) = "break"
+ │ ├── keyword_loc: (6,6)-(6,12) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (6,13)-(6,16))
+ ├── @ RescueModifierNode (location: (8,0)-(8,15))
+ │ ├── expression:
+ │ │ @ NextNode (location: (8,0)-(8,4))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (8,0)-(8,4) = "next"
+ │ ├── keyword_loc: (8,5)-(8,11) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (8,12)-(8,15))
+ ├── @ RescueModifierNode (location: (10,0)-(10,17))
+ │ ├── expression:
+ │ │ @ ReturnNode (location: (10,0)-(10,6))
+ │ │ ├── keyword_loc: (10,0)-(10,6) = "return"
+ │ │ └── arguments: ∅
+ │ ├── keyword_loc: (10,7)-(10,13) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (10,14)-(10,17))
+ ├── @ RescueModifierNode (location: (12,0)-(12,19))
+ │ ├── expression:
+ │ │ @ CallNode (location: (12,0)-(12,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (12,0)-(12,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── keyword_loc: (12,4)-(12,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ OrNode (location: (12,11)-(12,19))
+ │ ├── left:
+ │ │ @ NilNode (location: (12,11)-(12,14))
+ │ ├── right:
+ │ │ @ IntegerNode (location: (12,18)-(12,19))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (12,15)-(12,17) = "||"
+ ├── @ RescueModifierNode (location: (14,0)-(14,22))
+ │ ├── expression:
+ │ │ @ CallNode (location: (14,0)-(14,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (14,0)-(14,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── keyword_loc: (14,4)-(14,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ IfNode (location: (14,11)-(14,22))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ NilNode (location: (14,11)-(14,14))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (14,17)-(14,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (14,17)-(14,18))
+ │ │ └── flags: decimal
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (14,19)-(14,22))
+ │ │ ├── else_keyword_loc: (14,19)-(14,20) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (14,21)-(14,22))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (14,21)-(14,22))
+ │ │ │ └── flags: decimal
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ BeginNode (location: (16,0)-(16,24))
+ │ ├── begin_keyword_loc: (16,0)-(16,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (16,7)-(16,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (16,7)-(16,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,7)-(16,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (16,10)-(16,19))
+ │ │ ├── keyword_loc: (16,10)-(16,16) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ SplatNode (location: (16,17)-(16,19))
+ │ │ │ ├── operator_loc: (16,17)-(16,18) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (16,18)-(16,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (16,18)-(16,19) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (16,21)-(16,24) = "end"
+ ├── @ CallNode (location: (18,0)-(20,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (18,0)-(18,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (18,4)-(20,3))
+ │ │ ├── locals: [:x]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (18,7)-(18,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (18,8)-(18,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (18,8)-(18,9))
+ │ │ │ │ │ └── name: :x
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (18,7)-(18,8) = "|"
+ │ │ │ └── closing_loc: (18,9)-(18,10) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (19,2)-(19,40))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ RescueModifierNode (location: (19,2)-(19,40))
+ │ │ │ ├── expression:
+ │ │ │ │ @ CallNode (location: (19,2)-(19,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (19,2)-(19,5) = "bar"
+ │ │ │ │ ├── opening_loc: (19,5)-(19,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (19,6)-(19,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (19,6)-(19,7) = "y"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "y"
+ │ │ │ │ ├── closing_loc: (19,7)-(19,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── keyword_loc: (19,9)-(19,15) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ CallNode (location: (19,16)-(19,40))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,16)-(19,29) = "ArgumentError"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (19,30)-(19,40))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (19,30)-(19,40))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (19,30)-(19,34) = "fail"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (19,35)-(19,40))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (19,35)-(19,40))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: (19,35)-(19,36) = "\""
+ │ │ │ │ │ ├── content_loc: (19,36)-(19,39) = "baz"
+ │ │ │ │ │ ├── closing_loc: (19,39)-(19,40) = "\""
+ │ │ │ │ │ └── unescaped: "baz"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "fail"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "ArgumentError"
+ │ │ ├── opening_loc: (18,4)-(18,6) = "do"
+ │ │ └── closing_loc: (20,0)-(20,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ IfNode (location: (22,0)-(24,3))
+ │ ├── if_keyword_loc: (22,0)-(22,2) = "if"
+ │ ├── predicate:
+ │ │ @ LocalVariableWriteNode (location: (22,3)-(22,21))
+ │ │ ├── name: :a
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (22,3)-(22,4) = "a"
+ │ │ ├── value:
+ │ │ │ @ RescueModifierNode (location: (22,7)-(22,21))
+ │ │ │ ├── expression:
+ │ │ │ │ @ CallNode (location: (22,7)-(22,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (22,7)-(22,10) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── keyword_loc: (22,11)-(22,17) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ NilNode (location: (22,18)-(22,21))
+ │ │ └── operator_loc: (22,5)-(22,6) = "="
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (23,2)-(23,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (23,2)-(23,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,2)-(23,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (24,0)-(24,3) = "end"
+ ├── @ DefNode (location: (26,0)-(26,44))
+ │ ├── name: :some_method
+ │ ├── name_loc: (26,4)-(26,15) = "some_method"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (26,18)-(26,44))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (26,18)-(26,44))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (26,18)-(26,30) = "other_method"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (26,31)-(26,44))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ RescueModifierNode (location: (26,31)-(26,44))
+ │ │ │ ├── expression:
+ │ │ │ │ @ IntegerNode (location: (26,31)-(26,33))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── keyword_loc: (26,34)-(26,40) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ NilNode (location: (26,41)-(26,44))
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "other_method"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (26,0)-(26,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (26,16)-(26,17) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (28,0)-(31,3))
+ ├── name: :a
+ ├── name_loc: (28,4)-(28,5) = "a"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ BeginNode (location: (29,2)-(31,3))
+ │ ├── begin_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (29,2)-(29,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (29,2)-(29,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (29,2)-(29,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (29,4)-(29,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (29,4)-(29,6))
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (29,4)-(29,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (29,4)-(29,6))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (29,4)-(29,5) = "b"
+ │ │ │ │ ├── closing_loc: (29,5)-(29,6) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (29,4)-(29,6))
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (29,4)-(29,6))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (29,4)-(29,5) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "b"
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (30,0)-(30,6))
+ │ │ ├── keyword_loc: (30,0)-(30,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
+ ├── locals: []
+ ├── def_keyword_loc: (28,0)-(28,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (31,0)-(31,3) = "end"
diff --git a/test/prism/snapshots/return.txt b/test/prism/snapshots/return.txt
new file mode 100644
index 0000000000..66e4625262
--- /dev/null
+++ b/test/prism/snapshots/return.txt
@@ -0,0 +1,128 @@
+@ ProgramNode (location: (1,0)-(23,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(23,9))
+ └── body: (length: 10)
+ ├── @ ReturnNode (location: (1,0)-(1,6))
+ │ ├── keyword_loc: (1,0)-(1,6) = "return"
+ │ └── arguments: ∅
+ ├── @ ReturnNode (location: (3,0)-(3,20))
+ │ ├── keyword_loc: (3,0)-(3,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (3,7)-(3,20))
+ │ └── arguments: (length: 3)
+ │ ├── @ ParenthesesNode (location: (3,7)-(3,10))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,8)-(3,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,8)-(3,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (3,7)-(3,8) = "("
+ │ │ └── closing_loc: (3,9)-(3,10) = ")"
+ │ ├── @ ParenthesesNode (location: (3,12)-(3,15))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,13)-(3,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,13)-(3,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (3,12)-(3,13) = "("
+ │ │ └── closing_loc: (3,14)-(3,15) = ")"
+ │ └── @ ParenthesesNode (location: (3,17)-(3,20))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,18)-(3,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,18)-(3,19))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (3,17)-(3,18) = "("
+ │ └── closing_loc: (3,19)-(3,20) = ")"
+ ├── @ ReturnNode (location: (5,0)-(5,9))
+ │ ├── keyword_loc: (5,0)-(5,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (5,7)-(5,9))
+ │ └── arguments: (length: 1)
+ │ └── @ SplatNode (location: (5,7)-(5,9))
+ │ ├── operator_loc: (5,7)-(5,8) = "*"
+ │ └── expression:
+ │ @ IntegerNode (location: (5,8)-(5,9))
+ │ └── flags: decimal
+ ├── @ ReturnNode (location: (7,0)-(7,8))
+ │ ├── keyword_loc: (7,0)-(7,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (7,7)-(7,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (7,7)-(7,8))
+ │ └── flags: decimal
+ ├── @ ReturnNode (location: (9,0)-(10,1))
+ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (9,7)-(10,1))
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (9,7)-(9,8))
+ │ │ └── flags: decimal
+ │ ├── @ IntegerNode (location: (9,10)-(9,11))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (10,0)-(10,1))
+ │ └── flags: decimal
+ ├── @ ReturnNode (location: (12,0)-(12,14))
+ │ ├── keyword_loc: (12,0)-(12,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (12,7)-(12,14))
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (12,7)-(12,8))
+ │ │ └── flags: decimal
+ │ ├── @ IntegerNode (location: (12,10)-(12,11))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (12,13)-(12,14))
+ │ └── flags: decimal
+ ├── @ ReturnNode (location: (14,0)-(14,16))
+ │ ├── keyword_loc: (14,0)-(14,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (14,7)-(14,16))
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (14,7)-(14,16))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (14,8)-(14,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (14,11)-(14,12))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (14,14)-(14,15))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (14,7)-(14,8) = "["
+ │ └── closing_loc: (14,15)-(14,16) = "]"
+ ├── @ ReturnNode (location: (16,0)-(19,1))
+ │ ├── keyword_loc: (16,0)-(16,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (16,6)-(19,1))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (16,6)-(19,1))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (17,2)-(18,3))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ IntegerNode (location: (17,2)-(17,3))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (18,2)-(18,3))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (16,6)-(16,7) = "("
+ │ └── closing_loc: (19,0)-(19,1) = ")"
+ ├── @ ReturnNode (location: (21,0)-(21,8))
+ │ ├── keyword_loc: (21,0)-(21,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (21,6)-(21,8))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (21,6)-(21,8))
+ │ ├── body: ∅
+ │ ├── opening_loc: (21,6)-(21,7) = "("
+ │ └── closing_loc: (21,7)-(21,8) = ")"
+ └── @ ReturnNode (location: (23,0)-(23,9))
+ ├── keyword_loc: (23,0)-(23,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (23,6)-(23,9))
+ └── arguments: (length: 1)
+ └── @ ParenthesesNode (location: (23,6)-(23,9))
+ ├── body:
+ │ @ StatementsNode (location: (23,7)-(23,8))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (23,7)-(23,8))
+ │ └── flags: decimal
+ ├── opening_loc: (23,6)-(23,7) = "("
+ └── closing_loc: (23,8)-(23,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/BEGIN.txt b/test/prism/snapshots/seattlerb/BEGIN.txt
new file mode 100644
index 0000000000..3595e2a05c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/BEGIN.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ PreExecutionNode (location: (1,0)-(1,12))
+ ├── statements:
+ │ @ StatementsNode (location: (1,8)-(1,10))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,8)-(1,10))
+ │ └── flags: decimal
+ ├── keyword_loc: (1,0)-(1,5) = "BEGIN"
+ ├── opening_loc: (1,6)-(1,7) = "{"
+ └── closing_loc: (1,11)-(1,12) = "}"
diff --git a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
new file mode 100644
index 0000000000..deb317781a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt
@@ -0,0 +1,332 @@
+@ ProgramNode (location: (1,0)-(92,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(92,1))
+ └── body: (length: 16)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (1,0)-(1,3) = "%I["
+ │ └── closing_loc: (4,0)-(4,1) = "]"
+ ├── @ ArrayNode (location: (6,0)-(9,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (7,0)-(7,5))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (7,0)-(7,5) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ SymbolNode (location: (8,0)-(8,5))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (8,0)-(8,5) = "line3"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "line3"
+ │ ├── opening_loc: (6,0)-(6,3) = "%I["
+ │ └── closing_loc: (9,0)-(9,1) = "]"
+ ├── @ ArrayNode (location: (11,0)-(14,1))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (11,0)-(11,3) = "%W["
+ │ └── closing_loc: (14,0)-(14,1) = "]"
+ ├── @ ArrayNode (location: (16,0)-(19,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (17,0)-(17,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (17,0)-(17,5) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ StringNode (location: (18,0)-(18,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (18,0)-(18,5) = "line3"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "line3"
+ │ ├── opening_loc: (16,0)-(16,3) = "%W["
+ │ └── closing_loc: (19,0)-(19,1) = "]"
+ ├── @ ArrayNode (location: (21,0)-(24,1))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (21,0)-(21,3) = "%i["
+ │ └── closing_loc: (24,0)-(24,1) = "]"
+ ├── @ ArrayNode (location: (26,0)-(29,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (27,0)-(27,5))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (27,0)-(27,5) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ SymbolNode (location: (28,0)-(28,5))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (28,0)-(28,5) = "line3"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "line3"
+ │ ├── opening_loc: (26,0)-(26,3) = "%i["
+ │ └── closing_loc: (29,0)-(29,1) = "]"
+ ├── @ RegularExpressionNode (location: (31,0)-(34,1))
+ │ ├── opening_loc: (31,0)-(31,3) = "%r["
+ │ ├── content_loc: (31,3)-(33,0) = "\n\n\n"
+ │ ├── closing_loc: (34,0)-(34,1) = "]"
+ │ ├── unescaped: "\n\n\n"
+ │ └── flags: ∅
+ ├── @ ArrayNode (location: (36,0)-(39,1))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (36,0)-(36,3) = "%w["
+ │ └── closing_loc: (39,0)-(39,1) = "]"
+ ├── @ ArrayNode (location: (41,0)-(44,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (42,0)-(42,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (42,0)-(42,5) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ StringNode (location: (43,0)-(43,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (43,0)-(43,5) = "line3"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "line3"
+ │ ├── opening_loc: (41,0)-(41,3) = "%w["
+ │ └── closing_loc: (44,0)-(44,1) = "]"
+ ├── @ ArrayNode (location: (46,0)-(49,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (47,0)-(47,6))
+ │ │ │ ├── opening_loc: (47,0)-(47,1) = ":"
+ │ │ │ ├── value_loc: (47,1)-(47,6) = "line2"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "line2"
+ │ │ └── @ SymbolNode (location: (48,0)-(48,6))
+ │ │ ├── opening_loc: (48,0)-(48,1) = ":"
+ │ │ ├── value_loc: (48,1)-(48,6) = "line3"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "line3"
+ │ ├── opening_loc: (46,0)-(46,1) = "["
+ │ └── closing_loc: (49,0)-(49,1) = "]"
+ ├── @ ClassNode (location: (51,0)-(56,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (51,0)-(51,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (51,6)-(51,7))
+ │ │ └── name: :X
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (52,2)-(55,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ DefNode (location: (52,2)-(55,5))
+ │ │ ├── name: :y
+ │ │ ├── name_loc: (52,11)-(52,12) = "y"
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (52,6)-(52,10))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (52,13)-(53,9))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (52,13)-(52,14))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (53,8)-(53,9))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (54,4)-(54,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (54,4)-(54,9))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (54,4)-(54,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (54,6)-(54,7) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (54,8)-(54,9))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (54,8)-(54,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── def_keyword_loc: (52,2)-(52,5) = "def"
+ │ │ ├── operator_loc: (52,10)-(52,11) = "."
+ │ │ ├── lparen_loc: (52,12)-(52,13) = "("
+ │ │ ├── rparen_loc: (53,9)-(53,10) = ")"
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (55,2)-(55,5) = "end"
+ │ ├── end_keyword_loc: (56,0)-(56,3) = "end"
+ │ └── name: :X
+ ├── @ ClassNode (location: (59,0)-(63,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (59,0)-(59,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (59,6)-(59,7))
+ │ │ └── name: :X
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (60,2)-(62,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ClassNode (location: (60,2)-(62,5))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (60,2)-(60,7) = "class"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (60,8)-(60,9))
+ │ │ │ └── name: :Y
+ │ │ ├── inheritance_operator_loc: ∅
+ │ │ ├── superclass: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (61,4)-(61,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ ConstantWriteNode (location: (61,4)-(61,10))
+ │ │ │ ├── name: :Z
+ │ │ │ ├── name_loc: (61,4)-(61,5) = "Z"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (61,8)-(61,10))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (61,6)-(61,7) = "="
+ │ │ ├── end_keyword_loc: (62,2)-(62,5) = "end"
+ │ │ └── name: :Y
+ │ ├── end_keyword_loc: (63,0)-(63,3) = "end"
+ │ └── name: :X
+ ├── @ ClassNode (location: (66,0)-(71,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (66,0)-(66,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (66,6)-(66,7))
+ │ │ └── name: :X
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (67,2)-(70,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ DefNode (location: (67,2)-(70,5))
+ │ │ ├── name: :y
+ │ │ ├── name_loc: (67,6)-(67,7) = "y"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (67,8)-(68,9))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (67,8)-(67,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (68,8)-(68,9))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (69,4)-(69,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (69,4)-(69,9))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (69,4)-(69,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (69,6)-(69,7) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (69,8)-(69,9))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (69,8)-(69,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── def_keyword_loc: (67,2)-(67,5) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: (67,7)-(67,8) = "("
+ │ │ ├── rparen_loc: (68,9)-(68,10) = ")"
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (70,2)-(70,5) = "end"
+ │ ├── end_keyword_loc: (71,0)-(71,3) = "end"
+ │ └── name: :X
+ ├── @ ModuleNode (location: (74,0)-(79,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (74,0)-(74,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (74,7)-(74,8))
+ │ │ └── name: :X
+ │ ├── body:
+ │ │ @ StatementsNode (location: (75,2)-(78,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ConstantWriteNode (location: (75,2)-(78,3))
+ │ │ ├── name: :X
+ │ │ ├── name_loc: (75,2)-(75,3) = "X"
+ │ │ ├── value:
+ │ │ │ @ ArrayNode (location: (75,6)-(78,3))
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (76,4)-(76,10))
+ │ │ │ │ │ ├── opening_loc: (76,4)-(76,5) = ":"
+ │ │ │ │ │ ├── value_loc: (76,5)-(76,10) = "line3"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "line3"
+ │ │ │ │ └── @ SymbolNode (location: (77,4)-(77,10))
+ │ │ │ │ ├── opening_loc: (77,4)-(77,5) = ":"
+ │ │ │ │ ├── value_loc: (77,5)-(77,10) = "line4"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "line4"
+ │ │ │ ├── opening_loc: (75,6)-(75,7) = "["
+ │ │ │ └── closing_loc: (78,2)-(78,3) = "]"
+ │ │ └── operator_loc: (75,4)-(75,5) = "="
+ │ ├── end_keyword_loc: (79,0)-(79,3) = "end"
+ │ └── name: :X
+ ├── @ ModuleNode (location: (82,0)-(86,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (82,0)-(82,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (82,7)-(82,8))
+ │ │ └── name: :X
+ │ ├── body:
+ │ │ @ StatementsNode (location: (83,2)-(85,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ModuleNode (location: (83,2)-(85,5))
+ │ │ ├── locals: []
+ │ │ ├── module_keyword_loc: (83,2)-(83,8) = "module"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (83,9)-(83,10))
+ │ │ │ └── name: :Y
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (84,4)-(84,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ ConstantWriteNode (location: (84,4)-(84,10))
+ │ │ │ ├── name: :Z
+ │ │ │ ├── name_loc: (84,4)-(84,5) = "Z"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (84,8)-(84,10))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (84,6)-(84,7) = "="
+ │ │ ├── end_keyword_loc: (85,2)-(85,5) = "end"
+ │ │ └── name: :Y
+ │ ├── end_keyword_loc: (86,0)-(86,3) = "end"
+ │ └── name: :X
+ └── @ CallNode (location: (89,0)-(92,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (89,0)-(89,1) = "x"
+ ├── opening_loc: (89,1)-(89,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (90,0)-(91,6))
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (90,0)-(90,6))
+ │ │ ├── opening_loc: (90,0)-(90,1) = ":"
+ │ │ ├── value_loc: (90,1)-(90,6) = "line2"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "line2"
+ │ └── @ SymbolNode (location: (91,0)-(91,6))
+ │ ├── opening_loc: (91,0)-(91,1) = ":"
+ │ ├── value_loc: (91,1)-(91,6) = "line3"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "line3"
+ ├── closing_loc: (92,0)-(92,1) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/__ENCODING__.txt b/test/prism/snapshots/seattlerb/__ENCODING__.txt
new file mode 100644
index 0000000000..1b223bd8fe
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/__ENCODING__.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ SourceEncodingNode (location: (1,0)-(1,12))
diff --git a/test/prism/snapshots/seattlerb/alias_gvar_backref.txt b/test/prism/snapshots/seattlerb/alias_gvar_backref.txt
new file mode 100644
index 0000000000..4ba0469132
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/alias_gvar_backref.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ AliasGlobalVariableNode (location: (1,0)-(1,15))
+ ├── new_name:
+ │ @ GlobalVariableReadNode (location: (1,6)-(1,12))
+ │ └── name: :$MATCH
+ ├── old_name:
+ │ @ BackReferenceReadNode (location: (1,13)-(1,15))
+ └── keyword_loc: (1,0)-(1,5) = "alias"
diff --git a/test/prism/snapshots/seattlerb/alias_resword.txt b/test/prism/snapshots/seattlerb/alias_resword.txt
new file mode 100644
index 0000000000..089819b528
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/alias_resword.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ AliasMethodNode (location: (1,0)-(1,12))
+ ├── new_name:
+ │ @ SymbolNode (location: (1,6)-(1,8))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,6)-(1,8) = "in"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "in"
+ ├── old_name:
+ │ @ SymbolNode (location: (1,9)-(1,12))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,9)-(1,12) = "out"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "out"
+ └── keyword_loc: (1,0)-(1,5) = "alias"
diff --git a/test/prism/snapshots/seattlerb/and_multi.txt b/test/prism/snapshots/seattlerb/and_multi.txt
new file mode 100644
index 0000000000..575f75fe30
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/and_multi.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 1)
+ └── @ AndNode (location: (1,0)-(3,4))
+ ├── left:
+ │ @ AndNode (location: (1,0)-(2,9))
+ │ ├── left:
+ │ │ @ TrueNode (location: (1,0)-(1,4))
+ │ ├── right:
+ │ │ @ CallNode (location: (2,0)-(2,9))
+ │ │ ├── receiver:
+ │ │ │ @ FalseNode (location: (2,4)-(2,9))
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,0)-(2,3) = "not"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "!"
+ │ └── operator_loc: (1,5)-(1,8) = "and"
+ ├── right:
+ │ @ TrueNode (location: (3,0)-(3,4))
+ └── operator_loc: (2,10)-(2,13) = "and"
diff --git a/test/prism/snapshots/seattlerb/aref_args_assocs.txt b/test/prism/snapshots/seattlerb/aref_args_assocs.txt
new file mode 100644
index 0000000000..02bfd74b50
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/aref_args_assocs.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,8))
+ ├── elements: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,1)-(1,7))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,1)-(1,7))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,3)-(1,5) = "=>"
+ ├── opening_loc: (1,0)-(1,1) = "["
+ └── closing_loc: (1,7)-(1,8) = "]"
diff --git a/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt b/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt
new file mode 100644
index 0000000000..bbe45dfc0e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,11))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ └── flags: decimal
+ │ └── @ KeywordHashNode (location: (1,4)-(1,10))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,4)-(1,10))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,6)-(1,8) = "=>"
+ ├── opening_loc: (1,0)-(1,1) = "["
+ └── closing_loc: (1,10)-(1,11) = "]"
diff --git a/test/prism/snapshots/seattlerb/args_kw_block.txt b/test/prism/snapshots/seattlerb/args_kw_block.txt
new file mode 100644
index 0000000000..3cbd2c1705
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/args_kw_block.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,20))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,14))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,6)-(1,8) = "a:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (1,12)-(1,14))
+ │ ├── name: :b
+ │ ├── name_loc: (1,13)-(1,14) = "b"
+ │ └── operator_loc: (1,12)-(1,13) = "&"
+ ├── body: ∅
+ ├── locals: [:a, :b]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,14)-(1,15) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,17)-(1,20) = "end"
diff --git a/test/prism/snapshots/seattlerb/array_line_breaks.txt b/test/prism/snapshots/seattlerb/array_line_breaks.txt
new file mode 100644
index 0000000000..b6ebac1688
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/array_line_breaks.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(4,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(3,4))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (2,0)-(2,3))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (2,0)-(2,1) = "'"
+ │ │ │ ├── content_loc: (2,1)-(2,2) = "a"
+ │ │ │ ├── closing_loc: (2,2)-(2,3) = "'"
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ StringNode (location: (3,0)-(3,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (3,0)-(3,1) = "'"
+ │ │ ├── content_loc: (3,1)-(3,2) = "b"
+ │ │ ├── closing_loc: (3,2)-(3,3) = "'"
+ │ │ └── unescaped: "b"
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (3,3)-(3,4) = "]"
+ └── @ IntegerNode (location: (4,0)-(4,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt b/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt
new file mode 100644
index 0000000000..ef31ed8bbc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── receiver:
+ │ │ @ ArrayNode (location: (1,0)-(1,4))
+ │ │ ├── elements: (length: 0)
+ │ │ ├── opening_loc: (1,0)-(1,3) = "%w["
+ │ │ └── closing_loc: (1,3)-(1,4) = "]"
+ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ └── @ CallNode (location: (3,0)-(3,4))
+ ├── receiver:
+ │ @ ArrayNode (location: (3,0)-(3,2))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (3,0)-(3,1) = "["
+ │ └── closing_loc: (3,1)-(3,2) = "]"
+ ├── call_operator_loc: (3,2)-(3,3) = "."
+ ├── message_loc: (3,3)-(3,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/assoc__bare.txt b/test/prism/snapshots/seattlerb/assoc__bare.txt
new file mode 100644
index 0000000000..1de54f236d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/assoc__bare.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(1,6))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,4))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,2)-(1,3) = "y"
+ │ │ ├── closing_loc: (1,3)-(1,4) = ":"
+ │ │ └── unescaped: "y"
+ │ ├── value:
+ │ │ @ ImplicitNode (location: (1,2)-(1,4))
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,2)-(1,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "y"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "y"
+ │ └── operator_loc: ∅
+ └── closing_loc: (1,5)-(1,6) = "}"
diff --git a/test/prism/snapshots/seattlerb/assoc_label.txt b/test/prism/snapshots/seattlerb/assoc_label.txt
new file mode 100644
index 0000000000..2e20f9fc29
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/assoc_label.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,5))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,5))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,2)-(1,3) = "b"
+ │ │ ├── closing_loc: (1,3)-(1,4) = ":"
+ │ │ └── unescaped: "b"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt b/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt
new file mode 100644
index 0000000000..5232738267
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "b="
diff --git a/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt b/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt
new file mode 100644
index 0000000000..5d30d718c9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,1)-(1,9) = "[[1, 2]]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,13))
+ │ └── arguments: (length: 2)
+ │ ├── @ ArrayNode (location: (1,2)-(1,8))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (1,3)-(1,4))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (1,2)-(1,3) = "["
+ │ │ └── closing_loc: (1,7)-(1,8) = "]"
+ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ └── flags: decimal
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]="
diff --git a/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt b/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt
new file mode 100644
index 0000000000..741e1cba09
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt
@@ -0,0 +1,76 @@
+@ ProgramNode (location: (1,0)-(1,42))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,42))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,42))
+ ├── receiver:
+ │ @ ArrayNode (location: (1,0)-(1,12))
+ │ ├── elements: (length: 4)
+ │ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,11)-(1,12) = "]"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,12)-(1,24) = "[from .. to]"
+ ├── opening_loc: (1,12)-(1,13) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,13)-(1,42))
+ │ └── arguments: (length: 2)
+ │ ├── @ RangeNode (location: (1,13)-(1,23))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (1,13)-(1,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,13)-(1,17) = "from"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "from"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (1,21)-(1,23))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,21)-(1,23) = "to"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "to"
+ │ │ ├── operator_loc: (1,18)-(1,20) = ".."
+ │ │ └── flags: ∅
+ │ └── @ ArrayNode (location: (1,27)-(1,42))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (1,28)-(1,31))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,28)-(1,29) = "\""
+ │ │ │ ├── content_loc: (1,29)-(1,30) = "a"
+ │ │ │ ├── closing_loc: (1,30)-(1,31) = "\""
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ StringNode (location: (1,33)-(1,36))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,33)-(1,34) = "\""
+ │ │ │ ├── content_loc: (1,34)-(1,35) = "b"
+ │ │ │ ├── closing_loc: (1,35)-(1,36) = "\""
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ StringNode (location: (1,38)-(1,41))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,38)-(1,39) = "\""
+ │ │ ├── content_loc: (1,39)-(1,40) = "c"
+ │ │ ├── closing_loc: (1,40)-(1,41) = "\""
+ │ │ └── unescaped: "c"
+ │ ├── opening_loc: (1,27)-(1,28) = "["
+ │ └── closing_loc: (1,41)-(1,42) = "]"
+ ├── closing_loc: (1,23)-(1,24) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]="
diff --git a/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt b/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt
new file mode 100644
index 0000000000..73b65fc636
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "B"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "B="
diff --git a/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt b/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt
new file mode 100644
index 0000000000..d56a532bc4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedXStringNode (location: (1,2)-(1,8))
+ │ ├── opening_loc: (1,2)-(1,3) = "`"
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
+ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,5)-(1,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,5)-(1,6) = "y"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "y"
+ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ └── closing_loc: (1,7)-(1,8) = "`"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/bang_eq.txt b/test/prism/snapshots/seattlerb/bang_eq.txt
new file mode 100644
index 0000000000..b2fc7b7bb7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bang_eq.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,4) = "!="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!="
diff --git a/test/prism/snapshots/seattlerb/bdot2.txt b/test/prism/snapshots/seattlerb/bdot2.txt
new file mode 100644
index 0000000000..2fc74e52a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bdot2.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,4))
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (1,2)-(1,4))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (1,0)-(1,2) = ".."
+ │ └── flags: ∅
+ ├── @ RangeNode (location: (2,2)-(2,5))
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (2,4)-(2,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,4)-(2,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── operator_loc: (2,2)-(2,4) = ".."
+ │ └── flags: ∅
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/bdot3.txt b/test/prism/snapshots/seattlerb/bdot3.txt
new file mode 100644
index 0000000000..f282688f85
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bdot3.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,5))
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (1,3)-(1,5))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (1,0)-(1,3) = "..."
+ │ └── flags: exclude_end
+ ├── @ RangeNode (location: (2,2)-(2,6))
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ CallNode (location: (2,5)-(2,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,5)-(2,6) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── operator_loc: (2,2)-(2,5) = "..."
+ │ └── flags: exclude_end
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt b/test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt
new file mode 100644
index 0000000000..e1698d0bae
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/begin_ensure_no_bodies.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(3,3))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements: ∅
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (2,0)-(3,3))
+ │ ├── ensure_keyword_loc: (2,0)-(2,6) = "ensure"
+ │ ├── statements: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt b/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt
new file mode 100644
index 0000000000..686fa100f1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_bodies.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(9,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,3))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(9,3))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(2,3))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (2,2)-(2,3))
+ │ └── flags: decimal
+ ├── rescue_clause:
+ │ @ RescueNode (location: (3,0)-(4,3))
+ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (4,2)-(4,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (4,2)-(4,3))
+ │ │ └── flags: decimal
+ │ └── consequent: ∅
+ ├── else_clause:
+ │ @ ElseNode (location: (5,0)-(7,6))
+ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (6,2)-(6,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (6,2)-(6,3))
+ │ │ └── flags: decimal
+ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (7,0)-(9,3))
+ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,2)-(8,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (8,2)-(8,3))
+ │ │ └── flags: decimal
+ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ └── end_keyword_loc: (9,0)-(9,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt b/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt
new file mode 100644
index 0000000000..02e1f097ac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/begin_rescue_else_ensure_no_bodies.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(9,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,3))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(9,3))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements: ∅
+ ├── rescue_clause:
+ │ @ RescueNode (location: (3,0)-(3,6))
+ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements: ∅
+ │ └── consequent: ∅
+ ├── else_clause:
+ │ @ ElseNode (location: (5,0)-(7,6))
+ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
+ │ ├── statements: ∅
+ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (7,0)-(9,3))
+ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ ├── statements: ∅
+ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ └── end_keyword_loc: (9,0)-(9,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt b/test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt
new file mode 100644
index 0000000000..b36fe5c1fe
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/begin_rescue_ensure_no_bodies.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(4,3))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements: ∅
+ ├── rescue_clause:
+ │ @ RescueNode (location: (2,0)-(2,6))
+ │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements: ∅
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (3,0)-(4,3))
+ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
+ │ ├── statements: ∅
+ │ └── end_keyword_loc: (4,0)-(4,3) = "end"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_arg__bare.txt b/test/prism/snapshots/seattlerb/block_arg__bare.txt
new file mode 100644
index 0000000000..fb9b0bdd0d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg__bare.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,13))
+ ├── name: :x
+ ├── name_loc: (1,4)-(1,5) = "x"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,7))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (1,6)-(1,7))
+ │ ├── name: nil
+ │ ├── name_loc: ∅
+ │ └── operator_loc: (1,6)-(1,7) = "&"
+ ├── body: ∅
+ ├── locals: [:&]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,7)-(1,8) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
new file mode 100644
index 0000000000..c3041819bf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,11))
+ │ ├── locals: [:b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,9))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,8))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,8))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,7)-(1,8) = "b"
+ │ │ │ │ └── operator_loc: (1,5)-(1,7) = "**"
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,8)-(1,9) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
new file mode 100644
index 0000000000..d1382f9a53
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,21))
+ │ ├── locals: [:b, :c, :d, :e]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,19))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,18))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ └── name: :d
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,16)-(1,18))
+ │ │ │ ├── name: :e
+ │ │ │ ├── name_loc: (1,17)-(1,18) = "e"
+ │ │ │ └── operator_loc: (1,16)-(1,17) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,18)-(1,19) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,20)-(1,21) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
new file mode 100644
index 0000000000..1119f827dd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,20))
+ │ ├── locals: [:b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,18))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,17))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,13))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,15)-(1,17))
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── name_loc: (1,16)-(1,17) = "d"
+ │ │ │ │ └── operator_loc: (1,15)-(1,16) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,17)-(1,18) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,19)-(1,20) = "}"
+ ├── flags: ∅
+ └── name: "a"
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
new file mode 100644
index 0000000000..5bb2de2a16
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,25))
+ │ ├── locals: [:b, :c, :d, :e, :f]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,23))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,22))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ │ ├── name: :d
+ │ │ │ │ ├── name_loc: (1,14)-(1,15) = "d"
+ │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
+ │ │ │ │ └── name: :e
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,20)-(1,22))
+ │ │ │ ├── name: :f
+ │ │ │ ├── name_loc: (1,21)-(1,22) = "f"
+ │ │ │ └── operator_loc: (1,20)-(1,21) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,22)-(1,23) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,24)-(1,25) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_arg_optional.txt b/test/prism/snapshots/seattlerb/block_arg_optional.txt
new file mode 100644
index 0000000000..8b29ce6e9f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_optional.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,13))
+ │ ├── locals: [:b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,10))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_arg_scope.txt b/test/prism/snapshots/seattlerb/block_arg_scope.txt
new file mode 100644
index 0000000000..e70f2f4ce7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_scope.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,12))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,10))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,6))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 1)
+ │ │ │ └── @ BlockLocalVariableNode (location: (1,8)-(1,9))
+ │ │ │ └── name: :c
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,9)-(1,10) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,11)-(1,12) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_arg_scope2.txt b/test/prism/snapshots/seattlerb/block_arg_scope2.txt
new file mode 100644
index 0000000000..99af39a109
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_scope2.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,14))
+ │ ├── locals: [:b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,3)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,4)-(1,5))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,4)-(1,5))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 2)
+ │ │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8))
+ │ │ │ │ └── name: :c
+ │ │ │ └── @ BlockLocalVariableNode (location: (1,10)-(1,11))
+ │ │ │ └── name: :d
+ │ │ ├── opening_loc: (1,3)-(1,4) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,13)-(1,14) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt
new file mode 100644
index 0000000000..a3a194f30b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,16))
+ │ ├── locals: [:b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,14))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,13))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,8)-(1,10))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,9)-(1,10) = "c"
+ │ │ │ │ └── operator_loc: (1,8)-(1,9) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ └── name: :d
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,13)-(1,14) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,15)-(1,16) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_args_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_kwargs.txt
new file mode 100644
index 0000000000..4d2255fd66
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_kwargs.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,23))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,23))
+ │ ├── locals: [:kwargs]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,14))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,13))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,13))
+ │ │ │ │ ├── name: :kwargs
+ │ │ │ │ ├── name_loc: (1,7)-(1,13) = "kwargs"
+ │ │ │ │ └── operator_loc: (1,5)-(1,7) = "**"
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,13)-(1,14) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,15)-(1,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,15)-(1,21))
+ │ │ ├── name: :kwargs
+ │ │ └── depth: 0
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,22)-(1,23) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt
new file mode 100644
index 0000000000..b8542f2ab7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,13))
+ │ ├── locals: []
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,10))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ NoKeywordsParameterNode (location: (1,5)-(1,10))
+ │ │ │ │ ├── operator_loc: (1,5)-(1,7) = "**"
+ │ │ │ │ └── keyword_loc: (1,7)-(1,10) = "nil"
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt1.txt b/test/prism/snapshots/seattlerb/block_args_opt1.txt
new file mode 100644
index 0000000000..7e022ab1ea
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt1.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,24))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,24))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,16)-(1,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ArrayNode (location: (1,16)-(1,22))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableReadNode (location: (1,20)-(1,21))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (1,16)-(1,17) = "["
+ │ │ └── closing_loc: (1,21)-(1,22) = "]"
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,23)-(1,24) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt2.txt b/test/prism/snapshots/seattlerb/block_args_opt2.txt
new file mode 100644
index 0000000000..4a5b0ef03d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt2.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,18))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,6)-(1,14))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 2)
+ │ │ │ │ ├── @ OptionalParameterNode (location: (1,6)-(1,9))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
+ │ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,11)-(1,14))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,11)-(1,12) = "c"
+ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,13)-(1,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,15)-(1,16) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,17)-(1,18) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt2_2.txt b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
new file mode 100644
index 0000000000..da706e2306
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(1,35))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,35))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,35))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,35))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,23))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,22))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 2)
+ │ │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,16)-(1,17) = "c"
+ │ │ │ │ ├── operator_loc: (1,18)-(1,19) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,20)-(1,22))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,22)-(1,23) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,24)-(1,33))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ArrayNode (location: (1,24)-(1,33))
+ │ │ ├── elements: (length: 3)
+ │ │ │ ├── @ LocalVariableReadNode (location: (1,25)-(1,26))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── @ LocalVariableReadNode (location: (1,28)-(1,29))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableReadNode (location: (1,31)-(1,32))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (1,24)-(1,25) = "["
+ │ │ └── closing_loc: (1,32)-(1,33) = "]"
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,34)-(1,35) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_args_opt3.txt b/test/prism/snapshots/seattlerb/block_args_opt3.txt
new file mode 100644
index 0000000000..5f187e20cf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_args_opt3.txt
@@ -0,0 +1,72 @@
+@ ProgramNode (location: (1,0)-(1,42))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,42))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,42))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,42))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,27))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,26))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 2)
+ │ │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,16)-(1,17) = "c"
+ │ │ │ │ ├── operator_loc: (1,18)-(1,19) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,20)-(1,22))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,24)-(1,26))
+ │ │ │ ├── name: :d
+ │ │ │ ├── name_loc: (1,25)-(1,26) = "d"
+ │ │ │ └── operator_loc: (1,24)-(1,25) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,26)-(1,27) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,28)-(1,40))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ArrayNode (location: (1,28)-(1,40))
+ │ │ ├── elements: (length: 4)
+ │ │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── @ LocalVariableReadNode (location: (1,32)-(1,33))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── @ LocalVariableReadNode (location: (1,35)-(1,36))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableReadNode (location: (1,38)-(1,39))
+ │ │ │ ├── name: :d
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (1,28)-(1,29) = "["
+ │ │ └── closing_loc: (1,39)-(1,40) = "]"
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,41)-(1,42) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_break.txt b/test/prism/snapshots/seattlerb/block_break.txt
new file mode 100644
index 0000000000..ce4f94f1c9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_break.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ BreakNode (location: (1,0)-(1,26))
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,26))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,6)-(1,26))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,10)-(1,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,10)-(1,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,10)-(1,13) = "arg"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "arg"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,14)-(1,26))
+ │ │ ├── locals: [:bar]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (1,17)-(1,22))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (1,18)-(1,21))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,21))
+ │ │ │ │ │ └── name: :bar
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (1,17)-(1,18) = "|"
+ │ │ │ └── closing_loc: (1,21)-(1,22) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
+ │ │ └── closing_loc: (1,23)-(1,26) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── keyword_loc: (1,0)-(1,5) = "break"
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
new file mode 100644
index 0000000000..49ddad48b2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt
@@ -0,0 +1,78 @@
+@ ProgramNode (location: (1,0)-(4,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,11))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(3,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(3,4))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ DefNode (location: (1,2)-(3,4))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,6)-(1,7) = "b"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,8)-(1,9))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,9))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (2,1)-(2,2))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,1)-(2,2))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,1)-(2,2) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── locals: [:c]
+ │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ │ ├── rparen_loc: (1,9)-(1,10) = ")"
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (3,1)-(3,4) = "end"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (4,1)-(4,11))
+ ├── receiver:
+ │ @ CallNode (location: (4,1)-(4,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,1)-(4,2) = "e"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "e"
+ ├── call_operator_loc: (4,2)-(4,3) = "."
+ ├── message_loc: (4,3)-(4,4) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (4,5)-(4,11))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (4,5)-(4,7) = "do"
+ │ └── closing_loc: (4,8)-(4,11) = "end"
+ ├── flags: ∅
+ └── name: "f"
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
new file mode 100644
index 0000000000..812b7ab151
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt
@@ -0,0 +1,98 @@
+@ ProgramNode (location: (1,0)-(1,31))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,31))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,31))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,16))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (1,6)-(1,7) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "c"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,8)-(1,16))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,11)-(1,12))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (1,8)-(1,10) = "do"
+ │ │ └── closing_loc: (1,13)-(1,16) = "end"
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: (1,16)-(1,17) = "."
+ ├── message_loc: (1,17)-(1,18) = "e"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,19)-(1,31))
+ │ ├── locals: [:f]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,22)-(1,25))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,23)-(1,24))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,23)-(1,24))
+ │ │ │ │ └── name: :f
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,22)-(1,23) = "|"
+ │ │ └── closing_loc: (1,24)-(1,25) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,26)-(1,27))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,26)-(1,27))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,26)-(1,27) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "g"
+ │ ├── opening_loc: (1,19)-(1,21) = "do"
+ │ └── closing_loc: (1,28)-(1,31) = "end"
+ ├── flags: ∅
+ └── name: "e"
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
new file mode 100644
index 0000000000..2262a7cc88
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt
@@ -0,0 +1,110 @@
+@ ProgramNode (location: (1,0)-(1,33))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,33))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,33))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,16))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (1,6)-(1,7) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "c"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,8)-(1,16))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,11)-(1,12))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (1,8)-(1,10) = "do"
+ │ │ └── closing_loc: (1,13)-(1,16) = "end"
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: (1,16)-(1,17) = "."
+ ├── message_loc: (1,17)-(1,18) = "e"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,19)-(1,20))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,19)-(1,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,19)-(1,20) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "f"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,21)-(1,33))
+ │ ├── locals: [:g]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,24)-(1,27))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,25)-(1,26))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,25)-(1,26))
+ │ │ │ │ └── name: :g
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,24)-(1,25) = "|"
+ │ │ └── closing_loc: (1,26)-(1,27) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,28)-(1,29))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,28)-(1,29))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,28)-(1,29) = "h"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "h"
+ │ ├── opening_loc: (1,21)-(1,23) = "do"
+ │ └── closing_loc: (1,30)-(1,33) = "end"
+ ├── flags: ∅
+ └── name: "e"
diff --git a/test/prism/snapshots/seattlerb/block_call_operation_colon.txt b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
new file mode 100644
index 0000000000..3bcc89b50a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,12))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,6)-(1,12))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,6)-(1,8) = "do"
+ │ │ └── closing_loc: (1,9)-(1,12) = "end"
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: (1,12)-(1,14) = "::"
+ ├── message_loc: (1,14)-(1,15) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/block_call_operation_dot.txt b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
new file mode 100644
index 0000000000..93116aed58
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,12))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,6)-(1,12))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,6)-(1,8) = "do"
+ │ │ └── closing_loc: (1,9)-(1,12) = "end"
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: (1,12)-(1,13) = "."
+ ├── message_loc: (1,13)-(1,14) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "d"
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
new file mode 100644
index 0000000000..ec75ca056a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(2,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,10))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (1,2)-(1,5))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,3)-(1,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,3)-(1,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ │ └── closing_loc: (1,4)-(1,5) = ")"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (2,0)-(2,10))
+ ├── receiver:
+ │ @ CallNode (location: (2,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,1) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "c"
+ ├── call_operator_loc: (2,1)-(2,2) = "."
+ ├── message_loc: (2,2)-(2,3) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (2,4)-(2,10))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (2,4)-(2,6) = "do"
+ │ └── closing_loc: (2,7)-(2,10) = "end"
+ ├── flags: ∅
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/block_command_operation_colon.txt b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
new file mode 100644
index 0000000000..90bb7ad6d0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── opening_loc: (1,2)-(1,3) = ":"
+ │ │ ├── value_loc: (1,3)-(1,4) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,5)-(1,11))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ │ └── closing_loc: (1,8)-(1,11) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── call_operator_loc: (1,11)-(1,13) = "::"
+ ├── message_loc: (1,13)-(1,14) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,15)-(1,17))
+ │ └── arguments: (length: 1)
+ │ └── @ SymbolNode (location: (1,15)-(1,17))
+ │ ├── opening_loc: (1,15)-(1,16) = ":"
+ │ ├── value_loc: (1,16)-(1,17) = "d"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "d"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/block_command_operation_dot.txt b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
new file mode 100644
index 0000000000..94be9641fb
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── opening_loc: (1,2)-(1,3) = ":"
+ │ │ ├── value_loc: (1,3)-(1,4) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,5)-(1,11))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ │ └── closing_loc: (1,8)-(1,11) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── call_operator_loc: (1,11)-(1,12) = "."
+ ├── message_loc: (1,12)-(1,13) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,14)-(1,16))
+ │ └── arguments: (length: 1)
+ │ └── @ SymbolNode (location: (1,14)-(1,16))
+ │ ├── opening_loc: (1,14)-(1,15) = ":"
+ │ ├── value_loc: (1,15)-(1,16) = "d"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "d"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
new file mode 100644
index 0000000000..76c3b8c413
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,14))
+ │ ├── locals: [:a]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,11))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ SplatNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
+ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,13)-(1,14) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
new file mode 100644
index 0000000000..3eebb50b72
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,14))
+ │ ├── locals: [:b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,11))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ SplatNode (location: (1,9)-(1,10))
+ │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,13)-(1,14) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
new file mode 100644
index 0000000000..4ee66e215b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,18))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,15))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,15))
+ │ │ │ │ ├── parameters: (length: 3)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ ├── @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ │ │ └── expression:
+ │ │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,14)-(1,15) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,15)-(1,16) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,17)-(1,18) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_decomp_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_splat.txt
new file mode 100644
index 0000000000..698dba24db
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_decomp_splat.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,12))
+ │ ├── locals: [:a]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,10))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,9))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,9))
+ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ └── @ SplatNode (location: (1,6)-(1,8))
+ │ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,8)-(1,9) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,9)-(1,10) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,11)-(1,12) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/block_kw.txt b/test/prism/snapshots/seattlerb/block_kw.txt
new file mode 100644
index 0000000000..f706063884
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_kw.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,4) = "blah"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,5)-(1,15))
+ │ ├── locals: [:k]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,7)-(1,13))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,8)-(1,12))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (1,8)-(1,12))
+ │ │ │ │ ├── name: :k
+ │ │ │ │ ├── name_loc: (1,8)-(1,10) = "k:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,10)-(1,12))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,7)-(1,8) = "|"
+ │ │ └── closing_loc: (1,12)-(1,13) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ └── closing_loc: (1,14)-(1,15) = "}"
+ ├── flags: ∅
+ └── name: "blah"
diff --git a/test/prism/snapshots/seattlerb/block_kw__required.txt b/test/prism/snapshots/seattlerb/block_kw__required.txt
new file mode 100644
index 0000000000..d46bfcf21a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_kw__required.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,4) = "blah"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,5)-(1,16))
+ │ ├── locals: [:k]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,8)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,9)-(1,11))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (1,9)-(1,11))
+ │ │ │ │ ├── name: :k
+ │ │ │ │ ├── name_loc: (1,9)-(1,11) = "k:"
+ │ │ │ │ └── value: ∅
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,8)-(1,9) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ └── closing_loc: (1,13)-(1,16) = "end"
+ ├── flags: ∅
+ └── name: "blah"
diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt
new file mode 100644
index 0000000000..f268418a5f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,2) = "bl"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,3)-(1,20))
+ │ ├── locals: [:kw]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,5)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,6)-(1,14))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,14))
+ │ │ │ │ ├── name: :kw
+ │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
+ │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "val"
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,5)-(1,6) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,16)-(1,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,16)-(1,18))
+ │ │ ├── name: :kw
+ │ │ └── depth: 0
+ │ ├── opening_loc: (1,3)-(1,4) = "{"
+ │ └── closing_loc: (1,19)-(1,20) = "}"
+ ├── flags: ∅
+ └── name: "bl"
diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
new file mode 100644
index 0000000000..f062044909
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(1,33))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,33))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,33))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,2) = "bl"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,3)-(1,33))
+ │ ├── locals: [:kw, :kw2]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,5)-(1,28))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,6)-(1,26))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ ├── @ KeywordParameterNode (location: (1,6)-(1,14))
+ │ │ │ │ │ ├── name: :kw
+ │ │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:"
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ │ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
+ │ │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "val"
+ │ │ │ │ └── @ KeywordParameterNode (location: (1,16)-(1,26))
+ │ │ │ │ ├── name: :kw2
+ │ │ │ │ ├── name_loc: (1,16)-(1,20) = "kw2:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ SymbolNode (location: (1,21)-(1,26))
+ │ │ │ │ ├── opening_loc: (1,21)-(1,22) = ":"
+ │ │ │ │ ├── value_loc: (1,22)-(1,26) = "val2"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "val2"
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,5)-(1,6) = "|"
+ │ │ └── closing_loc: (1,27)-(1,28) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,29)-(1,31))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,29)-(1,31))
+ │ │ ├── name: :kw
+ │ │ └── depth: 0
+ │ ├── opening_loc: (1,3)-(1,4) = "{"
+ │ └── closing_loc: (1,32)-(1,33) = "}"
+ ├── flags: ∅
+ └── name: "bl"
diff --git a/test/prism/snapshots/seattlerb/block_next.txt b/test/prism/snapshots/seattlerb/block_next.txt
new file mode 100644
index 0000000000..5c1b27d8f3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_next.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ NextNode (location: (1,0)-(1,25))
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,25))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,5)-(1,25))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,9)-(1,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,12) = "arg"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "arg"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,13)-(1,25))
+ │ │ ├── locals: [:bar]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (1,16)-(1,21))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (1,17)-(1,20))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,20))
+ │ │ │ │ │ └── name: :bar
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (1,16)-(1,17) = "|"
+ │ │ │ └── closing_loc: (1,20)-(1,21) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,13)-(1,15) = "do"
+ │ │ └── closing_loc: (1,22)-(1,25) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── keyword_loc: (1,0)-(1,4) = "next"
diff --git a/test/prism/snapshots/seattlerb/block_opt_arg.txt b/test/prism/snapshots/seattlerb/block_opt_arg.txt
new file mode 100644
index 0000000000..32d5738df3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_opt_arg.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,14))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,11))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,13)-(1,14) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_opt_splat.txt b/test/prism/snapshots/seattlerb/block_opt_splat.txt
new file mode 100644
index 0000000000..9a8a4938fe
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_opt_splat.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,12)-(1,14))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,13)-(1,14) = "c"
+ │ │ │ │ └── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "a"
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
new file mode 100644
index 0000000000..e3fc328737
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,22))
+ │ ├── locals: [:b, :c, :d, :e]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,20))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,19))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,10)-(1,12))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,11)-(1,12) = "c"
+ │ │ │ │ └── operator_loc: (1,10)-(1,11) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ │ └── name: :d
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,17)-(1,19))
+ │ │ │ ├── name: :e
+ │ │ │ ├── name_loc: (1,18)-(1,19) = "e"
+ │ │ │ └── operator_loc: (1,17)-(1,18) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,19)-(1,20) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,21)-(1,22) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_optarg.txt b/test/prism/snapshots/seattlerb/block_optarg.txt
new file mode 100644
index 0000000000..b930687f3b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_optarg.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,14))
+ │ ├── locals: [:b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,11))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ SymbolNode (location: (1,9)-(1,11))
+ │ │ │ │ ├── opening_loc: (1,9)-(1,10) = ":"
+ │ │ │ │ ├── value_loc: (1,10)-(1,11) = "c"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "c"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,13)-(1,14) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_paren_splat.txt b/test/prism/snapshots/seattlerb/block_paren_splat.txt
new file mode 100644
index 0000000000..f7592497f1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_paren_splat.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,15))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,13))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,12))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,12))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,12)-(1,13) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,14)-(1,15) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_reg_optarg.txt b/test/prism/snapshots/seattlerb/block_reg_optarg.txt
new file mode 100644
index 0000000000..2d6d50122c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_reg_optarg.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ SymbolNode (location: (1,12)-(1,14))
+ │ │ │ │ ├── opening_loc: (1,12)-(1,13) = ":"
+ │ │ │ │ ├── value_loc: (1,13)-(1,14) = "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "d"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_return.txt b/test/prism/snapshots/seattlerb/block_return.txt
new file mode 100644
index 0000000000..8c391abd53
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_return.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,27))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,27))
+ └── body: (length: 1)
+ └── @ ReturnNode (location: (1,0)-(1,27))
+ ├── keyword_loc: (1,0)-(1,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (1,7)-(1,27))
+ └── arguments: (length: 1)
+ └── @ CallNode (location: (1,7)-(1,27))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,7)-(1,10) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,11)-(1,14))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,14) = "arg"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "arg"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,15)-(1,27))
+ │ ├── locals: [:bar]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,18)-(1,23))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,19)-(1,22))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,19)-(1,22))
+ │ │ │ │ └── name: :bar
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,18)-(1,19) = "|"
+ │ │ └── closing_loc: (1,22)-(1,23) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,15)-(1,17) = "do"
+ │ └── closing_loc: (1,24)-(1,27) = "end"
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/seattlerb/block_scope.txt b/test/prism/snapshots/seattlerb/block_scope.txt
new file mode 100644
index 0000000000..14263c5623
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_scope.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,10))
+ │ ├── locals: [:b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,8))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 1)
+ │ │ │ └── @ BlockLocalVariableNode (location: (1,6)-(1,7))
+ │ │ │ └── name: :b
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,7)-(1,8) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,9)-(1,10) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/block_splat_reg.txt b/test/prism/snapshots/seattlerb/block_splat_reg.txt
new file mode 100644
index 0000000000..4b12ce34a8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/block_splat_reg.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,13))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,10))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,5)-(1,7))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
+ │ │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/bug169.txt b/test/prism/snapshots/seattlerb/bug169.txt
new file mode 100644
index 0000000000..94c2597316
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug169.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,2)-(1,4))
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,3)-(1,4) = ")"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,5)-(1,7))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ └── closing_loc: (1,6)-(1,7) = "}"
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/seattlerb/bug179.txt b/test/prism/snapshots/seattlerb/bug179.txt
new file mode 100644
index 0000000000..233a4767e0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug179.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ └── arguments: (length: 1)
+ │ └── @ RangeNode (location: (1,2)-(1,9))
+ │ ├── left:
+ │ │ @ ParenthesesNode (location: (1,2)-(1,4))
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ │ └── closing_loc: (1,3)-(1,4) = ")"
+ │ ├── right:
+ │ │ @ NilNode (location: (1,6)-(1,9))
+ │ ├── operator_loc: (1,4)-(1,6) = ".."
+ │ └── flags: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/seattlerb/bug190.txt b/test/prism/snapshots/seattlerb/bug190.txt
new file mode 100644
index 0000000000..527304835a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug190.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ RegularExpressionNode (location: (1,0)-(1,6))
+ ├── opening_loc: (1,0)-(1,3) = "%r'"
+ ├── content_loc: (1,3)-(1,5) = "\\'"
+ ├── closing_loc: (1,5)-(1,6) = "'"
+ ├── unescaped: "'"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/bug191.txt b/test/prism/snapshots/seattlerb/bug191.txt
new file mode 100644
index 0000000000..313e892629
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug191.txt
@@ -0,0 +1,85 @@
+@ ProgramNode (location: (1,0)-(3,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,9))
+ └── body: (length: 2)
+ ├── @ IfNode (location: (1,0)-(1,9))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,4)-(1,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ StringNode (location: (1,4)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,4)-(1,5) = "\""
+ │ │ ├── content_loc: (1,5)-(1,5) = ""
+ │ │ ├── closing_loc: (1,5)-(1,6) = "\""
+ │ │ └── unescaped: ""
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,6)-(1,9))
+ │ │ ├── else_keyword_loc: (1,6)-(1,7) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,8)-(1,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,8)-(1,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,8)-(1,9) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ IfNode (location: (3,0)-(3,9))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (3,0)-(3,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── statements:
+ │ @ StatementsNode (location: (3,4)-(3,6))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (3,4)-(3,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (3,4)-(3,5) = "'"
+ │ ├── content_loc: (3,5)-(3,5) = ""
+ │ ├── closing_loc: (3,5)-(3,6) = "'"
+ │ └── unescaped: ""
+ ├── consequent:
+ │ @ ElseNode (location: (3,6)-(3,9))
+ │ ├── else_keyword_loc: (3,6)-(3,7) = ":"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,8)-(3,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,8)-(3,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,8)-(3,9) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── end_keyword_loc: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/bug202.txt b/test/prism/snapshots/seattlerb/bug202.txt
new file mode 100644
index 0000000000..3faff193dc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug202.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(2,10))
+├── locals: [:测试]
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,10))
+ └── body: (length: 2)
+ ├── @ GlobalVariableWriteNode (location: (1,0)-(1,11))
+ │ ├── name: :$测试
+ │ ├── name_loc: (1,0)-(1,7) = "$测试"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,8)-(1,9) = "="
+ └── @ LocalVariableWriteNode (location: (2,0)-(2,10))
+ ├── name: :测试
+ ├── depth: 0
+ ├── name_loc: (2,0)-(2,6) = "测试"
+ ├── value:
+ │ @ IntegerNode (location: (2,9)-(2,10))
+ │ └── flags: decimal
+ └── operator_loc: (2,7)-(2,8) = "="
diff --git a/test/prism/snapshots/seattlerb/bug236.txt b/test/prism/snapshots/seattlerb/bug236.txt
new file mode 100644
index 0000000000..c53055bae0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug236.txt
@@ -0,0 +1,71 @@
+@ ProgramNode (location: (1,0)-(3,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,6))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,1)-(1,7))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (1,2)-(1,6))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (1,3)-(1,5))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (1,4)-(1,5))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (1,4)-(1,5) = ","
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (1,2)-(1,3) = "|"
+ │ │ │ └── closing_loc: (1,5)-(1,6) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,1)-(1,2) = "{"
+ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ ├── flags: ∅
+ │ └── name: "x"
+ └── @ CallNode (location: (3,0)-(3,6))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (3,1)-(3,6))
+ │ ├── locals: [:a]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (3,2)-(3,5))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (3,3)-(3,4))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (3,3)-(3,4))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (3,2)-(3,3) = "|"
+ │ │ └── closing_loc: (3,4)-(3,5) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (3,1)-(3,2) = "{"
+ │ └── closing_loc: (3,5)-(3,6) = "}"
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/bug290.txt b/test/prism/snapshots/seattlerb/bug290.txt
new file mode 100644
index 0000000000..dbe69a5a15
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug290.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(3,3))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,2)-(2,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_187.txt b/test/prism/snapshots/seattlerb/bug_187.txt
new file mode 100644
index 0000000000..0f55dc049c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_187.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,7) = "private"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,8)-(3,3))
+ │ └── arguments: (length: 1)
+ │ └── @ DefNode (location: (1,8)-(3,3))
+ │ ├── name: :f
+ │ ├── name_loc: (1,12)-(1,13) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,0)-(2,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,0)-(2,10))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── call_operator_loc: (2,1)-(2,2) = "."
+ │ │ ├── message_loc: (2,2)-(2,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (2,4)-(2,10))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (2,4)-(2,6) = "do"
+ │ │ │ └── closing_loc: (2,7)-(2,10) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,8)-(1,11) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "private"
diff --git a/test/prism/snapshots/seattlerb/bug_215.txt b/test/prism/snapshots/seattlerb/bug_215.txt
new file mode 100644
index 0000000000..0ce43b58de
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_215.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ UndefNode (location: (1,0)-(1,13))
+ ├── names: (length: 1)
+ │ └── @ SymbolNode (location: (1,6)-(1,13))
+ │ ├── opening_loc: (1,6)-(1,9) = "%s("
+ │ ├── value_loc: (1,9)-(1,12) = "foo"
+ │ ├── closing_loc: (1,12)-(1,13) = ")"
+ │ └── unescaped: "foo"
+ └── keyword_loc: (1,0)-(1,5) = "undef"
diff --git a/test/prism/snapshots/seattlerb/bug_249.txt b/test/prism/snapshots/seattlerb/bug_249.txt
new file mode 100644
index 0000000000..3fd204a71b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_249.txt
@@ -0,0 +1,83 @@
+@ ProgramNode (location: (1,0)-(4,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,28))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,5) = "mount"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(4,28))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,6)-(4,9))
+ │ │ ├── receiver:
+ │ │ │ @ ParenthesesNode (location: (1,6)-(4,5))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (1,7)-(4,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,7)-(4,4))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ ConstantReadNode (location: (1,7)-(1,12))
+ │ │ │ │ │ └── name: :Class
+ │ │ │ │ ├── call_operator_loc: (1,12)-(1,13) = "."
+ │ │ │ │ ├── message_loc: (1,13)-(1,16) = "new"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (1,17)-(4,4))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body:
+ │ │ │ │ │ │ @ StatementsNode (location: (2,0)-(3,3))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ DefNode (location: (2,0)-(3,3))
+ │ │ │ │ │ │ ├── name: :initialize
+ │ │ │ │ │ │ ├── name_loc: (2,4)-(2,14) = "initialize"
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── def_keyword_loc: (2,0)-(2,3) = "def"
+ │ │ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ │ │ ├── lparen_loc: ∅
+ │ │ │ │ │ │ ├── rparen_loc: ∅
+ │ │ │ │ │ │ ├── equal_loc: ∅
+ │ │ │ │ │ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ │ │ │ │ │ ├── opening_loc: (1,17)-(1,19) = "do"
+ │ │ │ │ │ └── closing_loc: (4,1)-(4,4) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "new"
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = "("
+ │ │ │ └── closing_loc: (4,4)-(4,5) = ")"
+ │ │ ├── call_operator_loc: (4,5)-(4,6) = "."
+ │ │ ├── message_loc: (4,6)-(4,9) = "new"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "new"
+ │ └── @ KeywordHashNode (location: (4,11)-(4,28))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (4,11)-(4,28))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (4,11)-(4,14))
+ │ │ ├── opening_loc: (4,11)-(4,12) = ":"
+ │ │ ├── value_loc: (4,12)-(4,14) = "at"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "at"
+ │ ├── value:
+ │ │ @ StringNode (location: (4,18)-(4,28))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (4,18)-(4,19) = "'"
+ │ │ ├── content_loc: (4,19)-(4,27) = "endpoint"
+ │ │ ├── closing_loc: (4,27)-(4,28) = "'"
+ │ │ └── unescaped: "endpoint"
+ │ └── operator_loc: (4,15)-(4,17) = "=>"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "mount"
diff --git a/test/prism/snapshots/seattlerb/bug_and.txt b/test/prism/snapshots/seattlerb/bug_and.txt
new file mode 100644
index 0000000000..49c387a72d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_and.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(4,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,11))
+ └── body: (length: 2)
+ ├── @ AndNode (location: (1,0)-(2,4))
+ │ ├── left:
+ │ │ @ TrueNode (location: (1,0)-(1,4))
+ │ ├── right:
+ │ │ @ TrueNode (location: (2,0)-(2,4))
+ │ └── operator_loc: (1,5)-(1,8) = "and"
+ └── @ AndNode (location: (4,0)-(4,11))
+ ├── left:
+ │ @ TrueNode (location: (4,0)-(4,4))
+ ├── right:
+ │ @ ArrayNode (location: (4,9)-(4,11))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (4,9)-(4,10) = "["
+ │ └── closing_loc: (4,10)-(4,11) = "]"
+ └── operator_loc: (4,5)-(4,8) = "and"
diff --git a/test/prism/snapshots/seattlerb/bug_args__19.txt b/test/prism/snapshots/seattlerb/bug_args__19.txt
new file mode 100644
index 0000000000..45abd4c0e4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args__19.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,16))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,11))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,13)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,13)-(1,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,13)-(1,14) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "d"
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,15)-(1,16) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn.txt b/test/prism/snapshots/seattlerb/bug_args_masgn.txt
new file mode 100644
index 0000000000..748eb80f26
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredDestructuredParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn2.txt b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
new file mode 100644
index 0000000000..b4e786c7c2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,22))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,20))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,19))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredDestructuredParameterNode (location: (1,5)-(1,16))
+ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredDestructuredParameterNode (location: (1,6)-(1,12))
+ │ │ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ │ │ ├── opening_loc: (1,6)-(1,7) = "("
+ │ │ │ │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ │ │ │ └── name: :c
+ │ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ │ └── closing_loc: (1,15)-(1,16) = ")"
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19))
+ │ │ │ │ └── name: :d
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,19)-(1,20) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,21)-(1,22) = "}"
+ ├── flags: ∅
+ └── name: "f"
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
new file mode 100644
index 0000000000..61eacf4421
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,19))
+ │ ├── locals: [:k, :v, :i]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,17))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,16))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,16))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredDestructuredParameterNode (location: (1,6)-(1,12))
+ │ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ │ │ │ │ │ └── name: :k
+ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ │ └── name: :v
+ │ │ │ │ │ │ ├── opening_loc: (1,6)-(1,7) = "("
+ │ │ │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ │ │ └── name: :i
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,15)-(1,16) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,16)-(1,17) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,18)-(1,19) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
new file mode 100644
index 0000000000..3a7d533238
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt
@@ -0,0 +1,101 @@
+@ ProgramNode (location: (1,6)-(11,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,6)-(11,9))
+ └── body: (length: 3)
+ ├── @ DefNode (location: (1,6)-(3,9))
+ │ ├── name: :f
+ │ ├── name_loc: (1,10)-(1,11) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,8)-(2,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,8)-(2,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,8)-(2,9) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,10)-(2,17))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ ParenthesesNode (location: (2,10)-(2,14))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (2,12)-(2,13))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (2,12)-(2,13))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── opening_loc: (2,10)-(2,11) = "("
+ │ │ │ │ └── closing_loc: (2,13)-(2,14) = ")"
+ │ │ │ └── @ IntegerNode (location: (2,16)-(2,17))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "g"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,6)-(1,9) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,6)-(3,9) = "end"
+ ├── @ DefNode (location: (6,6)-(8,9))
+ │ ├── name: :f
+ │ ├── name_loc: (6,10)-(6,11) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,8)-(7,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,8)-(7,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,8)-(7,9) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,10)-(7,16))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ ParenthesesNode (location: (7,10)-(7,13))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (7,11)-(7,12))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (7,11)-(7,12))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── opening_loc: (7,10)-(7,11) = "("
+ │ │ │ │ └── closing_loc: (7,12)-(7,13) = ")"
+ │ │ │ └── @ IntegerNode (location: (7,15)-(7,16))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "g"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (6,6)-(6,9) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (6,11)-(6,12) = "("
+ │ ├── rparen_loc: (6,12)-(6,13) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (8,6)-(8,9) = "end"
+ └── @ CallNode (location: (11,0)-(11,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (11,0)-(11,1) = "g"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,2)-(11,9))
+ │ └── arguments: (length: 2)
+ │ ├── @ ParenthesesNode (location: (11,2)-(11,6))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (11,4)-(11,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (11,2)-(11,3) = "("
+ │ │ └── closing_loc: (11,5)-(11,6) = ")"
+ │ └── @ IntegerNode (location: (11,8)-(11,9))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "g"
diff --git a/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt b/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt
new file mode 100644
index 0000000000..ac948bc6c9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,26))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "x"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "x"
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,9)-(1,17))
+ │ ├── keyword_loc: (1,9)-(1,13) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (1,14)-(1,17))
+ │ │ ├── opening_loc: (1,14)-(1,15) = "/"
+ │ │ ├── content_loc: (1,15)-(1,16) = "x"
+ │ │ ├── closing_loc: (1,16)-(1,17) = "/"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: ∅
+ │ └── statements: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,23)-(1,26) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_comma.txt b/test/prism/snapshots/seattlerb/bug_comma.txt
new file mode 100644
index 0000000000..07ec02b232
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_comma.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,24))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (1,3)-(1,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,3)-(1,7) = "test"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (1,8)-(1,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,8)-(1,9) = "?"
+ │ │ │ ├── content_loc: (1,9)-(1,10) = "d"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "d"
+ │ │ └── @ CallNode (location: (1,12)-(1,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,12)-(1,15) = "dir"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "dir"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "test"
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,21)-(1,24) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_cond_pct.txt b/test/prism/snapshots/seattlerb/bug_cond_pct.txt
new file mode 100644
index 0000000000..bb07f009aa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_cond_pct.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,28))
+ ├── predicate: ∅
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,6)-(1,23))
+ │ ├── keyword_loc: (1,6)-(1,10) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (1,11)-(1,23))
+ │ │ ├── opening_loc: (1,11)-(1,14) = "%r%"
+ │ │ ├── content_loc: (1,14)-(1,22) = "blahblah"
+ │ │ ├── closing_loc: (1,22)-(1,23) = "%"
+ │ │ ├── unescaped: "blahblah"
+ │ │ └── flags: ∅
+ │ └── statements: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,25)-(1,28) = "end"
diff --git a/test/prism/snapshots/seattlerb/bug_hash_args.txt b/test/prism/snapshots/seattlerb/bug_hash_args.txt
new file mode 100644
index 0000000000..3a204fb4b8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_hash_args.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (1,4)-(1,8))
+ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ ├── value_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── @ KeywordHashNode (location: (1,10)-(1,18))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,10)-(1,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,10)-(1,13) = "baz"
+ │ │ ├── closing_loc: (1,13)-(1,14) = ":"
+ │ │ └── unescaped: "baz"
+ │ ├── value:
+ │ │ @ NilNode (location: (1,15)-(1,18))
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,18)-(1,19) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
new file mode 100644
index 0000000000..73bc04243d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (1,4)-(1,8))
+ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ ├── value_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── @ KeywordHashNode (location: (1,10)-(1,18))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,10)-(1,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,10)-(1,14))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,10)-(1,13) = "baz"
+ │ │ ├── closing_loc: (1,13)-(1,14) = ":"
+ │ │ └── unescaped: "baz"
+ │ ├── value:
+ │ │ @ NilNode (location: (1,15)-(1,18))
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,19)-(1,20) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt b/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt
new file mode 100644
index 0000000000..e4b9536b87
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(1,13))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,11))
+ │ ├── key:
+ │ │ @ InterpolatedSymbolNode (location: (1,2)-(1,8))
+ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ ├── parts: (length: 1)
+ │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,6))
+ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (1,5)-(1,6) = "}"
+ │ │ └── closing_loc: (1,6)-(1,8) = "\":"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (1,9)-(1,11))
+ │ │ ├── elements: (length: 0)
+ │ │ ├── opening_loc: (1,9)-(1,10) = "["
+ │ │ └── closing_loc: (1,10)-(1,11) = "]"
+ │ └── operator_loc: ∅
+ └── closing_loc: (1,12)-(1,13) = "}"
diff --git a/test/prism/snapshots/seattlerb/bug_masgn_right.txt b/test/prism/snapshots/seattlerb/bug_masgn_right.txt
new file mode 100644
index 0000000000..c19931cdd1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_masgn_right.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,13)-(1,14) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/bug_not_parens.txt b/test/prism/snapshots/seattlerb/bug_not_parens.txt
new file mode 100644
index 0000000000..8b937728d0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_not_parens.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ CallNode (location: (1,4)-(1,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "not"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt b/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt
new file mode 100644
index 0000000000..c3df9b1be9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ LocalVariableOrWriteNode (location: (1,0)-(1,18))
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── operator_loc: (1,2)-(1,5) = "||="
+ ├── value:
+ │ @ RescueModifierNode (location: (1,6)-(1,18))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── keyword_loc: (1,8)-(1,14) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (1,15)-(1,18))
+ ├── name: :a
+ └── depth: 0
diff --git a/test/prism/snapshots/seattlerb/call_and.txt b/test/prism/snapshots/seattlerb/call_and.txt
new file mode 100644
index 0000000000..009eb877d0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_and.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,3) = "&"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "&"
diff --git a/test/prism/snapshots/seattlerb/call_arg_assoc.txt b/test/prism/snapshots/seattlerb/call_arg_assoc.txt
new file mode 100644
index 0000000000..2f7f20b2d9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_arg_assoc.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ └── @ KeywordHashNode (location: (1,5)-(1,9))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,5)-(1,9))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,6)-(1,8) = "=>"
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt b/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt
new file mode 100644
index 0000000000..f477f046ac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,15))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ └── @ KeywordHashNode (location: (1,5)-(1,15))
+ │ └── elements: (length: 2)
+ │ ├── @ AssocNode (location: (1,5)-(1,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,5)-(1,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,5)-(1,7) = "kw"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
+ │ │ │ └── unescaped: "kw"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocSplatNode (location: (1,12)-(1,15))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,14)-(1,15))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,12)-(1,14) = "**"
+ ├── closing_loc: (1,15)-(1,16) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt b/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt
new file mode 100644
index 0000000000..6ebfe62964
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── @ KeywordHashNode (location: (1,5)-(1,8))
+ │ └── elements: (length: 1)
+ │ └── @ AssocSplatNode (location: (1,5)-(1,8))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,5)-(1,7) = "**"
+ ├── closing_loc: (1,8)-(1,9) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
new file mode 100644
index 0000000000..095bab4ce1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
@@ -0,0 +1,95 @@
+@ ProgramNode (location: (1,0)-(5,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,8))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,2)-(1,11))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,2)-(1,11))
+ │ │ ├── key:
+ │ │ │ @ InterpolatedSymbolNode (location: (1,2)-(1,9))
+ │ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ │ ├── parts: (length: 1)
+ │ │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
+ │ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,5)-(1,6))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "k"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "k"
+ │ │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ │ │ └── closing_loc: (1,7)-(1,9) = "\":"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "x"
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (3,2)-(3,8))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (3,2)-(3,8))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,2)-(3,6))
+ │ │ │ ├── opening_loc: (3,2)-(3,3) = "\""
+ │ │ │ ├── value_loc: (3,3)-(3,4) = "k"
+ │ │ │ ├── closing_loc: (3,4)-(3,6) = "\":"
+ │ │ │ └── unescaped: "k"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,6)-(3,8))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "x"
+ └── @ CallNode (location: (5,0)-(5,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,2)-(5,8))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (5,2)-(5,8))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (5,2)-(5,8))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (5,2)-(5,6))
+ │ │ ├── opening_loc: (5,2)-(5,3) = "'"
+ │ │ ├── value_loc: (5,3)-(5,4) = "k"
+ │ │ ├── closing_loc: (5,4)-(5,6) = "':"
+ │ │ └── unescaped: "k"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (5,6)-(5,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt
new file mode 100644
index 0000000000..7af70d5832
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ └── @ KeywordHashNode (location: (1,5)-(1,9))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,5)-(1,9))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,6)-(1,8) = "=>"
+ ├── closing_loc: (1,10)-(1,11) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/call_args_command.txt b/test/prism/snapshots/seattlerb/call_args_command.txt
new file mode 100644
index 0000000000..dfd0e60fbd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_args_command.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── call_operator_loc: (1,5)-(1,6) = "."
+ │ ├── message_loc: (1,6)-(1,7) = "d"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "d"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/call_array_arg.txt b/test/prism/snapshots/seattlerb/call_array_arg.txt
new file mode 100644
index 0000000000..f0bc196cf3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_arg.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,4) = "=="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,13))
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,5)-(1,13))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ │ ├── value_loc: (1,7)-(1,8) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
+ │ │ ├── value_loc: (1,11)-(1,12) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── opening_loc: (1,5)-(1,6) = "["
+ │ └── closing_loc: (1,12)-(1,13) = "]"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "=="
diff --git a/test/prism/snapshots/seattlerb/call_array_block_call.txt b/test/prism/snapshots/seattlerb/call_array_block_call.txt
new file mode 100644
index 0000000000..6c78b7f52c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_block_call.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,19))
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,2)-(1,19))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ NilNode (location: (1,4)-(1,7))
+ │ │ └── @ CallNode (location: (1,9)-(1,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,10) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,11)-(1,17))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,11)-(1,13) = "do"
+ │ │ │ └── closing_loc: (1,14)-(1,17) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── opening_loc: (1,2)-(1,3) = "["
+ │ └── closing_loc: (1,18)-(1,19) = "]"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
new file mode 100644
index 0000000000..7b25a64419
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,2)-(1,11))
+ │ ├── elements: (length: 1)
+ │ │ └── @ LambdaNode (location: (1,3)-(1,10))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (1,3)-(1,5) = "->"
+ │ │ ├── opening_loc: (1,8)-(1,9) = "{"
+ │ │ ├── closing_loc: (1,9)-(1,10) = "}"
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (1,5)-(1,7))
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ └── closing_loc: (1,6)-(1,7) = ")"
+ │ │ └── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "["
+ │ └── closing_loc: (1,10)-(1,11) = "]"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,12)-(2,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,12)-(1,14) = "do"
+ │ └── closing_loc: (2,0)-(2,3) = "end"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt
new file mode 100644
index 0000000000..6ce4c98d5f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,15))
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,2)-(1,15))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,3)-(1,5))
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = ":"
+ │ │ │ ├── value_loc: (1,4)-(1,5) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ KeywordHashNode (location: (1,7)-(1,14))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,7)-(1,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,7)-(1,9))
+ │ │ │ ├── opening_loc: (1,7)-(1,8) = ":"
+ │ │ │ ├── value_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "c"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,13)-(1,14))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,10)-(1,12) = "=>"
+ │ ├── opening_loc: (1,2)-(1,3) = "["
+ │ └── closing_loc: (1,14)-(1,15) = "]"
+ ├── closing_loc: (1,15)-(1,16) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_assoc.txt b/test/prism/snapshots/seattlerb/call_assoc.txt
new file mode 100644
index 0000000000..59ede3254e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,6))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,6))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,3)-(1,5) = "=>"
+ ├── closing_loc: (1,6)-(1,7) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/call_assoc_new.txt b/test/prism/snapshots/seattlerb/call_assoc_new.txt
new file mode 100644
index 0000000000..d1121c377f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc_new.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,5))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,5))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,2)-(1,3) = "a"
+ │ │ ├── closing_loc: (1,3)-(1,4) = ":"
+ │ │ └── unescaped: "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
new file mode 100644
index 0000000000..c7ea9767c7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(5,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(5,4))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(5,3))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(5,3))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(5,3))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,2)-(1,3) = "b"
+ │ │ ├── closing_loc: (1,3)-(1,4) = ":"
+ │ │ └── unescaped: "b"
+ │ ├── value:
+ │ │ @ IfNode (location: (1,5)-(5,3))
+ │ │ ├── if_keyword_loc: (1,5)-(1,7) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ SymbolNode (location: (1,8)-(1,10))
+ │ │ │ ├── opening_loc: (1,8)-(1,9) = ":"
+ │ │ │ ├── value_loc: (1,9)-(1,10) = "c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "c"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,0)-(2,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (2,0)-(2,1))
+ │ │ │ └── flags: decimal
+ │ │ ├── consequent:
+ │ │ │ @ ElseNode (location: (3,0)-(5,3))
+ │ │ │ ├── else_keyword_loc: (3,0)-(3,4) = "else"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (4,0)-(4,1))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (4,0)-(4,1))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ └── operator_loc: ∅
+ ├── closing_loc: (5,3)-(5,4) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt
new file mode 100644
index 0000000000..bf0cce6956
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,6))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,6))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,3)-(1,5) = "=>"
+ ├── closing_loc: (1,7)-(1,8) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/call_bang_command_call.txt b/test/prism/snapshots/seattlerb/call_bang_command_call.txt
new file mode 100644
index 0000000000..b38ffe085b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_bang_command_call.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ CallNode (location: (1,2)-(1,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/seattlerb/call_bang_squiggle.txt b/test/prism/snapshots/seattlerb/call_bang_squiggle.txt
new file mode 100644
index 0000000000..2bc2d0a9bd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_bang_squiggle.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,4) = "!~"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!~"
diff --git a/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
new file mode 100644
index 0000000000..f43f9a0bd9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(3,3))
+ │ └── arguments: (length: 1)
+ │ └── @ BeginNode (location: (1,2)-(3,3))
+ │ ├── begin_keyword_loc: (1,2)-(1,7) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,0)-(2,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,0)-(2,10))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── call_operator_loc: (2,1)-(2,2) = "."
+ │ │ ├── message_loc: (2,2)-(2,3) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (2,4)-(2,10))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (2,4)-(2,6) = "do"
+ │ │ │ └── closing_loc: (2,7)-(2,10) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "c"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_block_arg_named.txt b/test/prism/snapshots/seattlerb/call_block_arg_named.txt
new file mode 100644
index 0000000000..deb1433cab
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_block_arg_named.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,6)-(1,7) = ")"
+ ├── block:
+ │ @ BlockArgumentNode (location: (1,2)-(1,6))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,6) = "blk"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "blk"
+ │ └── operator_loc: (1,2)-(1,3) = "&"
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/call_carat.txt b/test/prism/snapshots/seattlerb/call_carat.txt
new file mode 100644
index 0000000000..6bf95e2a5a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_carat.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,3) = "^"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "^"
diff --git a/test/prism/snapshots/seattlerb/call_colon2.txt b/test/prism/snapshots/seattlerb/call_colon2.txt
new file mode 100644
index 0000000000..42206b4f08
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_colon2.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/call_colon_parens.txt b/test/prism/snapshots/seattlerb/call_colon_parens.txt
new file mode 100644
index 0000000000..f1327adac3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_colon_parens.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: ∅
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,4)-(1,5) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "call"
diff --git a/test/prism/snapshots/seattlerb/call_div.txt b/test/prism/snapshots/seattlerb/call_div.txt
new file mode 100644
index 0000000000..4a9961847b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_div.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,3) = "/"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "/"
diff --git a/test/prism/snapshots/seattlerb/call_dot_parens.txt b/test/prism/snapshots/seattlerb/call_dot_parens.txt
new file mode 100644
index 0000000000..a473a2258a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_dot_parens.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: ∅
+ ├── opening_loc: (1,2)-(1,3) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,3)-(1,4) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "call"
diff --git a/test/prism/snapshots/seattlerb/call_env.txt b/test/prism/snapshots/seattlerb/call_env.txt
new file mode 100644
index 0000000000..f2996f3a21
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_env.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,7) = "happy"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "happy"
diff --git a/test/prism/snapshots/seattlerb/call_eq3.txt b/test/prism/snapshots/seattlerb/call_eq3.txt
new file mode 100644
index 0000000000..146aa7993a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_eq3.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,5) = "==="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "==="
diff --git a/test/prism/snapshots/seattlerb/call_gt.txt b/test/prism/snapshots/seattlerb/call_gt.txt
new file mode 100644
index 0000000000..8cb2772a90
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_gt.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,3) = ">"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: ">"
diff --git a/test/prism/snapshots/seattlerb/call_kwsplat.txt b/test/prism/snapshots/seattlerb/call_kwsplat.txt
new file mode 100644
index 0000000000..d750ea21e9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_kwsplat.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,5))
+ │ └── elements: (length: 1)
+ │ └── @ AssocSplatNode (location: (1,2)-(1,5))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,2)-(1,4) = "**"
+ ├── closing_loc: (1,5)-(1,6) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_leading_dots.txt b/test/prism/snapshots/seattlerb/call_leading_dots.txt
new file mode 100644
index 0000000000..a8fad7a4aa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_leading_dots.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(3,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,2))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(2,2))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (2,0)-(2,1) = "."
+ │ ├── message_loc: (2,1)-(2,2) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: (3,0)-(3,1) = "."
+ ├── message_loc: (3,1)-(3,2) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt b/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt
new file mode 100644
index 0000000000..b21a68b542
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(4,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,2))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(2,2))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (2,0)-(2,1) = "."
+ │ ├── message_loc: (2,1)-(2,2) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: (4,0)-(4,1) = "."
+ ├── message_loc: (4,1)-(4,2) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/call_lt.txt b/test/prism/snapshots/seattlerb/call_lt.txt
new file mode 100644
index 0000000000..dcdfbb3420
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_lt.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,3) = "<"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "<"
diff --git a/test/prism/snapshots/seattlerb/call_lte.txt b/test/prism/snapshots/seattlerb/call_lte.txt
new file mode 100644
index 0000000000..32f886fa3c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_lte.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,4) = "<="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "<="
diff --git a/test/prism/snapshots/seattlerb/call_not.txt b/test/prism/snapshots/seattlerb/call_not.txt
new file mode 100644
index 0000000000..6c2f2d5f52
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_not.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,4)-(1,6))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "not"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/seattlerb/call_pipe.txt b/test/prism/snapshots/seattlerb/call_pipe.txt
new file mode 100644
index 0000000000..4981718ce9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_pipe.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,3) = "|"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "|"
diff --git a/test/prism/snapshots/seattlerb/call_rshift.txt b/test/prism/snapshots/seattlerb/call_rshift.txt
new file mode 100644
index 0000000000..dd50e3e336
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_rshift.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,4) = ">>"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: ">>"
diff --git a/test/prism/snapshots/seattlerb/call_self_brackets.txt b/test/prism/snapshots/seattlerb/call_self_brackets.txt
new file mode 100644
index 0000000000..0fb7d677d8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_self_brackets.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ SelfNode (location: (1,0)-(1,4))
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,4)-(1,7) = "[1]"
+ ├── opening_loc: (1,4)-(1,5) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── closing_loc: (1,6)-(1,7) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/seattlerb/call_spaceship.txt b/test/prism/snapshots/seattlerb/call_spaceship.txt
new file mode 100644
index 0000000000..388b8dc427
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_spaceship.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,5) = "<=>"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "<=>"
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
new file mode 100644
index 0000000000..576e1a49b0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,13))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (1,2)-(1,13))
+ │ ├── locals: []
+ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ ├── closing_loc: (1,10)-(1,13) = "end"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (1,8)-(1,9))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,14)-(1,22))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,17)-(1,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,17)-(1,18))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,14)-(1,16) = "do"
+ │ └── closing_loc: (1,19)-(1,22) = "end"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
new file mode 100644
index 0000000000..0dc00fd90d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,10))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (1,2)-(1,10))
+ │ ├── locals: []
+ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ ├── closing_loc: (1,9)-(1,10) = "}"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (1,7)-(1,8))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,11)-(1,19))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,14)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,14)-(1,15))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,11)-(1,13) = "do"
+ │ └── closing_loc: (1,16)-(1,19) = "end"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/call_star.txt b/test/prism/snapshots/seattlerb/call_star.txt
new file mode 100644
index 0000000000..bf3fa53b44
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_star.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,3) = "*"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "*"
diff --git a/test/prism/snapshots/seattlerb/call_star2.txt b/test/prism/snapshots/seattlerb/call_star2.txt
new file mode 100644
index 0000000000..960f676135
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_star2.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,2)-(1,4) = "**"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "**"
diff --git a/test/prism/snapshots/seattlerb/call_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_trailing_comma.txt
new file mode 100644
index 0000000000..91ffc098bf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_trailing_comma.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,2)-(1,3))
+ │ └── flags: decimal
+ ├── closing_loc: (1,4)-(1,5) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/call_trailing_dots.txt b/test/prism/snapshots/seattlerb/call_trailing_dots.txt
new file mode 100644
index 0000000000..828db0ce3b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_trailing_dots.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(3,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,1))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,1))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(2,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── call_operator_loc: (2,1)-(2,2) = "."
+ ├── message_loc: (3,0)-(3,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/call_unary_bang.txt b/test/prism/snapshots/seattlerb/call_unary_bang.txt
new file mode 100644
index 0000000000..a3dc0368a5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/call_unary_bang.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,2))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/seattlerb/case_in.txt b/test/prism/snapshots/seattlerb/case_in.txt
new file mode 100644
index 0000000000..94556ddecb
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in.txt
@@ -0,0 +1,892 @@
+@ ProgramNode (location: (1,0)-(111,3))
+├── locals: [:b, :_, :lhs, :x, :rhs, :c, :e]
+└── statements:
+ @ StatementsNode (location: (1,0)-(111,3))
+ └── body: (length: 28)
+ ├── @ CaseNode (location: (1,0)-(3,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (2,0)-(2,8))
+ │ │ ├── pattern:
+ │ │ │ @ HashPatternNode (location: (2,4)-(2,8))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (2,4)-(2,8))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,8))
+ │ │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\""
+ │ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
+ │ │ │ │ │ ├── closing_loc: (2,6)-(2,8) = "\":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── kwrest: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── @ CaseNode (location: (5,0)-(7,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (5,5)-(5,7))
+ │ │ ├── opening_loc: (5,5)-(5,6) = ":"
+ │ │ ├── value_loc: (5,6)-(5,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (6,0)-(6,10))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (6,3)-(6,10))
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (6,6)-(6,7))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (6,6)-(6,7) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ └── @ SymbolNode (location: (6,8)-(6,9))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (6,8)-(6,9) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── opening_loc: (6,3)-(6,6) = "%I["
+ │ │ │ └── closing_loc: (6,9)-(6,10) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (6,0)-(6,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (5,0)-(5,4) = "case"
+ │ └── end_keyword_loc: (7,0)-(7,3) = "end"
+ ├── @ CaseNode (location: (9,0)-(11,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (9,5)-(9,7))
+ │ │ ├── opening_loc: (9,5)-(9,6) = ":"
+ │ │ ├── value_loc: (9,6)-(9,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (10,0)-(10,10))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (10,3)-(10,10))
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (10,6)-(10,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (10,6)-(10,7) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ └── @ StringNode (location: (10,8)-(10,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (10,8)-(10,9) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── opening_loc: (10,3)-(10,6) = "%W["
+ │ │ │ └── closing_loc: (10,9)-(10,10) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (10,0)-(10,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (9,0)-(9,4) = "case"
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ CaseNode (location: (13,0)-(15,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (13,5)-(13,7))
+ │ │ ├── opening_loc: (13,5)-(13,6) = ":"
+ │ │ ├── value_loc: (13,6)-(13,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (14,0)-(14,10))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (14,3)-(14,10))
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (14,6)-(14,7))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (14,6)-(14,7) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ └── @ SymbolNode (location: (14,8)-(14,9))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (14,8)-(14,9) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── opening_loc: (14,3)-(14,6) = "%i["
+ │ │ │ └── closing_loc: (14,9)-(14,10) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (14,0)-(14,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (13,0)-(13,4) = "case"
+ │ └── end_keyword_loc: (15,0)-(15,3) = "end"
+ ├── @ CaseNode (location: (17,0)-(19,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (17,5)-(17,7))
+ │ │ ├── opening_loc: (17,5)-(17,6) = ":"
+ │ │ ├── value_loc: (17,6)-(17,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (18,0)-(18,10))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayNode (location: (18,3)-(18,10))
+ │ │ │ ├── elements: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (18,6)-(18,7))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (18,6)-(18,7) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ └── @ StringNode (location: (18,8)-(18,9))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (18,8)-(18,9) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── opening_loc: (18,3)-(18,6) = "%w["
+ │ │ │ └── closing_loc: (18,9)-(18,10) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (18,0)-(18,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (17,0)-(17,4) = "case"
+ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ ├── @ CaseNode (location: (21,0)-(23,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (21,5)-(21,7))
+ │ │ ├── opening_loc: (21,5)-(21,6) = ":"
+ │ │ ├── value_loc: (21,6)-(21,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (22,0)-(22,9))
+ │ │ ├── pattern:
+ │ │ │ @ RangeNode (location: (22,4)-(22,9))
+ │ │ │ ├── left: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ IntegerNode (location: (22,7)-(22,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── operator_loc: (22,4)-(22,7) = "..."
+ │ │ │ └── flags: exclude_end
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (22,0)-(22,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (21,0)-(21,4) = "case"
+ │ └── end_keyword_loc: (23,0)-(23,3) = "end"
+ ├── @ CaseNode (location: (25,0)-(27,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (25,5)-(25,7))
+ │ │ ├── opening_loc: (25,5)-(25,6) = ":"
+ │ │ ├── value_loc: (25,6)-(25,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (26,0)-(26,8))
+ │ │ ├── pattern:
+ │ │ │ @ RangeNode (location: (26,4)-(26,8))
+ │ │ │ ├── left: ∅
+ │ │ │ ├── right:
+ │ │ │ │ @ IntegerNode (location: (26,6)-(26,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── operator_loc: (26,4)-(26,6) = ".."
+ │ │ │ └── flags: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (26,0)-(26,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (25,0)-(25,4) = "case"
+ │ └── end_keyword_loc: (27,0)-(27,3) = "end"
+ ├── @ CaseNode (location: (29,0)-(31,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (29,5)-(29,7))
+ │ │ ├── opening_loc: (29,5)-(29,6) = ":"
+ │ │ ├── value_loc: (29,6)-(29,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (30,0)-(30,8))
+ │ │ ├── pattern:
+ │ │ │ @ RangeNode (location: (30,4)-(30,8))
+ │ │ │ ├── left:
+ │ │ │ │ @ IntegerNode (location: (30,4)-(30,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── right: ∅
+ │ │ │ ├── operator_loc: (30,5)-(30,8) = "..."
+ │ │ │ └── flags: exclude_end
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (30,0)-(30,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (29,0)-(29,4) = "case"
+ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
+ ├── @ CaseNode (location: (33,0)-(35,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (33,5)-(33,7))
+ │ │ ├── opening_loc: (33,5)-(33,6) = ":"
+ │ │ ├── value_loc: (33,6)-(33,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (34,0)-(34,9))
+ │ │ ├── pattern:
+ │ │ │ @ RangeNode (location: (34,4)-(34,9))
+ │ │ │ ├── left:
+ │ │ │ │ @ IntegerNode (location: (34,4)-(34,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── right:
+ │ │ │ │ @ IntegerNode (location: (34,8)-(34,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── operator_loc: (34,5)-(34,8) = "..."
+ │ │ │ └── flags: exclude_end
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (34,0)-(34,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (33,0)-(33,4) = "case"
+ │ └── end_keyword_loc: (35,0)-(35,3) = "end"
+ ├── @ CaseNode (location: (37,0)-(39,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (37,5)-(37,7))
+ │ │ ├── opening_loc: (37,5)-(37,6) = ":"
+ │ │ ├── value_loc: (37,6)-(37,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (38,0)-(38,6))
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (38,4)-(38,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (38,0)-(38,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (37,0)-(37,4) = "case"
+ │ └── end_keyword_loc: (39,0)-(39,3) = "end"
+ ├── @ CaseNode (location: (41,0)-(43,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (41,5)-(41,7))
+ │ │ ├── opening_loc: (41,5)-(41,6) = ":"
+ │ │ ├── value_loc: (41,6)-(41,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (42,0)-(42,8))
+ │ │ ├── pattern:
+ │ │ │ @ HashPatternNode (location: (42,3)-(42,8))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ └── @ NoKeywordsParameterNode (location: (42,3)-(42,8))
+ │ │ │ │ ├── operator_loc: (42,3)-(42,5) = "**"
+ │ │ │ │ └── keyword_loc: (42,5)-(42,8) = "nil"
+ │ │ │ ├── kwrest: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (42,0)-(42,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (41,0)-(41,4) = "case"
+ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
+ ├── @ CaseNode (location: (45,0)-(47,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (45,5)-(45,7))
+ │ │ ├── opening_loc: (45,5)-(45,6) = ":"
+ │ │ ├── value_loc: (45,6)-(45,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (46,0)-(46,11))
+ │ │ ├── pattern:
+ │ │ │ @ RegularExpressionNode (location: (46,3)-(46,11))
+ │ │ │ ├── opening_loc: (46,3)-(46,4) = "/"
+ │ │ │ ├── content_loc: (46,4)-(46,10) = "regexp"
+ │ │ │ ├── closing_loc: (46,10)-(46,11) = "/"
+ │ │ │ ├── unescaped: "regexp"
+ │ │ │ └── flags: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (46,0)-(46,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (45,0)-(45,4) = "case"
+ │ └── end_keyword_loc: (47,0)-(47,3) = "end"
+ ├── @ CaseNode (location: (49,0)-(51,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (49,5)-(49,7))
+ │ │ ├── opening_loc: (49,5)-(49,6) = ":"
+ │ │ ├── value_loc: (49,6)-(49,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (50,0)-(50,13))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (50,3)-(50,13))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (50,3)-(50,5))
+ │ │ │ │ ├── opening_loc: (50,3)-(50,4) = ":"
+ │ │ │ │ ├── value_loc: (50,4)-(50,5) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (50,7)-(50,9))
+ │ │ │ │ ├── operator_loc: (50,7)-(50,8) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableTargetNode (location: (50,8)-(50,9))
+ │ │ │ │ ├── name: :_
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (50,11)-(50,13))
+ │ │ │ │ ├── opening_loc: (50,11)-(50,12) = ":"
+ │ │ │ │ ├── value_loc: (50,12)-(50,13) = "c"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (50,0)-(50,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (49,0)-(49,4) = "case"
+ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
+ ├── @ CaseNode (location: (53,0)-(55,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (53,5)-(53,7))
+ │ │ ├── opening_loc: (53,5)-(53,6) = ":"
+ │ │ ├── value_loc: (53,6)-(53,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (54,0)-(54,11))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (54,3)-(54,11))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ SymbolNode (location: (54,3)-(54,5))
+ │ │ │ │ │ ├── opening_loc: (54,3)-(54,4) = ":"
+ │ │ │ │ │ ├── value_loc: (54,4)-(54,5) = "b"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ └── @ ArrayPatternNode (location: (54,7)-(54,11))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ SymbolNode (location: (54,8)-(54,10))
+ │ │ │ │ │ ├── opening_loc: (54,8)-(54,9) = ":"
+ │ │ │ │ │ ├── value_loc: (54,9)-(54,10) = "c"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "c"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (54,7)-(54,8) = "["
+ │ │ │ │ └── closing_loc: (54,10)-(54,11) = "]"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (54,0)-(54,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (53,0)-(53,4) = "case"
+ │ └── end_keyword_loc: (55,0)-(55,3) = "end"
+ ├── @ CaseNode (location: (57,0)-(59,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (57,5)-(57,7))
+ │ │ ├── opening_loc: (57,5)-(57,6) = ":"
+ │ │ ├── value_loc: (57,6)-(57,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (58,0)-(58,11))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (58,3)-(58,11))
+ │ │ │ ├── constant:
+ │ │ │ │ @ ConstantReadNode (location: (58,3)-(58,9))
+ │ │ │ │ └── name: :Symbol
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (58,9)-(58,10) = "("
+ │ │ │ └── closing_loc: (58,10)-(58,11) = ")"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (58,0)-(58,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (57,0)-(57,4) = "case"
+ │ └── end_keyword_loc: (59,0)-(59,3) = "end"
+ ├── @ CaseNode (location: (61,0)-(63,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (61,5)-(61,7))
+ │ │ ├── opening_loc: (61,5)-(61,6) = ":"
+ │ │ ├── value_loc: (61,6)-(61,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (62,0)-(62,24))
+ │ │ ├── pattern:
+ │ │ │ @ FindPatternNode (location: (62,3)-(62,24))
+ │ │ │ ├── constant:
+ │ │ │ │ @ ConstantReadNode (location: (62,3)-(62,9))
+ │ │ │ │ └── name: :Symbol
+ │ │ │ ├── left:
+ │ │ │ │ @ SplatNode (location: (62,10)-(62,14))
+ │ │ │ │ ├── operator_loc: (62,10)-(62,11) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableTargetNode (location: (62,11)-(62,14))
+ │ │ │ │ ├── name: :lhs
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (62,16)-(62,17))
+ │ │ │ │ ├── name: :x
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── right:
+ │ │ │ │ @ SplatNode (location: (62,19)-(62,23))
+ │ │ │ │ ├── operator_loc: (62,19)-(62,20) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableTargetNode (location: (62,20)-(62,23))
+ │ │ │ │ ├── name: :rhs
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── opening_loc: (62,9)-(62,10) = "("
+ │ │ │ └── closing_loc: (62,23)-(62,24) = ")"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (62,0)-(62,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (61,0)-(61,4) = "case"
+ │ └── end_keyword_loc: (63,0)-(63,3) = "end"
+ ├── @ CaseNode (location: (65,0)-(67,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (65,5)-(65,7))
+ │ │ ├── opening_loc: (65,5)-(65,6) = ":"
+ │ │ ├── value_loc: (65,6)-(65,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (66,0)-(66,24))
+ │ │ ├── pattern:
+ │ │ │ @ FindPatternNode (location: (66,3)-(66,24))
+ │ │ │ ├── constant:
+ │ │ │ │ @ ConstantReadNode (location: (66,3)-(66,9))
+ │ │ │ │ └── name: :Symbol
+ │ │ │ ├── left:
+ │ │ │ │ @ SplatNode (location: (66,10)-(66,14))
+ │ │ │ │ ├── operator_loc: (66,10)-(66,11) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableTargetNode (location: (66,11)-(66,14))
+ │ │ │ │ ├── name: :lhs
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (66,16)-(66,17))
+ │ │ │ │ ├── name: :x
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── right:
+ │ │ │ │ @ SplatNode (location: (66,19)-(66,23))
+ │ │ │ │ ├── operator_loc: (66,19)-(66,20) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableTargetNode (location: (66,20)-(66,23))
+ │ │ │ │ ├── name: :rhs
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── opening_loc: (66,9)-(66,10) = "["
+ │ │ │ └── closing_loc: (66,23)-(66,24) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (66,0)-(66,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (65,0)-(65,4) = "case"
+ │ └── end_keyword_loc: (67,0)-(67,3) = "end"
+ ├── @ CaseNode (location: (69,0)-(71,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (69,5)-(69,7))
+ │ │ ├── opening_loc: (69,5)-(69,6) = ":"
+ │ │ ├── value_loc: (69,6)-(69,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (70,0)-(70,22))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (70,3)-(70,22))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ LambdaNode (location: (70,4)-(70,18))
+ │ │ │ │ │ ├── locals: [:b]
+ │ │ │ │ │ ├── operator_loc: (70,4)-(70,6) = "->"
+ │ │ │ │ │ ├── opening_loc: (70,10)-(70,11) = "{"
+ │ │ │ │ │ ├── closing_loc: (70,17)-(70,18) = "}"
+ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ @ BlockParametersNode (location: (70,6)-(70,9))
+ │ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ │ @ ParametersNode (location: (70,7)-(70,8))
+ │ │ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (70,7)-(70,8))
+ │ │ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ │ │ ├── opening_loc: (70,6)-(70,7) = "("
+ │ │ │ │ │ │ └── closing_loc: (70,8)-(70,9) = ")"
+ │ │ │ │ │ └── body:
+ │ │ │ │ │ @ StatementsNode (location: (70,12)-(70,16))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ TrueNode (location: (70,12)-(70,16))
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (70,20)-(70,21))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (70,3)-(70,4) = "["
+ │ │ │ └── closing_loc: (70,21)-(70,22) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (70,0)-(70,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (69,0)-(69,4) = "case"
+ │ └── end_keyword_loc: (71,0)-(71,3) = "end"
+ ├── @ CaseNode (location: (73,0)-(75,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (73,5)-(73,7))
+ │ │ ├── opening_loc: (73,5)-(73,6) = ":"
+ │ │ ├── value_loc: (73,6)-(73,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (74,0)-(74,28))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (74,3)-(74,28))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 4)
+ │ │ │ │ ├── @ SymbolNode (location: (74,4)-(74,6))
+ │ │ │ │ │ ├── opening_loc: (74,4)-(74,5) = ":"
+ │ │ │ │ │ ├── value_loc: (74,5)-(74,6) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── @ LocalVariableTargetNode (location: (74,8)-(74,9))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── @ LocalVariableTargetNode (location: (74,11)-(74,12))
+ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── @ ArrayPatternNode (location: (74,14)-(74,27))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ SymbolNode (location: (74,15)-(74,17))
+ │ │ │ │ │ ├── opening_loc: (74,15)-(74,16) = ":"
+ │ │ │ │ │ ├── value_loc: (74,16)-(74,17) = "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "d"
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ SplatNode (location: (74,19)-(74,21))
+ │ │ │ │ │ ├── operator_loc: (74,19)-(74,20) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (74,20)-(74,21))
+ │ │ │ │ │ ├── name: :e
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ NilNode (location: (74,23)-(74,26))
+ │ │ │ │ ├── opening_loc: (74,14)-(74,15) = "["
+ │ │ │ │ └── closing_loc: (74,26)-(74,27) = "]"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (74,3)-(74,4) = "["
+ │ │ │ └── closing_loc: (74,27)-(74,28) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (74,0)-(74,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (73,0)-(73,4) = "case"
+ │ └── end_keyword_loc: (75,0)-(75,3) = "end"
+ ├── @ CaseNode (location: (77,0)-(79,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (77,5)-(77,7))
+ │ │ ├── opening_loc: (77,5)-(77,6) = ":"
+ │ │ ├── value_loc: (77,6)-(77,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (78,0)-(78,12))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (78,3)-(78,12))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (78,4)-(78,5))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (78,7)-(78,8))
+ │ │ │ │ ├── operator_loc: (78,7)-(78,8) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (78,10)-(78,11))
+ │ │ │ │ └── name: :B
+ │ │ │ ├── opening_loc: (78,3)-(78,4) = "["
+ │ │ │ └── closing_loc: (78,11)-(78,12) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (78,0)-(78,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (77,0)-(77,4) = "case"
+ │ └── end_keyword_loc: (79,0)-(79,3) = "end"
+ ├── @ CaseNode (location: (81,0)-(83,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (81,5)-(81,7))
+ │ │ ├── opening_loc: (81,5)-(81,6) = ":"
+ │ │ ├── value_loc: (81,6)-(81,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (82,0)-(82,22))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (82,3)-(82,22))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ ArrayPatternNode (location: (82,4)-(82,11))
+ │ │ │ │ │ ├── constant: ∅
+ │ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ │ ├── @ SymbolNode (location: (82,5)-(82,7))
+ │ │ │ │ │ │ │ ├── opening_loc: (82,5)-(82,6) = ":"
+ │ │ │ │ │ │ │ ├── value_loc: (82,6)-(82,7) = "b"
+ │ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ │ │ └── @ LocalVariableTargetNode (location: (82,9)-(82,10))
+ │ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── opening_loc: (82,4)-(82,5) = "["
+ │ │ │ │ │ └── closing_loc: (82,10)-(82,11) = "]"
+ │ │ │ │ └── @ ArrayPatternNode (location: (82,13)-(82,21))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ SymbolNode (location: (82,14)-(82,16))
+ │ │ │ │ │ │ ├── opening_loc: (82,14)-(82,15) = ":"
+ │ │ │ │ │ │ ├── value_loc: (82,15)-(82,16) = "d"
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: "d"
+ │ │ │ │ │ └── @ PinnedVariableNode (location: (82,18)-(82,20))
+ │ │ │ │ │ ├── variable:
+ │ │ │ │ │ │ @ LocalVariableReadNode (location: (82,19)-(82,20))
+ │ │ │ │ │ │ ├── name: :e
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── operator_loc: (82,18)-(82,19) = "^"
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (82,13)-(82,14) = "["
+ │ │ │ │ └── closing_loc: (82,20)-(82,21) = "]"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (82,3)-(82,4) = "["
+ │ │ │ └── closing_loc: (82,21)-(82,22) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (82,0)-(82,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (81,0)-(81,4) = "case"
+ │ └── end_keyword_loc: (83,0)-(83,3) = "end"
+ ├── @ CaseNode (location: (85,0)-(87,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (85,5)-(85,7))
+ │ │ ├── opening_loc: (85,5)-(85,6) = ":"
+ │ │ ├── value_loc: (85,6)-(85,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (86,0)-(86,5))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (86,3)-(86,5))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (86,3)-(86,4) = "["
+ │ │ │ └── closing_loc: (86,4)-(86,5) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (86,0)-(86,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (85,0)-(85,4) = "case"
+ │ └── end_keyword_loc: (87,0)-(87,3) = "end"
+ ├── @ CaseNode (location: (89,0)-(91,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (89,5)-(89,7))
+ │ │ ├── opening_loc: (89,5)-(89,6) = ":"
+ │ │ ├── value_loc: (89,6)-(89,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (90,0)-(90,9))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (90,3)-(90,9))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ PinnedExpressionNode (location: (90,4)-(90,8))
+ │ │ │ │ ├── expression:
+ │ │ │ │ │ @ CallNode (location: (90,6)-(90,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (90,6)-(90,7) = "a"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "a"
+ │ │ │ │ ├── operator_loc: (90,4)-(90,5) = "^"
+ │ │ │ │ ├── lparen_loc: (90,5)-(90,6) = "("
+ │ │ │ │ └── rparen_loc: (90,7)-(90,8) = ")"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (90,3)-(90,4) = "["
+ │ │ │ └── closing_loc: (90,8)-(90,9) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (90,0)-(90,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (89,0)-(89,4) = "case"
+ │ └── end_keyword_loc: (91,0)-(91,3) = "end"
+ ├── @ CaseNode (location: (93,0)-(95,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (93,5)-(93,7))
+ │ │ ├── opening_loc: (93,5)-(93,6) = ":"
+ │ │ ├── value_loc: (93,6)-(93,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (94,0)-(94,19))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (94,3)-(94,19))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 3)
+ │ │ │ │ ├── @ PinnedVariableNode (location: (94,4)-(94,7))
+ │ │ │ │ │ ├── variable:
+ │ │ │ │ │ │ @ InstanceVariableReadNode (location: (94,5)-(94,7))
+ │ │ │ │ │ │ └── name: :@a
+ │ │ │ │ │ └── operator_loc: (94,4)-(94,5) = "^"
+ │ │ │ │ ├── @ PinnedVariableNode (location: (94,9)-(94,12))
+ │ │ │ │ │ ├── variable:
+ │ │ │ │ │ │ @ GlobalVariableReadNode (location: (94,10)-(94,12))
+ │ │ │ │ │ │ └── name: :$b
+ │ │ │ │ │ └── operator_loc: (94,9)-(94,10) = "^"
+ │ │ │ │ └── @ PinnedVariableNode (location: (94,14)-(94,18))
+ │ │ │ │ ├── variable:
+ │ │ │ │ │ @ ClassVariableReadNode (location: (94,15)-(94,18))
+ │ │ │ │ │ └── name: :@@c
+ │ │ │ │ └── operator_loc: (94,14)-(94,15) = "^"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: (94,3)-(94,4) = "["
+ │ │ │ └── closing_loc: (94,18)-(94,19) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (94,0)-(94,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (93,0)-(93,4) = "case"
+ │ └── end_keyword_loc: (95,0)-(95,3) = "end"
+ ├── @ CaseNode (location: (97,0)-(99,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (97,5)-(97,7))
+ │ │ ├── opening_loc: (97,5)-(97,6) = ":"
+ │ │ ├── value_loc: (97,6)-(97,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (98,0)-(98,12))
+ │ │ ├── pattern:
+ │ │ │ @ XStringNode (location: (98,3)-(98,12))
+ │ │ │ ├── opening_loc: (98,3)-(98,4) = "`"
+ │ │ │ ├── content_loc: (98,4)-(98,11) = "echo hi"
+ │ │ │ ├── closing_loc: (98,11)-(98,12) = "`"
+ │ │ │ └── unescaped: "echo hi"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (98,0)-(98,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (97,0)-(97,4) = "case"
+ │ └── end_keyword_loc: (99,0)-(99,3) = "end"
+ ├── @ CaseNode (location: (101,0)-(103,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (101,5)-(101,7))
+ │ │ ├── opening_loc: (101,5)-(101,6) = ":"
+ │ │ ├── value_loc: (101,6)-(101,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (102,0)-(102,16))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (102,3)-(102,16))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── requireds: (length: 3)
+ │ │ │ │ ├── @ NilNode (location: (102,3)-(102,6))
+ │ │ │ │ ├── @ NilNode (location: (102,8)-(102,11))
+ │ │ │ │ └── @ NilNode (location: (102,13)-(102,16))
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (102,0)-(102,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (101,0)-(101,4) = "case"
+ │ └── end_keyword_loc: (103,0)-(103,3) = "end"
+ ├── @ CaseNode (location: (105,0)-(107,3))
+ │ ├── predicate:
+ │ │ @ SymbolNode (location: (105,5)-(105,7))
+ │ │ ├── opening_loc: (105,5)-(105,6) = ":"
+ │ │ ├── value_loc: (105,6)-(105,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (106,0)-(106,11))
+ │ │ ├── pattern:
+ │ │ │ @ HashPatternNode (location: (106,3)-(106,11))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (106,5)-(106,9))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (106,5)-(106,9))
+ │ │ │ │ │ ├── opening_loc: (106,5)-(106,6) = "\""
+ │ │ │ │ │ ├── value_loc: (106,6)-(106,7) = "b"
+ │ │ │ │ │ ├── closing_loc: (106,7)-(106,9) = "\":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── kwrest: ∅
+ │ │ │ ├── opening_loc: (106,3)-(106,4) = "{"
+ │ │ │ └── closing_loc: (106,10)-(106,11) = "}"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (106,0)-(106,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (105,0)-(105,4) = "case"
+ │ └── end_keyword_loc: (107,0)-(107,3) = "end"
+ └── @ CaseNode (location: (109,0)-(111,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (109,5)-(109,7))
+ │ ├── opening_loc: (109,5)-(109,6) = ":"
+ │ ├── value_loc: (109,6)-(109,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (110,0)-(110,5))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (110,3)-(110,5))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 0)
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (110,3)-(110,4) = "{"
+ │ │ └── closing_loc: (110,4)-(110,5) = "}"
+ │ ├── statements: ∅
+ │ ├── in_loc: (110,0)-(110,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (109,0)-(109,4) = "case"
+ └── end_keyword_loc: (111,0)-(111,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_31.txt b/test/prism/snapshots/seattlerb/case_in_31.txt
new file mode 100644
index 0000000000..e753c3ccff
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_31.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,11))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ ├── opening_loc: (2,4)-(2,5) = ":"
+ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (2,8)-(2,10))
+ │ │ │ ├── operator_loc: (2,8)-(2,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (2,9)-(2,10))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,3)-(2,4) = "["
+ │ │ └── closing_loc: (2,10)-(2,11) = "]"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_37.txt b/test/prism/snapshots/seattlerb/case_in_37.txt
new file mode 100644
index 0000000000..46bdcf40b6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_37.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,19))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,5)-(2,17))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
+ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ ArrayPatternNode (location: (2,8)-(2,17))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ ConstantReadNode (location: (2,9)-(2,13))
+ │ │ │ │ │ └── name: :Hash
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ SplatNode (location: (2,15)-(2,16))
+ │ │ │ │ │ ├── operator_loc: (2,15)-(2,16) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (2,8)-(2,9) = "["
+ │ │ │ │ └── closing_loc: (2,16)-(2,17) = "]"
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,3)-(2,4) = "{"
+ │ │ └── closing_loc: (2,18)-(2,19) = "}"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_42.txt b/test/prism/snapshots/seattlerb/case_in_42.txt
new file mode 100644
index 0000000000..fe69a9e3d3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_42.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:_]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,18))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,9))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ ├── opening_loc: (2,3)-(2,4) = ":"
+ │ │ │ ├── value_loc: (2,4)-(2,5) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (2,7)-(2,9))
+ │ │ │ ├── operator_loc: (2,7)-(2,8) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (2,8)-(2,9))
+ │ │ │ ├── name: :_
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,15)-(2,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (2,15)-(2,18))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,10)-(2,14) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_42_2.txt b/test/prism/snapshots/seattlerb/case_in_42_2.txt
new file mode 100644
index 0000000000..f4e6806d35
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_42_2.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:list]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,20))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,11))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ └── name: :A
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (2,5)-(2,10))
+ │ │ │ ├── operator_loc: (2,5)-(2,6) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,10))
+ │ │ │ ├── name: :list
+ │ │ │ └── depth: 0
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,4)-(2,5) = "("
+ │ │ └── closing_loc: (2,10)-(2,11) = ")"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,17)-(2,20))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (2,17)-(2,20))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,12)-(2,16) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_47.txt b/test/prism/snapshots/seattlerb/case_in_47.txt
new file mode 100644
index 0000000000..32b24fc98d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_47.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,14))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (2,4)-(2,5))
+ │ │ │ ├── operator_loc: (2,4)-(2,5) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── posts: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (2,7)-(2,9))
+ │ │ │ │ ├── opening_loc: (2,7)-(2,8) = ":"
+ │ │ │ │ ├── value_loc: (2,8)-(2,9) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ └── @ SymbolNode (location: (2,11)-(2,13))
+ │ │ │ ├── opening_loc: (2,11)-(2,12) = ":"
+ │ │ │ ├── value_loc: (2,12)-(2,13) = "c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "c"
+ │ │ ├── opening_loc: (2,3)-(2,4) = "["
+ │ │ └── closing_loc: (2,13)-(2,14) = "]"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_67.txt b/test/prism/snapshots/seattlerb/case_in_67.txt
new file mode 100644
index 0000000000..73649059f0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_67.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,15))
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (2,3)-(2,6))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (2,3)-(2,4))
+ │ │ │ └── flags: decimal
+ │ │ ├── right: ∅
+ │ │ ├── operator_loc: (2,4)-(2,6) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,12)-(2,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (2,12)-(2,15))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,7)-(2,11) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_86.txt b/test/prism/snapshots/seattlerb/case_in_86.txt
new file mode 100644
index 0000000000..7197e77bc0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_86.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,5)-(1,13))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ │ ├── value_loc: (1,7)-(1,8) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
+ │ │ ├── value_loc: (1,11)-(1,12) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── opening_loc: (1,5)-(1,6) = "["
+ │ └── closing_loc: (1,12)-(1,13) = "]"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,25))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,16))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ ConstantPathNode (location: (2,3)-(2,13))
+ │ │ │ ├── parent: ∅
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (2,5)-(2,13))
+ │ │ │ │ └── name: :NilClass
+ │ │ │ └── delimiter_loc: (2,3)-(2,5) = "::"
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (2,15)-(2,16))
+ │ │ │ ├── operator_loc: (2,15)-(2,16) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,22)-(2,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (2,22)-(2,25))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,17)-(2,21) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_86_2.txt b/test/prism/snapshots/seattlerb/case_in_86_2.txt
new file mode 100644
index 0000000000..9d3abbb31d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_86_2.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,5)-(1,13))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ │ ├── value_loc: (1,7)-(1,8) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
+ │ │ ├── value_loc: (1,11)-(1,12) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── opening_loc: (1,5)-(1,6) = "["
+ │ └── closing_loc: (1,12)-(1,13) = "]"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,25))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,16))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (2,3)-(2,4))
+ │ │ │ ├── operator_loc: (2,3)-(2,4) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ ConstantPathNode (location: (2,6)-(2,16))
+ │ │ │ ├── parent: ∅
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (2,8)-(2,16))
+ │ │ │ │ └── name: :NilClass
+ │ │ │ └── delimiter_loc: (2,6)-(2,8) = "::"
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,22)-(2,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (2,22)-(2,25))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,17)-(2,21) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_array_pat_const.txt b/test/prism/snapshots/seattlerb/case_in_array_pat_const.txt
new file mode 100644
index 0000000000..8316c51f2e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_array_pat_const.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,7))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ └── name: :B
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (2,5)-(2,6))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,4)-(2,5) = "["
+ │ │ └── closing_loc: (2,6)-(2,7) = "]"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt b/test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt
new file mode 100644
index 0000000000..9f54b921ac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_array_pat_const2.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:d]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,10))
+ │ │ ├── constant:
+ │ │ │ @ ConstantPathNode (location: (2,3)-(2,7))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ │ └── name: :B
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (2,6)-(2,7))
+ │ │ │ │ └── name: :C
+ │ │ │ └── delimiter_loc: (2,4)-(2,6) = "::"
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (2,8)-(2,9))
+ │ │ │ ├── name: :d
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,7)-(2,8) = "["
+ │ │ └── closing_loc: (2,9)-(2,10) = "]"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "e"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "e"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt b/test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt
new file mode 100644
index 0000000000..0b903e8d91
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_array_pat_paren_assign.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:d]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,12))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ └── name: :B
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ CapturePatternNode (location: (2,5)-(2,11))
+ │ │ │ ├── value:
+ │ │ │ │ @ ConstantReadNode (location: (2,5)-(2,6))
+ │ │ │ │ └── name: :C
+ │ │ │ ├── target:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,11))
+ │ │ │ │ ├── name: :d
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,7)-(2,9) = "=>"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,4)-(2,5) = "("
+ │ │ └── closing_loc: (2,11)-(2,12) = ")"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_const.txt b/test/prism/snapshots/seattlerb/case_in_const.txt
new file mode 100644
index 0000000000..59880bc2a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_const.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ ConstantReadNode (location: (1,5)-(1,10))
+ │ └── name: :Array
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ ConstantReadNode (location: (2,3)-(2,8))
+ │ │ └── name: :Class
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_else.txt b/test/prism/snapshots/seattlerb/case_in_else.txt
new file mode 100644
index 0000000000..c132443cc8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_else.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(6,3))
+ ├── predicate:
+ │ @ ConstantReadNode (location: (1,5)-(1,10))
+ │ └── name: :Array
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ ConstantReadNode (location: (2,3)-(2,8))
+ │ │ └── name: :Class
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent:
+ │ @ ElseNode (location: (4,0)-(6,3))
+ │ ├── else_keyword_loc: (4,0)-(4,4) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (5,2)-(5,4))
+ │ │ ├── opening_loc: (5,2)-(5,3) = ":"
+ │ │ ├── value_loc: (5,3)-(5,4) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_find.txt b/test/prism/snapshots/seattlerb/case_in_find.txt
new file mode 100644
index 0000000000..191dee3a04
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_find.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,2)-(2,15))
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (2,5)-(2,15))
+ │ │ ├── constant: ∅
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (2,5)-(2,7))
+ │ │ │ ├── operator_loc: (2,5)-(2,6) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,7))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,9)-(2,11))
+ │ │ │ ├── opening_loc: (2,9)-(2,10) = ":"
+ │ │ │ ├── value_loc: (2,10)-(2,11) = "+"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "+"
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (2,13)-(2,15))
+ │ │ │ ├── operator_loc: (2,13)-(2,14) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (2,14)-(2,15))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements: ∅
+ │ ├── in_loc: (2,2)-(2,4) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_find_array.txt b/test/prism/snapshots/seattlerb/case_in_find_array.txt
new file mode 100644
index 0000000000..df764a4b07
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_find_array.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,16))
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (2,3)-(2,16))
+ │ │ ├── constant: ∅
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (2,4)-(2,5))
+ │ │ │ ├── operator_loc: (2,4)-(2,5) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (2,7)-(2,9))
+ │ │ │ │ ├── opening_loc: (2,7)-(2,8) = ":"
+ │ │ │ │ ├── value_loc: (2,8)-(2,9) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ └── @ LocalVariableTargetNode (location: (2,11)-(2,12))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (2,14)-(2,15))
+ │ │ │ ├── operator_loc: (2,14)-(2,15) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── opening_loc: (2,3)-(2,4) = "["
+ │ │ └── closing_loc: (2,15)-(2,16) = "]"
+ │ ├── statements: ∅
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat.txt
new file mode 100644
index 0000000000..e039140241
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat.txt
@@ -0,0 +1,64 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,21))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (2,5)-(2,11))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
+ │ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ StringNode (location: (2,8)-(2,11))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: (2,8)-(2,9) = "'"
+ │ │ │ │ │ ├── content_loc: (2,9)-(2,10) = "c"
+ │ │ │ │ │ ├── closing_loc: (2,10)-(2,11) = "'"
+ │ │ │ │ │ └── unescaped: "c"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (2,13)-(2,19))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,13)-(2,15))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,13)-(2,14) = "d"
+ │ │ │ │ ├── closing_loc: (2,14)-(2,15) = ":"
+ │ │ │ │ └── unescaped: "d"
+ │ │ │ ├── value:
+ │ │ │ │ @ StringNode (location: (2,16)-(2,19))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (2,16)-(2,17) = "\""
+ │ │ │ │ ├── content_loc: (2,17)-(2,18) = "e"
+ │ │ │ │ ├── closing_loc: (2,18)-(2,19) = "\""
+ │ │ │ │ └── unescaped: "e"
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,3)-(2,4) = "{"
+ │ │ └── closing_loc: (2,20)-(2,21) = "}"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "f"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "f"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,22)-(2,26) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt
new file mode 100644
index 0000000000..b24718b1ee
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_assign.txt
@@ -0,0 +1,76 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:x, :f]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,34))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 3)
+ │ │ │ ├── @ AssocNode (location: (2,5)-(2,20))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "b"
+ │ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CapturePatternNode (location: (2,8)-(2,20))
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ ConstantReadNode (location: (2,8)-(2,15))
+ │ │ │ │ │ │ └── name: :Integer
+ │ │ │ │ │ ├── target:
+ │ │ │ │ │ │ @ LocalVariableTargetNode (location: (2,19)-(2,20))
+ │ │ │ │ │ │ ├── name: :x
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── operator_loc: (2,16)-(2,18) = "=>"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── @ AssocNode (location: (2,22)-(2,28))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,22)-(2,24))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (2,22)-(2,23) = "d"
+ │ │ │ │ │ ├── closing_loc: (2,23)-(2,24) = ":"
+ │ │ │ │ │ └── unescaped: "d"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ StringNode (location: (2,25)-(2,28))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "\""
+ │ │ │ │ │ ├── content_loc: (2,26)-(2,27) = "e"
+ │ │ │ │ │ ├── closing_loc: (2,27)-(2,28) = "\""
+ │ │ │ │ │ └── unescaped: "e"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (2,30)-(2,32))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,30)-(2,32))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,30)-(2,31) = "f"
+ │ │ │ │ ├── closing_loc: (2,31)-(2,32) = ":"
+ │ │ │ │ └── unescaped: "f"
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,3)-(2,4) = "{"
+ │ │ └── closing_loc: (2,33)-(2,34) = "}"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "g"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "g"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,35)-(2,39) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt
new file mode 100644
index 0000000000..802c09438e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_assign.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,11))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ └── name: :B
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,5)-(2,10))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,5)-(2,7))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,5)-(2,6) = "a"
+ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (2,8)-(2,10))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,4)-(2,5) = "("
+ │ │ └── closing_loc: (2,10)-(2,11) = ")"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt
new file mode 100644
index 0000000000..ca7fbcfd92
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_paren_true.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,10))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,3)-(2,10))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
+ │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ TrueNode (location: (2,6)-(2,10))
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,11)-(2,15) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
new file mode 100644
index 0000000000..bbd4963008
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:c, :rest]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,23))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,15))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (2,3)-(2,7))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
+ │ │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,7))
+ │ │ │ │ │ ├── name: :c
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocSplatNode (location: (2,9)-(2,15))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,11)-(2,15))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,9)-(2,11) = "**"
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,21)-(2,23))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (2,21)-(2,23))
+ │ │ ├── opening_loc: (2,21)-(2,22) = ":"
+ │ │ ├── value_loc: (2,22)-(2,23) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,16)-(2,20) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt
new file mode 100644
index 0000000000..4a189bb590
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest_solo.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: [:rest]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(3,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(2,17))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,9))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocSplatNode (location: (2,3)-(2,9))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,5)-(2,9))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,3)-(2,5) = "**"
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,15)-(2,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (2,15)-(2,17))
+ │ │ ├── opening_loc: (2,15)-(2,16) = ":"
+ │ │ ├── value_loc: (2,16)-(2,17) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: (2,10)-(2,14) = "then"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt b/test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt
new file mode 100644
index 0000000000..b058ee0285
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_if_unless_post_mod.txt
@@ -0,0 +1,62 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(6,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 2)
+ │ ├── @ InNode (location: (2,0)-(3,4))
+ │ │ ├── pattern:
+ │ │ │ @ IfNode (location: (2,3)-(2,12))
+ │ │ │ ├── if_keyword_loc: (2,5)-(2,7) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ TrueNode (location: (2,8)-(2,12))
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (2,3)-(2,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ │ ├── value_loc: (3,3)-(3,4) = "C"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "C"
+ │ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ │ └── then_loc: ∅
+ │ └── @ InNode (location: (4,0)-(5,4))
+ │ ├── pattern:
+ │ │ @ UnlessNode (location: (4,3)-(4,17))
+ │ │ ├── keyword_loc: (4,5)-(4,11) = "unless"
+ │ │ ├── predicate:
+ │ │ │ @ FalseNode (location: (4,12)-(4,17))
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (4,3)-(4,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (4,3)-(4,4))
+ │ │ │ └── name: :D
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (5,2)-(5,4))
+ │ │ ├── opening_loc: (5,2)-(5,3) = ":"
+ │ │ ├── value_loc: (5,3)-(5,4) = "E"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "E"
+ │ ├── in_loc: (4,0)-(4,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_multiple.txt b/test/prism/snapshots/seattlerb/case_in_multiple.txt
new file mode 100644
index 0000000000..046cb61838
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_multiple.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(6,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 2)
+ │ ├── @ InNode (location: (2,0)-(3,4))
+ │ │ ├── pattern:
+ │ │ │ @ ConstantPathNode (location: (2,3)-(2,7))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (2,6)-(2,7))
+ │ │ │ │ └── name: :B
+ │ │ │ └── delimiter_loc: (2,4)-(2,6) = "::"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ │ ├── value_loc: (3,3)-(3,4) = "C"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "C"
+ │ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ │ └── then_loc: ∅
+ │ └── @ InNode (location: (4,0)-(5,4))
+ │ ├── pattern:
+ │ │ @ ConstantPathNode (location: (4,3)-(4,7))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (4,3)-(4,4))
+ │ │ │ └── name: :D
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (4,6)-(4,7))
+ │ │ │ └── name: :E
+ │ │ └── delimiter_loc: (4,4)-(4,6) = "::"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (5,2)-(5,4))
+ │ │ ├── opening_loc: (5,2)-(5,3) = ":"
+ │ │ ├── value_loc: (5,3)-(5,4) = "F"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "F"
+ │ ├── in_loc: (4,0)-(4,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/case_in_or.txt b/test/prism/snapshots/seattlerb/case_in_or.txt
new file mode 100644
index 0000000000..059ddcd32c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/case_in_or.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,4))
+ │ ├── pattern:
+ │ │ @ AlternationPatternNode (location: (2,3)-(2,8))
+ │ │ ├── left:
+ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ └── name: :B
+ │ │ ├── right:
+ │ │ │ @ ConstantReadNode (location: (2,7)-(2,8))
+ │ │ │ └── name: :C
+ │ │ └── operator_loc: (2,5)-(2,6) = "|"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (3,2)-(3,4))
+ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ ├── value_loc: (3,3)-(3,4) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/class_comments.txt b/test/prism/snapshots/seattlerb/class_comments.txt
new file mode 100644
index 0000000000..5ac05b6be6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/class_comments.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (4,0)-(9,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (4,0)-(9,3))
+ └── body: (length: 1)
+ └── @ ClassNode (location: (4,0)-(9,3))
+ ├── locals: []
+ ├── class_keyword_loc: (4,0)-(4,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (4,6)-(4,7))
+ │ └── name: :X
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body:
+ │ @ StatementsNode (location: (6,2)-(8,5))
+ │ └── body: (length: 1)
+ │ └── @ DefNode (location: (6,2)-(8,5))
+ │ ├── name: :blah
+ │ ├── name_loc: (6,6)-(6,10) = "blah"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (6,2)-(6,5) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (8,2)-(8,5) = "end"
+ ├── end_keyword_loc: (9,0)-(9,3) = "end"
+ └── name: :X
diff --git a/test/prism/snapshots/seattlerb/cond_unary_minus.txt b/test/prism/snapshots/seattlerb/cond_unary_minus.txt
new file mode 100644
index 0000000000..28c354b85d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/cond_unary_minus.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,10))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ IntegerNode (location: (1,3)-(1,5))
+ │ └── flags: decimal
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,7)-(1,10) = "end"
diff --git a/test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt b/test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt
new file mode 100644
index 0000000000..332c7ff302
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/const_2_op_asgn_or2.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ ConstantPathOrWriteNode (location: (1,0)-(1,12))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,6))
+ │ ├── parent:
+ │ │ @ ConstantPathNode (location: (1,0)-(1,3))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (1,2)-(1,3))
+ │ │ │ └── name: :X
+ │ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,5)-(1,6))
+ │ │ └── name: :Y
+ │ └── delimiter_loc: (1,3)-(1,5) = "::"
+ ├── operator_loc: (1,7)-(1,10) = "||="
+ └── value:
+ @ IntegerNode (location: (1,11)-(1,12))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt b/test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt
new file mode 100644
index 0000000000..e7130cc1b3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/const_3_op_asgn_or.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ConstantPathOrWriteNode (location: (1,0)-(1,9))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,3))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,2)-(1,3))
+ │ │ └── name: :X
+ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ ├── operator_loc: (1,4)-(1,7) = "||="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,9))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/const_op_asgn_and1.txt b/test/prism/snapshots/seattlerb/const_op_asgn_and1.txt
new file mode 100644
index 0000000000..c4c5534f92
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/const_op_asgn_and1.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ ConstantPathOperatorWriteNode (location: (1,0)-(1,8))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,3))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,2)-(1,3))
+ │ │ └── name: :X
+ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ ├── operator_loc: (1,4)-(1,6) = "&="
+ ├── value:
+ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ └── operator: :&
diff --git a/test/prism/snapshots/seattlerb/const_op_asgn_and2.txt b/test/prism/snapshots/seattlerb/const_op_asgn_and2.txt
new file mode 100644
index 0000000000..ef9ee358b9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/const_op_asgn_and2.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ConstantPathAndWriteNode (location: (1,0)-(1,9))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,3))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,2)-(1,3))
+ │ │ └── name: :X
+ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ ├── operator_loc: (1,4)-(1,7) = "&&="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,9))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/const_op_asgn_or.txt b/test/prism/snapshots/seattlerb/const_op_asgn_or.txt
new file mode 100644
index 0000000000..7afc8882e9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/const_op_asgn_or.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ ConstantPathOrWriteNode (location: (1,0)-(1,10))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,4))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ │ └── name: :X
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,3)-(1,4))
+ │ │ └── name: :Y
+ │ └── delimiter_loc: (1,1)-(1,3) = "::"
+ ├── operator_loc: (1,5)-(1,8) = "||="
+ └── value:
+ @ IntegerNode (location: (1,9)-(1,10))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/dasgn_icky2.txt b/test/prism/snapshots/seattlerb/dasgn_icky2.txt
new file mode 100644
index 0000000000..16864d1e33
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dasgn_icky2.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(8,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(8,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(8,3))
+ │ ├── locals: [:v]
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(7,5))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ LocalVariableWriteNode (location: (2,2)-(2,9))
+ │ │ │ ├── name: :v
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (2,2)-(2,3) = "v"
+ │ │ │ ├── value:
+ │ │ │ │ @ NilNode (location: (2,6)-(2,9))
+ │ │ │ └── operator_loc: (2,4)-(2,5) = "="
+ │ │ └── @ BeginNode (location: (3,2)-(7,5))
+ │ │ ├── begin_keyword_loc: (3,2)-(3,7) = "begin"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (4,4)-(4,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ YieldNode (location: (4,4)-(4,9))
+ │ │ │ ├── keyword_loc: (4,4)-(4,9) = "yield"
+ │ │ │ ├── lparen_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ └── rparen_loc: ∅
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (5,2)-(6,9))
+ │ │ │ ├── keyword_loc: (5,2)-(5,8) = "rescue"
+ │ │ │ ├── exceptions: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (5,9)-(5,18))
+ │ │ │ │ └── name: :Exception
+ │ │ │ ├── operator_loc: (5,19)-(5,21) = "=>"
+ │ │ │ ├── reference:
+ │ │ │ │ @ LocalVariableTargetNode (location: (5,22)-(5,23))
+ │ │ │ │ ├── name: :v
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (6,4)-(6,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ BreakNode (location: (6,4)-(6,9))
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ └── keyword_loc: (6,4)-(6,9) = "break"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (7,2)-(7,5) = "end"
+ │ ├── opening_loc: (1,2)-(1,4) = "do"
+ │ └── closing_loc: (8,0)-(8,3) = "end"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/defined_eh_parens.txt b/test/prism/snapshots/seattlerb/defined_eh_parens.txt
new file mode 100644
index 0000000000..b03666c7e4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defined_eh_parens.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ DefinedNode (location: (1,0)-(1,12))
+ ├── lparen_loc: (1,8)-(1,9) = "("
+ ├── value:
+ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ └── flags: decimal
+ ├── rparen_loc: (1,11)-(1,12) = ")"
+ └── keyword_loc: (1,0)-(1,8) = "defined?"
diff --git a/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
new file mode 100644
index 0000000000..c5c169fc0e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,29))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,29))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,29))
+ ├── name: :call
+ ├── name_loc: (1,4)-(1,8) = "call"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,9)-(1,24))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,15))
+ │ │ └── name: :interp
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,17)-(1,18))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,17)-(1,18) = "*"
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,24))
+ │ │ └── name: :args
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:interp, :*, :args]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,8)-(1,9) = "("
+ ├── rparen_loc: (1,24)-(1,25) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,26)-(1,29) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
new file mode 100644
index 0000000000..8b85009de0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,29))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,29))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,29))
+ ├── name: :a
+ ├── name_loc: (1,4)-(1,5) = "a"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,12))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ └── name: :x
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (1,9)-(1,12))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,15)-(1,24))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,15)-(1,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,15)-(1,16) = "b"
+ │ ├── opening_loc: (1,16)-(1,17) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,17)-(1,23))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ └── @ ForwardingArgumentsNode (location: (1,20)-(1,23))
+ │ ├── closing_loc: (1,23)-(1,24) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── locals: [:x, :"..."]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,12)-(1,13) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,26)-(1,29) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_args_forward_args.txt b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
new file mode 100644
index 0000000000..2d033dd1f2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(1,41))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,41))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,41))
+ ├── name: :a
+ ├── name_loc: (1,4)-(1,5) = "a"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,18))
+ │ ├── requireds: (length: 3)
+ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ └── name: :x
+ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ └── name: :y
+ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ └── name: :z
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (1,15)-(1,18))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,21)-(1,36))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,21)-(1,36))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,21)-(1,22) = "b"
+ │ ├── opening_loc: (1,22)-(1,23) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,23)-(1,35))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ SymbolNode (location: (1,23)-(1,27))
+ │ │ │ ├── opening_loc: (1,23)-(1,24) = ":"
+ │ │ │ ├── value_loc: (1,24)-(1,27) = "get"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "get"
+ │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30))
+ │ │ │ ├── name: :z
+ │ │ │ └── depth: 0
+ │ │ └── @ ForwardingArgumentsNode (location: (1,32)-(1,35))
+ │ ├── closing_loc: (1,35)-(1,36) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── locals: [:x, :y, :z, :"..."]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,18)-(1,19) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,38)-(1,41) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_comments.txt b/test/prism/snapshots/seattlerb/defn_comments.txt
new file mode 100644
index 0000000000..585aa65c9a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_comments.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (4,0)-(5,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (4,0)-(5,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (4,0)-(5,3))
+ ├── name: :blah
+ ├── name_loc: (4,4)-(4,8) = "blah"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (5,0)-(5,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_endless_command.txt b/test/prism/snapshots/seattlerb/defn_endless_command.txt
new file mode 100644
index 0000000000..90cfd1c888
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_endless_command.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,33))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,33))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,33))
+ ├── name: :some_method
+ ├── name_loc: (1,4)-(1,15) = "some_method"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,18)-(1,33))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,18)-(1,33))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,18)-(1,30) = "other_method"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,31)-(1,33))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,31)-(1,33))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "other_method"
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: (1,16)-(1,17) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
new file mode 100644
index 0000000000..18e019d4f4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,43))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,43))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,43))
+ ├── name: :some_method
+ ├── name_loc: (1,4)-(1,15) = "some_method"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,18)-(1,43))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,18)-(1,43))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,18)-(1,30) = "other_method"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,31)-(1,43))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (1,31)-(1,43))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (1,31)-(1,33))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_loc: (1,34)-(1,40) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ IntegerNode (location: (1,41)-(1,43))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "other_method"
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: (1,16)-(1,17) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_forward_args.txt b/test/prism/snapshots/seattlerb/defn_forward_args.txt
new file mode 100644
index 0000000000..5eb2cf1d18
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_forward_args.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,23))
+ ├── name: :a
+ ├── name_loc: (1,4)-(1,5) = "a"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,9))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (1,6)-(1,9))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,12)-(1,18))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,12)-(1,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,12)-(1,13) = "b"
+ │ ├── opening_loc: (1,13)-(1,14) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,14)-(1,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (1,14)-(1,17))
+ │ ├── closing_loc: (1,17)-(1,18) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── locals: [:"..."]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,9)-(1,10) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,20)-(1,23) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
new file mode 100644
index 0000000000..168fdbbb42
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(3,3))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,9))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (1,6)-(1,9))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (2,2)-(2,8))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,2)-(2,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,2)-(2,3) = "m"
+ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,4)-(2,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (2,4)-(2,7))
+ │ ├── closing_loc: (2,7)-(2,8) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── locals: [:"..."]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (3,0)-(3,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_env.txt b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
new file mode 100644
index 0000000000..57b835d9d4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,45))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,45))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,45))
+ ├── name: :test
+ ├── name_loc: (1,4)-(1,8) = "test"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,9)-(1,18))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,9)-(1,18))
+ │ │ ├── name: :testing
+ │ │ ├── name_loc: (1,11)-(1,18) = "testing"
+ │ │ └── operator_loc: (1,9)-(1,11) = "**"
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,20)-(1,41))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,20)-(1,41))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,20)-(1,30) = "test_splat"
+ │ ├── opening_loc: (1,30)-(1,31) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,31)-(1,40))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,31)-(1,40))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (1,31)-(1,40))
+ │ │ ├── value:
+ │ │ │ @ LocalVariableReadNode (location: (1,33)-(1,40))
+ │ │ │ ├── name: :testing
+ │ │ │ └── depth: 0
+ │ │ └── operator_loc: (1,31)-(1,33) = "**"
+ │ ├── closing_loc: (1,40)-(1,41) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "test_splat"
+ ├── locals: [:testing]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,8)-(1,9) = "("
+ ├── rparen_loc: (1,18)-(1,19) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,42)-(1,45) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
new file mode 100644
index 0000000000..2d57ad3189
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,24))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,19))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 2)
+ │ │ ├── @ KeywordParameterNode (location: (1,9)-(1,13))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,9)-(1,11) = "b:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ └── flags: decimal
+ │ │ └── @ KeywordParameterNode (location: (1,15)-(1,19))
+ │ │ ├── name: :c
+ │ │ ├── name_loc: (1,15)-(1,17) = "c:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,18)-(1,19))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a, :b, :c]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,19)-(1,20) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,21)-(1,24) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
new file mode 100644
index 0000000000..0d005c2057
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,20))
+ ├── name: :a
+ ├── name_loc: (1,4)-(1,5) = "a"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,15))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,6)-(1,8) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,12)-(1,15))
+ │ │ ├── name: :c
+ │ │ ├── name_loc: (1,14)-(1,15) = "c"
+ │ │ └── operator_loc: (1,12)-(1,14) = "**"
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:b, :c]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,15)-(1,16) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,17)-(1,20) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
new file mode 100644
index 0000000000..60c8e7bcb8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,19))
+ ├── name: :a
+ ├── name_loc: (1,4)-(1,5) = "a"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,14))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,6)-(1,8) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,12)-(1,14))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,12)-(1,14) = "**"
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:b, :**]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,14)-(1,15) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,16)-(1,19) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
new file mode 100644
index 0000000000..6b46d9e2d4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,26))
+ ├── name: :fun
+ ├── name_loc: (1,4)-(1,7) = "fun"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,16))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,8)-(1,16))
+ │ │ ├── name: :kw
+ │ │ ├── name_loc: (1,8)-(1,11) = "kw:"
+ │ │ └── value:
+ │ │ @ SymbolNode (location: (1,12)-(1,16))
+ │ │ ├── opening_loc: (1,12)-(1,13) = ":"
+ │ │ ├── value_loc: (1,13)-(1,16) = "val"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "val"
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,19)-(1,21))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (1,19)-(1,21))
+ │ ├── name: :kw
+ │ └── depth: 0
+ ├── locals: [:kw]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,16)-(1,17) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,23)-(1,26) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt
new file mode 100644
index 0000000000..ba0bd44324
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(2,3))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,6)-(1,8) = "a:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_val.txt b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
new file mode 100644
index 0000000000..5933c969db
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,17))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,12))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,9)-(1,12))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,9)-(1,11) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a, :b]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,12)-(1,13) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_no_kwargs.txt b/test/prism/snapshots/seattlerb/defn_no_kwargs.txt
new file mode 100644
index 0000000000..0ef0634a53
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_no_kwargs.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,17))
+ ├── name: :x
+ ├── name_loc: (1,4)-(1,5) = "x"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,11))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ NoKeywordsParameterNode (location: (1,6)-(1,11))
+ │ │ ├── operator_loc: (1,6)-(1,8) = "**"
+ │ │ └── keyword_loc: (1,8)-(1,11) = "nil"
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,11)-(1,12) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner.txt b/test/prism/snapshots/seattlerb/defn_oneliner.txt
new file mode 100644
index 0000000000..55227da074
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,27))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,27))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,27))
+ ├── name: :exec
+ ├── name_loc: (1,4)-(1,8) = "exec"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,9)-(1,12))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,12))
+ │ │ └── name: :cmd
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,16)-(1,27))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,16)-(1,27))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,16)-(1,22) = "system"
+ │ ├── opening_loc: (1,22)-(1,23) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,23)-(1,26))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,23)-(1,26))
+ │ │ ├── name: :cmd
+ │ │ └── depth: 0
+ │ ├── closing_loc: (1,26)-(1,27) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "system"
+ ├── locals: [:cmd]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,8)-(1,9) = "("
+ ├── rparen_loc: (1,12)-(1,13) = ")"
+ ├── equal_loc: (1,14)-(1,15) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt b/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
new file mode 100644
index 0000000000..359332adba
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_eq2.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ ClassNode (location: (1,0)-(3,3))
+ ├── locals: []
+ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (1,6)-(1,7))
+ │ └── name: :X
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body:
+ │ @ StatementsNode (location: (2,2)-(2,16))
+ │ └── body: (length: 1)
+ │ └── @ DefNode (location: (2,2)-(2,16))
+ │ ├── name: :==
+ │ ├── name_loc: (2,6)-(2,8) = "=="
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (2,9)-(2,10))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (2,9)-(2,10))
+ │ │ │ └── name: :o
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,14)-(2,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (2,14)-(2,16))
+ │ │ └── flags: decimal
+ │ ├── locals: [:o]
+ │ ├── def_keyword_loc: (2,2)-(2,5) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (2,8)-(2,9) = "("
+ │ ├── rparen_loc: (2,10)-(2,11) = ")"
+ │ ├── equal_loc: (2,12)-(2,13) = "="
+ │ └── end_keyword_loc: ∅
+ ├── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── name: :X
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt
new file mode 100644
index 0000000000..1159287905
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,17))
+ ├── name: :exec
+ ├── name_loc: (1,4)-(1,8) = "exec"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,11)-(1,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,11)-(1,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,17) = "system"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "system"
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: (1,9)-(1,10) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt
new file mode 100644
index 0000000000..6634a2c375
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,19))
+ ├── name: :exec
+ ├── name_loc: (1,4)-(1,8) = "exec"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,13)-(1,19))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,13)-(1,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,13)-(1,19) = "system"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "system"
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,8)-(1,9) = "("
+ ├── rparen_loc: (1,9)-(1,10) = ")"
+ ├── equal_loc: (1,11)-(1,12) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
new file mode 100644
index 0000000000..5fe7779944
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt
@@ -0,0 +1,152 @@
+@ ProgramNode (location: (1,0)-(13,38))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,38))
+ └── body: (length: 3)
+ ├── @ DefNode (location: (1,0)-(5,3))
+ │ ├── name: :exec
+ │ ├── name_loc: (1,4)-(1,8) = "exec"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,9)-(1,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,12))
+ │ │ │ └── name: :cmd
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (2,2)-(5,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,8) = "system"
+ │ │ │ ├── opening_loc: (2,8)-(2,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (2,12)-(2,13) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "system"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (3,0)-(4,5))
+ │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ NilNode (location: (4,2)-(4,5))
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ ├── locals: [:cmd]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ ├── rparen_loc: (1,12)-(1,13) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ DefNode (location: (8,0)-(10,3))
+ │ ├── name: :exec
+ │ ├── name_loc: (8,4)-(8,8) = "exec"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (8,9)-(8,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (8,9)-(8,12))
+ │ │ │ └── name: :cmd
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (9,2)-(9,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (9,2)-(9,24))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (9,2)-(9,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,2)-(9,8) = "system"
+ │ │ │ ├── opening_loc: (9,8)-(9,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (9,12)-(9,13) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "system"
+ │ │ ├── keyword_loc: (9,14)-(9,20) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (9,21)-(9,24))
+ │ ├── locals: [:cmd]
+ │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (8,8)-(8,9) = "("
+ │ ├── rparen_loc: (8,12)-(8,13) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (10,0)-(10,3) = "end"
+ └── @ DefNode (location: (13,0)-(13,38))
+ ├── name: :exec
+ ├── name_loc: (13,4)-(13,8) = "exec"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (13,9)-(13,12))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (13,9)-(13,12))
+ │ │ └── name: :cmd
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (13,16)-(13,38))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (13,16)-(13,38))
+ │ ├── expression:
+ │ │ @ CallNode (location: (13,16)-(13,27))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,16)-(13,22) = "system"
+ │ │ ├── opening_loc: (13,22)-(13,23) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,23)-(13,26))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (13,23)-(13,26))
+ │ │ │ ├── name: :cmd
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: (13,26)-(13,27) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "system"
+ │ ├── keyword_loc: (13,28)-(13,34) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (13,35)-(13,38))
+ ├── locals: [:cmd]
+ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (13,8)-(13,9) = "("
+ ├── rparen_loc: (13,12)-(13,13) = ")"
+ ├── equal_loc: (13,14)-(13,15) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt b/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt
new file mode 100644
index 0000000000..e82a9c8091
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_opt_last_arg.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(2,3))
+ ├── name: :m
+ ├── name_loc: (1,4)-(1,5) = "m"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,17))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 1)
+ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,17))
+ │ │ ├── name: :arg
+ │ │ ├── name_loc: (1,6)-(1,9) = "arg"
+ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ └── value:
+ │ │ @ FalseNode (location: (1,12)-(1,17))
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:arg]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_opt_reg.txt b/test/prism/snapshots/seattlerb/defn_opt_reg.txt
new file mode 100644
index 0000000000..437eaa7472
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_opt_reg.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,19))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,14))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 1)
+ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,11))
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,6)-(1,7) = "a"
+ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ └── value:
+ │ │ @ NilNode (location: (1,8)-(1,11))
+ │ ├── rest: ∅
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ └── name: :b
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a, :b]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,14)-(1,15) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,16)-(1,19) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt b/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
new file mode 100644
index 0000000000..4ad2a5303e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_opt_splat_arg.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,24))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,7)-(1,19))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 1)
+ │ │ └── @ OptionalParameterNode (location: (1,7)-(1,12))
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,7)-(1,8) = "a"
+ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ └── flags: decimal
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,14)-(1,16))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,15)-(1,16) = "b"
+ │ │ └── operator_loc: (1,14)-(1,15) = "*"
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19))
+ │ │ └── name: :c
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a, :b, :c]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,6)-(1,7) = "("
+ ├── rparen_loc: (1,19)-(1,20) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,21)-(1,24) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_powarg.txt b/test/prism/snapshots/seattlerb/defn_powarg.txt
new file mode 100644
index 0000000000..a903d1f741
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_powarg.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,17))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,12))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,6)-(1,12))
+ │ │ ├── name: :opts
+ │ │ ├── name_loc: (1,8)-(1,12) = "opts"
+ │ │ └── operator_loc: (1,6)-(1,8) = "**"
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:opts]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,12)-(1,13) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt b/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
new file mode 100644
index 0000000000..0b6614abbc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_reg_opt_reg.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,23))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,18))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ └── name: :a
+ │ ├── optionals: (length: 1)
+ │ │ └── @ OptionalParameterNode (location: (1,9)-(1,15))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,9)-(1,10) = "b"
+ │ │ ├── operator_loc: (1,11)-(1,12) = "="
+ │ │ └── value:
+ │ │ @ SymbolNode (location: (1,13)-(1,15))
+ │ │ ├── opening_loc: (1,13)-(1,14) = ":"
+ │ │ ├── value_loc: (1,14)-(1,15) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── rest: ∅
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
+ │ │ └── name: :d
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a, :b, :d]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,18)-(1,19) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,20)-(1,23) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_splat_arg.txt b/test/prism/snapshots/seattlerb/defn_splat_arg.txt
new file mode 100644
index 0000000000..69b1c0749a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_splat_arg.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,15))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,6)-(1,7))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,6)-(1,7) = "*"
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ └── name: :a
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:*, :a]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,10)-(1,11) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,12)-(1,15) = "end"
diff --git a/test/prism/snapshots/seattlerb/defn_unary_not.txt b/test/prism/snapshots/seattlerb/defn_unary_not.txt
new file mode 100644
index 0000000000..61afb79ad1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defn_unary_not.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,17))
+ ├── name: :"!@"
+ ├── name_loc: (1,4)-(1,6) = "!@"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,8)-(1,12))
+ │ └── body: (length: 1)
+ │ └── @ TrueNode (location: (1,8)-(1,12))
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/seattlerb/defns_reserved.txt b/test/prism/snapshots/seattlerb/defns_reserved.txt
new file mode 100644
index 0000000000..96860b49ce
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defns_reserved.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,20))
+ ├── name: :return
+ ├── name_loc: (1,9)-(1,15) = "return"
+ ├── receiver:
+ │ @ SelfNode (location: (1,4)-(1,8))
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: (1,8)-(1,9) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,17)-(1,20) = "end"
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
new file mode 100644
index 0000000000..8b2002ac39
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,30))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,30))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,30))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,30))
+ │ └── arguments: (length: 1)
+ │ └── @ DefNode (location: (1,2)-(1,30))
+ │ ├── name: :b
+ │ ├── name_loc: (1,11)-(1,12) = "b"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (1,6)-(1,10))
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,14)-(1,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,14)-(1,25))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,14)-(1,15))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,14)-(1,15) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "x"
+ │ │ ├── call_operator_loc: (1,15)-(1,16) = "."
+ │ │ ├── message_loc: (1,16)-(1,17) = "y"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,18)-(1,25))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,18)-(1,20) = "do"
+ │ │ │ └── closing_loc: (1,22)-(1,25) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "y"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
+ │ ├── operator_loc: (1,10)-(1,11) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,27)-(1,30) = "end"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/seattlerb/defs_comments.txt b/test/prism/snapshots/seattlerb/defs_comments.txt
new file mode 100644
index 0000000000..a2976e7ee2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_comments.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (4,0)-(5,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (4,0)-(5,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (4,0)-(5,3))
+ ├── name: :blah
+ ├── name_loc: (4,9)-(4,13) = "blah"
+ ├── receiver:
+ │ @ SelfNode (location: (4,4)-(4,8))
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ ├── operator_loc: (4,8)-(4,9) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (5,0)-(5,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defs_endless_command.txt b/test/prism/snapshots/seattlerb/defs_endless_command.txt
new file mode 100644
index 0000000000..257b632a3d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_endless_command.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,35))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,35))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,35))
+ ├── name: :some_method
+ ├── name_loc: (1,6)-(1,17) = "some_method"
+ ├── receiver:
+ │ @ CallNode (location: (1,4)-(1,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "x"
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,20)-(1,35))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,20)-(1,35))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,20)-(1,32) = "other_method"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,33)-(1,35))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,33)-(1,35))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "other_method"
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: (1,5)-(1,6) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: (1,18)-(1,19) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
new file mode 100644
index 0000000000..0b18829492
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,45))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,45))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,45))
+ ├── name: :some_method
+ ├── name_loc: (1,6)-(1,17) = "some_method"
+ ├── receiver:
+ │ @ CallNode (location: (1,4)-(1,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "x"
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,20)-(1,45))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,20)-(1,45))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,20)-(1,32) = "other_method"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,33)-(1,45))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (1,33)-(1,45))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (1,33)-(1,35))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_loc: (1,36)-(1,42) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ IntegerNode (location: (1,43)-(1,45))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "other_method"
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: (1,5)-(1,6) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: (1,18)-(1,19) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_kwarg.txt b/test/prism/snapshots/seattlerb/defs_kwarg.txt
new file mode 100644
index 0000000000..8343c1f178
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_kwarg.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(2,3))
+ ├── name: :a
+ ├── name_loc: (1,9)-(1,10) = "a"
+ ├── receiver:
+ │ @ SelfNode (location: (1,4)-(1,8))
+ ├── parameters:
+ │ @ ParametersNode (location: (1,11)-(1,15))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,11)-(1,15))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,11)-(1,13) = "b:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,14)-(1,15))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:b]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: (1,8)-(1,9) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner.txt b/test/prism/snapshots/seattlerb/defs_oneliner.txt
new file mode 100644
index 0000000000..629de9b138
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_oneliner.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,32))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,32))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,32))
+ ├── name: :exec
+ ├── name_loc: (1,9)-(1,13) = "exec"
+ ├── receiver:
+ │ @ SelfNode (location: (1,4)-(1,8))
+ ├── parameters:
+ │ @ ParametersNode (location: (1,14)-(1,17))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,17))
+ │ │ └── name: :cmd
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,21)-(1,32))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,21)-(1,32))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,21)-(1,27) = "system"
+ │ ├── opening_loc: (1,27)-(1,28) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,28)-(1,31))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,28)-(1,31))
+ │ │ ├── name: :cmd
+ │ │ └── depth: 0
+ │ ├── closing_loc: (1,31)-(1,32) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "system"
+ ├── locals: [:cmd]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: (1,8)-(1,9) = "."
+ ├── lparen_loc: (1,13)-(1,14) = "("
+ ├── rparen_loc: (1,17)-(1,18) = ")"
+ ├── equal_loc: (1,19)-(1,20) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt b/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
new file mode 100644
index 0000000000..45ae30ecea
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_oneliner_eq2.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ ClassNode (location: (1,0)-(3,3))
+ ├── locals: []
+ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (1,6)-(1,7))
+ │ └── name: :X
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body:
+ │ @ StatementsNode (location: (2,2)-(2,21))
+ │ └── body: (length: 1)
+ │ └── @ DefNode (location: (2,2)-(2,21))
+ │ ├── name: :==
+ │ ├── name_loc: (2,11)-(2,13) = "=="
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (2,6)-(2,10))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (2,14)-(2,15))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (2,14)-(2,15))
+ │ │ │ └── name: :o
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,19)-(2,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (2,19)-(2,21))
+ │ │ └── flags: decimal
+ │ ├── locals: [:o]
+ │ ├── def_keyword_loc: (2,2)-(2,5) = "def"
+ │ ├── operator_loc: (2,10)-(2,11) = "."
+ │ ├── lparen_loc: (2,13)-(2,14) = "("
+ │ ├── rparen_loc: (2,15)-(2,16) = ")"
+ │ ├── equal_loc: (2,17)-(2,18) = "="
+ │ └── end_keyword_loc: ∅
+ ├── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── name: :X
diff --git a/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
new file mode 100644
index 0000000000..9e1bea2d2c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt
@@ -0,0 +1,155 @@
+@ ProgramNode (location: (1,0)-(13,43))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,43))
+ └── body: (length: 3)
+ ├── @ DefNode (location: (1,0)-(5,3))
+ │ ├── name: :exec
+ │ ├── name_loc: (1,9)-(1,13) = "exec"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (1,4)-(1,8))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,14)-(1,17))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,17))
+ │ │ │ └── name: :cmd
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (2,2)-(5,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,8) = "system"
+ │ │ │ ├── opening_loc: (2,8)-(2,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (2,12)-(2,13) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "system"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (3,0)-(4,5))
+ │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ NilNode (location: (4,2)-(4,5))
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ ├── locals: [:cmd]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: (1,8)-(1,9) = "."
+ │ ├── lparen_loc: (1,13)-(1,14) = "("
+ │ ├── rparen_loc: (1,17)-(1,18) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ DefNode (location: (8,0)-(10,3))
+ │ ├── name: :exec
+ │ ├── name_loc: (8,9)-(8,13) = "exec"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (8,4)-(8,8))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (8,14)-(8,17))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (8,14)-(8,17))
+ │ │ │ └── name: :cmd
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (9,2)-(9,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (9,2)-(9,24))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (9,2)-(9,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,2)-(9,8) = "system"
+ │ │ │ ├── opening_loc: (9,8)-(9,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12))
+ │ │ │ │ ├── name: :cmd
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (9,12)-(9,13) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "system"
+ │ │ ├── keyword_loc: (9,14)-(9,20) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (9,21)-(9,24))
+ │ ├── locals: [:cmd]
+ │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
+ │ ├── operator_loc: (8,8)-(8,9) = "."
+ │ ├── lparen_loc: (8,13)-(8,14) = "("
+ │ ├── rparen_loc: (8,17)-(8,18) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (10,0)-(10,3) = "end"
+ └── @ DefNode (location: (13,0)-(13,43))
+ ├── name: :exec
+ ├── name_loc: (13,9)-(13,13) = "exec"
+ ├── receiver:
+ │ @ SelfNode (location: (13,4)-(13,8))
+ ├── parameters:
+ │ @ ParametersNode (location: (13,14)-(13,17))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (13,14)-(13,17))
+ │ │ └── name: :cmd
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (13,21)-(13,43))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (13,21)-(13,43))
+ │ ├── expression:
+ │ │ @ CallNode (location: (13,21)-(13,32))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,21)-(13,27) = "system"
+ │ │ ├── opening_loc: (13,27)-(13,28) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,28)-(13,31))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (13,28)-(13,31))
+ │ │ │ ├── name: :cmd
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: (13,31)-(13,32) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "system"
+ │ ├── keyword_loc: (13,33)-(13,39) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (13,40)-(13,43))
+ ├── locals: [:cmd]
+ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ ├── operator_loc: (13,8)-(13,9) = "."
+ ├── lparen_loc: (13,13)-(13,14) = "("
+ ├── rparen_loc: (13,17)-(13,18) = ")"
+ ├── equal_loc: (13,19)-(13,20) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult0_.txt b/test/prism/snapshots/seattlerb/difficult0_.txt
new file mode 100644
index 0000000000..f4f9b11560
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult0_.txt
@@ -0,0 +1,69 @@
+@ ProgramNode (location: (1,0)-(4,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(4,8))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(4,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,2)-(4,4))
+ │ │ ├── receiver:
+ │ │ │ @ StringNode (location: (1,2)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<-END"
+ │ │ │ ├── content_loc: (2,0)-(2,0) = " a\n"
+ │ │ │ ├── closing_loc: (3,0)-(3,0) = " END\n"
+ │ │ │ └── unescaped: " a\n"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,8)-(1,9) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,9)-(4,4))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (1,9)-(4,4))
+ │ │ │ ├── opening_loc: (1,9)-(1,10) = "'"
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (1,10)-(1,0))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (1,10)-(1,0) = "b\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b\n"
+ │ │ │ │ └── @ StringNode (location: (4,0)-(4,3))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (4,0)-(4,3) = " c"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " c"
+ │ │ │ └── closing_loc: (4,3)-(4,4) = "'"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,4)-(4,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (4,5)-(4,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (4,5)-(4,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (4,5)-(4,6) = "'"
+ │ │ ├── content_loc: (4,6)-(4,7) = "d"
+ │ │ ├── closing_loc: (4,7)-(4,8) = "'"
+ │ │ └── unescaped: "d"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt b/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt
new file mode 100644
index 0000000000..fd98c2a5ef
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt
@@ -0,0 +1,242 @@
+@ ProgramNode (location: (1,0)-(12,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(12,3))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(12,3))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ TrueNode (location: (1,3)-(1,7))
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(11,11))
+ │ └── body: (length: 10)
+ │ ├── @ CallNode (location: (2,2)-(2,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,3) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (2,4)-(2,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "p"
+ │ ├── @ CallNode (location: (3,2)-(3,7))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (3,2)-(3,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ │ ├── message_loc: (3,4)-(3,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,6)-(3,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── @ CallNode (location: (4,2)-(4,10))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (4,2)-(4,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (4,2)-(4,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── call_operator_loc: (4,3)-(4,4) = "."
+ │ │ ├── message_loc: (4,4)-(4,5) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (4,6)-(4,10))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (4,6)-(4,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (4,9)-(4,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "d"
+ │ ├── @ CallNode (location: (5,2)-(5,7))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (5,2)-(5,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,2)-(5,3) = "e"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "e"
+ │ │ ├── call_operator_loc: (5,3)-(5,4) = "."
+ │ │ ├── message_loc: (5,4)-(5,5) = "f"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "f"
+ │ ├── @ CallNode (location: (6,2)-(6,10))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (6,2)-(6,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (6,2)-(6,3) = "g"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "g"
+ │ │ ├── call_operator_loc: (6,3)-(6,4) = "."
+ │ │ ├── message_loc: (6,4)-(6,5) = "h"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (6,6)-(6,10))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (6,6)-(6,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (6,9)-(6,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "h"
+ │ ├── @ CallNode (location: (7,2)-(7,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,2)-(7,3) = "p"
+ │ │ ├── opening_loc: (7,3)-(7,4) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,4)-(7,5))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (7,4)-(7,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (7,5)-(7,6) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "p"
+ │ ├── @ CallNode (location: (8,2)-(8,8))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (8,2)-(8,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (8,2)-(8,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── call_operator_loc: (8,3)-(8,4) = "."
+ │ │ ├── message_loc: (8,4)-(8,5) = "b"
+ │ │ ├── opening_loc: (8,5)-(8,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (8,6)-(8,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (8,6)-(8,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (8,7)-(8,8) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── @ CallNode (location: (9,2)-(9,11))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (9,2)-(9,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,2)-(9,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── call_operator_loc: (9,3)-(9,4) = "."
+ │ │ ├── message_loc: (9,4)-(9,5) = "d"
+ │ │ ├── opening_loc: (9,5)-(9,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,6)-(9,10))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (9,6)-(9,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (9,9)-(9,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (9,10)-(9,11) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "d"
+ │ ├── @ CallNode (location: (10,2)-(10,8))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (10,2)-(10,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (10,2)-(10,3) = "e"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "e"
+ │ │ ├── call_operator_loc: (10,3)-(10,4) = "."
+ │ │ ├── message_loc: (10,4)-(10,5) = "f"
+ │ │ ├── opening_loc: (10,5)-(10,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (10,6)-(10,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (10,6)-(10,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (10,7)-(10,8) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "f"
+ │ └── @ CallNode (location: (11,2)-(11,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,2)-(11,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,2)-(11,3) = "g"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "g"
+ │ ├── call_operator_loc: (11,3)-(11,4) = "."
+ │ ├── message_loc: (11,4)-(11,5) = "h"
+ │ ├── opening_loc: (11,5)-(11,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,6)-(11,10))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (11,6)-(11,7))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (11,9)-(11,10))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (11,10)-(11,11) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "h"
+ ├── consequent: ∅
+ └── end_keyword_loc: (12,0)-(12,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt b/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt
new file mode 100644
index 0000000000..ab8857b6d3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt
@@ -0,0 +1,73 @@
+@ ProgramNode (location: (1,0)-(7,1))
+├── locals: [:b, :c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,1))
+ └── body: (length: 2)
+ ├── @ IfNode (location: (1,0)-(6,3))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (1,3)-(1,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(5,6))
+ │ │ └── body: (length: 4)
+ │ │ ├── @ CallNode (location: (2,2)-(2,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "p"
+ │ │ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,4)-(2,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (2,4)-(2,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\""
+ │ │ │ │ ├── content_loc: (2,5)-(2,6) = "a"
+ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = "\""
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── closing_loc: (2,7)-(2,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "p"
+ │ │ ├── @ LocalVariableWriteNode (location: (3,2)-(3,7))
+ │ │ │ ├── name: :b
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (3,2)-(3,3) = "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (3,6)-(3,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (3,4)-(3,5) = "="
+ │ │ ├── @ CallNode (location: (4,2)-(4,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (4,2)-(4,3) = "p"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (4,4)-(4,5))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (4,4)-(4,5))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "p"
+ │ │ └── @ LocalVariableWriteNode (location: (5,2)-(5,6))
+ │ │ ├── name: :c
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (5,2)-(5,3) = "c"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (5,5)-(5,6))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (5,4)-(5,5) = "="
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ └── @ CallNode (location: (7,0)-(7,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (7,0)-(7,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/difficult2_.txt b/test/prism/snapshots/seattlerb/difficult2_.txt
new file mode 100644
index 0000000000..6bada8e1be
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult2_.txt
@@ -0,0 +1,66 @@
+@ ProgramNode (location: (1,0)-(2,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,6))
+ └── body: (length: 2)
+ ├── @ IfNode (location: (1,0)-(1,13))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,4)-(1,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,6)-(1,8))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (1,6)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = "'"
+ │ │ │ ├── content_loc: (1,7)-(1,7) = ""
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = "'"
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: (1,8)-(1,9) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,10)-(1,13))
+ │ │ ├── else_keyword_loc: (1,10)-(1,11) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,12)-(1,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ └── flags: decimal
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ CallNode (location: (2,0)-(2,6))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (2,0)-(2,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (2,2)-(2,6))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (2,2)-(2,6))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (2,2)-(2,6))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (2,2)-(2,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (2,2)-(2,3) = "d"
+ │ │ ├── closing_loc: (2,3)-(2,4) = ":"
+ │ │ └── unescaped: "d"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (2,5)-(2,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/difficult3_.txt b/test/prism/snapshots/seattlerb/difficult3_.txt
new file mode 100644
index 0000000000..315602ea1e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,18))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,15))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,15))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ SplatNode (location: (1,12)-(1,14))
+ │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,14)-(1,15) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,15)-(1,16) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,17)-(1,18) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3_2.txt b/test/prism/snapshots/seattlerb/difficult3_2.txt
new file mode 100644
index 0000000000..c1ebe5b4cf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_2.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,13))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,10))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,5)-(1,7))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,6)-(1,7) = "a"
+ │ │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3_3.txt b/test/prism/snapshots/seattlerb/difficult3_3.txt
new file mode 100644
index 0000000000..46160cc33c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_3.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,5)-(1,7))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,6)-(1,7) = "a"
+ │ │ │ │ └── operator_loc: (1,5)-(1,6) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,12)-(1,14))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,13)-(1,14) = "c"
+ │ │ │ └── operator_loc: (1,12)-(1,13) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3_4.txt b/test/prism/snapshots/seattlerb/difficult3_4.txt
new file mode 100644
index 0000000000..67fe5715a3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_4.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,17))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ IfNode (location: (1,2)-(1,17))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,6)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ TrueNode (location: (1,6)-(1,10))
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,10)-(1,17))
+ │ │ ├── else_keyword_loc: (1,10)-(1,11) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,12)-(1,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FalseNode (location: (1,12)-(1,17))
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── operator_loc: (1,1)-(1,2) = "="
diff --git a/test/prism/snapshots/seattlerb/difficult3_5.txt b/test/prism/snapshots/seattlerb/difficult3_5.txt
new file mode 100644
index 0000000000..174557dc5e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3_5.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,19))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (1,2)-(1,19))
+ │ ├── locals: []
+ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ ├── opening_loc: (1,7)-(1,8) = "{"
+ │ ├── closing_loc: (1,18)-(1,19) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,6))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ └── closing_loc: (1,5)-(1,6) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (1,9)-(1,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,9)-(1,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,9)-(1,10) = "g"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,11)-(1,17))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,11)-(1,13) = "do"
+ │ │ └── closing_loc: (1,14)-(1,17) = "end"
+ │ ├── flags: ∅
+ │ └── name: "g"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3__10.txt b/test/prism/snapshots/seattlerb/difficult3__10.txt
new file mode 100644
index 0000000000..c70e73eb86
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__10.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,18))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,15))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,15))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ │ │ └── expression:
+ │ │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,14)-(1,15) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,15)-(1,16) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,17)-(1,18) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3__11.txt b/test/prism/snapshots/seattlerb/difficult3__11.txt
new file mode 100644
index 0000000000..6dce592668
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__11.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,14))
+ │ ├── locals: [:a]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,11))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,11))
+ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ └── @ SplatNode (location: (1,9)-(1,10))
+ │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,13)-(1,14) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3__12.txt b/test/prism/snapshots/seattlerb/difficult3__12.txt
new file mode 100644
index 0000000000..67947d6301
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__12.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ SplatNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,13)-(1,14) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3__6.txt b/test/prism/snapshots/seattlerb/difficult3__6.txt
new file mode 100644
index 0000000000..ea05a98bbd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__6.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,21))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,19))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,18))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,18))
+ │ │ │ │ ├── parameters: (length: 3)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ ├── @ SplatNode (location: (1,12)-(1,14))
+ │ │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ │ │ └── expression:
+ │ │ │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ │ │ └── name: :c
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17))
+ │ │ │ │ │ └── name: :d
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,17)-(1,18) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,18)-(1,19) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,20)-(1,21) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3__7.txt b/test/prism/snapshots/seattlerb/difficult3__7.txt
new file mode 100644
index 0000000000..8c0aa4cf1b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__7.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ └── @ SplatNode (location: (1,12)-(1,13))
+ │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,13)-(1,14) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3__8.txt b/test/prism/snapshots/seattlerb/difficult3__8.txt
new file mode 100644
index 0000000000..c7e893600c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__8.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,20))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,18))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,17))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,17))
+ │ │ │ │ ├── parameters: (length: 3)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ ├── @ SplatNode (location: (1,12)-(1,13))
+ │ │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*"
+ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,16)-(1,17) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,17)-(1,18) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,19)-(1,20) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult3__9.txt b/test/prism/snapshots/seattlerb/difficult3__9.txt
new file mode 100644
index 0000000000..5e1c6b1cab
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult3__9.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,15))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,13))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,12))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,8)-(1,12))
+ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ └── @ SplatNode (location: (1,9)-(1,11))
+ │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,12)-(1,13) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,14)-(1,15) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt b/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt
new file mode 100644
index 0000000000..acdb72f84c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(2,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,2))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (2,0)-(2,1) = "."
+ ├── message_loc: (2,1)-(2,2) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt b/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt
new file mode 100644
index 0000000000..e569fbea1f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 2)
+ ├── @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ └── @ RangeNode (location: (2,0)-(2,3))
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (2,2)-(2,3))
+ │ └── flags: decimal
+ ├── operator_loc: (2,0)-(2,2) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/difficult6_.txt b/test/prism/snapshots/seattlerb/difficult6_.txt
new file mode 100644
index 0000000000..dd12d42c15
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult6_.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,25))
+ ├── locals: [:a, :b]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,13)-(1,14) = "{"
+ ├── closing_loc: (1,24)-(1,25) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,2)-(1,12))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,3)-(1,11))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,11))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,6)-(1,7) = "b"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ NilNode (location: (1,8)-(1,11))
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,11)-(1,12) = ")"
+ └── body:
+ @ StatementsNode (location: (1,15)-(1,23))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,15)-(1,23))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,15)-(1,16) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,17)-(1,23))
+ │ └── arguments: (length: 1)
+ │ └── @ ArrayNode (location: (1,17)-(1,23))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ LocalVariableReadNode (location: (1,18)-(1,19))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableReadNode (location: (1,21)-(1,22))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── opening_loc: (1,17)-(1,18) = "["
+ │ └── closing_loc: (1,22)-(1,23) = "]"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/seattlerb/difficult6__7.txt b/test/prism/snapshots/seattlerb/difficult6__7.txt
new file mode 100644
index 0000000000..2ca623e8e8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult6__7.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(1,7))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,6)-(1,7) = ")"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,8)-(1,11))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,9)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,9)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,10) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── opening_loc: (1,8)-(1,9) = "{"
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/difficult6__8.txt b/test/prism/snapshots/seattlerb/difficult6__8.txt
new file mode 100644
index 0000000000..1f7c63ba12
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult6__8.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,5)-(1,8))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,6)-(1,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ └── closing_loc: (1,7)-(1,8) = ")"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,9)-(1,12))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,10)-(1,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,10)-(1,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,10)-(1,11) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── opening_loc: (1,9)-(1,10) = "{"
+ │ └── closing_loc: (1,11)-(1,12) = "}"
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/difficult7_.txt b/test/prism/snapshots/seattlerb/difficult7_.txt
new file mode 100644
index 0000000000..e567448bcf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/difficult7_.txt
@@ -0,0 +1,90 @@
+@ ProgramNode (location: (1,6)-(4,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,6)-(4,7))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,6)-(4,7))
+ ├── opening_loc: (1,6)-(1,7) = "{"
+ ├── elements: (length: 2)
+ │ ├── @ AssocNode (location: (2,8)-(2,33))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (2,8)-(2,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (2,8)-(2,9) = "a"
+ │ │ │ ├── closing_loc: (2,9)-(2,10) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (2,11)-(2,33))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,11)-(2,17) = "lambda"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (2,18)-(2,33))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (2,20)-(2,31))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IfNode (location: (2,20)-(2,31))
+ │ │ │ │ │ ├── if_keyword_loc: ∅
+ │ │ │ │ │ ├── predicate:
+ │ │ │ │ │ │ @ CallNode (location: (2,20)-(2,21))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "b"
+ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ @ StatementsNode (location: (2,24)-(2,27))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (2,24)-(2,27))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (2,24)-(2,25) = "c"
+ │ │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "("
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: (2,26)-(2,27) = ")"
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ └── name: "c"
+ │ │ │ │ │ ├── consequent:
+ │ │ │ │ │ │ @ ElseNode (location: (2,28)-(2,31))
+ │ │ │ │ │ │ ├── else_keyword_loc: (2,28)-(2,29) = ":"
+ │ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ │ @ StatementsNode (location: (2,30)-(2,31))
+ │ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ │ └── @ CallNode (location: (2,30)-(2,31))
+ │ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ │ ├── message_loc: (2,30)-(2,31) = "d"
+ │ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ │ └── end_keyword_loc: ∅
+ │ │ │ │ │ └── end_keyword_loc: ∅
+ │ │ │ │ ├── opening_loc: (2,18)-(2,19) = "{"
+ │ │ │ │ └── closing_loc: (2,32)-(2,33) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "lambda"
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocNode (location: (3,8)-(3,14))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,8)-(3,10))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (3,8)-(3,9) = "e"
+ │ │ ├── closing_loc: (3,9)-(3,10) = ":"
+ │ │ └── unescaped: "e"
+ │ ├── value:
+ │ │ @ NilNode (location: (3,11)-(3,14))
+ │ └── operator_loc: ∅
+ └── closing_loc: (4,6)-(4,7) = "}"
diff --git a/test/prism/snapshots/seattlerb/do_bug.txt b/test/prism/snapshots/seattlerb/do_bug.txt
new file mode 100644
index 0000000000..49b3605da3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/do_bug.txt
@@ -0,0 +1,60 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (2,0)-(4,3))
+ ├── receiver:
+ │ @ CallNode (location: (2,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (2,1)-(2,2) = "."
+ ├── message_loc: (2,2)-(2,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (2,4)-(4,3))
+ │ ├── locals: [:c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (2,7)-(2,10))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (2,8)-(2,9))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (2,8)-(2,9))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (2,7)-(2,8) = "|"
+ │ │ └── closing_loc: (2,9)-(2,10) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (2,4)-(2,6) = "do"
+ │ └── closing_loc: (4,0)-(4,3) = "end"
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/do_lambda.txt b/test/prism/snapshots/seattlerb/do_lambda.txt
new file mode 100644
index 0000000000..4713fb3e4b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/do_lambda.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,11))
+ ├── locals: []
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,5)-(1,7) = "do"
+ ├── closing_loc: (1,8)-(1,11) = "end"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,2)-(1,4))
+ │ ├── parameters: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,3)-(1,4) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/dot2_nil__26.txt b/test/prism/snapshots/seattlerb/dot2_nil__26.txt
new file mode 100644
index 0000000000..6e10c48818
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dot2_nil__26.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,3))
+ ├── left:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── right: ∅
+ ├── operator_loc: (1,1)-(1,3) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/dot3_nil__26.txt b/test/prism/snapshots/seattlerb/dot3_nil__26.txt
new file mode 100644
index 0000000000..0da36ab471
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dot3_nil__26.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,4))
+ ├── left:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── right: ∅
+ ├── operator_loc: (1,1)-(1,4) = "..."
+ └── flags: exclude_end
diff --git a/test/prism/snapshots/seattlerb/dstr_evstr.txt b/test/prism/snapshots/seattlerb/dstr_evstr.txt
new file mode 100644
index 0000000000..c070c86f96
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dstr_evstr.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,12))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,7))
+ │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,3)-(1,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ StringNode (location: (1,3)-(1,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "'"
+ │ │ │ ├── content_loc: (1,4)-(1,5) = "a"
+ │ │ │ ├── closing_loc: (1,5)-(1,6) = "'"
+ │ │ │ └── unescaped: "a"
+ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ └── @ EmbeddedStatementsNode (location: (1,7)-(1,11))
+ │ ├── opening_loc: (1,7)-(1,9) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,9)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,9)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,10) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ └── closing_loc: (1,11)-(1,12) = "\""
diff --git a/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt b/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt
new file mode 100644
index 0000000000..a51f7fe994
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ InterpolatedSymbolNode (location: (1,0)-(1,11))
+ ├── opening_loc: (1,0)-(1,2) = ":\""
+ ├── parts: (length: 1)
+ │ └── @ EmbeddedStatementsNode (location: (1,2)-(1,10))
+ │ ├── opening_loc: (1,2)-(1,4) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,4)-(1,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,9) = "field"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "field"
+ │ └── closing_loc: (1,9)-(1,10) = "}"
+ └── closing_loc: (1,10)-(1,11) = "\""
diff --git a/test/prism/snapshots/seattlerb/dstr_lex_state.txt b/test/prism/snapshots/seattlerb/dstr_lex_state.txt
new file mode 100644
index 0000000000..60d9eff91e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dstr_lex_state.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,8))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 1)
+ │ └── @ EmbeddedStatementsNode (location: (1,1)-(1,7))
+ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,3)-(1,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,4) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,4)-(1,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (1,4)-(1,6))
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ │ ├── value_loc: (1,5)-(1,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "p"
+ │ └── closing_loc: (1,6)-(1,7) = "}"
+ └── closing_loc: (1,7)-(1,8) = "\""
diff --git a/test/prism/snapshots/seattlerb/dstr_str.txt b/test/prism/snapshots/seattlerb/dstr_str.txt
new file mode 100644
index 0000000000..42bd37a1ac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dstr_str.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,10))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,7))
+ │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,3)-(1,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ StringNode (location: (1,3)-(1,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "'"
+ │ │ │ ├── content_loc: (1,4)-(1,5) = "a"
+ │ │ │ ├── closing_loc: (1,5)-(1,6) = "'"
+ │ │ │ └── unescaped: "a"
+ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ └── @ StringNode (location: (1,7)-(1,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,7)-(1,9) = " b"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: " b"
+ └── closing_loc: (1,9)-(1,10) = "\""
diff --git a/test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt b/test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt
new file mode 100644
index 0000000000..a52ac4043c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dsym_esc_to_sym.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ SymbolNode (location: (1,0)-(1,17))
+ ├── opening_loc: (1,0)-(1,2) = ":\""
+ ├── value_loc: (1,2)-(1,16) = "Variet\\303\\240"
+ ├── closing_loc: (1,16)-(1,17) = "\""
+ └── unescaped: "Varietà"
diff --git a/test/prism/snapshots/seattlerb/dsym_to_sym.txt b/test/prism/snapshots/seattlerb/dsym_to_sym.txt
new file mode 100644
index 0000000000..1d7fcf801f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/dsym_to_sym.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(3,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,13))
+ └── body: (length: 2)
+ ├── @ AliasMethodNode (location: (1,0)-(1,17))
+ │ ├── new_name:
+ │ │ @ SymbolNode (location: (1,6)-(1,11))
+ │ │ ├── opening_loc: (1,6)-(1,8) = ":\""
+ │ │ ├── value_loc: (1,8)-(1,10) = "<<"
+ │ │ ├── closing_loc: (1,10)-(1,11) = "\""
+ │ │ └── unescaped: "<<"
+ │ ├── old_name:
+ │ │ @ SymbolNode (location: (1,12)-(1,17))
+ │ │ ├── opening_loc: (1,12)-(1,14) = ":\""
+ │ │ ├── value_loc: (1,14)-(1,16) = ">>"
+ │ │ ├── closing_loc: (1,16)-(1,17) = "\""
+ │ │ └── unescaped: ">>"
+ │ └── keyword_loc: (1,0)-(1,5) = "alias"
+ └── @ AliasMethodNode (location: (3,0)-(3,13))
+ ├── new_name:
+ │ @ SymbolNode (location: (3,6)-(3,9))
+ │ ├── opening_loc: (3,6)-(3,7) = ":"
+ │ ├── value_loc: (3,7)-(3,9) = "<<"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<<"
+ ├── old_name:
+ │ @ SymbolNode (location: (3,10)-(3,13))
+ │ ├── opening_loc: (3,10)-(3,11) = ":"
+ │ ├── value_loc: (3,11)-(3,13) = ">>"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: ">>"
+ └── keyword_loc: (3,0)-(3,5) = "alias"
diff --git a/test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt b/test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt
new file mode 100644
index 0000000000..1fd43f6166
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/eq_begin_line_numbers.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(6,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,1))
+ └── body: (length: 2)
+ ├── @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ └── @ IntegerNode (location: (6,0)-(6,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt b/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt
new file mode 100644
index 0000000000..38c745deef
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,8))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "h"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "h"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,1)-(1,4) = "[k]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(3,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "k"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "k"
+ │ └── @ BeginNode (location: (1,5)-(3,8))
+ │ ├── begin_keyword_loc: (1,5)-(1,10) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,7)-(2,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (2,7)-(2,9))
+ │ │ └── flags: decimal
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (3,5)-(3,8) = "end"
+ ├── closing_loc: (1,3)-(1,4) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]="
diff --git a/test/prism/snapshots/seattlerb/evstr_evstr.txt b/test/prism/snapshots/seattlerb/evstr_evstr.txt
new file mode 100644
index 0000000000..373f49364e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/evstr_evstr.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,10))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,5))
+ │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,3)-(1,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,3)-(1,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ └── @ EmbeddedStatementsNode (location: (1,5)-(1,9))
+ │ ├── opening_loc: (1,5)-(1,7) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,7)-(1,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,7)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,8) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── closing_loc: (1,8)-(1,9) = "}"
+ └── closing_loc: (1,9)-(1,10) = "\""
diff --git a/test/prism/snapshots/seattlerb/evstr_str.txt b/test/prism/snapshots/seattlerb/evstr_str.txt
new file mode 100644
index 0000000000..196014e307
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/evstr_str.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,8))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,5))
+ │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,3)-(1,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,3)-(1,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ └── @ StringNode (location: (1,5)-(1,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,5)-(1,7) = " b"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: " b"
+ └── closing_loc: (1,7)-(1,8) = "\""
diff --git a/test/prism/snapshots/seattlerb/expr_not_bang.txt b/test/prism/snapshots/seattlerb/expr_not_bang.txt
new file mode 100644
index 0000000000..f9679d8df6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/expr_not_bang.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ CallNode (location: (1,2)-(1,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/seattlerb/f_kw.txt b/test/prism/snapshots/seattlerb/f_kw.txt
new file mode 100644
index 0000000000..cbc29b9c96
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/f_kw.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,15))
+ ├── name: :x
+ ├── name_loc: (1,4)-(1,5) = "x"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── name: :k
+ │ │ ├── name_loc: (1,6)-(1,8) = "k:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,8)-(1,10))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:k]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,12)-(1,15) = "end"
diff --git a/test/prism/snapshots/seattlerb/f_kw__required.txt b/test/prism/snapshots/seattlerb/f_kw__required.txt
new file mode 100644
index 0000000000..16d94d6b46
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/f_kw__required.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,13))
+ ├── name: :x
+ ├── name_loc: (1,4)-(1,5) = "x"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,8))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,8))
+ │ │ ├── name: :k
+ │ │ ├── name_loc: (1,6)-(1,8) = "k:"
+ │ │ └── value: ∅
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:k]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/seattlerb/flip2_env_lvar.txt b/test/prism/snapshots/seattlerb/flip2_env_lvar.txt
new file mode 100644
index 0000000000..1bd74d2b82
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/flip2_env_lvar.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,16))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (1,3)-(1,7))
+ │ ├── left:
+ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── right:
+ │ │ @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── operator_loc: (1,4)-(1,6) = ".."
+ │ └── flags: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,13)-(1,16) = "end"
diff --git a/test/prism/snapshots/seattlerb/float_with_if_modifier.txt b/test/prism/snapshots/seattlerb/float_with_if_modifier.txt
new file mode 100644
index 0000000000..798dba2d05
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/float_with_if_modifier.txt
@@ -0,0 +1,15 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,10))
+ ├── if_keyword_loc: (1,3)-(1,5) = "if"
+ ├── predicate:
+ │ @ TrueNode (location: (1,6)-(1,10))
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,3))
+ │ └── body: (length: 1)
+ │ └── @ FloatNode (location: (1,0)-(1,3))
+ ├── consequent: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt b/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt
new file mode 100644
index 0000000000..1d8b569dfe
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:str]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
+ ├── name: :str
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,3) = "str"
+ ├── value:
+ │ @ StringNode (location: (1,6)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,6)-(1,12) = "<<-XXX"
+ │ ├── content_loc: (2,0)-(3,0) = "before\\\r\nafter\r\n"
+ │ ├── closing_loc: (4,0)-(4,0) = "XXX\r\n"
+ │ └── unescaped: "beforeafter\r\n"
+ └── operator_loc: (1,4)-(1,5) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt b/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt
new file mode 100644
index 0000000000..3f98b7cd43
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(5,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,7))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(3,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(2,0) = " why would someone do this? \\\n blah\n"
+ │ ├── closing_loc: (3,0)-(3,1) = "\""
+ │ └── unescaped: " why would someone do this? blah\n"
+ └── @ StringNode (location: (5,0)-(5,7))
+ ├── flags: ∅
+ ├── opening_loc: (5,0)-(5,7) = "<<-DESC"
+ ├── content_loc: (6,0)-(7,0) = " why would someone do this? \\\n blah\n"
+ ├── closing_loc: (8,0)-(8,0) = "DESC\n"
+ └── unescaped: " why would someone do this? blah\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt b/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt
new file mode 100644
index 0000000000..29770b2ba3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: [:s]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,9))
+ ├── name: :s
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "s"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(1,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,9) = "<<eos"
+ │ ├── content_loc: (2,0)-(2,0) = "a\\xE9b\n"
+ │ ├── closing_loc: (3,0)-(3,0) = "eos\n"
+ │ └── unescaped: "a\xE9b\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt b/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt
new file mode 100644
index 0000000000..e51b83d922
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:s]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
+ ├── name: :s
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "s"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,10) = "<<-EOS"
+ │ ├── content_loc: (2,0)-(3,0) = "a\\247b\ncöd\n"
+ │ ├── closing_loc: (4,0)-(4,0) = "EOS\n"
+ │ └── unescaped: "a\xA7b\ncöd\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt
new file mode 100644
index 0000000000..007c4308fe
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(7,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(2,3))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (1,1)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,1)-(1,2) = "\""
+ │ │ ├── content_loc: (1,2)-(1,0) = " some text\n"
+ │ │ ├── closing_loc: (2,0)-(2,1) = "\""
+ │ │ └── unescaped: " some text\n"
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (2,2)-(2,3) = "]"
+ └── @ ArrayNode (location: (4,0)-(7,1))
+ ├── elements: (length: 1)
+ │ └── @ StringNode (location: (4,1)-(4,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (4,1)-(4,8) = "<<-FILE"
+ │ ├── content_loc: (5,0)-(5,0) = " some text\n"
+ │ ├── closing_loc: (6,0)-(6,0) = "FILE\n"
+ │ └── unescaped: " some text\n"
+ ├── opening_loc: (4,0)-(4,1) = "["
+ └── closing_loc: (7,0)-(7,1) = "]"
diff --git a/test/prism/snapshots/seattlerb/heredoc_lineno.txt b/test/prism/snapshots/seattlerb/heredoc_lineno.txt
new file mode 100644
index 0000000000..138a6af030
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_lineno.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(7,6))
+├── locals: [:c, :d]
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,6))
+ └── body: (length: 2)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,11))
+ │ ├── name: :c
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,1) = "c"
+ │ ├── value:
+ │ │ @ StringNode (location: (1,4)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,4)-(1,11) = "<<'CCC'"
+ │ │ ├── content_loc: (2,0)-(4,0) = "line2\nline3\nline4\n"
+ │ │ ├── closing_loc: (5,0)-(5,0) = "CCC\n"
+ │ │ └── unescaped: "line2\nline3\nline4\n"
+ │ └── operator_loc: (1,2)-(1,3) = "="
+ └── @ LocalVariableWriteNode (location: (7,0)-(7,6))
+ ├── name: :d
+ ├── depth: 0
+ ├── name_loc: (7,0)-(7,1) = "d"
+ ├── value:
+ │ @ IntegerNode (location: (7,4)-(7,6))
+ │ └── flags: decimal
+ └── operator_loc: (7,2)-(7,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_nested.txt b/test/prism/snapshots/seattlerb/heredoc_nested.txt
new file mode 100644
index 0000000000..d46f7253a5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_nested.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(7,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,2))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(7,2))
+ ├── elements: (length: 2)
+ │ ├── @ InterpolatedStringNode (location: (1,1)-(1,4))
+ │ │ ├── opening_loc: (1,1)-(1,4) = "<<A"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (2,0)-(2,6))
+ │ │ │ │ ├── opening_loc: (2,0)-(2,2) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (2,2)-(2,5))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: (2,2)-(2,5) = "<<B"
+ │ │ │ │ │ ├── content_loc: (3,0)-(3,0) = "b\n"
+ │ │ │ │ │ ├── closing_loc: (4,0)-(4,0) = "B\n"
+ │ │ │ │ │ └── unescaped: "b\n"
+ │ │ │ │ └── closing_loc: (2,5)-(2,6) = "}"
+ │ │ │ ├── @ StringNode (location: (2,6)-(2,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (2,6)-(2,0) = "\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\n"
+ │ │ │ └── @ StringNode (location: (5,0)-(5,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (5,0)-(5,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── closing_loc: (6,0)-(6,0) = "A\n"
+ │ └── @ IntegerNode (location: (7,0)-(7,1))
+ │ └── flags: decimal
+ ├── opening_loc: (1,0)-(1,1) = "["
+ └── closing_loc: (7,1)-(7,2) = "]"
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly.txt
new file mode 100644
index 0000000000..bc5273e9ac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
+ │ ├── content_loc: (2,0)-(4,0) = " x\n y\n z\n"
+ │ ├── closing_loc: (5,0)-(5,0) = " EOF\n"
+ │ └── unescaped: "x\ny\nz\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt
new file mode 100644
index 0000000000..1d6e533151
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,20))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ CallNode (location: (1,4)-(1,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ ├── opening_loc: (1,7)-(1,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,19))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,8)-(1,19))
+ │ │ ├── receiver:
+ │ │ │ @ InterpolatedStringNode (location: (1,8)-(1,14))
+ │ │ │ ├── opening_loc: (1,8)-(1,14) = "<<~EOF"
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (2,0)-(3,4))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (2,0)-(3,4) = "\n "
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (3,4)-(3,10))
+ │ │ │ │ │ ├── opening_loc: (3,4)-(3,6) = "\#{"
+ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ @ StatementsNode (location: (3,6)-(3,9))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,9))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (3,6)-(3,9) = "bar"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}"
+ │ │ │ │ └── @ StringNode (location: (3,10)-(3,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (3,10)-(3,0) = "baz\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "baz\n"
+ │ │ │ └── closing_loc: (4,0)-(4,0) = " EOF\n"
+ │ │ ├── call_operator_loc: (1,14)-(1,15) = "."
+ │ │ ├── message_loc: (1,15)-(1,19) = "chop"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "chop"
+ │ ├── closing_loc: (1,19)-(1,20) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt
new file mode 100644
index 0000000000..8adeee53bf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
+ │ ├── content_loc: (2,0)-(4,0) = " x\n\n z\n"
+ │ ├── closing_loc: (5,0)-(5,0) = "EOF\n"
+ │ └── unescaped: "x\n\nz\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt
new file mode 100644
index 0000000000..88049241d3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,4) = "<<~A"
+ ├── content_loc: (2,0)-(1,0) = ""
+ ├── closing_loc: (2,0)-(2,0) = "A\n"
+ └── unescaped: ""
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt
new file mode 100644
index 0000000000..620b29591c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ InterpolatedStringNode (location: (1,4)-(1,10))
+ │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (2,0)-(3,3))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(3,3) = " w\n x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " w\nx"
+ │ │ ├── @ EmbeddedStatementsNode (location: (3,3)-(3,8))
+ │ │ │ ├── opening_loc: (3,3)-(3,5) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,5)-(3,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (3,5)-(3,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (3,7)-(3,8) = "}"
+ │ │ └── @ StringNode (location: (3,8)-(4,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,8)-(4,0) = " y\n z\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " y\n z\n"
+ │ └── closing_loc: (5,0)-(5,0) = " EOF\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt
new file mode 100644
index 0000000000..b7f67aca7f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,4))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,4) = "<<~A"
+ ├── content_loc: (2,0)-(2,0) = "a\n"
+ ├── closing_loc: (3,0)-(3,0) = "A\n"
+ └── unescaped: "a\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt
new file mode 100644
index 0000000000..f876ffa456
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
+ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n\t blah blah\n"
+ │ ├── closing_loc: (4,0)-(4,0) = " EOF\n"
+ │ └── unescaped: "blah blah\n blah blah\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt
new file mode 100644
index 0000000000..32a8b64ce4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\""
+ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n \tblah blah\n"
+ │ ├── closing_loc: (4,0)-(4,0) = " EOF\n"
+ │ └── unescaped: "blah blah\n\tblah blah\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt
new file mode 100644
index 0000000000..edf33da732
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,10))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF"
+ │ ├── content_loc: (2,0)-(4,0) = " x\n \n z\n"
+ │ ├── closing_loc: (5,0)-(5,0) = "EOF\n"
+ │ └── unescaped: "x\n\nz\n"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt b/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt
new file mode 100644
index 0000000000..810031411c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(4,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,6))
+ ├── receiver:
+ │ @ StringNode (location: (1,0)-(1,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,5) = "<<END"
+ │ ├── content_loc: (2,0)-(2,0) = "blah\n"
+ │ ├── closing_loc: (3,0)-(3,0) = "END\n"
+ │ └── unescaped: "blah\n"
+ ├── call_operator_loc: (4,0)-(4,1) = "."
+ ├── message_loc: (4,1)-(4,6) = "strip"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "strip"
diff --git a/test/prism/snapshots/seattlerb/heredoc_unicode.txt b/test/prism/snapshots/seattlerb/heredoc_unicode.txt
new file mode 100644
index 0000000000..cf05249d7d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_unicode.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,9) = "<<OOTPÜT"
+ ├── content_loc: (2,0)-(2,0) = ".\n"
+ ├── closing_loc: (3,0)-(3,0) = "OOTPÜT\n"
+ └── unescaped: ".\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt
new file mode 100644
index 0000000000..c2f9bacf34
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── content_loc: (2,0)-(3,0) = "foo\\rbar\nbaz\\r\n"
+ ├── closing_loc: (4,0)-(4,0) = "EOS\n"
+ └── unescaped: "foo\rbar\nbaz\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt
new file mode 100644
index 0000000000..02cbf2d751
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── content_loc: (2,0)-(3,0) = "foo\\rbar\r\nbaz\\r\r\n"
+ ├── closing_loc: (4,0)-(4,0) = "EOS\r\n"
+ └── unescaped: "foo\rbar\r\nbaz\r\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
new file mode 100644
index 0000000000..66e83955b2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,7) = "<<'eot'"
+ ├── content_loc: (2,0)-(2,0) = "body\r\n"
+ ├── closing_loc: (3,0)-(3,0) = "eot\n"
+ └── unescaped: "body\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt
new file mode 100644
index 0000000000..1873c71d87
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── content_loc: (2,0)-(3,0) = "foo\rbar\r\nbaz\n"
+ ├── closing_loc: (4,0)-(4,0) = "EOS\n"
+ └── unescaped: "foo\rbar\r\nbaz\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt
new file mode 100644
index 0000000000..9473acb636
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── content_loc: (2,0)-(3,0) = "foo\rbar\r\r\nbaz\r\n"
+ ├── closing_loc: (4,0)-(4,0) = "EOS\r\n"
+ └── unescaped: "foo\rbar\r\r\nbaz\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt
new file mode 100644
index 0000000000..af8d5f697d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,5))
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (2,0)-(2,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(2,5) = "foo\\r"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo\r"
+ │ ├── @ EmbeddedVariableNode (location: (2,5)-(2,10))
+ │ │ ├── operator_loc: (2,5)-(2,6) = "#"
+ │ │ └── variable:
+ │ │ @ InstanceVariableReadNode (location: (2,6)-(2,10))
+ │ │ └── name: :@bar
+ │ └── @ StringNode (location: (2,10)-(2,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,10)-(2,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (3,0)-(3,0) = "EOS\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt
new file mode 100644
index 0000000000..d1b51850a9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,5))
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (2,0)-(2,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(2,5) = "foo\\r"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo\r"
+ │ ├── @ EmbeddedVariableNode (location: (2,5)-(2,10))
+ │ │ ├── operator_loc: (2,5)-(2,6) = "#"
+ │ │ └── variable:
+ │ │ @ InstanceVariableReadNode (location: (2,6)-(2,10))
+ │ │ └── name: :@bar
+ │ └── @ StringNode (location: (2,10)-(2,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,10)-(2,0) = "\r\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\r\n"
+ └── closing_loc: (3,0)-(3,0) = "EOS\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt b/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt
new file mode 100644
index 0000000000..c656ce4eec
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,10))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,10) = "<<-HEREDOC"
+ ├── content_loc: (2,0)-(2,0) = "\#${\n"
+ ├── closing_loc: (3,0)-(3,0) = "HEREDOC\n"
+ └── unescaped: "\#${\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt
new file mode 100644
index 0000000000..8043896a9e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── content_loc: (2,0)-(4,0) = "\r\n\r\r\n\\r\n"
+ ├── closing_loc: (5,0)-(5,0) = "EOS\n"
+ └── unescaped: "\r\n\r\r\n\r\n"
diff --git a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt
new file mode 100644
index 0000000000..5e62ba4230
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,5))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,5) = "<<EOS"
+ ├── content_loc: (2,0)-(4,0) = "\r\r\n\r\r\r\n\\r\r\n"
+ ├── closing_loc: (5,0)-(5,0) = "EOS\r\n"
+ └── unescaped: "\r\r\n\r\r\r\n\r\r\n"
diff --git a/test/prism/snapshots/seattlerb/if_elsif.txt b/test/prism/snapshots/seattlerb/if_elsif.txt
new file mode 100644
index 0000000000..bc526814a5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/if_elsif.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,18))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ IntegerNode (location: (1,3)-(1,4))
+ │ └── flags: decimal
+ ├── statements: ∅
+ ├── consequent:
+ │ @ IfNode (location: (1,6)-(1,18))
+ │ ├── if_keyword_loc: (1,6)-(1,11) = "elsif"
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ └── flags: decimal
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (1,15)-(1,18) = "end"
+ └── end_keyword_loc: (1,15)-(1,18) = "end"
diff --git a/test/prism/snapshots/seattlerb/if_symbol.txt b/test/prism/snapshots/seattlerb/if_symbol.txt
new file mode 100644
index 0000000000..050960a0b4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/if_symbol.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,12))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (1,3)-(1,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,3)-(1,4) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,5)-(1,7))
+ │ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ │ ├── value_loc: (1,6)-(1,7) = "x"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "x"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,9)-(1,12) = "end"
diff --git a/test/prism/snapshots/seattlerb/in_expr_no_case.txt b/test/prism/snapshots/seattlerb/in_expr_no_case.txt
new file mode 100644
index 0000000000..0a026c08db
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/in_expr_no_case.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ MatchPredicateNode (location: (1,0)-(1,16))
+ ├── value:
+ │ @ StringNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "'"
+ │ ├── content_loc: (1,1)-(1,5) = "woot"
+ │ ├── closing_loc: (1,5)-(1,6) = "'"
+ │ └── unescaped: "woot"
+ ├── pattern:
+ │ @ ConstantReadNode (location: (1,10)-(1,16))
+ │ └── name: :String
+ └── operator_loc: (1,7)-(1,9) = "in"
diff --git a/test/prism/snapshots/seattlerb/index_0.txt b/test/prism/snapshots/seattlerb/index_0.txt
new file mode 100644
index 0000000000..6df3611459
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/index_0.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,1)-(1,3) = "[]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── closing_loc: (1,2)-(1,3) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]="
diff --git a/test/prism/snapshots/seattlerb/index_0_opasgn.txt b/test/prism/snapshots/seattlerb/index_0_opasgn.txt
new file mode 100644
index 0000000000..537bcbf219
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/index_0_opasgn.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,8))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,1)-(1,3) = "[]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments: ∅
+ ├── closing_loc: (1,2)-(1,3) = "]"
+ ├── flags: ∅
+ ├── read_name: "[]"
+ ├── write_name: "[]="
+ ├── operator: :+
+ ├── operator_loc: (1,4)-(1,6) = "+="
+ └── value:
+ @ CallNode (location: (1,7)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/integer_with_if_modifier.txt b/test/prism/snapshots/seattlerb/integer_with_if_modifier.txt
new file mode 100644
index 0000000000..86632cca13
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/integer_with_if_modifier.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,12))
+ ├── if_keyword_loc: (1,5)-(1,7) = "if"
+ ├── predicate:
+ │ @ TrueNode (location: (1,8)-(1,12))
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,5))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,0)-(1,5))
+ │ └── flags: decimal
+ ├── consequent: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt b/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt
new file mode 100644
index 0000000000..a64a92ff34
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (2,0)-(2,1))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (3,0)-(3,1))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (3,0)-(3,1) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── opening_loc: (1,0)-(1,3) = "%I("
+ │ └── closing_loc: (4,0)-(4,1) = ")"
+ └── @ IntegerNode (location: (5,0)-(5,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt b/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt
new file mode 100644
index 0000000000..a9c2463161
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ StringNode (location: (3,0)-(3,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,0)-(3,1) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── opening_loc: (1,0)-(1,3) = "%W("
+ │ └── closing_loc: (4,0)-(4,1) = ")"
+ └── @ IntegerNode (location: (5,0)-(5,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/iter_args_1.txt b/test/prism/snapshots/seattlerb/iter_args_1.txt
new file mode 100644
index 0000000000..922c8167ee
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_1.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,11))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,9))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,8))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,7)-(1,8))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,8)-(1,9) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_10_1.txt b/test/prism/snapshots/seattlerb/iter_args_10_1.txt
new file mode 100644
index 0000000000..f883cdc457
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_10_1.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,21))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,19))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,18))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
+ │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,18)-(1,19) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,20)-(1,21) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_10_2.txt b/test/prism/snapshots/seattlerb/iter_args_10_2.txt
new file mode 100644
index 0000000000..9030ccf61a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_10_2.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,25))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,23))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,22))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
+ │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,20)-(1,22))
+ │ │ │ ├── name: :d
+ │ │ │ ├── name_loc: (1,21)-(1,22) = "d"
+ │ │ │ └── operator_loc: (1,20)-(1,21) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,22)-(1,23) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,24)-(1,25) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_11_1.txt b/test/prism/snapshots/seattlerb/iter_args_11_1.txt
new file mode 100644
index 0000000000..b9c326d2ed
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_11_1.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,24))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,24))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,22))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,21))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
+ │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21))
+ │ │ │ │ └── name: :d
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,21)-(1,22) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,23)-(1,24) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_11_2.txt b/test/prism/snapshots/seattlerb/iter_args_11_2.txt
new file mode 100644
index 0000000000..c1dd485bf3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_11_2.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,28))
+ │ ├── locals: [:a, :b, :c, :d, :e]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,26))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,25))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
+ │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21))
+ │ │ │ │ └── name: :d
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,23)-(1,25))
+ │ │ │ ├── name: :e
+ │ │ │ ├── name_loc: (1,24)-(1,25) = "e"
+ │ │ │ └── operator_loc: (1,23)-(1,24) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,25)-(1,26) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,27)-(1,28) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_2__19.txt b/test/prism/snapshots/seattlerb/iter_args_2__19.txt
new file mode 100644
index 0000000000..f6e064ef0f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_2__19.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,14))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,11))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,11)-(1,12) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,13)-(1,14) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_3.txt b/test/prism/snapshots/seattlerb/iter_args_3.txt
new file mode 100644
index 0000000000..3b96f8c4ee
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_3.txt
@@ -0,0 +1,46 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,20))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,18))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,17))
+ │ │ │ ├── requireds: (length: 3)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── @ RequiredDestructuredParameterNode (location: (1,8)-(1,14))
+ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ │ │ └── name: :c
+ │ │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ │ │ └── closing_loc: (1,13)-(1,14) = ")"
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17))
+ │ │ │ │ └── name: :d
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,17)-(1,18) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,19)-(1,20) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_4.txt b/test/prism/snapshots/seattlerb/iter_args_4.txt
new file mode 100644
index 0000000000..a39ce2c671
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_4.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,16))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,14))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,13))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,8)-(1,10))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,9)-(1,10) = "b"
+ │ │ │ │ └── operator_loc: (1,8)-(1,9) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,13)-(1,14) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,15)-(1,16) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_5.txt b/test/prism/snapshots/seattlerb/iter_args_5.txt
new file mode 100644
index 0000000000..b97c1d86ec
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_5.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,13))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,10))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,8)-(1,10))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,9)-(1,10) = "b"
+ │ │ │ └── operator_loc: (1,8)-(1,9) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_6.txt b/test/prism/snapshots/seattlerb/iter_args_6.txt
new file mode 100644
index 0000000000..d0f81d32c6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_6.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,18))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,15))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,12))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b"
+ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,10)-(1,12))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,15)-(1,16) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,17)-(1,18) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_7_1.txt b/test/prism/snapshots/seattlerb/iter_args_7_1.txt
new file mode 100644
index 0000000000..57dc9b5e92
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_7_1.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,18))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,15))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
+ │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,15)-(1,16) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,17)-(1,18) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_7_2.txt b/test/prism/snapshots/seattlerb/iter_args_7_2.txt
new file mode 100644
index 0000000000..7f29777661
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_7_2.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,22))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,20))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,19))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
+ │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,17)-(1,19))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,18)-(1,19) = "c"
+ │ │ │ └── operator_loc: (1,17)-(1,18) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,19)-(1,20) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,21)-(1,22) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_8_1.txt b/test/prism/snapshots/seattlerb/iter_args_8_1.txt
new file mode 100644
index 0000000000..d31b1d6c8c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_8_1.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,21))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,19))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,18))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
+ │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,18)-(1,19) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,20)-(1,21) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_8_2.txt b/test/prism/snapshots/seattlerb/iter_args_8_2.txt
new file mode 100644
index 0000000000..2c2719ffc7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_8_2.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,25))
+ │ ├── locals: [:a, :b, :c, :d]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,23))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,22))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b"
+ │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*"
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,20)-(1,22))
+ │ │ │ ├── name: :d
+ │ │ │ ├── name_loc: (1,21)-(1,22) = "d"
+ │ │ │ └── operator_loc: (1,20)-(1,21) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,22)-(1,23) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,24)-(1,25) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_9_1.txt b/test/prism/snapshots/seattlerb/iter_args_9_1.txt
new file mode 100644
index 0000000000..a04c4da21f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_9_1.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_args_9_2.txt b/test/prism/snapshots/seattlerb/iter_args_9_2.txt
new file mode 100644
index 0000000000..b9475368a7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_args_9_2.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,21))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,21))
+ │ ├── locals: [:a, :b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,19))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,18))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block:
+ │ │ │ @ BlockParameterNode (location: (1,16)-(1,18))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,17)-(1,18) = "c"
+ │ │ │ └── operator_loc: (1,16)-(1,17) = "&"
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,18)-(1,19) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,20)-(1,21) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/iter_kwarg.txt b/test/prism/snapshots/seattlerb/iter_kwarg.txt
new file mode 100644
index 0000000000..127ce75018
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_kwarg.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,12))
+ │ ├── locals: [:b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,10))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,9))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (1,5)-(1,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,9)-(1,10) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,11)-(1,12) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
new file mode 100644
index 0000000000..ac4ef0a80d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(1,17))
+ │ ├── locals: [:b, :c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,5)-(1,14))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (1,5)-(1,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ KeywordRestParameterNode (location: (1,11)-(1,14))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ ├── name_loc: (1,13)-(1,14) = "c"
+ │ │ │ │ └── operator_loc: (1,11)-(1,13) = "**"
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ └── closing_loc: (1,14)-(1,15) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ └── closing_loc: (1,16)-(1,17) = "}"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/label_vs_string.txt b/test/prism/snapshots/seattlerb/label_vs_string.txt
new file mode 100644
index 0000000000..bba7782fe6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/label_vs_string.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,1))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "_buf"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "_buf"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,5)-(1,7) = "<<"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,8)-(2,1))
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,8)-(2,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,8)-(1,9) = "'"
+ │ ├── content_loc: (1,9)-(1,0) = ":\n"
+ │ ├── closing_loc: (2,0)-(2,1) = "'"
+ │ └── unescaped: ":\n"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "<<"
diff --git a/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
new file mode 100644
index 0000000000..5762a91ccd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt
@@ -0,0 +1,91 @@
+@ ProgramNode (location: (1,0)-(7,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,9))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LambdaNode (location: (1,2)-(1,11))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ │ ├── closing_loc: (1,8)-(1,11) = "end"
+ │ │ ├── parameters: ∅
+ │ │ └── body: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (3,0)-(3,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LambdaNode (location: (3,2)-(3,7))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (3,2)-(3,4) = "->"
+ │ │ ├── opening_loc: (3,5)-(3,6) = "{"
+ │ │ ├── closing_loc: (3,6)-(3,7) = "}"
+ │ │ ├── parameters: ∅
+ │ │ └── body: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (5,0)-(5,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LambdaNode (location: (5,2)-(5,13))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (5,2)-(5,4) = "->"
+ │ │ ├── opening_loc: (5,7)-(5,9) = "do"
+ │ │ ├── closing_loc: (5,10)-(5,13) = "end"
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (5,4)-(5,6))
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (5,4)-(5,5) = "("
+ │ │ │ └── closing_loc: (5,5)-(5,6) = ")"
+ │ │ └── body: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ └── @ CallNode (location: (7,0)-(7,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (7,0)-(7,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,2)-(7,9))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (7,2)-(7,9))
+ │ ├── locals: []
+ │ ├── operator_loc: (7,2)-(7,4) = "->"
+ │ ├── opening_loc: (7,7)-(7,8) = "{"
+ │ ├── closing_loc: (7,8)-(7,9) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (7,4)-(7,6))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (7,4)-(7,5) = "("
+ │ │ └── closing_loc: (7,5)-(7,6) = ")"
+ │ └── body: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt
new file mode 100644
index 0000000000..b1c234bff2
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_arg_rescue_arg.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,14))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ RescueModifierNode (location: (1,4)-(1,14))
+ │ ├── expression:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ ├── keyword_loc: (1,6)-(1,12) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (1,13)-(1,14))
+ │ └── flags: decimal
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt
new file mode 100644
index 0000000000..36ee85c9d9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,17))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ RescueModifierNode (location: (1,4)-(1,17))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,4)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── keyword_loc: (1,9)-(1,15) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (1,16)-(1,17))
+ │ └── flags: decimal
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt
new file mode 100644
index 0000000000..a1e22f1852
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,16))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ CallNode (location: (1,4)-(1,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (1,6)-(1,16))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_loc: (1,8)-(1,14) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ IntegerNode (location: (1,15)-(1,16))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_command.txt b/test/prism/snapshots/seattlerb/lasgn_command.txt
new file mode 100644
index 0000000000..30bc60f5bc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_command.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,9))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ CallNode (location: (1,4)-(1,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── call_operator_loc: (1,5)-(1,6) = "."
+ │ ├── message_loc: (1,6)-(1,7) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "c"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_env.txt b/test/prism/snapshots/seattlerb/lasgn_env.txt
new file mode 100644
index 0000000000..33539a6918
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_env.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,6))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ IntegerNode (location: (1,4)-(1,6))
+ │ └── flags: decimal
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_ivar_env.txt b/test/prism/snapshots/seattlerb/lasgn_ivar_env.txt
new file mode 100644
index 0000000000..e37a331d51
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_ivar_env.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ InstanceVariableWriteNode (location: (1,0)-(1,7))
+ ├── name: :@a
+ ├── name_loc: (1,0)-(1,2) = "@a"
+ ├── value:
+ │ @ IntegerNode (location: (1,5)-(1,7))
+ │ └── flags: decimal
+ └── operator_loc: (1,3)-(1,4) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt b/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt
new file mode 100644
index 0000000000..0056decf76
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,11))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ LocalVariableWriteNode (location: (1,4)-(1,11))
+ │ ├── name: :b
+ │ ├── depth: 0
+ │ ├── name_loc: (1,4)-(1,5) = "b"
+ │ ├── value:
+ │ │ @ CallNode (location: (1,8)-(1,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "c"
+ │ └── operator_loc: (1,6)-(1,7) = "="
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt b/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt
new file mode 100644
index 0000000000..c21348bc75
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,12))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── value:
+ │ @ ArrayNode (location: (1,4)-(1,12))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ CallNode (location: (1,4)-(1,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── @ SplatNode (location: (1,7)-(1,9))
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (1,8)-(1,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "d"
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/magic_encoding_comment.txt b/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
new file mode 100644
index 0000000000..969d318d39
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/magic_encoding_comment.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (2,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (2,0)-(3,3))
+ └── body: (length: 1)
+ └── @ ClassNode (location: (2,0)-(3,3))
+ ├── locals: []
+ ├── class_keyword_loc: (2,0)-(2,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (2,6)-(2,34))
+ │ └── name: :ExampleUTF8ClassNameVarietà
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body:
+ │ @ StatementsNode (location: (2,36)-(2,68))
+ │ └── body: (length: 1)
+ │ └── @ DefNode (location: (2,36)-(2,68))
+ │ ├── name: :è
+ │ ├── name_loc: (2,45)-(2,47) = "è"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (2,40)-(2,44))
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,49)-(2,63))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (2,49)-(2,63))
+ │ │ ├── name: :così
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (2,49)-(2,54) = "così"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (2,57)-(2,63))
+ │ │ │ ├── opening_loc: (2,57)-(2,58) = ":"
+ │ │ │ ├── value_loc: (2,58)-(2,63) = "però"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "però"
+ │ │ └── operator_loc: (2,55)-(2,56) = "="
+ │ ├── locals: [:così]
+ │ ├── def_keyword_loc: (2,36)-(2,39) = "def"
+ │ ├── operator_loc: (2,44)-(2,45) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (2,65)-(2,68) = "end"
+ ├── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── name: :ExampleUTF8ClassNameVarietà
diff --git a/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt
new file mode 100644
index 0000000000..3b0ff6e998
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,8))
+ ├── targets: (length: 2)
+ │ ├── @ MultiTargetNode (location: (1,0)-(1,1))
+ │ │ ├── targets: (length: 1)
+ │ │ │ └── @ SplatNode (location: (1,0)-(1,1))
+ │ │ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ └── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,5)-(1,6) = "="
+ └── value:
+ @ CallNode (location: (1,7)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt b/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt
new file mode 100644
index 0000000000..c09d215438
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,11))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ CallNode (location: (1,3)-(1,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── call_operator_loc: (1,4)-(1,6) = "::"
+ │ ├── message_loc: (1,6)-(1,7) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "c="
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,8)-(1,9) = "="
+ └── value:
+ @ CallNode (location: (1,10)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,10)-(1,11) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/masgn_arg_ident.txt b/test/prism/snapshots/seattlerb/masgn_arg_ident.txt
new file mode 100644
index 0000000000..670540bb20
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_arg_ident.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,10))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ CallNode (location: (1,3)-(1,6))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ ├── message_loc: (1,5)-(1,6) = "C"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "C="
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,7)-(1,8) = "="
+ └── value:
+ @ CallNode (location: (1,9)-(1,10))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,9)-(1,10) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt
new file mode 100644
index 0000000000..c0849099cd
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a, :b, :c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,12))
+ ├── targets: (length: 3)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── @ SplatNode (location: (1,3)-(1,5))
+ │ │ ├── operator_loc: (1,3)-(1,4) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
+ │ ├── name: :c
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ CallNode (location: (1,11)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,11)-(1,12) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/masgn_colon2.txt b/test/prism/snapshots/seattlerb/masgn_colon2.txt
new file mode 100644
index 0000000000..01cf2320fc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_colon2.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,14))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ ConstantPathTargetNode (location: (1,3)-(1,7))
+ │ ├── parent:
+ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,6)-(1,7))
+ │ │ └── name: :C
+ │ └── delimiter_loc: (1,4)-(1,6) = "::"
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,8)-(1,9) = "="
+ └── value:
+ @ ArrayNode (location: (1,10)-(1,14))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,13)-(1,14))
+ │ └── flags: decimal
+ ├── opening_loc: ∅
+ └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_colon3.txt b/test/prism/snapshots/seattlerb/masgn_colon3.txt
new file mode 100644
index 0000000000..1c97b15d23
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_colon3.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,15))
+ ├── targets: (length: 2)
+ │ ├── @ ConstantPathTargetNode (location: (1,0)-(1,3))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (1,2)-(1,3))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ │ └── @ ConstantPathTargetNode (location: (1,5)-(1,8))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,7)-(1,8))
+ │ │ └── name: :B
+ │ └── delimiter_loc: (1,5)-(1,7) = "::"
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ ArrayNode (location: (1,11)-(1,15))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,11)-(1,12))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,14)-(1,15))
+ │ └── flags: decimal
+ ├── opening_loc: ∅
+ └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_command_call.txt b/test/prism/snapshots/seattlerb/masgn_command_call.txt
new file mode 100644
index 0000000000..becf774546
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_command_call.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,10))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ SplatNode (location: (1,1)-(1,2))
+ │ ├── operator_loc: (1,1)-(1,2) = ","
+ │ └── expression: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,3)-(1,4) = "="
+ └── value:
+ @ CallNode (location: (1,5)-(1,10))
+ ├── receiver:
+ │ @ CallNode (location: (1,5)-(1,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── call_operator_loc: (1,6)-(1,7) = "."
+ ├── message_loc: (1,7)-(1,8) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,9)-(1,10))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,9)-(1,10))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/masgn_double_paren.txt b/test/prism/snapshots/seattlerb/masgn_double_paren.txt
new file mode 100644
index 0000000000..3dfb782975
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_double_paren.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,9))
+ ├── targets: (length: 1)
+ │ └── @ MultiTargetNode (location: (1,1)-(1,6))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,2)-(1,3))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (1,1)-(1,2) = "("
+ │ └── rparen_loc: (1,5)-(1,6) = ")"
+ ├── lparen_loc: (1,0)-(1,1) = "("
+ ├── rparen_loc: (1,6)-(1,7) = ")"
+ ├── operator_loc: (1,7)-(1,8) = "="
+ └── value:
+ @ CallNode (location: (1,8)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt b/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt
new file mode 100644
index 0000000000..49b717143b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,12))
+ ├── targets: (length: 1)
+ │ └── @ SplatNode (location: (1,0)-(1,2))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,3)-(1,4) = "="
+ └── value:
+ @ ArrayNode (location: (1,5)-(1,12))
+ ├── elements: (length: 3)
+ │ ├── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,11)-(1,12))
+ │ └── flags: decimal
+ ├── opening_loc: ∅
+ └── closing_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/masgn_paren.txt b/test/prism/snapshots/seattlerb/masgn_paren.txt
new file mode 100644
index 0000000000..4463b6ac19
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_paren.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,12))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── lparen_loc: (1,0)-(1,1) = "("
+ ├── rparen_loc: (1,5)-(1,6) = ")"
+ ├── operator_loc: (1,7)-(1,8) = "="
+ └── value:
+ @ CallNode (location: (1,9)-(1,12))
+ ├── receiver:
+ │ @ CallNode (location: (1,9)-(1,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,9)-(1,10) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "c"
+ ├── call_operator_loc: (1,10)-(1,11) = "."
+ ├── message_loc: (1,11)-(1,12) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/masgn_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_splat_arg.txt
new file mode 100644
index 0000000000..1c29fe51a5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_splat_arg.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,9))
+ ├── targets: (length: 2)
+ │ ├── @ MultiTargetNode (location: (1,0)-(1,2))
+ │ │ ├── targets: (length: 1)
+ │ │ │ └── @ SplatNode (location: (1,0)-(1,2))
+ │ │ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ └── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,6)-(1,7) = "="
+ └── value:
+ @ CallNode (location: (1,8)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt b/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt
new file mode 100644
index 0000000000..5274cda1b8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:a, :b, :c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,12))
+ ├── targets: (length: 3)
+ │ ├── @ MultiTargetNode (location: (1,0)-(1,2))
+ │ │ ├── targets: (length: 1)
+ │ │ │ └── @ SplatNode (location: (1,0)-(1,2))
+ │ │ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
+ │ ├── name: :c
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ CallNode (location: (1,11)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,11)-(1,12) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/masgn_star.txt b/test/prism/snapshots/seattlerb/masgn_star.txt
new file mode 100644
index 0000000000..f86b63fbd0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_star.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,5))
+ ├── targets: (length: 1)
+ │ └── @ SplatNode (location: (1,0)-(1,1))
+ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ └── expression: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,2)-(1,3) = "="
+ └── value:
+ @ IntegerNode (location: (1,4)-(1,5))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/masgn_var_star_var.txt b/test/prism/snapshots/seattlerb/masgn_var_star_var.txt
new file mode 100644
index 0000000000..7923a9e6f8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/masgn_var_star_var.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,11))
+ ├── targets: (length: 3)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── @ SplatNode (location: (1,3)-(1,4))
+ │ │ ├── operator_loc: (1,3)-(1,4) = "*"
+ │ │ └── expression: ∅
+ │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,8)-(1,9) = "="
+ └── value:
+ @ CallNode (location: (1,10)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,10)-(1,11) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt b/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt
new file mode 100644
index 0000000000..44ea4fec29
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,15))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,2)-(1,15))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,3)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ConstantPathOperatorWriteNode (location: (1,3)-(1,14))
+ │ │ ├── target:
+ │ │ │ @ ConstantPathNode (location: (1,3)-(1,7))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (1,3)-(1,4))
+ │ │ │ │ └── name: :B
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (1,6)-(1,7))
+ │ │ │ │ └── name: :C
+ │ │ │ └── delimiter_loc: (1,4)-(1,6) = "::"
+ │ │ ├── operator_loc: (1,8)-(1,10) = "*="
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (1,11)-(1,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,11)-(1,12) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "e"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "e"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "d"
+ │ │ └── operator: :*
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,14)-(1,15) = ")"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt
new file mode 100644
index 0000000000..356831f513
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "f"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,4)-(1,8))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,4)-(1,8))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,5)-(1,7) = "=>"
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt b/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt
new file mode 100644
index 0000000000..a7ac3c7b6f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "f"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── closing_loc: (1,6)-(1,7) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt
new file mode 100644
index 0000000000..6166ec0705
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: [:a, :b, :c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,14))
+ ├── targets: (length: 4)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ └── @ SplatNode (location: (1,9)-(1,10))
+ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ └── expression: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,11)-(1,12) = "="
+ └── value:
+ @ CallNode (location: (1,13)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,13)-(1,14) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/mlhs_back_splat.txt b/test/prism/snapshots/seattlerb/mlhs_back_splat.txt
new file mode 100644
index 0000000000..eb41fc6b87
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_back_splat.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: [:a, :b, :c, :s]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,15))
+ ├── targets: (length: 4)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ └── @ SplatNode (location: (1,9)-(1,11))
+ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ └── expression:
+ │ @ LocalVariableTargetNode (location: (1,10)-(1,11))
+ │ ├── name: :s
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,12)-(1,13) = "="
+ └── value:
+ @ CallNode (location: (1,14)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,14)-(1,15) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt
new file mode 100644
index 0000000000..76b312d65b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: [:x, :y, :z]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,14))
+ ├── targets: (length: 4)
+ │ ├── @ MultiTargetNode (location: (1,0)-(1,1))
+ │ │ ├── targets: (length: 1)
+ │ │ │ └── @ SplatNode (location: (1,0)-(1,1))
+ │ │ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ │ ├── name: :y
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,9)-(1,10))
+ │ ├── name: :z
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,11)-(1,12) = "="
+ └── value:
+ @ CallNode (location: (1,13)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,13)-(1,14) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/mlhs_front_splat.txt b/test/prism/snapshots/seattlerb/mlhs_front_splat.txt
new file mode 100644
index 0000000000..0fff95f49e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_front_splat.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: [:s, :x, :y, :z]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,15))
+ ├── targets: (length: 4)
+ │ ├── @ MultiTargetNode (location: (1,0)-(1,2))
+ │ │ ├── targets: (length: 1)
+ │ │ │ └── @ SplatNode (location: (1,0)-(1,2))
+ │ │ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (1,1)-(1,2))
+ │ │ │ ├── name: :s
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ └── rparen_loc: ∅
+ │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,7)-(1,8))
+ │ │ ├── name: :y
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,10)-(1,11))
+ │ ├── name: :z
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,12)-(1,13) = "="
+ └── value:
+ @ CallNode (location: (1,14)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,14)-(1,15) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/mlhs_keyword.txt b/test/prism/snapshots/seattlerb/mlhs_keyword.txt
new file mode 100644
index 0000000000..05cf9c9ce9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_keyword.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,4) = "!="
+ ├── opening_loc: (1,4)-(1,5) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,15))
+ │ └── arguments: (length: 2)
+ │ ├── @ TrueNode (location: (1,5)-(1,9))
+ │ └── @ TrueNode (location: (1,11)-(1,15))
+ ├── closing_loc: (1,15)-(1,16) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!="
diff --git a/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt
new file mode 100644
index 0000000000..b2448bc839
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: [:a, :b, :c, :x, :y, :z]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,23))
+ ├── targets: (length: 7)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ ├── @ SplatNode (location: (1,9)-(1,10))
+ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ └── expression: ∅
+ │ ├── @ LocalVariableTargetNode (location: (1,12)-(1,13))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,15)-(1,16))
+ │ │ ├── name: :y
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,18)-(1,19))
+ │ ├── name: :z
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,20)-(1,21) = "="
+ └── value:
+ @ CallNode (location: (1,22)-(1,23))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,22)-(1,23) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt b/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt
new file mode 100644
index 0000000000..704f9f1c80
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: [:a, :b, :c, :s, :x, :y, :z]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,24))
+ ├── targets: (length: 7)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ ├── @ SplatNode (location: (1,9)-(1,11))
+ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (1,10)-(1,11))
+ │ │ ├── name: :s
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,13)-(1,14))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (1,16)-(1,17))
+ │ │ ├── name: :y
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,19)-(1,20))
+ │ ├── name: :z
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,21)-(1,22) = "="
+ └── value:
+ @ CallNode (location: (1,23)-(1,24))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,23)-(1,24) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/mlhs_rescue.txt b/test/prism/snapshots/seattlerb/mlhs_rescue.txt
new file mode 100644
index 0000000000..d6e2f7a75f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/mlhs_rescue.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,18))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,3)-(1,4))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,5)-(1,6) = "="
+ └── value:
+ @ RescueModifierNode (location: (1,7)-(1,18))
+ ├── expression:
+ │ @ CallNode (location: (1,7)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,8) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "f"
+ ├── keyword_loc: (1,9)-(1,15) = "rescue"
+ └── rescue_expression:
+ @ IntegerNode (location: (1,16)-(1,18))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/module_comments.txt b/test/prism/snapshots/seattlerb/module_comments.txt
new file mode 100644
index 0000000000..2785187a29
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/module_comments.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (5,0)-(10,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (5,0)-(10,3))
+ └── body: (length: 1)
+ └── @ ModuleNode (location: (5,0)-(10,3))
+ ├── locals: []
+ ├── module_keyword_loc: (5,0)-(5,6) = "module"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (5,7)-(5,8))
+ │ └── name: :X
+ ├── body:
+ │ @ StatementsNode (location: (7,2)-(9,5))
+ │ └── body: (length: 1)
+ │ └── @ DefNode (location: (7,2)-(9,5))
+ │ ├── name: :blah
+ │ ├── name_loc: (7,6)-(7,10) = "blah"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,2)-(7,5) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (9,2)-(9,5) = "end"
+ ├── end_keyword_loc: (10,0)-(10,3) = "end"
+ └── name: :X
diff --git a/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
new file mode 100644
index 0000000000..5c7453727b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
@@ -0,0 +1,86 @@
+@ ProgramNode (location: (1,0)-(8,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,12))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(3,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(3,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,2)-(3,1))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,2)-(3,1))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,2)-(1,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,2)-(1,7) = "state"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
+ │ │ │ └── unescaped: "state"
+ │ │ ├── value:
+ │ │ │ @ HashNode (location: (2,1)-(3,1))
+ │ │ │ ├── opening_loc: (2,1)-(2,2) = "{"
+ │ │ │ ├── elements: (length: 0)
+ │ │ │ └── closing_loc: (3,0)-(3,1) = "}"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (3,1)-(3,2) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (5,0)-(6,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "f"
+ │ ├── opening_loc: (5,1)-(5,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(6,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (5,2)-(6,1))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,2)-(6,1))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,2)-(5,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (5,2)-(5,7) = "state"
+ │ │ │ ├── closing_loc: (5,7)-(5,8) = ":"
+ │ │ │ └── unescaped: "state"
+ │ │ ├── value:
+ │ │ │ @ HashNode (location: (5,9)-(6,1))
+ │ │ │ ├── opening_loc: (5,9)-(5,10) = "{"
+ │ │ │ ├── elements: (length: 0)
+ │ │ │ └── closing_loc: (6,0)-(6,1) = "}"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (6,1)-(6,2) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ └── @ CallNode (location: (8,0)-(8,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (8,0)-(8,1) = "f"
+ ├── opening_loc: (8,1)-(8,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (8,2)-(8,11))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (8,2)-(8,11))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (8,2)-(8,11))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (8,2)-(8,8))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (8,2)-(8,7) = "state"
+ │ │ ├── closing_loc: (8,7)-(8,8) = ":"
+ │ │ └── unescaped: "state"
+ │ ├── value:
+ │ │ @ HashNode (location: (8,9)-(8,11))
+ │ │ ├── opening_loc: (8,9)-(8,10) = "{"
+ │ │ ├── elements: (length: 0)
+ │ │ └── closing_loc: (8,10)-(8,11) = "}"
+ │ └── operator_loc: ∅
+ ├── closing_loc: (8,11)-(8,12) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt b/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt
new file mode 100644
index 0000000000..84da92544b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (2,0)-(2,1))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (3,0)-(3,1))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (3,0)-(3,1) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── opening_loc: (1,0)-(1,3) = "%i("
+ │ └── closing_loc: (4,0)-(4,1) = ")"
+ └── @ IntegerNode (location: (5,0)-(5,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt b/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt
new file mode 100644
index 0000000000..8e34057120
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(4,1))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (2,0)-(2,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ StringNode (location: (3,0)-(3,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,0)-(3,1) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── opening_loc: (1,0)-(1,3) = "%w("
+ │ └── closing_loc: (4,0)-(4,1) = ")"
+ └── @ IntegerNode (location: (5,0)-(5,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/op_asgn_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_command_call.txt
new file mode 100644
index 0000000000..d986eccdb9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_command_call.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ LocalVariableOrWriteNode (location: (1,0)-(1,11))
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── operator_loc: (1,2)-(1,5) = "||="
+ ├── value:
+ │ @ CallNode (location: (1,6)-(1,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── call_operator_loc: (1,7)-(1,8) = "."
+ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "c"
+ ├── name: :a
+ └── depth: 0
diff --git a/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt
new file mode 100644
index 0000000000..62853c9475
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOrWriteNode (location: (1,0)-(1,11))
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "B"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: ∅
+ ├── read_name: "B"
+ ├── write_name: "B="
+ ├── operator_loc: (1,4)-(1,7) = "||="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt
new file mode 100644
index 0000000000..33f094b849
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallOrWriteNode (location: (1,0)-(1,16))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,1)-(1,5) = "[:b]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ └── arguments: (length: 1)
+ │ └── @ SymbolNode (location: (1,2)-(1,4))
+ │ ├── opening_loc: (1,2)-(1,3) = ":"
+ │ ├── value_loc: (1,3)-(1,4) = "b"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "b"
+ ├── closing_loc: (1,4)-(1,5) = "]"
+ ├── flags: ∅
+ ├── read_name: "[]"
+ ├── write_name: "[]="
+ ├── operator_loc: (1,6)-(1,9) = "||="
+ └── value:
+ @ CallNode (location: (1,10)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,10)-(1,11) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,12)-(1,16))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,12)-(1,13))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,15)-(1,16))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt
new file mode 100644
index 0000000000..81568afe4b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ ConstantPathOperatorWriteNode (location: (1,0)-(1,11))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,4))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ │ └── name: :A
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,3)-(1,4))
+ │ │ └── name: :B
+ │ └── delimiter_loc: (1,1)-(1,3) = "::"
+ ├── operator_loc: (1,5)-(1,7) = "*="
+ ├── value:
+ │ @ CallNode (location: (1,8)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,10)-(1,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,10)-(1,11) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "d"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "c"
+ └── operator: :*
diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt
new file mode 100644
index 0000000000..f03c9057a3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,9))
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: ∅
+ ├── read_name: "b"
+ ├── write_name: "b="
+ ├── operator: :+
+ ├── operator_loc: (1,5)-(1,7) = "+="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,9))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt
new file mode 100644
index 0000000000..addc999eec
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,11))
+ ├── receiver:
+ │ @ ConstantReadNode (location: (1,0)-(1,1))
+ │ └── name: :A
+ ├── call_operator_loc: (1,1)-(1,3) = "::"
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: ∅
+ ├── read_name: "b"
+ ├── write_name: "b="
+ ├── operator: :*
+ ├── operator_loc: (1,5)-(1,7) = "*="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,10)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,10)-(1,11) = "d"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "d"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt
new file mode 100644
index 0000000000..e6c9d1efd4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt
@@ -0,0 +1,41 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOrWriteNode (location: (1,0)-(1,11))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: ∅
+ ├── read_name: "b"
+ ├── write_name: "b="
+ ├── operator_loc: (1,4)-(1,7) = "||="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "c"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_def_special_name.txt b/test/prism/snapshots/seattlerb/parse_def_special_name.txt
new file mode 100644
index 0000000000..dfbfe8a391
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_def_special_name.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,13))
+ ├── name: :next
+ ├── name_loc: (1,4)-(1,8) = "next"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt
new file mode 100644
index 0000000000..a8c1aede4a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(2,3))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (1,3)-(1,15))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,7)-(1,15))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var"
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── message_loc: (1,11)-(1,15) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "nil?"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,3)-(1,6) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── statements:
+ │ @ StatementsNode (location: (1,21)-(1,26))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (1,21)-(1,26))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,21)-(1,22) = "'"
+ │ ├── content_loc: (1,22)-(1,25) = "foo"
+ │ ├── closing_loc: (1,25)-(1,26) = "'"
+ │ └── unescaped: "foo"
+ ├── consequent:
+ │ @ ElseNode (location: (1,27)-(2,3))
+ │ ├── else_keyword_loc: (1,27)-(1,31) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,32)-(1,37))
+ │ │ └── body: (length: 1)
+ │ │ └── @ StringNode (location: (1,32)-(1,37))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,32)-(1,33) = "'"
+ │ │ ├── content_loc: (1,33)-(1,36) = "bar"
+ │ │ ├── closing_loc: (1,36)-(1,37) = "'"
+ │ │ └── unescaped: "bar"
+ │ └── end_keyword_loc: (2,0)-(2,3) = "end"
+ └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt
new file mode 100644
index 0000000000..a8c1aede4a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(2,3))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (1,3)-(1,15))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,7)-(1,15))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var"
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── message_loc: (1,11)-(1,15) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "nil?"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,3)-(1,6) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── statements:
+ │ @ StatementsNode (location: (1,21)-(1,26))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (1,21)-(1,26))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,21)-(1,22) = "'"
+ │ ├── content_loc: (1,22)-(1,25) = "foo"
+ │ ├── closing_loc: (1,25)-(1,26) = "'"
+ │ └── unescaped: "foo"
+ ├── consequent:
+ │ @ ElseNode (location: (1,27)-(2,3))
+ │ ├── else_keyword_loc: (1,27)-(1,31) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,32)-(1,37))
+ │ │ └── body: (length: 1)
+ │ │ └── @ StringNode (location: (1,32)-(1,37))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,32)-(1,33) = "'"
+ │ │ ├── content_loc: (1,33)-(1,36) = "bar"
+ │ │ ├── closing_loc: (1,36)-(1,37) = "'"
+ │ │ └── unescaped: "bar"
+ │ └── end_keyword_loc: (2,0)-(2,3) = "end"
+ └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_block.txt b/test/prism/snapshots/seattlerb/parse_line_block.txt
new file mode 100644
index 0000000000..f75ed80127
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_block.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 2)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,6))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,1) = "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,4)-(1,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,2)-(1,3) = "="
+ └── @ CallNode (location: (2,0)-(2,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (2,0)-(2,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (2,2)-(2,3))
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt
new file mode 100644
index 0000000000..0cae7d514b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(3,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,1))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── @ CallNode (location: (2,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ └── @ CallNode (location: (3,0)-(3,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt
new file mode 100644
index 0000000000..5bb55d0f6a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (4,0)-(7,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (4,0)-(7,1))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (4,0)-(4,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,0)-(4,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── @ CallNode (location: (5,0)-(5,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ └── @ CallNode (location: (7,0)-(7,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (7,0)-(7,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt
new file mode 100644
index 0000000000..2aa469b88c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(4,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,1))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── @ CallNode (location: (2,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,1) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ └── @ CallNode (location: (4,0)-(4,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (4,0)-(4,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt b/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt
new file mode 100644
index 0000000000..a70dee6c7c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ └── arguments: (length: 1)
+ │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4))
+ │ └── name: :@b
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt b/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt
new file mode 100644
index 0000000000..9aa87bb1b7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ └── arguments: (length: 1)
+ │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4))
+ │ └── name: :@b
+ ├── closing_loc: (2,0)-(2,1) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
new file mode 100644
index 0000000000..cc71f259bf
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,2)-(3,3))
+ │ ├── locals: [:x, :y]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,5)-(1,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,6)-(1,10))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ │ │ │ └── name: :x
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ └── name: :y
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,5)-(1,6) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,4)-(2,5) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,6)-(2,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
+ │ │ │ ├── name: :y
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── opening_loc: (1,2)-(1,4) = "do"
+ │ └── closing_loc: (3,0)-(3,3) = "end"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
new file mode 100644
index 0000000000..f2fa55fb2d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt
@@ -0,0 +1,62 @@
+@ ProgramNode (location: (1,0)-(5,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(5,3))
+ ├── name: :x
+ ├── name_loc: (1,4)-(1,5) = "x"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,7))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ └── name: :y
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (2,2)-(4,10))
+ │ └── body: (length: 3)
+ │ ├── @ CallNode (location: (2,2)-(2,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,3) = "p"
+ │ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (2,4)-(2,5))
+ │ │ │ ├── name: :y
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: (2,5)-(2,6) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "p"
+ │ ├── @ LocalVariableOperatorWriteNode (location: (3,2)-(3,8))
+ │ │ ├── name_loc: (3,2)-(3,3) = "y"
+ │ │ ├── operator_loc: (3,4)-(3,6) = "*="
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,7)-(3,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── name: :y
+ │ │ ├── operator: :*
+ │ │ └── depth: 0
+ │ └── @ ReturnNode (location: (4,2)-(4,10))
+ │ ├── keyword_loc: (4,2)-(4,8) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (4,9)-(4,10))
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (4,9)-(4,10))
+ │ ├── name: :y
+ │ └── depth: 0
+ ├── locals: [:y]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,7)-(1,8) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (5,0)-(5,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt
new file mode 100644
index 0000000000..74240322ac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(3,3))
+ │ ├── name: :f
+ │ ├── name_loc: (1,4)-(1,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── @ DefNode (location: (5,0)-(6,3))
+ ├── name: :f
+ ├── name_loc: (5,4)-(5,5) = "f"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (6,0)-(6,3) = "end"
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
new file mode 100644
index 0000000000..d19fa698f6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_defn_no_parens_args.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(2,3))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,7))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7))
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot2.txt b/test/prism/snapshots/seattlerb/parse_line_dot2.txt
new file mode 100644
index 0000000000..3c2cd7a8ca
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot2.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(2,1))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (2,0)-(2,1))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (1,1)-(1,3) = ".."
+ │ └── flags: ∅
+ ├── @ RangeNode (location: (3,0)-(4,1))
+ │ ├── left:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── right:
+ │ │ @ CallNode (location: (4,0)-(4,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,0)-(4,1) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── operator_loc: (3,1)-(3,3) = ".."
+ │ └── flags: ∅
+ └── @ CallNode (location: (5,0)-(5,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt b/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt
new file mode 100644
index 0000000000..03183f59b1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,3))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ └── flags: decimal
+ │ ├── right: ∅
+ │ ├── operator_loc: (1,1)-(1,3) = ".."
+ │ └── flags: ∅
+ ├── @ RangeNode (location: (2,2)-(2,5))
+ │ ├── left:
+ │ │ @ CallNode (location: (2,2)-(2,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── right: ∅
+ │ ├── operator_loc: (2,3)-(2,5) = ".."
+ │ └── flags: ∅
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot3.txt b/test/prism/snapshots/seattlerb/parse_line_dot3.txt
new file mode 100644
index 0000000000..cb6d394d76
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot3.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(5,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,1))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(2,1))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (2,0)-(2,1))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (1,1)-(1,4) = "..."
+ │ └── flags: exclude_end
+ ├── @ RangeNode (location: (3,0)-(4,1))
+ │ ├── left:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── right:
+ │ │ @ CallNode (location: (4,0)-(4,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,0)-(4,1) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── operator_loc: (3,1)-(3,4) = "..."
+ │ └── flags: exclude_end
+ └── @ CallNode (location: (5,0)-(5,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,1) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt b/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt
new file mode 100644
index 0000000000..ec9b0f8f82
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 3)
+ ├── @ RangeNode (location: (1,0)-(1,4))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ └── flags: decimal
+ │ ├── right: ∅
+ │ ├── operator_loc: (1,1)-(1,4) = "..."
+ │ └── flags: exclude_end
+ ├── @ RangeNode (location: (2,2)-(2,6))
+ │ ├── left:
+ │ │ @ CallNode (location: (2,2)-(2,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── right: ∅
+ │ ├── operator_loc: (2,3)-(2,6) = "..."
+ │ └── flags: exclude_end
+ └── @ CallNode (location: (3,2)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,2)-(3,3) = "c"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt b/test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt
new file mode 100644
index 0000000000..e135d31a25
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dstr_escaped_newline.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ InterpolatedStringNode (location: (1,0)-(2,2))
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (1,1)-(1,4) = "a\\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ EmbeddedStatementsNode (location: (1,4)-(2,1))
+ │ │ ├── opening_loc: (1,4)-(1,6) = "\#{"
+ │ │ ├── statements: ∅
+ │ │ └── closing_loc: (2,0)-(2,1) = "}"
+ │ └── closing_loc: (2,1)-(2,2) = "\""
+ └── @ TrueNode (location: (3,0)-(3,4))
diff --git a/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt b/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt
new file mode 100644
index 0000000000..6f881c15f9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(4,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,4))
+ └── body: (length: 2)
+ ├── @ InterpolatedStringNode (location: (1,0)-(3,2))
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (1,1)-(1,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (1,1)-(1,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── @ EmbeddedStatementsNode (location: (2,0)-(3,1))
+ │ │ ├── opening_loc: (2,0)-(2,2) = "\#{"
+ │ │ ├── statements: ∅
+ │ │ └── closing_loc: (3,0)-(3,1) = "}"
+ │ └── closing_loc: (3,1)-(3,2) = "\""
+ └── @ TrueNode (location: (4,0)-(4,4))
diff --git a/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt b/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt
new file mode 100644
index 0000000000..931556aabc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(2,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,6))
+ └── body: (length: 1)
+ └── @ StringConcatNode (location: (1,0)-(2,6))
+ ├── left:
+ │ @ StringNode (location: (1,0)-(1,3))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(1,2) = "a"
+ │ ├── closing_loc: (1,2)-(1,3) = "\""
+ │ └── unescaped: "a"
+ └── right:
+ @ InterpolatedStringNode (location: (2,0)-(2,6))
+ ├── opening_loc: (2,0)-(2,1) = "\""
+ ├── parts: (length: 1)
+ │ └── @ EmbeddedStatementsNode (location: (2,1)-(2,5))
+ │ ├── opening_loc: (2,1)-(2,3) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,3)-(2,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,3)-(2,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,3)-(2,4) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── closing_loc: (2,4)-(2,5) = "}"
+ └── closing_loc: (2,5)-(2,6) = "\""
diff --git a/test/prism/snapshots/seattlerb/parse_line_hash_lit.txt b/test/prism/snapshots/seattlerb/parse_line_hash_lit.txt
new file mode 100644
index 0000000000..b29f36bf22
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_hash_lit.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(3,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,1))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(3,1))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (2,0)-(2,8))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (2,0)-(2,3))
+ │ │ ├── opening_loc: (2,0)-(2,1) = ":"
+ │ │ ├── value_loc: (2,1)-(2,3) = "s1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "s1"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (2,7)-(2,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (2,4)-(2,6) = "=>"
+ └── closing_loc: (3,0)-(3,1) = "}"
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt
new file mode 100644
index 0000000000..47a4f82f16
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,6)-(4,17))
+├── locals: [:string]
+└── statements:
+ @ StatementsNode (location: (1,6)-(4,17))
+ └── body: (length: 2)
+ ├── @ LocalVariableWriteNode (location: (1,6)-(1,31))
+ │ ├── name: :string
+ │ ├── depth: 0
+ │ ├── name_loc: (1,6)-(1,12) = "string"
+ │ ├── value:
+ │ │ @ CallNode (location: (1,15)-(1,31))
+ │ │ ├── receiver:
+ │ │ │ @ StringNode (location: (1,15)-(1,25))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,15)-(1,25) = "<<-HEREDOC"
+ │ │ │ ├── content_loc: (2,0)-(2,0) = " very long string\n"
+ │ │ │ ├── closing_loc: (3,0)-(3,0) = " HEREDOC\n"
+ │ │ │ └── unescaped: " very long string\n"
+ │ │ ├── call_operator_loc: (1,25)-(1,26) = "."
+ │ │ ├── message_loc: (1,26)-(1,31) = "strip"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "strip"
+ │ └── operator_loc: (1,13)-(1,14) = "="
+ └── @ CallNode (location: (4,6)-(4,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (4,6)-(4,10) = "puts"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (4,11)-(4,17))
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (4,11)-(4,17))
+ │ ├── name: :string
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "puts"
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt
new file mode 100644
index 0000000000..d32f4fa7a1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,4))
+ ├── opening_loc: (1,0)-(1,4) = "<<-A"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (2,0)-(2,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(2,0) = "a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\n"
+ │ ├── @ EmbeddedStatementsNode (location: (3,0)-(3,4))
+ │ │ ├── opening_loc: (3,0)-(3,2) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,2)-(3,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── closing_loc: (3,3)-(3,4) = "}"
+ │ └── @ StringNode (location: (3,4)-(3,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (3,4)-(3,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (4,0)-(4,0) = "A\n"
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt
new file mode 100644
index 0000000000..230de59dd6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(1,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,8) = "<<-EOFOO"
+ │ ├── content_loc: (2,0)-(2,0) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\n"
+ │ ├── closing_loc: (3,0)-(3,0) = "EOFOO\n"
+ │ └── unescaped: "\n\n\n\n\n\n\n\n\n\n"
+ └── @ ClassNode (location: (5,0)-(6,3))
+ ├── locals: []
+ ├── class_keyword_loc: (5,0)-(5,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (5,6)-(5,9))
+ │ └── name: :Foo
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body: ∅
+ ├── end_keyword_loc: (6,0)-(6,3) = "end"
+ └── name: :Foo
diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt
new file mode 100644
index 0000000000..f351c424f0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,6)-(4,17))
+├── locals: [:string]
+└── statements:
+ @ StatementsNode (location: (1,6)-(4,17))
+ └── body: (length: 2)
+ ├── @ LocalVariableWriteNode (location: (1,6)-(1,22))
+ │ ├── name: :string
+ │ ├── depth: 0
+ │ ├── name_loc: (1,6)-(1,12) = "string"
+ │ ├── value:
+ │ │ @ StringNode (location: (1,15)-(1,22))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,15)-(1,22) = "<<-\"^D\""
+ │ │ ├── content_loc: (2,0)-(2,0) = " very long string\n"
+ │ │ ├── closing_loc: (3,0)-(3,0) = " ^D\n"
+ │ │ └── unescaped: " very long string\n"
+ │ └── operator_loc: (1,13)-(1,14) = "="
+ └── @ CallNode (location: (4,6)-(4,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (4,6)-(4,10) = "puts"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (4,11)-(4,17))
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (4,11)-(4,17))
+ │ ├── name: :string
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "puts"
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
new file mode 100644
index 0000000000..f4c6adaf93
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt
@@ -0,0 +1,70 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,4)-(3,3))
+ │ ├── locals: [:x, :y]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,7)-(1,13))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,8)-(1,12))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,8)-(1,9))
+ │ │ │ │ │ └── name: :x
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
+ │ │ │ │ └── name: :y
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,7)-(1,8) = "|"
+ │ │ └── closing_loc: (1,12)-(1,13) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,4)-(2,5) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,6)-(2,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
+ │ │ │ ├── name: :y
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ └── closing_loc: (3,0)-(3,3) = "end"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
new file mode 100644
index 0000000000..f5240a5534
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt
@@ -0,0 +1,70 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── closing_loc: (1,3)-(1,4) = ")"
+ ├── block:
+ │ @ BlockNode (location: (1,5)-(3,3))
+ │ ├── locals: [:x, :y]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,8)-(1,14))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,9)-(1,13))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ │ └── name: :x
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13))
+ │ │ │ │ └── name: :y
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,8)-(1,9) = "|"
+ │ │ └── closing_loc: (1,13)-(1,14) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,4)-(2,5) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,6)-(2,7))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7))
+ │ │ │ ├── name: :y
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ └── closing_loc: (3,0)-(3,3) = "end"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/seattlerb/parse_line_multiline_str.txt b/test/prism/snapshots/seattlerb/parse_line_multiline_str.txt
new file mode 100644
index 0000000000..fa8c491047
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_multiline_str.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(3,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,1))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(2,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(2,1) = "a\nb"
+ │ ├── closing_loc: (2,1)-(2,2) = "\""
+ │ └── unescaped: "a\nb"
+ └── @ IntegerNode (location: (3,0)-(3,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt b/test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt
new file mode 100644
index 0000000000..c72b516baa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_multiline_str_literal_n.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(1,5) = "a\\nb"
+ │ ├── closing_loc: (1,5)-(1,6) = "\""
+ │ └── unescaped: "a\nb"
+ └── @ IntegerNode (location: (2,0)-(2,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/parse_line_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_newlines.txt
new file mode 100644
index 0000000000..3e1ceef586
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_newlines.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ TrueNode (location: (1,0)-(1,4))
diff --git a/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt b/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt
new file mode 100644
index 0000000000..e10f376dac
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,6)-(3,9))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,6)-(3,9))
+ └── body: (length: 2)
+ ├── @ LocalVariableOperatorWriteNode (location: (1,6)-(2,11))
+ │ ├── name_loc: (1,6)-(1,9) = "foo"
+ │ ├── operator_loc: (1,10)-(1,12) = "+="
+ │ ├── value:
+ │ │ @ CallNode (location: (2,8)-(2,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,8)-(2,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── name: :foo
+ │ ├── operator: :+
+ │ └── depth: 0
+ └── @ CallNode (location: (3,6)-(3,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,6)-(3,9) = "baz"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "baz"
diff --git a/test/prism/snapshots/seattlerb/parse_line_postexe.txt b/test/prism/snapshots/seattlerb/parse_line_postexe.txt
new file mode 100644
index 0000000000..507fba834b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_postexe.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(3,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,1))
+ └── body: (length: 1)
+ └── @ PostExecutionNode (location: (1,0)-(3,1))
+ ├── statements:
+ │ @ StatementsNode (location: (2,0)-(2,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,0)-(2,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── keyword_loc: (1,0)-(1,3) = "END"
+ ├── opening_loc: (1,4)-(1,5) = "{"
+ └── closing_loc: (3,0)-(3,1) = "}"
diff --git a/test/prism/snapshots/seattlerb/parse_line_preexe.txt b/test/prism/snapshots/seattlerb/parse_line_preexe.txt
new file mode 100644
index 0000000000..3b2f75fdd0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_preexe.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(3,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,1))
+ └── body: (length: 1)
+ └── @ PreExecutionNode (location: (1,0)-(3,1))
+ ├── statements:
+ │ @ StatementsNode (location: (2,0)-(2,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,0)-(2,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── keyword_loc: (1,0)-(1,5) = "BEGIN"
+ ├── opening_loc: (1,6)-(1,7) = "{"
+ └── closing_loc: (3,0)-(3,1) = "}"
diff --git a/test/prism/snapshots/seattlerb/parse_line_rescue.txt b/test/prism/snapshots/seattlerb/parse_line_rescue.txt
new file mode 100644
index 0000000000..4b4de20405
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_rescue.txt
@@ -0,0 +1,62 @@
+@ ProgramNode (location: (1,0)-(7,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,3))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(7,3))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(2,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,2)-(2,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (3,0)-(6,3))
+ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (4,2)-(4,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (4,2)-(4,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,2)-(4,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── consequent:
+ │ @ RescueNode (location: (5,0)-(6,3))
+ │ ├── keyword_loc: (5,0)-(5,6) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (6,2)-(6,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (6,2)-(6,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,2)-(6,3) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (7,0)-(7,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_return.txt b/test/prism/snapshots/seattlerb/parse_line_return.txt
new file mode 100644
index 0000000000..129b96d837
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_return.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,6)-(5,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,6)-(5,9))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,6)-(5,9))
+ ├── name: :blah
+ ├── name_loc: (1,10)-(1,14) = "blah"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (2,8)-(4,11))
+ │ └── body: (length: 1)
+ │ └── @ IfNode (location: (2,8)-(4,11))
+ │ ├── if_keyword_loc: (2,8)-(2,10) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (2,11)-(2,15))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,10)-(3,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (3,10)-(3,19))
+ │ │ ├── keyword_loc: (3,10)-(3,16) = "return"
+ │ │ └── arguments:
+ │ │ @ ArgumentsNode (location: (3,17)-(3,19))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,17)-(3,19))
+ │ │ └── flags: decimal
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (4,8)-(4,11) = "end"
+ ├── locals: []
+ ├── def_keyword_loc: (1,6)-(1,9) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (5,6)-(5,9) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt b/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt
new file mode 100644
index 0000000000..29f76ea9ba
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: (1,1)-(1,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,12))
+ │ └── arguments: (length: 2)
+ │ ├── @ StringNode (location: (1,2)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ ├── content_loc: (1,3)-(1,5) = "\\n"
+ │ │ ├── closing_loc: (1,5)-(1,6) = "\""
+ │ │ └── unescaped: "\n"
+ │ └── @ TrueNode (location: (1,8)-(1,12))
+ ├── closing_loc: (1,12)-(1,13) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/parse_line_to_ary.txt b/test/prism/snapshots/seattlerb/parse_line_to_ary.txt
new file mode 100644
index 0000000000..dffbdcbcd0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_to_ary.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(3,1))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,1))
+ └── body: (length: 2)
+ ├── @ MultiWriteNode (location: (1,0)-(2,5))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,1))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (2,0)-(2,1))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (2,2)-(2,3) = "="
+ │ └── value:
+ │ @ CallNode (location: (2,4)-(2,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,4)-(2,5) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "c"
+ └── @ CallNode (location: (3,0)-(3,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,1) = "d"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "d"
diff --git a/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt
new file mode 100644
index 0000000000..cd019a3045
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ └── @ CallNode (location: (2,0)-(2,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (2,0)-(2,1) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt b/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt
new file mode 100644
index 0000000000..b831cc094a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,1)-(1,8) = "[2=>3,]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,2)-(1,6))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,6))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,3)-(1,5) = "=>"
+ ├── closing_loc: (1,7)-(1,8) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt b/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt
new file mode 100644
index 0000000000..9e61b425fc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,1)-(1,5) = "[2,]"
+ ├── opening_loc: (1,1)-(1,2) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,3))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,2)-(1,3))
+ │ └── flags: decimal
+ ├── closing_loc: (1,4)-(1,5) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_019.txt b/test/prism/snapshots/seattlerb/parse_pattern_019.txt
new file mode 100644
index 0000000000..e3bf981ded
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_019.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,6))
+ │ ├── pattern:
+ │ │ @ RangeNode (location: (2,3)-(2,8))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (2,3)-(2,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ IntegerNode (location: (2,7)-(2,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── operator_loc: (2,5)-(2,7) = ".."
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ TrueNode (location: (3,2)-(3,6))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_044.txt b/test/prism/snapshots/seattlerb/parse_pattern_044.txt
new file mode 100644
index 0000000000..6d4dee139c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_044.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "obj"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "obj"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,6))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,11))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (2,3)-(2,9))
+ │ │ │ └── name: :Object
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,9)-(2,10) = "["
+ │ │ └── closing_loc: (2,10)-(2,11) = "]"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ TrueNode (location: (3,2)-(3,6))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_051.txt b/test/prism/snapshots/seattlerb/parse_pattern_051.txt
new file mode 100644
index 0000000000..5d95d71701
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_051.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,5)-(1,14))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,5)-(1,6) = "["
+ │ └── closing_loc: (1,13)-(1,14) = "]"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,6))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,3)-(2,10))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (2,4)-(2,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (2,7)-(2,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,3)-(2,4) = "["
+ │ │ └── closing_loc: (2,9)-(2,10) = "]"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ TrueNode (location: (3,2)-(3,6))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058.txt b/test/prism/snapshots/seattlerb/parse_pattern_058.txt
new file mode 100644
index 0000000000..15010ca250
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_058.txt
@@ -0,0 +1,64 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:a, :rest]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ HashNode (location: (1,5)-(1,11))
+ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,6)-(1,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,11))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,15))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocSplatNode (location: (2,8)-(2,14))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,14))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,3)-(2,4) = "{"
+ │ │ └── closing_loc: (2,14)-(2,15) = "}"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ArrayNode (location: (3,2)-(3,11))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ LocalVariableReadNode (location: (3,3)-(3,4))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableReadNode (location: (3,6)-(3,10))
+ │ │ │ ├── name: :rest
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (3,2)-(3,3) = "["
+ │ │ └── closing_loc: (3,10)-(3,11) = "]"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
new file mode 100644
index 0000000000..dc89fc3640
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ HashNode (location: (1,5)-(1,11))
+ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,6)-(1,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,5))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,11))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocSplatNode (location: (2,8)-(2,10))
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,3)-(2,4) = "{"
+ │ │ └── closing_loc: (2,10)-(2,11) = "}"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ArrayNode (location: (3,2)-(3,5))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (3,3)-(3,4))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (3,2)-(3,3) = "["
+ │ │ └── closing_loc: (3,4)-(3,5) = "]"
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_069.txt b/test/prism/snapshots/seattlerb/parse_pattern_069.txt
new file mode 100644
index 0000000000..4d1e51e3f4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_069.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ SymbolNode (location: (1,5)-(1,7))
+ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,3))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,15))
+ │ │ ├── constant:
+ │ │ │ @ ConstantReadNode (location: (2,3)-(2,9))
+ │ │ │ └── name: :Object
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,10)-(2,14))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,10)-(2,12))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,10)-(2,11) = "b"
+ │ │ │ │ ├── closing_loc: (2,11)-(2,12) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (2,13)-(2,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,9)-(2,10) = "["
+ │ │ └── closing_loc: (2,14)-(2,15) = "]"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,2)-(3,3))
+ │ │ └── flags: decimal
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_076.txt b/test/prism/snapshots/seattlerb/parse_pattern_076.txt
new file mode 100644
index 0000000000..bce1fdce96
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_pattern_076.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(4,3))
+ ├── predicate:
+ │ @ HashNode (location: (1,5)-(1,11))
+ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,6)-(1,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,6)-(1,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,0)-(3,6))
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,3)-(2,16))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (2,4)-(2,8))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ IntegerNode (location: (2,7)-(2,8))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ NoKeywordsParameterNode (location: (2,10)-(2,15))
+ │ │ │ ├── operator_loc: (2,10)-(2,12) = "**"
+ │ │ │ └── keyword_loc: (2,12)-(2,15) = "nil"
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: (2,3)-(2,4) = "{"
+ │ │ └── closing_loc: (2,15)-(2,16) = "}"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,2)-(3,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ TrueNode (location: (3,2)-(3,6))
+ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt
new file mode 100644
index 0000000000..a6f6be9789
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ UntilNode (location: (1,0)-(3,3))
+ ├── keyword_loc: (1,0)-(1,5) = "until"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var"
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "nil?"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (2,2)-(2,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (2,2)-(2,3) = "'"
+ │ ├── content_loc: (2,3)-(2,6) = "foo"
+ │ ├── closing_loc: (2,6)-(2,7) = "'"
+ │ └── unescaped: "foo"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt
new file mode 100644
index 0000000000..a6f6be9789
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ UntilNode (location: (1,0)-(3,3))
+ ├── keyword_loc: (1,0)-(1,5) = "until"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var"
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "nil?"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (2,2)-(2,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (2,2)-(2,3) = "'"
+ │ ├── content_loc: (2,3)-(2,6) = "foo"
+ │ ├── closing_loc: (2,6)-(2,7) = "'"
+ │ └── unescaped: "foo"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt
new file mode 100644
index 0000000000..d96f4018d7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ WhileNode (location: (1,0)-(3,3))
+ ├── keyword_loc: (1,0)-(1,5) = "while"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var"
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "nil?"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (2,2)-(2,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (2,2)-(2,3) = "'"
+ │ ├── content_loc: (2,3)-(2,6) = "foo"
+ │ ├── closing_loc: (2,6)-(2,7) = "'"
+ │ └── unescaped: "foo"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt
new file mode 100644
index 0000000000..d96f4018d7
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ WhileNode (location: (1,0)-(3,3))
+ ├── keyword_loc: (1,0)-(1,5) = "while"
+ ├── closing_loc: (3,0)-(3,3) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,18))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,10)-(1,13) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var"
+ │ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ │ ├── message_loc: (1,14)-(1,18) = "nil?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "nil?"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── statements:
+ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (2,2)-(2,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (2,2)-(2,3) = "'"
+ │ ├── content_loc: (2,3)-(2,6) = "foo"
+ │ ├── closing_loc: (2,6)-(2,7) = "'"
+ │ └── unescaped: "foo"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/pctW_lineno.txt b/test/prism/snapshots/seattlerb/pctW_lineno.txt
new file mode 100644
index 0000000000..468150529d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pctW_lineno.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(5,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(5,11))
+ ├── elements: (length: 7)
+ │ ├── @ StringNode (location: (1,3)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,3)-(1,7) = "a\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\nb"
+ │ ├── @ StringNode (location: (2,0)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,0)-(2,1) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── @ StringNode (location: (2,2)-(2,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (2,2)-(2,3) = "d"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d"
+ │ ├── @ StringNode (location: (3,0)-(4,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,0)-(4,1) = "e\\\nf"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "ef"
+ │ ├── @ StringNode (location: (5,0)-(5,2))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (5,0)-(5,2) = "gy"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "gy"
+ │ ├── @ StringNode (location: (5,3)-(5,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (5,3)-(5,6) = "h\\y"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "hy"
+ │ └── @ StringNode (location: (5,7)-(5,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (5,7)-(5,10) = "i\\y"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "iy"
+ ├── opening_loc: (1,0)-(1,3) = "%W("
+ └── closing_loc: (5,10)-(5,11) = ")"
diff --git a/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt b/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt
new file mode 100644
index 0000000000..02830644e3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(2,1))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,3) = "%q{"
+ ├── content_loc: (1,3)-(1,0) = " \\\n"
+ ├── closing_loc: (2,0)-(2,1) = "}"
+ └── unescaped: " \\\n"
diff --git a/test/prism/snapshots/seattlerb/pct_nl.txt b/test/prism/snapshots/seattlerb/pct_nl.txt
new file mode 100644
index 0000000000..147f8d4ce8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pct_nl.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(2,0))
+├── locals: [:x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,0))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(2,0))
+ ├── name: :x
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "x"
+ ├── value:
+ │ @ StringNode (location: (1,4)-(2,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,4)-(1,0) = "%\n"
+ │ ├── content_loc: (2,0)-(1,0) = ""
+ │ ├── closing_loc: (2,0)-(2,0) = "\n"
+ │ └── unescaped: ""
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt
new file mode 100644
index 0000000000..0b1fd48eca
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(4,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(4,11))
+ ├── elements: (length: 5)
+ │ ├── @ StringNode (location: (1,4)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,4)-(1,5) = "1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "1"
+ │ ├── @ InterpolatedStringNode (location: (1,6)-(1,12))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 1)
+ │ │ │ └── @ EmbeddedStatementsNode (location: (1,6)-(1,12))
+ │ │ │ ├── opening_loc: (1,6)-(1,8) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,8)-(1,11))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (1,8)-(1,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (1,8)-(1,11) = "<<A"
+ │ │ │ │ ├── content_loc: (2,0)-(2,0) = "2\n"
+ │ │ │ │ ├── closing_loc: (3,0)-(3,0) = "A\n"
+ │ │ │ │ └── unescaped: "2\n"
+ │ │ │ └── closing_loc: (1,11)-(1,12) = "}"
+ │ │ └── closing_loc: ∅
+ │ ├── @ StringNode (location: (1,13)-(1,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,13)-(1,14) = "3"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "3"
+ │ ├── @ StringNode (location: (4,6)-(4,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (4,6)-(4,7) = "4"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "4"
+ │ └── @ StringNode (location: (4,8)-(4,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (4,8)-(4,9) = "5"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "5"
+ ├── opening_loc: (1,0)-(1,3) = "%W("
+ └── closing_loc: (4,10)-(4,11) = ")"
diff --git a/test/prism/snapshots/seattlerb/pipe_semicolon.txt b/test/prism/snapshots/seattlerb/pipe_semicolon.txt
new file mode 100644
index 0000000000..a102fdd0a1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pipe_semicolon.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,18))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,4)-(1,18))
+ │ ├── locals: [:c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,7)-(1,14))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 1)
+ │ │ │ └── @ BlockLocalVariableNode (location: (1,11)-(1,12))
+ │ │ │ └── name: :c
+ │ │ ├── opening_loc: (1,7)-(1,8) = "|"
+ │ │ └── closing_loc: (1,13)-(1,14) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ └── closing_loc: (1,15)-(1,18) = "end"
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/pipe_space.txt b/test/prism/snapshots/seattlerb/pipe_space.txt
new file mode 100644
index 0000000000..7f3738fd5d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/pipe_space.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,2) = "."
+ ├── message_loc: (1,2)-(1,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,4)-(1,14))
+ │ ├── locals: []
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,7)-(1,10))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,7)-(1,8) = "|"
+ │ │ └── closing_loc: (1,9)-(1,10) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ └── closing_loc: (1,11)-(1,14) = "end"
+ ├── flags: ∅
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/qWords_space.txt b/test/prism/snapshots/seattlerb/qWords_space.txt
new file mode 100644
index 0000000000..db2a56632f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qWords_space.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,5))
+ ├── elements: (length: 0)
+ ├── opening_loc: (1,0)-(1,3) = "%W("
+ └── closing_loc: (1,4)-(1,5) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols.txt b/test/prism/snapshots/seattlerb/qsymbols.txt
new file mode 100644
index 0000000000..ba50680a43
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,9))
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── @ SymbolNode (location: (1,5)-(1,6))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,5)-(1,6) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── @ SymbolNode (location: (1,7)-(1,8))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,7)-(1,8) = "c"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "c"
+ ├── opening_loc: (1,0)-(1,3) = "%I("
+ └── closing_loc: (1,8)-(1,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols_empty.txt b/test/prism/snapshots/seattlerb/qsymbols_empty.txt
new file mode 100644
index 0000000000..dd94a36cc8
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols_empty.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,4))
+ ├── elements: (length: 0)
+ ├── opening_loc: (1,0)-(1,3) = "%I("
+ └── closing_loc: (1,3)-(1,4) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt b/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt
new file mode 100644
index 0000000000..e851b377d9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,5))
+ ├── elements: (length: 0)
+ ├── opening_loc: (1,0)-(1,3) = "%I("
+ └── closing_loc: (1,4)-(1,5) = ")"
diff --git a/test/prism/snapshots/seattlerb/qsymbols_interp.txt b/test/prism/snapshots/seattlerb/qsymbols_interp.txt
new file mode 100644
index 0000000000..4c2ffb3393
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qsymbols_interp.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,15))
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── @ InterpolatedSymbolNode (location: (1,5)-(1,12))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (1,5)-(1,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (1,5)-(1,6) = "b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ └── @ EmbeddedStatementsNode (location: (1,6)-(1,12))
+ │ │ │ ├── opening_loc: (1,6)-(1,8) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,8)-(1,11))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,8)-(1,11))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,9)-(1,10) = "+"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "+"
+ │ │ │ └── closing_loc: (1,11)-(1,12) = "}"
+ │ │ └── closing_loc: ∅
+ │ └── @ SymbolNode (location: (1,13)-(1,14))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,13)-(1,14) = "c"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "c"
+ ├── opening_loc: (1,0)-(1,3) = "%I("
+ └── closing_loc: (1,14)-(1,15) = ")"
diff --git a/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt
new file mode 100644
index 0000000000..a5877fac0c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,4) = "puts"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,12))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,5)-(1,12))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,5)-(1,12))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,5)-(1,9))
+ │ │ ├── opening_loc: (1,5)-(1,6) = "'"
+ │ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ │ ├── closing_loc: (1,7)-(1,9) = "':"
+ │ │ └── unescaped: "a"
+ │ ├── value:
+ │ │ @ HashNode (location: (1,10)-(1,12))
+ │ │ ├── opening_loc: (1,10)-(1,11) = "{"
+ │ │ ├── elements: (length: 0)
+ │ │ └── closing_loc: (1,11)-(1,12) = "}"
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "puts"
diff --git a/test/prism/snapshots/seattlerb/quoted_symbol_keys.txt b/test/prism/snapshots/seattlerb/quoted_symbol_keys.txt
new file mode 100644
index 0000000000..f7dc2289f3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/quoted_symbol_keys.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(1,11))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,9))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,6))
+ │ │ ├── opening_loc: (1,2)-(1,3) = "'"
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: (1,4)-(1,6) = "':"
+ │ │ └── unescaped: "a"
+ │ ├── value:
+ │ │ @ SymbolNode (location: (1,7)-(1,9))
+ │ │ ├── opening_loc: (1,7)-(1,8) = ":"
+ │ │ ├── value_loc: (1,8)-(1,9) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── operator_loc: ∅
+ └── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/seattlerb/qw_escape.txt b/test/prism/snapshots/seattlerb/qw_escape.txt
new file mode 100644
index 0000000000..ef60ee32c4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qw_escape.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,3) = "%q("
+ ├── content_loc: (1,3)-(1,6) = "\u0001\\'"
+ ├── closing_loc: (1,6)-(1,7) = ")"
+ └── unescaped: "\u0001'"
diff --git a/test/prism/snapshots/seattlerb/qw_escape_term.txt b/test/prism/snapshots/seattlerb/qw_escape_term.txt
new file mode 100644
index 0000000000..0677055ad6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qw_escape_term.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,26))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,3) = "%q|"
+ ├── content_loc: (1,3)-(1,25) = "blah blah \\| blah blah"
+ ├── closing_loc: (1,25)-(1,26) = "|"
+ └── unescaped: "blah blah \\| blah blah"
diff --git a/test/prism/snapshots/seattlerb/qwords_empty.txt b/test/prism/snapshots/seattlerb/qwords_empty.txt
new file mode 100644
index 0000000000..17ebaf21d9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/qwords_empty.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,4))
+ ├── elements: (length: 0)
+ ├── opening_loc: (1,0)-(1,3) = "%w("
+ └── closing_loc: (1,3)-(1,4) = ")"
diff --git a/test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt b/test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt
new file mode 100644
index 0000000000..4c4b6b9528
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/read_escape_unicode_curlies.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "?"
+ ├── content_loc: (1,1)-(1,9) = "\\u{00a0}"
+ ├── closing_loc: ∅
+ └── unescaped: " "
diff --git a/test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt b/test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt
new file mode 100644
index 0000000000..4bdf2cd2f9
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/read_escape_unicode_h4.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,7))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "?"
+ ├── content_loc: (1,1)-(1,7) = "\\u00a0"
+ ├── closing_loc: ∅
+ └── unescaped: " "
diff --git a/test/prism/snapshots/seattlerb/regexp.txt b/test/prism/snapshots/seattlerb/regexp.txt
new file mode 100644
index 0000000000..fead46a8be
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/regexp.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(9,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,13))
+ └── body: (length: 5)
+ ├── @ RegularExpressionNode (location: (1,0)-(1,5))
+ │ ├── opening_loc: (1,0)-(1,1) = "/"
+ │ ├── content_loc: (1,1)-(1,4) = "wtf"
+ │ ├── closing_loc: (1,4)-(1,5) = "/"
+ │ ├── unescaped: "wtf"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (3,0)-(3,6))
+ │ ├── opening_loc: (3,0)-(3,1) = "/"
+ │ ├── content_loc: (3,1)-(3,4) = "wtf"
+ │ ├── closing_loc: (3,4)-(3,6) = "/m"
+ │ ├── unescaped: "wtf"
+ │ └── flags: multi_line
+ ├── @ RegularExpressionNode (location: (5,0)-(5,6))
+ │ ├── opening_loc: (5,0)-(5,1) = "/"
+ │ ├── content_loc: (5,1)-(5,4) = "wtf"
+ │ ├── closing_loc: (5,4)-(5,6) = "/n"
+ │ ├── unescaped: "wtf"
+ │ └── flags: ascii_8bit
+ ├── @ RegularExpressionNode (location: (7,0)-(7,7))
+ │ ├── opening_loc: (7,0)-(7,1) = "/"
+ │ ├── content_loc: (7,1)-(7,4) = "wtf"
+ │ ├── closing_loc: (7,4)-(7,7) = "/nm"
+ │ ├── unescaped: "wtf"
+ │ └── flags: multi_line, ascii_8bit
+ └── @ RegularExpressionNode (location: (9,0)-(9,13))
+ ├── opening_loc: (9,0)-(9,1) = "/"
+ ├── content_loc: (9,1)-(9,4) = "wtf"
+ ├── closing_loc: (9,4)-(9,13) = "/nmnmnmnm"
+ ├── unescaped: "wtf"
+ └── flags: multi_line, ascii_8bit
diff --git a/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt b/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt
new file mode 100644
index 0000000000..3bc991033c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ RegularExpressionNode (location: (1,0)-(1,7))
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,6) = "\\cC\\d"
+ ├── closing_loc: (1,6)-(1,7) = "/"
+ ├── unescaped: "\u0003d"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/regexp_esc_u.txt b/test/prism/snapshots/seattlerb/regexp_esc_u.txt
new file mode 100644
index 0000000000..adbfe36880
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/regexp_esc_u.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ RegularExpressionNode (location: (1,0)-(1,17))
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,16) = "[\\u0021-\\u0027]"
+ ├── closing_loc: (1,16)-(1,17) = "/"
+ ├── unescaped: "[!-']"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/regexp_escape_extended.txt b/test/prism/snapshots/seattlerb/regexp_escape_extended.txt
new file mode 100644
index 0000000000..a8fb9a56f0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/regexp_escape_extended.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ RegularExpressionNode (location: (1,0)-(1,6))
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,5) = "\\“"
+ ├── closing_loc: (1,5)-(1,6) = "/"
+ ├── unescaped: "“"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt b/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt
new file mode 100644
index 0000000000..5e039bd16e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 2)
+ ├── @ RegularExpressionNode (location: (1,0)-(1,15))
+ │ ├── opening_loc: (1,0)-(1,1) = "/"
+ │ ├── content_loc: (1,1)-(1,14) = "\\u{c0de babe}"
+ │ ├── closing_loc: (1,14)-(1,15) = "/"
+ │ ├── unescaped: "샞몾"
+ │ └── flags: ∅
+ └── @ RegularExpressionNode (location: (3,0)-(3,8))
+ ├── opening_loc: (3,0)-(3,1) = "/"
+ ├── content_loc: (3,1)-(3,7) = "\\u{df}"
+ ├── closing_loc: (3,7)-(3,8) = "/"
+ ├── unescaped: "ß"
+ └── flags: ∅
diff --git a/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt b/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt
new file mode 100644
index 0000000000..ccfdab2a14
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(2,3))
+ ├── name: :x
+ ├── name_loc: (1,4)-(1,5) = "x"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,12))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 2)
+ │ │ ├── @ KeywordParameterNode (location: (1,6)-(1,8))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (1,6)-(1,8) = "a:"
+ │ │ │ └── value: ∅
+ │ │ └── @ KeywordParameterNode (location: (1,10)-(1,12))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,10)-(1,12) = "b:"
+ │ │ └── value: ∅
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:a, :b]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (2,0)-(2,3) = "end"
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
new file mode 100644
index 0000000000..e5f1a1e2ab
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(5,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(5,8))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(5,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "proc"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,5)-(5,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (2,2)-(5,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (2,2)-(2,8))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (2,2)-(2,8))
+ │ │ │ │ ├── opening_loc: (2,2)-(2,3) = ":"
+ │ │ │ │ ├── value_loc: (2,3)-(2,8) = "begin"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "begin"
+ │ │ │ ├── rescue_clause: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause:
+ │ │ │ │ @ EnsureNode (location: (3,0)-(5,3))
+ │ │ │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (4,2)-(4,9))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
+ │ │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
+ │ │ │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "ensure"
+ │ │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ │ └── closing_loc: (5,0)-(5,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "proc"
+ ├── call_operator_loc: (5,3)-(5,4) = "."
+ ├── message_loc: (5,4)-(5,8) = "call"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "call"
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
new file mode 100644
index 0000000000..88907d510d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt
@@ -0,0 +1,71 @@
+@ ProgramNode (location: (1,0)-(9,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(9,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,4)-(9,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (2,2)-(9,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,2)-(2,8))
+ │ │ │ ├── opening_loc: (2,2)-(2,3) = ":"
+ │ │ │ ├── value_loc: (2,3)-(2,8) = "begin"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "begin"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (3,0)-(4,9))
+ │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
+ │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
+ │ │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "rescue"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause:
+ │ │ │ @ ElseNode (location: (5,0)-(7,6))
+ │ │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (6,2)-(6,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (6,2)-(6,7))
+ │ │ │ │ ├── opening_loc: (6,2)-(6,3) = ":"
+ │ │ │ │ ├── value_loc: (6,3)-(6,7) = "else"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "else"
+ │ │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (7,0)-(9,3))
+ │ │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (8,2)-(8,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (8,2)-(8,9))
+ │ │ │ │ ├── opening_loc: (8,2)-(8,3) = ":"
+ │ │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "ensure"
+ │ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ └── closing_loc: (9,0)-(9,3) = "end"
+ ├── flags: ∅
+ └── name: "tap"
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
new file mode 100644
index 0000000000..c0fd317c9e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(5,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(5,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,4)-(5,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (2,2)-(5,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,7) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "raise"
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (3,0)-(5,3))
+ │ │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
+ │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
+ │ │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "ensure"
+ │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ └── closing_loc: (5,0)-(5,3) = "end"
+ ├── flags: ∅
+ └── name: "tap"
diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
new file mode 100644
index 0000000000..91e8062ae3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt
@@ -0,0 +1,76 @@
+@ ProgramNode (location: (1,0)-(9,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(9,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,4)-(9,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (2,2)-(9,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,7) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "raise"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (3,0)-(4,9))
+ │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9))
+ │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":"
+ │ │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "rescue"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause:
+ │ │ │ @ ElseNode (location: (5,0)-(7,6))
+ │ │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (6,2)-(6,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (6,2)-(6,7))
+ │ │ │ │ ├── opening_loc: (6,2)-(6,3) = ":"
+ │ │ │ │ ├── value_loc: (6,3)-(6,7) = "else"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "else"
+ │ │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (7,0)-(9,3))
+ │ │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (8,2)-(8,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (8,2)-(8,9))
+ │ │ │ │ ├── opening_loc: (8,2)-(8,3) = ":"
+ │ │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "ensure"
+ │ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ └── closing_loc: (9,0)-(9,3) = "end"
+ ├── flags: ∅
+ └── name: "tap"
diff --git a/test/prism/snapshots/seattlerb/rescue_in_block.txt b/test/prism/snapshots/seattlerb/rescue_in_block.txt
new file mode 100644
index 0000000000..58f6282558
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_in_block.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,4) = "blah"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,5)-(4,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (2,0)-(4,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements: ∅
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (2,0)-(3,7))
+ │ │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,2)-(3,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,2)-(3,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,2)-(3,7) = "stuff"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "stuff"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (4,0)-(4,3) = "end"
+ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ └── closing_loc: (4,0)-(4,3) = "end"
+ ├── flags: ∅
+ └── name: "blah"
diff --git a/test/prism/snapshots/seattlerb/rescue_parens.txt b/test/prism/snapshots/seattlerb/rescue_parens.txt
new file mode 100644
index 0000000000..e97a46a8ec
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rescue_parens.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,14))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,2)-(1,14))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,3)-(1,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (1,3)-(1,13))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── keyword_loc: (1,5)-(1,11) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ CallNode (location: (1,12)-(1,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,12)-(1,13) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,13)-(1,14) = ")"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/seattlerb/return_call_assocs.txt b/test/prism/snapshots/seattlerb/return_call_assocs.txt
new file mode 100644
index 0000000000..cfbf7fda5c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/return_call_assocs.txt
@@ -0,0 +1,181 @@
+@ ProgramNode (location: (1,0)-(11,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,14))
+ └── body: (length: 6)
+ ├── @ ReturnNode (location: (1,0)-(1,17))
+ │ ├── keyword_loc: (1,0)-(1,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,17))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ └── @ KeywordHashNode (location: (1,10)-(1,17))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,10)-(1,17))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,10)-(1,12))
+ │ │ ├── opening_loc: (1,10)-(1,11) = ":"
+ │ │ ├── value_loc: (1,11)-(1,12) = "z"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "z"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,16)-(1,17))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,13)-(1,15) = "=>"
+ ├── @ ReturnNode (location: (3,0)-(3,26))
+ │ ├── keyword_loc: (3,0)-(3,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (3,7)-(3,26))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (3,7)-(3,8))
+ │ │ └── flags: decimal
+ │ └── @ KeywordHashNode (location: (3,10)-(3,26))
+ │ └── elements: (length: 2)
+ │ ├── @ AssocNode (location: (3,10)-(3,17))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,10)-(3,12))
+ │ │ │ ├── opening_loc: (3,10)-(3,11) = ":"
+ │ │ │ ├── value_loc: (3,11)-(3,12) = "z"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "z"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,16)-(3,17))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (3,13)-(3,15) = "=>"
+ │ └── @ AssocNode (location: (3,19)-(3,26))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,19)-(3,21))
+ │ │ ├── opening_loc: (3,19)-(3,20) = ":"
+ │ │ ├── value_loc: (3,20)-(3,21) = "w"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "w"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,25)-(3,26))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (3,22)-(3,24) = "=>"
+ ├── @ ReturnNode (location: (5,0)-(5,14))
+ │ ├── keyword_loc: (5,0)-(5,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (5,7)-(5,14))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (5,7)-(5,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,7)-(5,8) = "y"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,9)-(5,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (5,9)-(5,14))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,9)-(5,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,9)-(5,11))
+ │ │ │ ├── opening_loc: (5,9)-(5,10) = ":"
+ │ │ │ ├── value_loc: (5,10)-(5,11) = "z"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "z"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (5,13)-(5,14))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (5,11)-(5,13) = "=>"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "y"
+ ├── @ ReturnNode (location: (7,0)-(7,12))
+ │ ├── keyword_loc: (7,0)-(7,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (7,7)-(7,12))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (7,7)-(7,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,7)-(7,8) = "y"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,9)-(7,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (7,9)-(7,12))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (7,9)-(7,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (7,9)-(7,11))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (7,9)-(7,10) = "z"
+ │ │ │ ├── closing_loc: (7,10)-(7,11) = ":"
+ │ │ │ └── unescaped: "z"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (7,11)-(7,12))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "y"
+ ├── @ ReturnNode (location: (9,0)-(9,13))
+ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (9,7)-(9,13))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (9,7)-(9,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,7)-(9,8) = "y"
+ │ ├── opening_loc: (9,8)-(9,9) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,9)-(9,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (9,9)-(9,12))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (9,9)-(9,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,9)-(9,11))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (9,9)-(9,10) = "z"
+ │ │ │ ├── closing_loc: (9,10)-(9,11) = ":"
+ │ │ │ └── unescaped: "z"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (9,11)-(9,12))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (9,12)-(9,13) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "y"
+ └── @ ReturnNode (location: (11,0)-(11,14))
+ ├── keyword_loc: (11,0)-(11,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (11,7)-(11,14))
+ └── arguments: (length: 1)
+ └── @ CallNode (location: (11,7)-(11,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (11,7)-(11,8) = "y"
+ ├── opening_loc: (11,8)-(11,9) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,9)-(11,13))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (11,9)-(11,13))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (11,9)-(11,13))
+ │ ├── key:
+ │ │ @ CallNode (location: (11,9)-(11,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,9)-(11,10) = "z"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "z"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (11,12)-(11,13))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (11,10)-(11,12) = "=>"
+ ├── closing_loc: (11,13)-(11,14) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "y"
diff --git a/test/prism/snapshots/seattlerb/rhs_asgn.txt b/test/prism/snapshots/seattlerb/rhs_asgn.txt
new file mode 100644
index 0000000000..61ed05f4e1
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/rhs_asgn.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: [:n]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ MatchRequiredNode (location: (1,0)-(1,7))
+ ├── value:
+ │ @ IntegerNode (location: (1,0)-(1,2))
+ │ └── flags: decimal
+ ├── pattern:
+ │ @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ ├── name: :n
+ │ └── depth: 0
+ └── operator_loc: (1,3)-(1,5) = "=>"
diff --git a/test/prism/snapshots/seattlerb/ruby21_numbers.txt b/test/prism/snapshots/seattlerb/ruby21_numbers.txt
new file mode 100644
index 0000000000..d855195ca6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/ruby21_numbers.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,13))
+ ├── elements: (length: 3)
+ │ ├── @ ImaginaryNode (location: (1,1)-(1,3))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ └── flags: decimal
+ │ ├── @ RationalNode (location: (1,5)-(1,7))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ └── @ ImaginaryNode (location: (1,9)-(1,12))
+ │ └── numeric:
+ │ @ RationalNode (location: (1,9)-(1,11))
+ │ └── numeric:
+ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ └── flags: decimal
+ ├── opening_loc: (1,0)-(1,1) = "["
+ └── closing_loc: (1,12)-(1,13) = "]"
diff --git a/test/prism/snapshots/seattlerb/safe_attrasgn.txt b/test/prism/snapshots/seattlerb/safe_attrasgn.txt
new file mode 100644
index 0000000000..e6ea102a26
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_attrasgn.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "b="
diff --git a/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt b/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt
new file mode 100644
index 0000000000..3bf82ed234
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "B"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "B="
diff --git a/test/prism/snapshots/seattlerb/safe_call.txt b/test/prism/snapshots/seattlerb/safe_call.txt
new file mode 100644
index 0000000000..cf7412a9fa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_call.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/safe_call_after_newline.txt b/test/prism/snapshots/seattlerb/safe_call_after_newline.txt
new file mode 100644
index 0000000000..ef16c63d2b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_call_after_newline.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,3))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (2,0)-(2,2) = "&."
+ ├── message_loc: (2,2)-(2,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt b/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt
new file mode 100644
index 0000000000..b152d6230b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,5))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: ∅
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,4)-(1,5) = ")"
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "call"
diff --git a/test/prism/snapshots/seattlerb/safe_call_newline.txt b/test/prism/snapshots/seattlerb/safe_call_newline.txt
new file mode 100644
index 0000000000..cf7412a9fa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_call_newline.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/safe_call_operator.txt b/test/prism/snapshots/seattlerb/safe_call_operator.txt
new file mode 100644
index 0000000000..d24465ef89
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_call_operator.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = ">"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: ">"
diff --git a/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt b/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt
new file mode 100644
index 0000000000..779a26b9a4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: [:c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,8))
+ ├── name: :c
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "c"
+ ├── value:
+ │ @ CallNode (location: (1,4)-(1,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,5)-(1,7) = "&."
+ │ ├── message_loc: (1,7)-(1,8) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "b"
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/seattlerb/safe_calls.txt b/test/prism/snapshots/seattlerb/safe_calls.txt
new file mode 100644
index 0000000000..f4f9644f12
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_calls.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ │ ├── message_loc: (1,3)-(1,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "b"
+ ├── call_operator_loc: (1,4)-(1,6) = "&."
+ ├── message_loc: (1,6)-(1,7) = "c"
+ ├── opening_loc: (1,7)-(1,8) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ └── flags: decimal
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "c"
diff --git a/test/prism/snapshots/seattlerb/safe_op_asgn.txt b/test/prism/snapshots/seattlerb/safe_op_asgn.txt
new file mode 100644
index 0000000000..eee4cd1b42
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_op_asgn.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,11))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: safe_navigation
+ ├── read_name: "b"
+ ├── write_name: "b="
+ ├── operator: :+
+ ├── operator_loc: (1,5)-(1,7) = "+="
+ └── value:
+ @ CallNode (location: (1,8)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/safe_op_asgn2.txt b/test/prism/snapshots/seattlerb/safe_op_asgn2.txt
new file mode 100644
index 0000000000..f7d02d3e55
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/safe_op_asgn2.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallOrWriteNode (location: (1,0)-(2,1))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: safe_navigation
+ ├── read_name: "b"
+ ├── write_name: "b="
+ ├── operator_loc: (1,5)-(1,8) = "||="
+ └── value:
+ @ CallNode (location: (2,0)-(2,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (2,0)-(2,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt b/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt
new file mode 100644
index 0000000000..49e5265871
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(6,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,5))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(4,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "puts"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(4,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,5)-(4,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,5)-(1,6) = "\""
+ │ │ ├── content_loc: (1,6)-(4,7) = "hello\\\n my\\\n dear\\\n friend"
+ │ │ ├── closing_loc: (4,7)-(4,8) = "\""
+ │ │ └── unescaped: "hello my dear friend"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "puts"
+ └── @ CallNode (location: (6,0)-(6,5))
+ ├── receiver:
+ │ @ CallNode (location: (6,0)-(6,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (6,2)-(6,3) = "+"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (6,4)-(6,5))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (6,4)-(6,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,4)-(6,5) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "+"
diff --git a/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt b/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
new file mode 100644
index 0000000000..7392e71525
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_arg_no_paren.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,5))
+ ├── locals: [:a]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,3)-(1,4) = "{"
+ ├── closing_loc: (1,4)-(1,5) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,2)-(1,3))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,2)-(1,3))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,2)-(1,3))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── body: ∅
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
new file mode 100644
index 0000000000..0661b2a2aa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_arg_opt_splat_arg_block_omfg.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,23))
+ ├── locals: [:b, :c, :d, :e, :f]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,21)-(1,22) = "{"
+ ├── closing_loc: (1,22)-(1,23) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,2)-(1,21))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,3)-(1,20))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,9))
+ │ │ │ ├── name: :c
+ │ │ │ ├── name_loc: (1,6)-(1,7) = "c"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (1,11)-(1,13))
+ │ │ │ ├── name: :d
+ │ │ │ ├── name_loc: (1,12)-(1,13) = "d"
+ │ │ │ └── operator_loc: (1,11)-(1,12) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16))
+ │ │ │ └── name: :e
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,18)-(1,20))
+ │ │ ├── name: :f
+ │ │ ├── name_loc: (1,19)-(1,20) = "f"
+ │ │ └── operator_loc: (1,18)-(1,19) = "&"
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,20)-(1,21) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
new file mode 100644
index 0000000000..4cce284497
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(4,3))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (1,2)-(4,3))
+ │ ├── locals: []
+ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ ├── opening_loc: (1,8)-(1,10) = "do"
+ │ ├── closing_loc: (4,0)-(4,3) = "end"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,5)-(1,7))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ └── closing_loc: (1,6)-(1,7) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (2,0)-(3,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,0)-(3,3))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (2,1)-(2,2) = "."
+ │ ├── message_loc: (2,2)-(2,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (2,4)-(3,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (2,4)-(2,6) = "do"
+ │ │ └── closing_loc: (3,0)-(3,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "x"
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
new file mode 100644
index 0000000000..46f401eb5a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(4,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(4,3))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (1,2)-(4,3))
+ │ ├── locals: []
+ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ ├── opening_loc: (1,8)-(1,10) = "do"
+ │ ├── closing_loc: (4,0)-(4,3) = "end"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,5)-(1,7))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ └── closing_loc: (1,6)-(1,7) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (2,0)-(3,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,0)-(3,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ ├── opening_loc: (2,1)-(2,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,2)-(2,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (2,2)-(2,3))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (2,3)-(2,4) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (2,5)-(3,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (2,5)-(2,7) = "do"
+ │ │ └── closing_loc: (3,0)-(3,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw.txt b/test/prism/snapshots/seattlerb/stabby_block_kw.txt
new file mode 100644
index 0000000000..e3613e4b36
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_block_kw.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,13))
+ ├── locals: [:k]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,10)-(1,11) = "{"
+ ├── closing_loc: (1,12)-(1,13) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,3)-(1,9))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,4)-(1,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (1,4)-(1,8))
+ │ │ │ ├── name: :k
+ │ │ │ ├── name_loc: (1,4)-(1,6) = "k:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,6)-(1,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,8)-(1,9) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt b/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt
new file mode 100644
index 0000000000..0139100071
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,11))
+ ├── locals: [:k]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,8)-(1,9) = "{"
+ ├── closing_loc: (1,10)-(1,11) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,3)-(1,7))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,4)-(1,6))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (1,4)-(1,6))
+ │ │ │ ├── name: :k
+ │ │ │ ├── name_loc: (1,4)-(1,6) = "k:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,6)-(1,7) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/stabby_proc_scope.txt b/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
new file mode 100644
index 0000000000..059192d67f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/stabby_proc_scope.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,11))
+ ├── locals: [:a, :b]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,9)-(1,10) = "{"
+ ├── closing_loc: (1,10)-(1,11) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,2)-(1,8))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,3)-(1,4))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 1)
+ │ │ └── @ BlockLocalVariableNode (location: (1,6)-(1,7))
+ │ │ └── name: :b
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,7)-(1,8) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/seattlerb/str_backslashes.txt b/test/prism/snapshots/seattlerb/str_backslashes.txt
new file mode 100644
index 0000000000..09e8628e8b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_backslashes.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(1,204))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,204))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,204))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "x"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,204))
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,2)-(1,204))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "'"
+ │ ├── content_loc: (1,3)-(1,203) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n"
+ │ ├── closing_loc: (1,203)-(1,204) = "'"
+ │ └── unescaped: "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "x"
diff --git a/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt
new file mode 100644
index 0000000000..56fdd6cd7d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n"
+ │ │ ├── closing_loc: (1,6)-(1,7) = "\""
+ │ │ └── unescaped: "\\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (1,8)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt
new file mode 100644
index 0000000000..906ef18d65
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ ├── content_loc: (1,3)-(1,5) = "\\n"
+ │ │ ├── closing_loc: (1,5)-(1,6) = "\""
+ │ │ └── unescaped: "\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (1,7)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/str_double_newline.txt b/test/prism/snapshots/seattlerb/str_double_newline.txt
new file mode 100644
index 0000000000..67953d770f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_double_newline.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(2,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ ├── content_loc: (1,3)-(1,0) = "\n"
+ │ │ ├── closing_loc: (2,0)-(2,1) = "\""
+ │ │ └── unescaped: "\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (2,2)-(2,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (2,2)-(2,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/str_evstr.txt b/test/prism/snapshots/seattlerb/str_evstr.txt
new file mode 100644
index 0000000000..8062024ed4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_evstr.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,8))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,1)-(1,3) = "a "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a "
+ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
+ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,5)-(1,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── closing_loc: (1,6)-(1,7) = "}"
+ └── closing_loc: (1,7)-(1,8) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_evstr_escape.txt b/test/prism/snapshots/seattlerb/str_evstr_escape.txt
new file mode 100644
index 0000000000..9dd987d226
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_evstr_escape.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,16))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,1)-(1,3) = "a "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a "
+ │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
+ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,5)-(1,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,5)-(1,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ └── @ StringNode (location: (1,7)-(1,15))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,7)-(1,15) = "\\302\\275"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "½"
+ └── closing_loc: (1,15)-(1,16) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_heredoc_interp.txt b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt
new file mode 100644
index 0000000000..465469430c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,4))
+ ├── opening_loc: (1,0)-(1,4) = "<<\"\""
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (2,0)-(2,4))
+ │ │ ├── opening_loc: (2,0)-(2,2) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "x"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "x"
+ │ │ └── closing_loc: (2,3)-(2,4) = "}"
+ │ └── @ StringNode (location: (2,4)-(3,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,4)-(3,0) = "\nblah2\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\nblah2\n"
+ └── closing_loc: (4,0)-(4,0) = "\n"
diff --git a/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt b/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt
new file mode 100644
index 0000000000..c168afca2d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt
@@ -0,0 +1,101 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,23))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 1)
+ │ └── @ EmbeddedStatementsNode (location: (1,1)-(1,22))
+ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,3)-(1,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IfNode (location: (1,3)-(1,21))
+ │ │ ├── if_keyword_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (1,3)-(1,7))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,3)-(1,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ │ │ ├── message_loc: (1,5)-(1,7) = "b?"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b?"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,10)-(1,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,10)-(1,17))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (1,10)-(1,14))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ StringNode (location: (1,10)-(1,12))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: (1,10)-(1,11) = "\""
+ │ │ │ │ │ ├── content_loc: (1,11)-(1,11) = ""
+ │ │ │ │ │ ├── closing_loc: (1,11)-(1,12) = "\""
+ │ │ │ │ │ └── unescaped: ""
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,12)-(1,13) = "+"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "a"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "a"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "+"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,14)-(1,15) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,15)-(1,17))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (1,15)-(1,17))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (1,15)-(1,16) = "\""
+ │ │ │ │ ├── content_loc: (1,16)-(1,16) = ""
+ │ │ │ │ ├── closing_loc: (1,16)-(1,17) = "\""
+ │ │ │ │ └── unescaped: ""
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── consequent:
+ │ │ │ @ ElseNode (location: (1,17)-(1,21))
+ │ │ │ ├── else_keyword_loc: (1,17)-(1,18) = ":"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,19)-(1,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ StringNode (location: (1,19)-(1,21))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (1,19)-(1,20) = "\""
+ │ │ │ │ ├── content_loc: (1,20)-(1,20) = ""
+ │ │ │ │ ├── closing_loc: (1,20)-(1,21) = "\""
+ │ │ │ │ └── unescaped: ""
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ └── closing_loc: (1,21)-(1,22) = "}"
+ └── closing_loc: (1,22)-(1,23) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt b/test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt
new file mode 100644
index 0000000000..7bf71b7858
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_lit_concat_bad_encodings.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(2,66))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,66))
+ └── body: (length: 1)
+ └── @ StringConcatNode (location: (1,0)-(2,66))
+ ├── left:
+ │ @ StringNode (location: (1,0)-(1,62))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(1,61) = "\\xE3\\xD3\\x8B\\xE3\\x83\\xBC\\x83\\xE3\\x83\\xE3\\x82\\xB3\\xA3\\x82\\x99"
+ │ ├── closing_loc: (1,61)-(1,62) = "\""
+ │ └── unescaped: "\xE3Ӌー\x83\xE3\x83コ\xA3\x82\x99"
+ └── right:
+ @ StringNode (location: (2,8)-(2,66))
+ ├── flags: ∅
+ ├── opening_loc: (2,8)-(2,9) = "\""
+ ├── content_loc: (2,9)-(2,65) = "\\xE3\\x83\\xB3\\xE3\\x83\\x8F\\xE3\\x82\\x9A\\xC3\\xBD;foo@bar.com"
+ ├── closing_loc: (2,65)-(2,66) = "\""
+ └── unescaped: "ンパý;foo@bar.com"
diff --git a/test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt b/test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt
new file mode 100644
index 0000000000..89f20da7b5
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_newline_hash_line_number.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(1,11))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(1,10) = "\\n\\n\\n\\n#"
+ │ ├── closing_loc: (1,10)-(1,11) = "\""
+ │ └── unescaped: "\n\n\n\n#"
+ └── @ IntegerNode (location: (2,0)-(2,1))
+ └── flags: decimal
diff --git a/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt b/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt
new file mode 100644
index 0000000000..6651fcdde0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,26))
+ ├── opening_loc: (1,0)-(1,3) = "%Q["
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,3)-(1,11))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,3)-(1,11) = "before ["
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "before ["
+ │ ├── @ EmbeddedStatementsNode (location: (1,11)-(1,18))
+ │ │ ├── opening_loc: (1,11)-(1,13) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,13)-(1,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,13)-(1,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,13)-(1,17) = "nest"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "nest"
+ │ │ └── closing_loc: (1,17)-(1,18) = "}"
+ │ └── @ StringNode (location: (1,18)-(1,25))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,18)-(1,25) = "] after"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "] after"
+ └── closing_loc: (1,25)-(1,26) = "]"
diff --git a/test/prism/snapshots/seattlerb/str_pct_nested_nested.txt b/test/prism/snapshots/seattlerb/str_pct_nested_nested.txt
new file mode 100644
index 0000000000..85ad89bc60
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_pct_nested_nested.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,20))
+ ├── opening_loc: (1,0)-(1,2) = "%{"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,2)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,2)-(1,5) = " { "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " { "
+ │ ├── @ EmbeddedStatementsNode (location: (1,5)-(1,16))
+ │ │ ├── opening_loc: (1,5)-(1,7) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,8)-(1,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (1,8)-(1,14))
+ │ │ │ ├── opening_loc: (1,8)-(1,9) = "\""
+ │ │ │ ├── parts: (length: 1)
+ │ │ │ │ └── @ EmbeddedStatementsNode (location: (1,9)-(1,13))
+ │ │ │ │ ├── opening_loc: (1,9)-(1,11) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (1,11)-(1,12))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (1,11)-(1,12))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── closing_loc: (1,12)-(1,13) = "}"
+ │ │ │ └── closing_loc: (1,13)-(1,14) = "\""
+ │ │ └── closing_loc: (1,15)-(1,16) = "}"
+ │ └── @ StringNode (location: (1,16)-(1,19))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,16)-(1,19) = " } "
+ │ ├── closing_loc: ∅
+ │ └── unescaped: " } "
+ └── closing_loc: (1,19)-(1,20) = "}"
diff --git a/test/prism/snapshots/seattlerb/str_pct_q.txt b/test/prism/snapshots/seattlerb/str_pct_q.txt
new file mode 100644
index 0000000000..c4dd5bacae
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_pct_q.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,3) = "%q{"
+ ├── content_loc: (1,3)-(1,8) = "a b c"
+ ├── closing_loc: (1,8)-(1,9) = "}"
+ └── unescaped: "a b c"
diff --git a/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt
new file mode 100644
index 0000000000..6b155de886
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(1,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "'"
+ │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n"
+ │ │ ├── closing_loc: (1,6)-(1,7) = "'"
+ │ │ └── unescaped: "\\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (1,8)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,8)-(1,9) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt
new file mode 100644
index 0000000000..ba2e204b68
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "'"
+ │ │ ├── content_loc: (1,3)-(1,5) = "\\n"
+ │ │ ├── closing_loc: (1,5)-(1,6) = "'"
+ │ │ └── unescaped: "\\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (1,7)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,7)-(1,8) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/str_single_newline.txt b/test/prism/snapshots/seattlerb/str_single_newline.txt
new file mode 100644
index 0000000000..18a96fbee6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_single_newline.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(2,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,2)-(2,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "'"
+ │ │ ├── content_loc: (1,3)-(1,0) = "\n"
+ │ │ ├── closing_loc: (2,0)-(2,1) = "'"
+ │ │ └── unescaped: "\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (2,2)-(2,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (2,2)-(2,3) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "b"
diff --git a/test/prism/snapshots/seattlerb/str_str.txt b/test/prism/snapshots/seattlerb/str_str.txt
new file mode 100644
index 0000000000..f183980f5e
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_str.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,10))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 2)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,1)-(1,3) = "a "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a "
+ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,9))
+ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,5)-(1,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ StringNode (location: (1,5)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,5)-(1,6) = "'"
+ │ │ ├── content_loc: (1,6)-(1,7) = "b"
+ │ │ ├── closing_loc: (1,7)-(1,8) = "'"
+ │ │ └── unescaped: "b"
+ │ └── closing_loc: (1,8)-(1,9) = "}"
+ └── closing_loc: (1,9)-(1,10) = "\""
diff --git a/test/prism/snapshots/seattlerb/str_str_str.txt b/test/prism/snapshots/seattlerb/str_str_str.txt
new file mode 100644
index 0000000000..68873d8182
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/str_str_str.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,12))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,1)-(1,3) = "a "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a "
+ │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,9))
+ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,5)-(1,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ StringNode (location: (1,5)-(1,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,5)-(1,6) = "'"
+ │ │ │ ├── content_loc: (1,6)-(1,7) = "b"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = "'"
+ │ │ │ └── unescaped: "b"
+ │ │ └── closing_loc: (1,8)-(1,9) = "}"
+ │ └── @ StringNode (location: (1,9)-(1,11))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,9)-(1,11) = " c"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: " c"
+ └── closing_loc: (1,11)-(1,12) = "\""
diff --git a/test/prism/snapshots/seattlerb/super_arg.txt b/test/prism/snapshots/seattlerb/super_arg.txt
new file mode 100644
index 0000000000..41109adcc3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/super_arg.txt
@@ -0,0 +1,15 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ SuperNode (location: (1,0)-(1,8))
+ ├── keyword_loc: (1,0)-(1,5) = "super"
+ ├── lparen_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,8))
+ │ └── flags: decimal
+ ├── rparen_loc: ∅
+ └── block: ∅
diff --git a/test/prism/snapshots/seattlerb/symbol_empty.txt b/test/prism/snapshots/seattlerb/symbol_empty.txt
new file mode 100644
index 0000000000..ab423959a0
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbol_empty.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ SymbolNode (location: (1,0)-(1,3))
+ ├── opening_loc: (1,0)-(1,2) = ":'"
+ ├── value_loc: (1,2)-(1,2) = ""
+ ├── closing_loc: (1,2)-(1,3) = "'"
+ └── unescaped: ""
diff --git a/test/prism/snapshots/seattlerb/symbol_list.txt b/test/prism/snapshots/seattlerb/symbol_list.txt
new file mode 100644
index 0000000000..834543195d
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbol_list.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,13))
+ ├── elements: (length: 2)
+ │ ├── @ InterpolatedSymbolNode (location: (1,3)-(1,7))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 1)
+ │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
+ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,5)-(1,6))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ │ └── closing_loc: ∅
+ │ └── @ InterpolatedSymbolNode (location: (1,8)-(1,12))
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (1,8)-(1,12))
+ │ │ ├── opening_loc: (1,8)-(1,10) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,10)-(1,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,10)-(1,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,10)-(1,11) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── closing_loc: (1,11)-(1,12) = "}"
+ │ └── closing_loc: ∅
+ ├── opening_loc: (1,0)-(1,3) = "%I["
+ └── closing_loc: (1,12)-(1,13) = "]"
diff --git a/test/prism/snapshots/seattlerb/symbols.txt b/test/prism/snapshots/seattlerb/symbols.txt
new file mode 100644
index 0000000000..1d4eae94aa
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,9))
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── @ SymbolNode (location: (1,5)-(1,6))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,5)-(1,6) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── @ SymbolNode (location: (1,7)-(1,8))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,7)-(1,8) = "c"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "c"
+ ├── opening_loc: (1,0)-(1,3) = "%i("
+ └── closing_loc: (1,8)-(1,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/symbols_empty.txt b/test/prism/snapshots/seattlerb/symbols_empty.txt
new file mode 100644
index 0000000000..74800d6bc6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols_empty.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,4))
+ ├── elements: (length: 0)
+ ├── opening_loc: (1,0)-(1,3) = "%i("
+ └── closing_loc: (1,3)-(1,4) = ")"
diff --git a/test/prism/snapshots/seattlerb/symbols_empty_space.txt b/test/prism/snapshots/seattlerb/symbols_empty_space.txt
new file mode 100644
index 0000000000..bff515a6dc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols_empty_space.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,5))
+ ├── elements: (length: 0)
+ ├── opening_loc: (1,0)-(1,3) = "%i("
+ └── closing_loc: (1,4)-(1,5) = ")"
diff --git a/test/prism/snapshots/seattlerb/symbols_interp.txt b/test/prism/snapshots/seattlerb/symbols_interp.txt
new file mode 100644
index 0000000000..6d7f614211
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/symbols_interp.txt
@@ -0,0 +1,24 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,15))
+ ├── elements: (length: 3)
+ │ ├── @ SymbolNode (location: (1,3)-(1,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,4) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── @ SymbolNode (location: (1,5)-(1,12))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,5)-(1,12) = "b\#{1+1}"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\#{1+1}"
+ │ └── @ SymbolNode (location: (1,13)-(1,14))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,13)-(1,14) = "c"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "c"
+ ├── opening_loc: (1,0)-(1,3) = "%i("
+ └── closing_loc: (1,14)-(1,15) = ")"
diff --git a/test/prism/snapshots/seattlerb/thingy.txt b/test/prism/snapshots/seattlerb/thingy.txt
new file mode 100644
index 0000000000..96c76e64b6
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/thingy.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(3,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,7))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "f"
+ │ ├── call_operator_loc: (1,1)-(1,2) = "."
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,3)-(1,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,3)-(1,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (1,5)-(1,6) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "call"
+ └── @ CallNode (location: (3,0)-(3,7))
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "f"
+ ├── call_operator_loc: (3,1)-(3,3) = "::"
+ ├── message_loc: ∅
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,6))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (3,4)-(3,6))
+ │ └── flags: decimal
+ ├── closing_loc: (3,6)-(3,7) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "call"
diff --git a/test/prism/snapshots/seattlerb/uminus_float.txt b/test/prism/snapshots/seattlerb/uminus_float.txt
new file mode 100644
index 0000000000..b509e2f7f3
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/uminus_float.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ FloatNode (location: (1,0)-(1,4))
diff --git a/test/prism/snapshots/seattlerb/unary_minus.txt b/test/prism/snapshots/seattlerb/unary_minus.txt
new file mode 100644
index 0000000000..e69aaaadec
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/unary_minus.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,2))
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,1)-(1,2) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "-"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "-@"
diff --git a/test/prism/snapshots/seattlerb/unary_plus.txt b/test/prism/snapshots/seattlerb/unary_plus.txt
new file mode 100644
index 0000000000..4d6c27805a
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/unary_plus.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,2))
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,1)-(1,2) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "+"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "+@"
diff --git a/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt b/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt
new file mode 100644
index 0000000000..9d1cb6a12c
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,3))
+ ├── receiver:
+ │ @ SymbolNode (location: (1,1)-(1,3))
+ │ ├── opening_loc: (1,1)-(1,2) = ":"
+ │ ├── value_loc: (1,2)-(1,3) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "+"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "+@"
diff --git a/test/prism/snapshots/seattlerb/unary_tilde.txt b/test/prism/snapshots/seattlerb/unary_tilde.txt
new file mode 100644
index 0000000000..aa413484dc
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/unary_tilde.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,2))
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,1)-(1,2) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "~"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "~"
diff --git a/test/prism/snapshots/seattlerb/utf8_bom.txt b/test/prism/snapshots/seattlerb/utf8_bom.txt
new file mode 100644
index 0000000000..6e56393521
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/utf8_bom.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (2,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (2,0)-(2,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (2,0)-(2,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (2,0)-(2,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (2,2)-(2,3))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (2,2)-(2,3))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/seattlerb/when_splat.txt b/test/prism/snapshots/seattlerb/when_splat.txt
new file mode 100644
index 0000000000..bdeae40fba
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/when_splat.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,25))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,6) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,8)-(1,15))
+ │ ├── keyword_loc: (1,8)-(1,12) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ SplatNode (location: (1,13)-(1,15))
+ │ │ ├── operator_loc: (1,13)-(1,14) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,14)-(1,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,14)-(1,15) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── statements: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,22)-(1,25) = "end"
diff --git a/test/prism/snapshots/seattlerb/words_interp.txt b/test/prism/snapshots/seattlerb/words_interp.txt
new file mode 100644
index 0000000000..eddc835f02
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/words_interp.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,9))
+ ├── elements: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,3)-(1,8))
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,7))
+ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (1,6)-(1,7) = "}"
+ │ │ └── @ StringNode (location: (1,7)-(1,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,7)-(1,8) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── closing_loc: ∅
+ ├── opening_loc: (1,0)-(1,3) = "%W("
+ └── closing_loc: (1,8)-(1,9) = ")"
diff --git a/test/prism/snapshots/seattlerb/yield_arg.txt b/test/prism/snapshots/seattlerb/yield_arg.txt
new file mode 100644
index 0000000000..ae6a5d2b0b
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/yield_arg.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ YieldNode (location: (1,0)-(1,8))
+ ├── keyword_loc: (1,0)-(1,5) = "yield"
+ ├── lparen_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,8))
+ │ └── flags: decimal
+ └── rparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/yield_call_assocs.txt b/test/prism/snapshots/seattlerb/yield_call_assocs.txt
new file mode 100644
index 0000000000..6964a034c4
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/yield_call_assocs.txt
@@ -0,0 +1,193 @@
+@ ProgramNode (location: (1,0)-(11,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,13))
+ └── body: (length: 6)
+ ├── @ YieldNode (location: (1,0)-(1,16))
+ │ ├── keyword_loc: (1,0)-(1,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,16))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ └── flags: decimal
+ │ │ └── @ KeywordHashNode (location: (1,9)-(1,16))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,9)-(1,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,9)-(1,11))
+ │ │ │ ├── opening_loc: (1,9)-(1,10) = ":"
+ │ │ │ ├── value_loc: (1,10)-(1,11) = "z"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "z"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,15)-(1,16))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,12)-(1,14) = "=>"
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (3,0)-(3,25))
+ │ ├── keyword_loc: (3,0)-(3,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,6)-(3,25))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (3,6)-(3,7))
+ │ │ │ └── flags: decimal
+ │ │ └── @ KeywordHashNode (location: (3,9)-(3,25))
+ │ │ └── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (3,9)-(3,16))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (3,9)-(3,11))
+ │ │ │ │ ├── opening_loc: (3,9)-(3,10) = ":"
+ │ │ │ │ ├── value_loc: (3,10)-(3,11) = "z"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "z"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (3,15)-(3,16))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (3,12)-(3,14) = "=>"
+ │ │ └── @ AssocNode (location: (3,18)-(3,25))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,18)-(3,20))
+ │ │ │ ├── opening_loc: (3,18)-(3,19) = ":"
+ │ │ │ ├── value_loc: (3,19)-(3,20) = "w"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "w"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,24)-(3,25))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (3,21)-(3,23) = "=>"
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (5,0)-(5,13))
+ │ ├── keyword_loc: (5,0)-(5,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (5,6)-(5,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,6)-(5,7) = "y"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,8)-(5,13))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (5,8)-(5,13))
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (5,8)-(5,13))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (5,8)-(5,10))
+ │ │ │ │ ├── opening_loc: (5,8)-(5,9) = ":"
+ │ │ │ │ ├── value_loc: (5,9)-(5,10) = "z"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "z"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (5,12)-(5,13))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (5,10)-(5,12) = "=>"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "y"
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (7,0)-(7,11))
+ │ ├── keyword_loc: (7,0)-(7,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,6)-(7,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,6)-(7,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,6)-(7,7) = "y"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,8)-(7,11))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (7,8)-(7,11))
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (7,8)-(7,11))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (7,8)-(7,10))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (7,8)-(7,9) = "z"
+ │ │ │ │ ├── closing_loc: (7,9)-(7,10) = ":"
+ │ │ │ │ └── unescaped: "z"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (7,10)-(7,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "y"
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (9,0)-(9,12))
+ │ ├── keyword_loc: (9,0)-(9,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,6)-(9,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (9,6)-(9,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,6)-(9,7) = "y"
+ │ │ ├── opening_loc: (9,7)-(9,8) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,8)-(9,11))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ KeywordHashNode (location: (9,8)-(9,11))
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (9,8)-(9,11))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (9,8)-(9,10))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (9,8)-(9,9) = "z"
+ │ │ │ │ ├── closing_loc: (9,9)-(9,10) = ":"
+ │ │ │ │ └── unescaped: "z"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (9,10)-(9,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── closing_loc: (9,11)-(9,12) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "y"
+ │ └── rparen_loc: ∅
+ └── @ YieldNode (location: (11,0)-(11,13))
+ ├── keyword_loc: (11,0)-(11,5) = "yield"
+ ├── lparen_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,6)-(11,13))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (11,6)-(11,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,6)-(11,7) = "y"
+ │ ├── opening_loc: (11,7)-(11,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,8)-(11,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (11,8)-(11,12))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (11,8)-(11,12))
+ │ │ ├── key:
+ │ │ │ @ CallNode (location: (11,8)-(11,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,8)-(11,9) = "z"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "z"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (11,11)-(11,12))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (11,9)-(11,11) = "=>"
+ │ ├── closing_loc: (11,12)-(11,13) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "y"
+ └── rparen_loc: ∅
diff --git a/test/prism/snapshots/seattlerb/yield_empty_parens.txt b/test/prism/snapshots/seattlerb/yield_empty_parens.txt
new file mode 100644
index 0000000000..5ecd89823f
--- /dev/null
+++ b/test/prism/snapshots/seattlerb/yield_empty_parens.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ YieldNode (location: (1,0)-(1,7))
+ ├── keyword_loc: (1,0)-(1,5) = "yield"
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── arguments: ∅
+ └── rparen_loc: (1,6)-(1,7) = ")"
diff --git a/test/prism/snapshots/single_quote_heredocs.txt b/test/prism/snapshots/single_quote_heredocs.txt
new file mode 100644
index 0000000000..cea79aa6b7
--- /dev/null
+++ b/test/prism/snapshots/single_quote_heredocs.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,8) = "<<-'EOS'"
+ ├── content_loc: (2,0)-(2,0) = " cd L:\\Work\\MG3710IQPro\\Develop\n"
+ ├── closing_loc: (3,0)-(3,0) = "EOS\n"
+ └── unescaped: " cd L:\\Work\\MG3710IQPro\\Develop\n"
diff --git a/test/prism/snapshots/spanning_heredoc.txt b/test/prism/snapshots/spanning_heredoc.txt
new file mode 100644
index 0000000000..9ebb067ecf
--- /dev/null
+++ b/test/prism/snapshots/spanning_heredoc.txt
@@ -0,0 +1,301 @@
+@ ProgramNode (location: (4,0)-(51,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (4,0)-(51,2))
+ └── body: (length: 8)
+ ├── @ CallNode (location: (4,0)-(7,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,0)-(4,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (4,3)-(7,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (4,3)-(7,7))
+ │ │ ├── receiver:
+ │ │ │ @ StringNode (location: (4,3)-(4,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (4,3)-(4,7) = "<<-A"
+ │ │ │ ├── content_loc: (5,0)-(5,0) = "a\n"
+ │ │ │ ├── closing_loc: (6,0)-(6,0) = "A\n"
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── call_operator_loc: (4,7)-(4,8) = "."
+ │ │ ├── message_loc: (4,8)-(4,12) = "gsub"
+ │ │ ├── opening_loc: (4,12)-(4,13) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (4,13)-(7,6))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ InterpolatedRegularExpressionNode (location: (4,13)-(7,2))
+ │ │ │ │ ├── opening_loc: (4,13)-(4,14) = "/"
+ │ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ │ ├── @ StringNode (location: (4,14)-(4,0))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── content_loc: (4,14)-(4,0) = "b\\\n"
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ │ └── @ StringNode (location: (7,0)-(7,1))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (7,0)-(7,1) = "b"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── closing_loc: (7,1)-(7,2) = "/"
+ │ │ │ │ └── flags: ∅
+ │ │ │ └── @ StringNode (location: (7,4)-(7,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (7,4)-(7,5) = "\""
+ │ │ │ ├── content_loc: (7,5)-(7,5) = ""
+ │ │ │ ├── closing_loc: (7,5)-(7,6) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: (7,6)-(7,7) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "gsub"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "pp"
+ ├── @ CallNode (location: (10,0)-(13,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (10,0)-(10,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (10,3)-(13,2))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (10,3)-(10,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (10,3)-(10,7) = "<<-A"
+ │ │ │ ├── content_loc: (11,0)-(11,0) = "c\n"
+ │ │ │ ├── closing_loc: (12,0)-(12,0) = "A\n"
+ │ │ │ └── unescaped: "c\n"
+ │ │ └── @ InterpolatedStringNode (location: (10,9)-(13,2))
+ │ │ ├── opening_loc: (10,9)-(10,10) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (10,10)-(10,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (10,10)-(10,0) = "d\\\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "d"
+ │ │ │ └── @ StringNode (location: (13,0)-(13,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (13,0)-(13,1) = "d"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "d"
+ │ │ └── closing_loc: (13,1)-(13,2) = "\""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "pp"
+ ├── @ CallNode (location: (16,0)-(19,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (16,0)-(16,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (16,3)-(19,2))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (16,3)-(16,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (16,3)-(16,7) = "<<-A"
+ │ │ │ ├── content_loc: (17,0)-(17,0) = "e\n"
+ │ │ │ ├── closing_loc: (18,0)-(18,0) = "A\n"
+ │ │ │ └── unescaped: "e\n"
+ │ │ └── @ InterpolatedStringNode (location: (16,9)-(19,2))
+ │ │ ├── opening_loc: (16,9)-(16,12) = "%q["
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (16,12)-(16,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (16,12)-(16,0) = "f\\\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "f\\\n"
+ │ │ │ └── @ StringNode (location: (19,0)-(19,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (19,0)-(19,1) = "f"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "f"
+ │ │ └── closing_loc: (19,1)-(19,2) = "]"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "pp"
+ ├── @ CallNode (location: (22,0)-(25,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (22,0)-(22,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (22,3)-(25,2))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (22,3)-(22,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (22,3)-(22,7) = "<<-A"
+ │ │ │ ├── content_loc: (23,0)-(23,0) = "g\n"
+ │ │ │ ├── closing_loc: (24,0)-(24,0) = "A\n"
+ │ │ │ └── unescaped: "g\n"
+ │ │ └── @ InterpolatedStringNode (location: (22,9)-(25,2))
+ │ │ ├── opening_loc: (22,9)-(22,12) = "%Q["
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (22,12)-(22,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (22,12)-(22,0) = "h\\\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "h"
+ │ │ │ └── @ StringNode (location: (25,0)-(25,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (25,0)-(25,1) = "h"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "h"
+ │ │ └── closing_loc: (25,1)-(25,2) = "]"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "pp"
+ ├── @ CallNode (location: (28,0)-(31,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (28,0)-(28,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (28,3)-(31,2))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (28,3)-(28,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (28,3)-(28,7) = "<<-A"
+ │ │ │ ├── content_loc: (29,0)-(29,0) = "i\n"
+ │ │ │ ├── closing_loc: (30,0)-(30,0) = "A\n"
+ │ │ │ └── unescaped: "i\n"
+ │ │ └── @ ArrayNode (location: (28,9)-(31,2))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ StringNode (location: (28,12)-(28,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (28,12)-(28,0) = "j\\\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "j\n"
+ │ │ │ └── @ StringNode (location: (31,0)-(31,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (31,0)-(31,1) = "j"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "j"
+ │ │ ├── opening_loc: (28,9)-(28,12) = "%w["
+ │ │ └── closing_loc: (31,1)-(31,2) = "]"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "pp"
+ ├── @ CallNode (location: (35,0)-(38,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,0)-(35,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,3)-(38,2))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (35,3)-(35,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (35,3)-(35,7) = "<<-A"
+ │ │ │ ├── content_loc: (36,0)-(36,0) = "k\n"
+ │ │ │ ├── closing_loc: (37,0)-(37,0) = "A\n"
+ │ │ │ └── unescaped: "k\n"
+ │ │ └── @ ArrayNode (location: (35,9)-(38,2))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (35,12)-(38,1))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (35,12)-(35,0))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (35,12)-(35,0) = "l\\\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "l"
+ │ │ │ │ └── @ StringNode (location: (38,0)-(38,1))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (38,0)-(38,1) = "l"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "l"
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── opening_loc: (35,9)-(35,12) = "%W["
+ │ │ └── closing_loc: (38,1)-(38,2) = "]"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "pp"
+ ├── @ CallNode (location: (41,0)-(44,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (41,0)-(41,2) = "pp"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,3)-(44,2))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (41,3)-(41,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (41,3)-(41,7) = "<<-A"
+ │ │ │ ├── content_loc: (42,0)-(42,0) = "m\n"
+ │ │ │ ├── closing_loc: (43,0)-(43,0) = "A\n"
+ │ │ │ └── unescaped: "m\n"
+ │ │ └── @ ArrayNode (location: (41,9)-(44,2))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (41,12)-(41,0))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (41,12)-(41,0) = "n\\\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "n\\\n"
+ │ │ │ └── @ SymbolNode (location: (44,0)-(44,1))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (44,0)-(44,1) = "n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "n"
+ │ │ ├── opening_loc: (41,9)-(41,12) = "%i["
+ │ │ └── closing_loc: (44,1)-(44,2) = "]"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "pp"
+ └── @ CallNode (location: (48,0)-(51,2))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (48,0)-(48,2) = "pp"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (48,3)-(51,2))
+ │ └── arguments: (length: 2)
+ │ ├── @ StringNode (location: (48,3)-(48,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (48,3)-(48,7) = "<<-A"
+ │ │ ├── content_loc: (49,0)-(49,0) = "o\n"
+ │ │ ├── closing_loc: (50,0)-(50,0) = "A\n"
+ │ │ └── unescaped: "o\n"
+ │ └── @ ArrayNode (location: (48,9)-(51,2))
+ │ ├── elements: (length: 1)
+ │ │ └── @ InterpolatedSymbolNode (location: (48,12)-(51,1))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (48,12)-(48,0))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (48,12)-(48,0) = "p\\\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "p"
+ │ │ │ └── @ StringNode (location: (51,0)-(51,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (51,0)-(51,1) = "p"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "p"
+ │ │ └── closing_loc: ∅
+ │ ├── opening_loc: (48,9)-(48,12) = "%I["
+ │ └── closing_loc: (51,1)-(51,2) = "]"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "pp"
diff --git a/test/prism/snapshots/strings.txt b/test/prism/snapshots/strings.txt
new file mode 100644
index 0000000000..e3a72eefdf
--- /dev/null
+++ b/test/prism/snapshots/strings.txt
@@ -0,0 +1,516 @@
+@ ProgramNode (location: (1,0)-(105,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(105,4))
+ └── body: (length: 50)
+ ├── @ StringNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,2) = "%%"
+ │ ├── content_loc: (1,2)-(1,5) = "abc"
+ │ ├── closing_loc: (1,5)-(1,6) = "%"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (3,0)-(3,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (3,0)-(3,2) = "%^"
+ │ ├── content_loc: (3,2)-(3,5) = "abc"
+ │ ├── closing_loc: (3,5)-(3,6) = "^"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (5,0)-(5,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,0)-(5,2) = "%&"
+ │ ├── content_loc: (5,2)-(5,5) = "abc"
+ │ ├── closing_loc: (5,5)-(5,6) = "&"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (7,0)-(7,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,2) = "%*"
+ │ ├── content_loc: (7,2)-(7,5) = "abc"
+ │ ├── closing_loc: (7,5)-(7,6) = "*"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (9,0)-(9,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (9,0)-(9,2) = "%_"
+ │ ├── content_loc: (9,2)-(9,5) = "abc"
+ │ ├── closing_loc: (9,5)-(9,6) = "_"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (11,0)-(11,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,0)-(11,2) = "%+"
+ │ ├── content_loc: (11,2)-(11,5) = "abc"
+ │ ├── closing_loc: (11,5)-(11,6) = "+"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (13,0)-(13,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (13,0)-(13,2) = "%-"
+ │ ├── content_loc: (13,2)-(13,5) = "abc"
+ │ ├── closing_loc: (13,5)-(13,6) = "-"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (15,0)-(15,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (15,0)-(15,2) = "%:"
+ │ ├── content_loc: (15,2)-(15,5) = "abc"
+ │ ├── closing_loc: (15,5)-(15,6) = ":"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (17,0)-(17,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (17,0)-(17,2) = "%;"
+ │ ├── content_loc: (17,2)-(17,5) = "abc"
+ │ ├── closing_loc: (17,5)-(17,6) = ";"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (19,0)-(19,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (19,0)-(19,2) = "%'"
+ │ ├── content_loc: (19,2)-(19,5) = "abc"
+ │ ├── closing_loc: (19,5)-(19,6) = "'"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (21,0)-(21,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (21,0)-(21,2) = "%~"
+ │ ├── content_loc: (21,2)-(21,5) = "abc"
+ │ ├── closing_loc: (21,5)-(21,6) = "~"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (23,0)-(23,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (23,0)-(23,2) = "%?"
+ │ ├── content_loc: (23,2)-(23,5) = "abc"
+ │ ├── closing_loc: (23,5)-(23,6) = "?"
+ │ └── unescaped: "abc"
+ ├── @ ArrayNode (location: (25,0)-(25,8))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (25,0)-(25,3) = "%w{"
+ │ └── closing_loc: (25,7)-(25,8) = "}"
+ ├── @ StringNode (location: (27,0)-(27,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (27,0)-(27,2) = "%/"
+ │ ├── content_loc: (27,2)-(27,5) = "abc"
+ │ ├── closing_loc: (27,5)-(27,6) = "/"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (29,0)-(29,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (29,0)-(29,2) = "%`"
+ │ ├── content_loc: (29,2)-(29,5) = "abc"
+ │ ├── closing_loc: (29,5)-(29,6) = "`"
+ │ └── unescaped: "abc"
+ ├── @ InterpolatedStringNode (location: (31,0)-(31,8))
+ │ ├── opening_loc: (31,0)-(31,1) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedVariableNode (location: (31,1)-(31,7))
+ │ │ ├── operator_loc: (31,1)-(31,2) = "#"
+ │ │ └── variable:
+ │ │ @ ClassVariableReadNode (location: (31,2)-(31,7))
+ │ │ └── name: :@@foo
+ │ └── closing_loc: (31,7)-(31,8) = "\""
+ ├── @ StringNode (location: (33,0)-(33,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (33,0)-(33,2) = "%\\"
+ │ ├── content_loc: (33,2)-(33,5) = "abc"
+ │ ├── closing_loc: (33,5)-(33,6) = "\\"
+ │ └── unescaped: "abc"
+ ├── @ InterpolatedStringNode (location: (35,0)-(35,17))
+ │ ├── opening_loc: (35,0)-(35,2) = "%{"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (35,2)-(35,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (35,2)-(35,6) = "aaa "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "aaa "
+ │ │ ├── @ EmbeddedStatementsNode (location: (35,6)-(35,12))
+ │ │ │ ├── opening_loc: (35,6)-(35,8) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (35,8)-(35,11))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (35,8)-(35,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (35,8)-(35,11) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bbb"
+ │ │ │ └── closing_loc: (35,11)-(35,12) = "}"
+ │ │ └── @ StringNode (location: (35,12)-(35,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (35,12)-(35,16) = " ccc"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " ccc"
+ │ └── closing_loc: (35,16)-(35,17) = "}"
+ ├── @ StringNode (location: (37,0)-(37,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (37,0)-(37,2) = "%["
+ │ ├── content_loc: (37,2)-(37,7) = "foo[]"
+ │ ├── closing_loc: (37,7)-(37,8) = "]"
+ │ └── unescaped: "foo[]"
+ ├── @ CallNode (location: (39,0)-(41,5))
+ │ ├── receiver:
+ │ │ @ StringNode (location: (39,0)-(39,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (39,0)-(39,1) = "\""
+ │ │ ├── content_loc: (39,1)-(39,4) = "foo"
+ │ │ ├── closing_loc: (39,4)-(39,5) = "\""
+ │ │ └── unescaped: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (39,6)-(39,7) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,0)-(41,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (41,0)-(41,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (41,0)-(41,1) = "\""
+ │ │ ├── content_loc: (41,1)-(41,4) = "bar"
+ │ │ ├── closing_loc: (41,4)-(41,5) = "\""
+ │ │ └── unescaped: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ StringNode (location: (43,0)-(43,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (43,0)-(43,3) = "%q{"
+ │ ├── content_loc: (43,3)-(43,6) = "abc"
+ │ ├── closing_loc: (43,6)-(43,7) = "}"
+ │ └── unescaped: "abc"
+ ├── @ SymbolNode (location: (45,0)-(45,7))
+ │ ├── opening_loc: (45,0)-(45,3) = "%s["
+ │ ├── value_loc: (45,3)-(45,6) = "abc"
+ │ ├── closing_loc: (45,6)-(45,7) = "]"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (47,0)-(47,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (47,0)-(47,2) = "%{"
+ │ ├── content_loc: (47,2)-(47,5) = "abc"
+ │ ├── closing_loc: (47,5)-(47,6) = "}"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (49,0)-(49,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (49,0)-(49,1) = "'"
+ │ ├── content_loc: (49,1)-(49,1) = ""
+ │ ├── closing_loc: (49,1)-(49,2) = "'"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (51,0)-(51,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (51,0)-(51,1) = "\""
+ │ ├── content_loc: (51,1)-(51,4) = "abc"
+ │ ├── closing_loc: (51,4)-(51,5) = "\""
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (53,0)-(53,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (53,0)-(53,1) = "\""
+ │ ├── content_loc: (53,1)-(53,6) = "\#@---"
+ │ ├── closing_loc: (53,6)-(53,7) = "\""
+ │ └── unescaped: "\#@---"
+ ├── @ InterpolatedStringNode (location: (55,0)-(55,16))
+ │ ├── opening_loc: (55,0)-(55,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (55,1)-(55,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (55,1)-(55,5) = "aaa "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "aaa "
+ │ │ ├── @ EmbeddedStatementsNode (location: (55,5)-(55,11))
+ │ │ │ ├── opening_loc: (55,5)-(55,7) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (55,7)-(55,10))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (55,7)-(55,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (55,7)-(55,10) = "bbb"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bbb"
+ │ │ │ └── closing_loc: (55,10)-(55,11) = "}"
+ │ │ └── @ StringNode (location: (55,11)-(55,15))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (55,11)-(55,15) = " ccc"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " ccc"
+ │ └── closing_loc: (55,15)-(55,16) = "\""
+ ├── @ StringNode (location: (57,0)-(57,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (57,0)-(57,1) = "'"
+ │ ├── content_loc: (57,1)-(57,4) = "abc"
+ │ ├── closing_loc: (57,4)-(57,5) = "'"
+ │ └── unescaped: "abc"
+ ├── @ ArrayNode (location: (59,0)-(59,9))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (59,3)-(59,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (59,3)-(59,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ StringNode (location: (59,5)-(59,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (59,5)-(59,6) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ StringNode (location: (59,7)-(59,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (59,7)-(59,8) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── opening_loc: (59,0)-(59,3) = "%w["
+ │ └── closing_loc: (59,8)-(59,9) = "]"
+ ├── @ ArrayNode (location: (61,0)-(61,17))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (61,3)-(61,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (61,3)-(61,6) = "a[]"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a[]"
+ │ │ ├── @ StringNode (location: (61,7)-(61,12))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (61,7)-(61,12) = "b[[]]"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b[[]]"
+ │ │ └── @ StringNode (location: (61,13)-(61,16))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (61,13)-(61,16) = "c[]"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c[]"
+ │ ├── opening_loc: (61,0)-(61,3) = "%w["
+ │ └── closing_loc: (61,16)-(61,17) = "]"
+ ├── @ ArrayNode (location: (63,0)-(63,18))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (63,3)-(63,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (63,3)-(63,11) = "foo\\ bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo bar"
+ │ │ └── @ StringNode (location: (63,12)-(63,17))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (63,12)-(63,17) = "\\\#{1}"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\\\#{1}"
+ │ ├── opening_loc: (63,0)-(63,3) = "%w["
+ │ └── closing_loc: (63,17)-(63,18) = "]"
+ ├── @ ArrayNode (location: (65,0)-(65,16))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (65,3)-(65,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (65,3)-(65,11) = "foo\\ bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo bar"
+ │ │ └── @ StringNode (location: (65,12)-(65,15))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (65,12)-(65,15) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ ├── opening_loc: (65,0)-(65,3) = "%w["
+ │ └── closing_loc: (65,15)-(65,16) = "]"
+ ├── @ ArrayNode (location: (67,0)-(67,14))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (67,3)-(67,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (67,3)-(67,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ InterpolatedStringNode (location: (67,5)-(67,11))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (67,5)-(67,6))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (67,5)-(67,6) = "b"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (67,6)-(67,10))
+ │ │ │ │ │ ├── opening_loc: (67,6)-(67,8) = "\#{"
+ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ @ StatementsNode (location: (67,8)-(67,9))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (67,8)-(67,9))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (67,8)-(67,9) = "c"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "c"
+ │ │ │ │ │ └── closing_loc: (67,9)-(67,10) = "}"
+ │ │ │ │ └── @ StringNode (location: (67,10)-(67,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (67,10)-(67,11) = "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "d"
+ │ │ │ └── closing_loc: ∅
+ │ │ └── @ StringNode (location: (67,12)-(67,13))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (67,12)-(67,13) = "e"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "e"
+ │ ├── opening_loc: (67,0)-(67,3) = "%W["
+ │ └── closing_loc: (67,13)-(67,14) = "]"
+ ├── @ ArrayNode (location: (69,0)-(69,9))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (69,3)-(69,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (69,3)-(69,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ StringNode (location: (69,5)-(69,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (69,5)-(69,6) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ StringNode (location: (69,7)-(69,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (69,7)-(69,8) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── opening_loc: (69,0)-(69,3) = "%W["
+ │ └── closing_loc: (69,8)-(69,9) = "]"
+ ├── @ ArrayNode (location: (71,0)-(75,1))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ StringNode (location: (72,2)-(72,3))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (72,2)-(72,3) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ StringNode (location: (73,2)-(73,3))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (73,2)-(73,3) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ StringNode (location: (74,2)-(74,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (74,2)-(74,3) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── opening_loc: (71,0)-(71,3) = "%w["
+ │ └── closing_loc: (75,0)-(75,1) = "]"
+ ├── @ StringNode (location: (77,0)-(77,15))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (77,0)-(77,1) = "'"
+ │ ├── content_loc: (77,1)-(77,14) = "\\' foo \\' bar"
+ │ ├── closing_loc: (77,14)-(77,15) = "'"
+ │ └── unescaped: "' foo ' bar"
+ ├── @ StringNode (location: (79,0)-(79,15))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (79,0)-(79,1) = "'"
+ │ ├── content_loc: (79,1)-(79,14) = "\\\\ foo \\\\ bar"
+ │ ├── closing_loc: (79,14)-(79,15) = "'"
+ │ └── unescaped: "\\ foo \\ bar"
+ ├── @ InterpolatedStringNode (location: (81,0)-(81,7))
+ │ ├── opening_loc: (81,0)-(81,1) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedVariableNode (location: (81,1)-(81,6))
+ │ │ ├── operator_loc: (81,1)-(81,2) = "#"
+ │ │ └── variable:
+ │ │ @ GlobalVariableReadNode (location: (81,2)-(81,6))
+ │ │ └── name: :$foo
+ │ └── closing_loc: (81,6)-(81,7) = "\""
+ ├── @ InterpolatedStringNode (location: (83,0)-(83,7))
+ │ ├── opening_loc: (83,0)-(83,1) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedVariableNode (location: (83,1)-(83,6))
+ │ │ ├── operator_loc: (83,1)-(83,2) = "#"
+ │ │ └── variable:
+ │ │ @ InstanceVariableReadNode (location: (83,2)-(83,6))
+ │ │ └── name: :@foo
+ │ └── closing_loc: (83,6)-(83,7) = "\""
+ ├── @ StringNode (location: (85,0)-(85,15))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (85,0)-(85,1) = "\""
+ │ ├── content_loc: (85,1)-(85,14) = "\\x7 \\x23 \\x61"
+ │ ├── closing_loc: (85,14)-(85,15) = "\""
+ │ └── unescaped: "\a # a"
+ ├── @ StringNode (location: (87,0)-(87,13))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (87,0)-(87,1) = "\""
+ │ ├── content_loc: (87,1)-(87,12) = "\\7 \\43 \\141"
+ │ ├── closing_loc: (87,12)-(87,13) = "\""
+ │ └── unescaped: "\a # a"
+ ├── @ StringNode (location: (89,0)-(89,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (89,0)-(89,2) = "%["
+ │ ├── content_loc: (89,2)-(89,5) = "abc"
+ │ ├── closing_loc: (89,5)-(89,6) = "]"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (91,0)-(91,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (91,0)-(91,2) = "%("
+ │ ├── content_loc: (91,2)-(91,5) = "abc"
+ │ ├── closing_loc: (91,5)-(91,6) = ")"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (93,0)-(93,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (93,0)-(93,2) = "%@"
+ │ ├── content_loc: (93,2)-(93,5) = "abc"
+ │ ├── closing_loc: (93,5)-(93,6) = "@"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (95,0)-(95,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (95,0)-(95,2) = "%$"
+ │ ├── content_loc: (95,2)-(95,5) = "abc"
+ │ ├── closing_loc: (95,5)-(95,6) = "$"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (97,0)-(97,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (97,0)-(97,1) = "?"
+ │ ├── content_loc: (97,1)-(97,2) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── @ StringConcatNode (location: (99,0)-(99,6))
+ │ ├── left:
+ │ │ @ StringNode (location: (99,0)-(99,2))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (99,0)-(99,1) = "?"
+ │ │ ├── content_loc: (99,1)-(99,2) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ └── right:
+ │ @ StringNode (location: (99,3)-(99,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (99,3)-(99,4) = "\""
+ │ ├── content_loc: (99,4)-(99,5) = "a"
+ │ ├── closing_loc: (99,5)-(99,6) = "\""
+ │ └── unescaped: "a"
+ ├── @ StringNode (location: (101,0)-(101,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (101,0)-(101,3) = "%Q{"
+ │ ├── content_loc: (101,3)-(101,6) = "abc"
+ │ ├── closing_loc: (101,6)-(101,7) = "}"
+ │ └── unescaped: "abc"
+ ├── @ StringNode (location: (103,0)-(103,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (103,0)-(103,2) = "%^"
+ │ ├── content_loc: (103,2)-(103,4) = "\#$"
+ │ ├── closing_loc: (103,4)-(103,5) = "^"
+ │ └── unescaped: "\#$"
+ └── @ StringNode (location: (105,0)-(105,4))
+ ├── flags: ∅
+ ├── opening_loc: (105,0)-(105,2) = "%@"
+ ├── content_loc: (105,2)-(105,3) = "#"
+ ├── closing_loc: (105,3)-(105,4) = "@"
+ └── unescaped: "#"
diff --git a/test/prism/snapshots/super.txt b/test/prism/snapshots/super.txt
new file mode 100644
index 0000000000..24a7ae81a9
--- /dev/null
+++ b/test/prism/snapshots/super.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(7,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,14))
+ └── body: (length: 4)
+ ├── @ ForwardingSuperNode (location: (1,0)-(1,5))
+ │ └── block: ∅
+ ├── @ SuperNode (location: (3,0)-(3,7))
+ │ ├── keyword_loc: (3,0)-(3,5) = "super"
+ │ ├── lparen_loc: (3,5)-(3,6) = "("
+ │ ├── arguments: ∅
+ │ ├── rparen_loc: (3,6)-(3,7) = ")"
+ │ └── block: ∅
+ ├── @ SuperNode (location: (5,0)-(5,8))
+ │ ├── keyword_loc: (5,0)-(5,5) = "super"
+ │ ├── lparen_loc: (5,5)-(5,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ └── flags: decimal
+ │ ├── rparen_loc: (5,7)-(5,8) = ")"
+ │ └── block: ∅
+ └── @ SuperNode (location: (7,0)-(7,14))
+ ├── keyword_loc: (7,0)-(7,5) = "super"
+ ├── lparen_loc: (7,5)-(7,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,6)-(7,13))
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (7,6)-(7,7))
+ │ │ └── flags: decimal
+ │ ├── @ IntegerNode (location: (7,9)-(7,10))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (7,12)-(7,13))
+ │ └── flags: decimal
+ ├── rparen_loc: (7,13)-(7,14) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/symbols.txt b/test/prism/snapshots/symbols.txt
new file mode 100644
index 0000000000..d445d8a90f
--- /dev/null
+++ b/test/prism/snapshots/symbols.txt
@@ -0,0 +1,398 @@
+@ ProgramNode (location: (1,0)-(93,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(93,13))
+ └── body: (length: 47)
+ ├── @ SymbolNode (location: (1,0)-(1,6))
+ │ ├── opening_loc: (1,0)-(1,2) = ":'"
+ │ ├── value_loc: (1,2)-(1,5) = "abc"
+ │ ├── closing_loc: (1,5)-(1,6) = "'"
+ │ └── unescaped: "abc"
+ ├── @ InterpolatedSymbolNode (location: (3,0)-(3,9))
+ │ ├── opening_loc: (3,0)-(3,2) = ":\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (3,2)-(3,8))
+ │ │ ├── opening_loc: (3,2)-(3,4) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,4)-(3,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,4)-(3,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,4)-(3,7) = "var"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var"
+ │ │ └── closing_loc: (3,7)-(3,8) = "}"
+ │ └── closing_loc: (3,8)-(3,9) = "\""
+ ├── @ InterpolatedSymbolNode (location: (5,0)-(5,10))
+ │ ├── opening_loc: (5,0)-(5,2) = ":\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (5,2)-(5,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (5,2)-(5,5) = "abc"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "abc"
+ │ │ └── @ EmbeddedStatementsNode (location: (5,5)-(5,9))
+ │ │ ├── opening_loc: (5,5)-(5,7) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (5,7)-(5,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,7)-(5,8))
+ │ │ │ └── flags: decimal
+ │ │ └── closing_loc: (5,8)-(5,9) = "}"
+ │ └── closing_loc: (5,9)-(5,10) = "\""
+ ├── @ ArrayNode (location: (7,0)-(7,20))
+ │ ├── elements: (length: 4)
+ │ │ ├── @ SymbolNode (location: (7,1)-(7,4))
+ │ │ │ ├── opening_loc: (7,1)-(7,2) = ":"
+ │ │ │ ├── value_loc: (7,2)-(7,4) = "Υ"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "Υ"
+ │ │ ├── @ SymbolNode (location: (7,6)-(7,9))
+ │ │ │ ├── opening_loc: (7,6)-(7,7) = ":"
+ │ │ │ ├── value_loc: (7,7)-(7,9) = "ά"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "ά"
+ │ │ ├── @ SymbolNode (location: (7,11)-(7,14))
+ │ │ │ ├── opening_loc: (7,11)-(7,12) = ":"
+ │ │ │ ├── value_loc: (7,12)-(7,14) = "ŗ"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "ŗ"
+ │ │ └── @ SymbolNode (location: (7,16)-(7,19))
+ │ │ ├── opening_loc: (7,16)-(7,17) = ":"
+ │ │ ├── value_loc: (7,17)-(7,19) = "ρ"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "ρ"
+ │ ├── opening_loc: (7,0)-(7,1) = "["
+ │ └── closing_loc: (7,19)-(7,20) = "]"
+ ├── @ SymbolNode (location: (9,0)-(9,3))
+ │ ├── opening_loc: (9,0)-(9,1) = ":"
+ │ ├── value_loc: (9,1)-(9,3) = "-@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "-@"
+ ├── @ SymbolNode (location: (11,0)-(11,2))
+ │ ├── opening_loc: (11,0)-(11,1) = ":"
+ │ ├── value_loc: (11,1)-(11,2) = "-"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "-"
+ ├── @ SymbolNode (location: (13,0)-(13,2))
+ │ ├── opening_loc: (13,0)-(13,1) = ":"
+ │ ├── value_loc: (13,1)-(13,2) = "%"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "%"
+ ├── @ SymbolNode (location: (15,0)-(15,2))
+ │ ├── opening_loc: (15,0)-(15,1) = ":"
+ │ ├── value_loc: (15,1)-(15,2) = "|"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "|"
+ ├── @ SymbolNode (location: (17,0)-(17,3))
+ │ ├── opening_loc: (17,0)-(17,1) = ":"
+ │ ├── value_loc: (17,1)-(17,3) = "+@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "+@"
+ ├── @ SymbolNode (location: (19,0)-(19,2))
+ │ ├── opening_loc: (19,0)-(19,1) = ":"
+ │ ├── value_loc: (19,1)-(19,2) = "+"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "+"
+ ├── @ SymbolNode (location: (21,0)-(21,2))
+ │ ├── opening_loc: (21,0)-(21,1) = ":"
+ │ ├── value_loc: (21,1)-(21,2) = "/"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "/"
+ ├── @ SymbolNode (location: (23,0)-(23,3))
+ │ ├── opening_loc: (23,0)-(23,1) = ":"
+ │ ├── value_loc: (23,1)-(23,3) = "**"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "**"
+ ├── @ SymbolNode (location: (25,0)-(25,2))
+ │ ├── opening_loc: (25,0)-(25,1) = ":"
+ │ ├── value_loc: (25,1)-(25,2) = "*"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "*"
+ ├── @ SymbolNode (location: (27,0)-(27,3))
+ │ ├── opening_loc: (27,0)-(27,1) = ":"
+ │ ├── value_loc: (27,1)-(27,3) = "~@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "~@"
+ ├── @ ArrayNode (location: (29,0)-(29,16))
+ │ ├── elements: (length: 4)
+ │ │ ├── @ IntegerNode (location: (29,1)-(29,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ FloatNode (location: (29,4)-(29,7))
+ │ │ ├── @ RationalNode (location: (29,9)-(29,11))
+ │ │ │ └── numeric:
+ │ │ │ @ IntegerNode (location: (29,9)-(29,10))
+ │ │ │ └── flags: decimal
+ │ │ └── @ ImaginaryNode (location: (29,13)-(29,15))
+ │ │ └── numeric:
+ │ │ @ IntegerNode (location: (29,13)-(29,14))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (29,0)-(29,1) = "["
+ │ └── closing_loc: (29,15)-(29,16) = "]"
+ ├── @ SymbolNode (location: (31,0)-(31,2))
+ │ ├── opening_loc: (31,0)-(31,1) = ":"
+ │ ├── value_loc: (31,1)-(31,2) = "~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "~"
+ ├── @ SymbolNode (location: (33,0)-(33,2))
+ │ ├── opening_loc: (33,0)-(33,1) = ":"
+ │ ├── value_loc: (33,1)-(33,2) = "a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "a"
+ ├── @ ArrayNode (location: (35,0)-(35,9))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SymbolNode (location: (35,3)-(35,4))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (35,3)-(35,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (35,5)-(35,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (35,5)-(35,6) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ SymbolNode (location: (35,7)-(35,8))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (35,7)-(35,8) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ ├── opening_loc: (35,0)-(35,3) = "%i["
+ │ └── closing_loc: (35,8)-(35,9) = "]"
+ ├── @ ArrayNode (location: (37,0)-(37,24))
+ │ ├── elements: (length: 4)
+ │ │ ├── @ SymbolNode (location: (37,3)-(37,4))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (37,3)-(37,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (37,5)-(37,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (37,5)-(37,10) = "b\#{1}"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b\#{1}"
+ │ │ ├── @ SymbolNode (location: (37,11)-(37,16))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (37,11)-(37,16) = "\#{2}c"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\#{2}c"
+ │ │ └── @ SymbolNode (location: (37,17)-(37,23))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (37,17)-(37,23) = "d\#{3}f"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "d\#{3}f"
+ │ ├── opening_loc: (37,0)-(37,3) = "%i["
+ │ └── closing_loc: (37,23)-(37,24) = "]"
+ ├── @ ArrayNode (location: (39,0)-(39,24))
+ │ ├── elements: (length: 4)
+ │ │ ├── @ SymbolNode (location: (39,3)-(39,4))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (39,3)-(39,4) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ InterpolatedSymbolNode (location: (39,5)-(39,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (39,5)-(39,6))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (39,5)-(39,6) = "b"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ └── @ EmbeddedStatementsNode (location: (39,6)-(39,10))
+ │ │ │ │ ├── opening_loc: (39,6)-(39,8) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (39,8)-(39,9))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (39,8)-(39,9))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── closing_loc: (39,9)-(39,10) = "}"
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── @ InterpolatedSymbolNode (location: (39,11)-(39,16))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (39,11)-(39,15))
+ │ │ │ │ │ ├── opening_loc: (39,11)-(39,13) = "\#{"
+ │ │ │ │ │ ├── statements:
+ │ │ │ │ │ │ @ StatementsNode (location: (39,13)-(39,14))
+ │ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (39,13)-(39,14))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ └── closing_loc: (39,14)-(39,15) = "}"
+ │ │ │ │ └── @ StringNode (location: (39,15)-(39,16))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (39,15)-(39,16) = "c"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "c"
+ │ │ │ └── closing_loc: ∅
+ │ │ └── @ InterpolatedSymbolNode (location: (39,17)-(39,23))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (39,17)-(39,18))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (39,17)-(39,18) = "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "d"
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (39,18)-(39,22))
+ │ │ │ │ ├── opening_loc: (39,18)-(39,20) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (39,20)-(39,21))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (39,20)-(39,21))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── closing_loc: (39,21)-(39,22) = "}"
+ │ │ │ └── @ StringNode (location: (39,22)-(39,23))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (39,22)-(39,23) = "f"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "f"
+ │ │ └── closing_loc: ∅
+ │ ├── opening_loc: (39,0)-(39,3) = "%I["
+ │ └── closing_loc: (39,23)-(39,24) = "]"
+ ├── @ SymbolNode (location: (41,0)-(41,4))
+ │ ├── opening_loc: (41,0)-(41,1) = ":"
+ │ ├── value_loc: (41,1)-(41,4) = "@@a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "@@a"
+ ├── @ SymbolNode (location: (43,0)-(43,5))
+ │ ├── opening_loc: (43,0)-(43,1) = ":"
+ │ ├── value_loc: (43,1)-(43,5) = "👍"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "👍"
+ ├── @ ArrayNode (location: (45,0)-(45,7))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (45,3)-(45,6))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (45,3)-(45,6) = "a\\b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\\b"
+ │ ├── opening_loc: (45,0)-(45,3) = "%i["
+ │ └── closing_loc: (45,6)-(45,7) = "]"
+ ├── @ SymbolNode (location: (47,0)-(47,3))
+ │ ├── opening_loc: (47,0)-(47,1) = ":"
+ │ ├── value_loc: (47,1)-(47,3) = "$a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "$a"
+ ├── @ SymbolNode (location: (49,0)-(49,3))
+ │ ├── opening_loc: (49,0)-(49,1) = ":"
+ │ ├── value_loc: (49,1)-(49,3) = "@a"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "@a"
+ ├── @ SymbolNode (location: (51,0)-(51,3))
+ │ ├── opening_loc: (51,0)-(51,1) = ":"
+ │ ├── value_loc: (51,1)-(51,3) = "do"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "do"
+ ├── @ SymbolNode (location: (53,0)-(53,2))
+ │ ├── opening_loc: (53,0)-(53,1) = ":"
+ │ ├── value_loc: (53,1)-(53,2) = "&"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "&"
+ ├── @ SymbolNode (location: (55,0)-(55,2))
+ │ ├── opening_loc: (55,0)-(55,1) = ":"
+ │ ├── value_loc: (55,1)-(55,2) = "`"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "`"
+ ├── @ SymbolNode (location: (57,0)-(57,3))
+ │ ├── opening_loc: (57,0)-(57,1) = ":"
+ │ ├── value_loc: (57,1)-(57,3) = "!@"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "!@"
+ ├── @ SymbolNode (location: (59,0)-(59,3))
+ │ ├── opening_loc: (59,0)-(59,1) = ":"
+ │ ├── value_loc: (59,1)-(59,3) = "!~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "!~"
+ ├── @ SymbolNode (location: (61,0)-(61,2))
+ │ ├── opening_loc: (61,0)-(61,1) = ":"
+ │ ├── value_loc: (61,1)-(61,2) = "!"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "!"
+ ├── @ SymbolNode (location: (63,0)-(63,3))
+ │ ├── opening_loc: (63,0)-(63,1) = ":"
+ │ ├── value_loc: (63,1)-(63,3) = "[]"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "[]"
+ ├── @ SymbolNode (location: (65,0)-(65,4))
+ │ ├── opening_loc: (65,0)-(65,1) = ":"
+ │ ├── value_loc: (65,1)-(65,4) = "[]="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "[]="
+ ├── @ SymbolNode (location: (67,0)-(67,2))
+ │ ├── opening_loc: (67,0)-(67,1) = ":"
+ │ ├── value_loc: (67,1)-(67,2) = "^"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "^"
+ ├── @ SymbolNode (location: (69,0)-(69,3))
+ │ ├── opening_loc: (69,0)-(69,1) = ":"
+ │ ├── value_loc: (69,1)-(69,3) = "=="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "=="
+ ├── @ SymbolNode (location: (71,0)-(71,4))
+ │ ├── opening_loc: (71,0)-(71,1) = ":"
+ │ ├── value_loc: (71,1)-(71,4) = "==="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "==="
+ ├── @ SymbolNode (location: (73,0)-(73,3))
+ │ ├── opening_loc: (73,0)-(73,1) = ":"
+ │ ├── value_loc: (73,1)-(73,3) = "=~"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "=~"
+ ├── @ SymbolNode (location: (75,0)-(75,3))
+ │ ├── opening_loc: (75,0)-(75,1) = ":"
+ │ ├── value_loc: (75,1)-(75,3) = ">="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: ">="
+ ├── @ SymbolNode (location: (77,0)-(77,3))
+ │ ├── opening_loc: (77,0)-(77,1) = ":"
+ │ ├── value_loc: (77,1)-(77,3) = ">>"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: ">>"
+ ├── @ SymbolNode (location: (79,0)-(79,2))
+ │ ├── opening_loc: (79,0)-(79,1) = ":"
+ │ ├── value_loc: (79,1)-(79,2) = ">"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: ">"
+ ├── @ SymbolNode (location: (81,0)-(81,4))
+ │ ├── opening_loc: (81,0)-(81,1) = ":"
+ │ ├── value_loc: (81,1)-(81,4) = "<=>"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<=>"
+ ├── @ SymbolNode (location: (83,0)-(83,3))
+ │ ├── opening_loc: (83,0)-(83,1) = ":"
+ │ ├── value_loc: (83,1)-(83,3) = "<="
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<="
+ ├── @ SymbolNode (location: (85,0)-(85,3))
+ │ ├── opening_loc: (85,0)-(85,1) = ":"
+ │ ├── value_loc: (85,1)-(85,3) = "<<"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<<"
+ ├── @ SymbolNode (location: (87,0)-(87,2))
+ │ ├── opening_loc: (87,0)-(87,1) = ":"
+ │ ├── value_loc: (87,1)-(87,2) = "<"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "<"
+ ├── @ SymbolNode (location: (89,0)-(89,9))
+ │ ├── opening_loc: (89,0)-(89,1) = ":"
+ │ ├── value_loc: (89,1)-(89,9) = "__LINE__"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "__LINE__"
+ ├── @ SymbolNode (location: (91,0)-(91,9))
+ │ ├── opening_loc: (91,0)-(91,1) = ":"
+ │ ├── value_loc: (91,1)-(91,9) = "__FILE__"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "__FILE__"
+ └── @ SymbolNode (location: (93,0)-(93,13))
+ ├── opening_loc: (93,0)-(93,1) = ":"
+ ├── value_loc: (93,1)-(93,13) = "__ENCODING__"
+ ├── closing_loc: ∅
+ └── unescaped: "__ENCODING__"
diff --git a/test/prism/snapshots/ternary_operator.txt b/test/prism/snapshots/ternary_operator.txt
new file mode 100644
index 0000000000..13aa17e81a
--- /dev/null
+++ b/test/prism/snapshots/ternary_operator.txt
@@ -0,0 +1,285 @@
+@ ProgramNode (location: (1,0)-(15,12))
+├── locals: [:_a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(15,12))
+ └── body: (length: 8)
+ ├── @ IfNode (location: (1,0)-(1,9))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,4)-(1,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,6)-(1,9))
+ │ │ ├── else_keyword_loc: (1,6)-(1,7) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,8)-(1,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,8)-(1,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,8)-(1,9) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (3,0)-(3,27))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (3,0)-(3,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,4)-(3,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ DefinedNode (location: (3,4)-(3,14))
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (3,13)-(3,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,13)-(3,14) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── rparen_loc: ∅
+ │ │ └── keyword_loc: (3,4)-(3,12) = "defined?"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (3,15)-(3,27))
+ │ │ ├── else_keyword_loc: (3,15)-(3,16) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,17)-(3,27))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ DefinedNode (location: (3,17)-(3,27))
+ │ │ │ ├── lparen_loc: ∅
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (3,26)-(3,27))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,26)-(3,27) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── rparen_loc: ∅
+ │ │ │ └── keyword_loc: (3,17)-(3,25) = "defined?"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (5,0)-(5,15))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (5,0)-(5,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,0)-(5,6) = "empty?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "empty?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,7)-(5,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ TrueNode (location: (5,7)-(5,11))
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (5,11)-(5,15))
+ │ │ ├── else_keyword_loc: (5,11)-(5,12) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (5,12)-(5,15))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NilNode (location: (5,12)-(5,15))
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (7,0)-(7,16))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (7,0)-(7,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,0)-(7,6) = "empty?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "empty?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (7,7)-(7,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ FalseNode (location: (7,7)-(7,12))
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (7,12)-(7,16))
+ │ │ ├── else_keyword_loc: (7,12)-(7,13) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (7,13)-(7,16))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NilNode (location: (7,13)-(7,16))
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (9,0)-(9,14))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (9,0)-(9,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,0)-(9,6) = "empty?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "empty?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (9,7)-(9,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (9,7)-(9,10))
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (9,10)-(9,14))
+ │ │ ├── else_keyword_loc: (9,10)-(9,11) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (9,11)-(9,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NilNode (location: (9,11)-(9,14))
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (11,0)-(11,10))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (11,0)-(11,2))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,0)-(11,2) = "a?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (11,3)-(11,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (11,3)-(11,6))
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (11,6)-(11,10))
+ │ │ ├── else_keyword_loc: (11,6)-(11,7) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (11,7)-(11,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NilNode (location: (11,7)-(11,10))
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (13,0)-(13,14))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (13,0)-(13,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (13,3)-(13,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (13,3)-(13,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,3)-(13,7) = "var1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "var1"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (13,8)-(13,14))
+ │ │ ├── else_keyword_loc: (13,8)-(13,9) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (13,10)-(13,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (13,10)-(13,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,10)-(13,14) = "var2"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "var2"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ IfNode (location: (15,0)-(15,12))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (15,0)-(15,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,0)-(15,4) = "nil?"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "nil?"
+ ├── statements:
+ │ @ StatementsNode (location: (15,5)-(15,10))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableWriteNode (location: (15,5)-(15,10))
+ │ ├── name: :_a
+ │ ├── depth: 0
+ │ ├── name_loc: (15,5)-(15,7) = "_a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (15,9)-(15,10))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (15,8)-(15,9) = "="
+ ├── consequent:
+ │ @ ElseNode (location: (15,10)-(15,12))
+ │ ├── else_keyword_loc: (15,10)-(15,11) = ":"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (15,11)-(15,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (15,11)-(15,12))
+ │ │ └── flags: decimal
+ │ └── end_keyword_loc: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/tilde_heredocs.txt b/test/prism/snapshots/tilde_heredocs.txt
new file mode 100644
index 0000000000..b0b060255c
--- /dev/null
+++ b/test/prism/snapshots/tilde_heredocs.txt
@@ -0,0 +1,209 @@
+@ ProgramNode (location: (1,0)-(88,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(88,6))
+ └── body: (length: 18)
+ ├── @ StringNode (location: (1,0)-(1,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,6) = "<<~EOF"
+ │ ├── content_loc: (2,0)-(2,0) = " a\n"
+ │ ├── closing_loc: (3,0)-(3,0) = "EOF\n"
+ │ └── unescaped: "a\n"
+ ├── @ StringNode (location: (5,0)-(5,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,0)-(5,6) = "<<~EOF"
+ │ ├── content_loc: (6,0)-(8,0) = "\ta\n b\n\t\tc\n"
+ │ ├── closing_loc: (9,0)-(9,0) = "EOF\n"
+ │ └── unescaped: "\ta\nb\n\t\tc\n"
+ ├── @ InterpolatedStringNode (location: (11,0)-(11,6))
+ │ ├── opening_loc: (11,0)-(11,6) = "<<~EOF"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (12,2)-(12,6))
+ │ │ │ ├── opening_loc: (12,2)-(12,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (12,4)-(12,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (12,4)-(12,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (12,5)-(12,6) = "}"
+ │ │ └── @ StringNode (location: (12,6)-(12,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (12,6)-(12,0) = " a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " a\n"
+ │ └── closing_loc: (13,0)-(13,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (15,0)-(15,6))
+ │ ├── opening_loc: (15,0)-(15,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (16,0)-(16,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (16,0)-(16,4) = " a "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a "
+ │ │ ├── @ EmbeddedStatementsNode (location: (16,4)-(16,8))
+ │ │ │ ├── opening_loc: (16,4)-(16,6) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (16,6)-(16,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (16,6)-(16,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (16,7)-(16,8) = "}"
+ │ │ └── @ StringNode (location: (16,8)-(16,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (16,8)-(16,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (17,0)-(17,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (19,0)-(19,6))
+ │ ├── opening_loc: (19,0)-(19,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (20,0)-(21,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (20,0)-(21,1) = " a\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (21,1)-(21,5))
+ │ │ │ ├── opening_loc: (21,1)-(21,3) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (21,3)-(21,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (21,3)-(21,4))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (21,4)-(21,5) = "}"
+ │ │ └── @ StringNode (location: (21,5)-(21,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (21,5)-(21,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (22,0)-(22,0) = "EOF\n"
+ ├── @ InterpolatedStringNode (location: (24,0)-(24,6))
+ │ ├── opening_loc: (24,0)-(24,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (25,0)-(26,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (25,0)-(26,2) = " a\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (26,2)-(26,6))
+ │ │ │ ├── opening_loc: (26,2)-(26,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (26,4)-(26,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (26,4)-(26,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (26,5)-(26,6) = "}"
+ │ │ └── @ StringNode (location: (26,6)-(26,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (26,6)-(26,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (27,0)-(27,0) = "EOF\n"
+ ├── @ StringNode (location: (29,0)-(29,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (29,0)-(29,6) = "<<~EOF"
+ │ ├── content_loc: (30,0)-(31,0) = " a\n b\n"
+ │ ├── closing_loc: (32,0)-(32,0) = "EOF\n"
+ │ └── unescaped: "a\nb\n"
+ ├── @ StringNode (location: (34,0)-(34,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (34,0)-(34,6) = "<<~EOF"
+ │ ├── content_loc: (35,0)-(36,0) = " a\n b\n"
+ │ ├── closing_loc: (37,0)-(37,0) = "EOF\n"
+ │ └── unescaped: "a\n b\n"
+ ├── @ StringNode (location: (39,0)-(39,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (39,0)-(39,6) = "<<~EOF"
+ │ ├── content_loc: (40,0)-(41,0) = "\t\t\ta\n\t\tb\n"
+ │ ├── closing_loc: (42,0)-(42,0) = "EOF\n"
+ │ └── unescaped: "\ta\nb\n"
+ ├── @ StringNode (location: (44,0)-(44,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (44,0)-(44,8) = "<<~'EOF'"
+ │ ├── content_loc: (45,0)-(45,0) = " a \#{1}\n"
+ │ ├── closing_loc: (46,0)-(46,0) = "EOF\n"
+ │ └── unescaped: "a \#{1}\n"
+ ├── @ StringNode (location: (48,0)-(48,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (48,0)-(48,6) = "<<~EOF"
+ │ ├── content_loc: (49,0)-(50,0) = "\ta\n\t b\n"
+ │ ├── closing_loc: (51,0)-(51,0) = "EOF\n"
+ │ └── unescaped: "a\n b\n"
+ ├── @ StringNode (location: (53,0)-(53,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (53,0)-(53,6) = "<<~EOF"
+ │ ├── content_loc: (54,0)-(55,0) = "\t a\n\tb\n"
+ │ ├── closing_loc: (56,0)-(56,0) = "EOF\n"
+ │ └── unescaped: " a\nb\n"
+ ├── @ StringNode (location: (58,0)-(58,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (58,0)-(58,6) = "<<~EOF"
+ │ ├── content_loc: (59,0)-(60,0) = " \ta\n b\n"
+ │ ├── closing_loc: (61,0)-(61,0) = "EOF\n"
+ │ └── unescaped: "a\nb\n"
+ ├── @ StringNode (location: (63,0)-(63,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (63,0)-(63,6) = "<<~EOF"
+ │ ├── content_loc: (64,0)-(66,0) = " a\n\n b\n"
+ │ ├── closing_loc: (67,0)-(67,0) = "EOF\n"
+ │ └── unescaped: "a\n\nb\n"
+ ├── @ StringNode (location: (69,0)-(69,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (69,0)-(69,6) = "<<~EOF"
+ │ ├── content_loc: (70,0)-(72,0) = " a\n\n b\n"
+ │ ├── closing_loc: (73,0)-(73,0) = "EOF\n"
+ │ └── unescaped: "a\n\nb\n"
+ ├── @ StringNode (location: (75,0)-(75,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (75,0)-(75,6) = "<<~EOF"
+ │ ├── content_loc: (76,0)-(80,0) = " a\n\n\n\n b\n"
+ │ ├── closing_loc: (81,0)-(81,0) = "EOF\n"
+ │ └── unescaped: "a\n\n\n\nb\n"
+ ├── @ InterpolatedStringNode (location: (83,0)-(83,6))
+ │ ├── opening_loc: (83,0)-(83,6) = "<<~EOF"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (84,0)-(85,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (84,0)-(85,2) = "\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (85,2)-(85,6))
+ │ │ │ ├── opening_loc: (85,2)-(85,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (85,4)-(85,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (85,4)-(85,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (85,5)-(85,6) = "}"
+ │ │ └── @ StringNode (location: (85,6)-(85,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (85,6)-(85,0) = "a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\n"
+ │ └── closing_loc: (86,0)-(86,0) = " EOF\n"
+ └── @ InterpolatedStringNode (location: (88,0)-(88,6))
+ ├── opening_loc: (88,0)-(88,6) = "<<~EOT"
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (89,2)-(89,6))
+ │ │ ├── opening_loc: (89,2)-(89,4) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (89,4)-(89,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (89,4)-(89,5))
+ │ │ │ └── flags: decimal
+ │ │ └── closing_loc: (89,5)-(89,6) = "}"
+ │ └── @ StringNode (location: (89,6)-(90,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (89,6)-(90,0) = "\n\tb\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n\tb\n"
+ └── closing_loc: (91,0)-(91,0) = "EOT\n"
diff --git a/test/prism/snapshots/undef.txt b/test/prism/snapshots/undef.txt
new file mode 100644
index 0000000000..8ab7acacec
--- /dev/null
+++ b/test/prism/snapshots/undef.txt
@@ -0,0 +1,105 @@
+@ ProgramNode (location: (1,0)-(17,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(17,14))
+ └── body: (length: 9)
+ ├── @ UndefNode (location: (1,0)-(1,7))
+ │ ├── names: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,6)-(1,7))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ └── keyword_loc: (1,0)-(1,5) = "undef"
+ ├── @ UndefNode (location: (3,0)-(3,10))
+ │ ├── names: (length: 2)
+ │ │ ├── @ SymbolNode (location: (3,6)-(3,7))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (3,6)-(3,7) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (3,9)-(3,10))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (3,9)-(3,10) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ └── keyword_loc: (3,0)-(3,5) = "undef"
+ ├── @ UndefNode (location: (5,0)-(5,8))
+ │ ├── names: (length: 1)
+ │ │ └── @ SymbolNode (location: (5,6)-(5,8))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (5,6)-(5,8) = "if"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "if"
+ │ └── keyword_loc: (5,0)-(5,5) = "undef"
+ ├── @ UndefNode (location: (7,0)-(7,9))
+ │ ├── names: (length: 1)
+ │ │ └── @ SymbolNode (location: (7,6)-(7,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (7,6)-(7,9) = "<=>"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "<=>"
+ │ └── keyword_loc: (7,0)-(7,5) = "undef"
+ ├── @ UndefNode (location: (9,0)-(9,8))
+ │ ├── names: (length: 1)
+ │ │ └── @ SymbolNode (location: (9,6)-(9,8))
+ │ │ ├── opening_loc: (9,6)-(9,7) = ":"
+ │ │ ├── value_loc: (9,7)-(9,8) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ └── keyword_loc: (9,0)-(9,5) = "undef"
+ ├── @ UndefNode (location: (11,0)-(11,16))
+ │ ├── names: (length: 3)
+ │ │ ├── @ SymbolNode (location: (11,6)-(11,8))
+ │ │ │ ├── opening_loc: (11,6)-(11,7) = ":"
+ │ │ │ ├── value_loc: (11,7)-(11,8) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── @ SymbolNode (location: (11,10)-(11,12))
+ │ │ │ ├── opening_loc: (11,10)-(11,11) = ":"
+ │ │ │ ├── value_loc: (11,11)-(11,12) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ └── @ SymbolNode (location: (11,14)-(11,16))
+ │ │ ├── opening_loc: (11,14)-(11,15) = ":"
+ │ │ ├── value_loc: (11,15)-(11,16) = "c"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "c"
+ │ └── keyword_loc: (11,0)-(11,5) = "undef"
+ ├── @ UndefNode (location: (13,0)-(13,12))
+ │ ├── names: (length: 1)
+ │ │ └── @ SymbolNode (location: (13,6)-(13,12))
+ │ │ ├── opening_loc: (13,6)-(13,8) = ":'"
+ │ │ ├── value_loc: (13,8)-(13,11) = "abc"
+ │ │ ├── closing_loc: (13,11)-(13,12) = "'"
+ │ │ └── unescaped: "abc"
+ │ └── keyword_loc: (13,0)-(13,5) = "undef"
+ ├── @ UndefNode (location: (15,0)-(15,16))
+ │ ├── names: (length: 1)
+ │ │ └── @ InterpolatedSymbolNode (location: (15,6)-(15,16))
+ │ │ ├── opening_loc: (15,6)-(15,8) = ":\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (15,8)-(15,11))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (15,8)-(15,11) = "abc"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "abc"
+ │ │ │ └── @ EmbeddedStatementsNode (location: (15,11)-(15,15))
+ │ │ │ ├── opening_loc: (15,11)-(15,13) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (15,13)-(15,14))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (15,13)-(15,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (15,14)-(15,15) = "}"
+ │ │ └── closing_loc: (15,15)-(15,16) = "\""
+ │ └── keyword_loc: (15,0)-(15,5) = "undef"
+ └── @ UndefNode (location: (17,0)-(17,14))
+ ├── names: (length: 1)
+ │ └── @ SymbolNode (location: (17,6)-(17,14))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (17,6)-(17,14) = "Constant"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "Constant"
+ └── keyword_loc: (17,0)-(17,5) = "undef"
diff --git a/test/prism/snapshots/unescaping.txt b/test/prism/snapshots/unescaping.txt
new file mode 100644
index 0000000000..a59dc01626
--- /dev/null
+++ b/test/prism/snapshots/unescaping.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(7,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,7))
+ └── body: (length: 4)
+ ├── @ ArrayNode (location: (1,0)-(1,10))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (1,1)-(1,9))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,1)-(1,2) = "\""
+ │ │ ├── content_loc: (1,2)-(1,8) = "\\c\#{1}"
+ │ │ ├── closing_loc: (1,8)-(1,9) = "\""
+ │ │ └── unescaped: "\u0003{1}"
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,9)-(1,10) = "]"
+ ├── @ RegularExpressionNode (location: (3,0)-(3,8))
+ │ ├── opening_loc: (3,0)-(3,1) = "/"
+ │ ├── content_loc: (3,1)-(3,7) = "\\c\#{1}"
+ │ ├── closing_loc: (3,7)-(3,8) = "/"
+ │ ├── unescaped: "\u0003{1}"
+ │ └── flags: ∅
+ ├── @ StringNode (location: (5,0)-(5,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (5,0)-(5,1) = "\""
+ │ ├── content_loc: (5,1)-(5,7) = "\\c\#{1}"
+ │ ├── closing_loc: (5,7)-(5,8) = "\""
+ │ └── unescaped: "\u0003{1}"
+ └── @ StringNode (location: (7,0)-(7,7))
+ ├── flags: ∅
+ ├── opening_loc: (7,0)-(7,7) = "<<~HERE"
+ ├── content_loc: (8,0)-(8,0) = " \\c\#{1}\n"
+ ├── closing_loc: (9,0)-(9,0) = "HERE\n"
+ └── unescaped: "\u0003{1}\n"
diff --git a/test/prism/snapshots/unless.txt b/test/prism/snapshots/unless.txt
new file mode 100644
index 0000000000..27455d08c6
--- /dev/null
+++ b/test/prism/snapshots/unless.txt
@@ -0,0 +1,122 @@
+@ ProgramNode (location: (1,0)-(14,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(14,22))
+ └── body: (length: 7)
+ ├── @ UnlessNode (location: (1,0)-(1,19))
+ │ ├── keyword_loc: (1,0)-(1,6) = "unless"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (1,7)-(1,11))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,13)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,13)-(1,14))
+ │ │ └── flags: decimal
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (1,16)-(1,19) = "end"
+ ├── @ UnlessNode (location: (3,0)-(4,12))
+ │ ├── keyword_loc: (3,0)-(3,6) = "unless"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (3,7)-(3,11))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (4,0)-(4,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (4,0)-(4,1))
+ │ │ └── flags: decimal
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (4,2)-(4,12))
+ │ │ ├── else_keyword_loc: (4,2)-(4,6) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (4,7)-(4,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (4,7)-(4,8))
+ │ │ │ └── flags: decimal
+ │ │ └── end_keyword_loc: (4,9)-(4,12) = "end"
+ │ └── end_keyword_loc: (4,9)-(4,12) = "end"
+ ├── @ UnlessNode (location: (6,0)-(6,13))
+ │ ├── keyword_loc: (6,2)-(6,8) = "unless"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (6,9)-(6,13))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (6,0)-(6,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (6,0)-(6,1))
+ │ │ └── flags: decimal
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ UnlessNode (location: (8,0)-(8,17))
+ │ ├── keyword_loc: (8,6)-(8,12) = "unless"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (8,13)-(8,17))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,0)-(8,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (8,0)-(8,5))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (8,0)-(8,5) = "break"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ UnlessNode (location: (10,0)-(10,16))
+ │ ├── keyword_loc: (10,5)-(10,11) = "unless"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (10,12)-(10,16))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (10,0)-(10,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (10,0)-(10,4))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (10,0)-(10,4) = "next"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ UnlessNode (location: (12,0)-(12,18))
+ │ ├── keyword_loc: (12,7)-(12,13) = "unless"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (12,14)-(12,18))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (12,0)-(12,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (12,0)-(12,6))
+ │ │ ├── keyword_loc: (12,0)-(12,6) = "return"
+ │ │ └── arguments: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ UnlessNode (location: (14,0)-(14,22))
+ ├── keyword_loc: (14,11)-(14,17) = "unless"
+ ├── predicate:
+ │ @ CallNode (location: (14,18)-(14,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (14,18)-(14,22) = "bar?"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar?"
+ ├── statements:
+ │ @ StatementsNode (location: (14,0)-(14,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (14,0)-(14,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (14,0)-(14,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (14,4)-(14,10))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (14,4)-(14,6))
+ │ │ │ ├── opening_loc: (14,4)-(14,5) = ":"
+ │ │ │ ├── value_loc: (14,5)-(14,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (14,8)-(14,10))
+ │ │ ├── opening_loc: (14,8)-(14,9) = ":"
+ │ │ ├── value_loc: (14,9)-(14,10) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── consequent: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/alias.txt b/test/prism/snapshots/unparser/corpus/literal/alias.txt
new file mode 100644
index 0000000000..e726797685
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/alias.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(2,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,15))
+ └── body: (length: 2)
+ ├── @ AliasGlobalVariableNode (location: (1,0)-(1,15))
+ │ ├── new_name:
+ │ │ @ GlobalVariableReadNode (location: (1,6)-(1,10))
+ │ │ └── name: :$foo
+ │ ├── old_name:
+ │ │ @ GlobalVariableReadNode (location: (1,11)-(1,15))
+ │ │ └── name: :$bar
+ │ └── keyword_loc: (1,0)-(1,5) = "alias"
+ └── @ AliasMethodNode (location: (2,0)-(2,15))
+ ├── new_name:
+ │ @ SymbolNode (location: (2,6)-(2,10))
+ │ ├── opening_loc: (2,6)-(2,7) = ":"
+ │ ├── value_loc: (2,7)-(2,10) = "foo"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "foo"
+ ├── old_name:
+ │ @ SymbolNode (location: (2,11)-(2,15))
+ │ ├── opening_loc: (2,11)-(2,12) = ":"
+ │ ├── value_loc: (2,12)-(2,15) = "bar"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "bar"
+ └── keyword_loc: (2,0)-(2,5) = "alias"
diff --git a/test/prism/snapshots/unparser/corpus/literal/assignment.txt b/test/prism/snapshots/unparser/corpus/literal/assignment.txt
new file mode 100644
index 0000000000..ec6678281a
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/assignment.txt
@@ -0,0 +1,999 @@
+@ ProgramNode (location: (1,0)-(51,17))
+├── locals: [:a, :b, :foo, :c, :x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(51,17))
+ └── body: (length: 43)
+ ├── @ GlobalVariableWriteNode (location: (1,0)-(1,6))
+ │ ├── name: :$a
+ │ ├── name_loc: (1,0)-(1,2) = "$a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,3)-(1,4) = "="
+ ├── @ MultiWriteNode (location: (2,0)-(2,17))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ GlobalVariableTargetNode (location: (2,1)-(2,3))
+ │ │ │ └── name: :$a
+ │ │ └── @ GlobalVariableTargetNode (location: (2,5)-(2,7))
+ │ │ └── name: :$b
+ │ ├── lparen_loc: (2,0)-(2,1) = "("
+ │ ├── rparen_loc: (2,7)-(2,8) = ")"
+ │ ├── operator_loc: (2,9)-(2,10) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (2,11)-(2,17))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (2,12)-(2,13))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (2,15)-(2,16))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (2,11)-(2,12) = "["
+ │ └── closing_loc: (2,16)-(2,17) = "]"
+ ├── @ MultiWriteNode (location: (3,0)-(3,13))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ MultiTargetNode (location: (3,1)-(3,5))
+ │ │ │ ├── targets: (length: 2)
+ │ │ │ │ ├── @ LocalVariableTargetNode (location: (3,2)-(3,3))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── @ SplatNode (location: (3,3)-(3,4))
+ │ │ │ │ ├── operator_loc: (3,3)-(3,4) = ","
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── lparen_loc: (3,1)-(3,2) = "("
+ │ │ │ └── rparen_loc: (3,4)-(3,5) = ")"
+ │ │ └── @ LocalVariableTargetNode (location: (3,7)-(3,8))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (3,0)-(3,1) = "("
+ │ ├── rparen_loc: (3,8)-(3,9) = ")"
+ │ ├── operator_loc: (3,10)-(3,11) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (3,12)-(3,13))
+ │ └── flags: decimal
+ ├── @ MultiWriteNode (location: (4,0)-(4,9))
+ │ ├── targets: (length: 1)
+ │ │ └── @ SplatNode (location: (4,1)-(4,3))
+ │ │ ├── operator_loc: (4,1)-(4,2) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (4,2)-(4,3))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (4,0)-(4,1) = "("
+ │ ├── rparen_loc: (4,3)-(4,4) = ")"
+ │ ├── operator_loc: (4,5)-(4,6) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (4,7)-(4,9))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (4,7)-(4,8) = "["
+ │ └── closing_loc: (4,8)-(4,9) = "]"
+ ├── @ MultiWriteNode (location: (5,0)-(5,15))
+ │ ├── targets: (length: 1)
+ │ │ └── @ SplatNode (location: (5,1)-(5,5))
+ │ │ ├── operator_loc: (5,1)-(5,2) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (5,2)-(5,5))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (5,0)-(5,1) = "("
+ │ ├── rparen_loc: (5,5)-(5,6) = ")"
+ │ ├── operator_loc: (5,7)-(5,8) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (5,9)-(5,15))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (5,10)-(5,11))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (5,13)-(5,14))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (5,9)-(5,10) = "["
+ │ └── closing_loc: (5,14)-(5,15) = "]"
+ ├── @ MultiWriteNode (location: (6,0)-(6,19))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ ClassVariableTargetNode (location: (6,1)-(6,4))
+ │ │ │ └── name: :@@a
+ │ │ └── @ ClassVariableTargetNode (location: (6,6)-(6,9))
+ │ │ └── name: :@@b
+ │ ├── lparen_loc: (6,0)-(6,1) = "("
+ │ ├── rparen_loc: (6,9)-(6,10) = ")"
+ │ ├── operator_loc: (6,11)-(6,12) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (6,13)-(6,19))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (6,14)-(6,15))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (6,17)-(6,18))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (6,13)-(6,14) = "["
+ │ └── closing_loc: (6,18)-(6,19) = "]"
+ ├── @ MultiWriteNode (location: (7,0)-(7,17))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ InstanceVariableTargetNode (location: (7,1)-(7,3))
+ │ │ │ └── name: :@a
+ │ │ └── @ InstanceVariableTargetNode (location: (7,5)-(7,7))
+ │ │ └── name: :@b
+ │ ├── lparen_loc: (7,0)-(7,1) = "("
+ │ ├── rparen_loc: (7,7)-(7,8) = ")"
+ │ ├── operator_loc: (7,9)-(7,10) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (7,11)-(7,17))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (7,12)-(7,13))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (7,15)-(7,16))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (7,11)-(7,12) = "["
+ │ └── closing_loc: (7,16)-(7,17) = "]"
+ ├── @ MultiWriteNode (location: (8,0)-(8,25))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (8,1)-(8,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ MultiTargetNode (location: (8,4)-(8,10))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (8,5)-(8,6))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (8,8)-(8,9))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: (8,4)-(8,5) = "("
+ │ │ └── rparen_loc: (8,9)-(8,10) = ")"
+ │ ├── lparen_loc: (8,0)-(8,1) = "("
+ │ ├── rparen_loc: (8,10)-(8,11) = ")"
+ │ ├── operator_loc: (8,12)-(8,13) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (8,14)-(8,25))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (8,15)-(8,16))
+ │ │ │ └── flags: decimal
+ │ │ └── @ ArrayNode (location: (8,18)-(8,24))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (8,19)-(8,20))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (8,22)-(8,23))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (8,18)-(8,19) = "["
+ │ │ └── closing_loc: (8,23)-(8,24) = "]"
+ │ ├── opening_loc: (8,14)-(8,15) = "["
+ │ └── closing_loc: (8,24)-(8,25) = "]"
+ ├── @ MultiWriteNode (location: (9,0)-(9,15))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (9,1)-(9,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (9,4)-(9,5))
+ │ │ ├── operator_loc: (9,4)-(9,5) = "*"
+ │ │ └── expression: ∅
+ │ ├── lparen_loc: (9,0)-(9,1) = "("
+ │ ├── rparen_loc: (9,5)-(9,6) = ")"
+ │ ├── operator_loc: (9,7)-(9,8) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (9,9)-(9,15))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (9,10)-(9,11))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (9,13)-(9,14))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (9,9)-(9,10) = "["
+ │ └── closing_loc: (9,14)-(9,15) = "]"
+ ├── @ MultiWriteNode (location: (10,0)-(10,18))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (10,1)-(10,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (10,4)-(10,8))
+ │ │ ├── operator_loc: (10,4)-(10,5) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (10,5)-(10,8))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (10,0)-(10,1) = "("
+ │ ├── rparen_loc: (10,8)-(10,9) = ")"
+ │ ├── operator_loc: (10,10)-(10,11) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (10,12)-(10,18))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (10,13)-(10,14))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (10,16)-(10,17))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (10,12)-(10,13) = "["
+ │ └── closing_loc: (10,17)-(10,18) = "]"
+ ├── @ MultiWriteNode (location: (11,0)-(11,15))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (11,1)-(11,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (11,4)-(11,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (11,0)-(11,1) = "("
+ │ ├── rparen_loc: (11,5)-(11,6) = ")"
+ │ ├── operator_loc: (11,7)-(11,8) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (11,9)-(11,15))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (11,10)-(11,11))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (11,13)-(11,14))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (11,9)-(11,10) = "["
+ │ └── closing_loc: (11,14)-(11,15) = "]"
+ ├── @ MultiWriteNode (location: (12,0)-(12,12))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (12,1)-(12,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (12,4)-(12,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (12,0)-(12,1) = "("
+ │ ├── rparen_loc: (12,5)-(12,6) = ")"
+ │ ├── operator_loc: (12,7)-(12,8) = "="
+ │ └── value:
+ │ @ LocalVariableReadNode (location: (12,9)-(12,12))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── @ MultiWriteNode (location: (13,0)-(13,10))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (13,1)-(13,2))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (13,2)-(13,3))
+ │ │ ├── operator_loc: (13,2)-(13,3) = ","
+ │ │ └── expression: ∅
+ │ ├── lparen_loc: (13,0)-(13,1) = "("
+ │ ├── rparen_loc: (13,3)-(13,4) = ")"
+ │ ├── operator_loc: (13,5)-(13,6) = "="
+ │ └── value:
+ │ @ LocalVariableReadNode (location: (13,7)-(13,10))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── @ MultiWriteNode (location: (14,0)-(14,23))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ CallNode (location: (14,1)-(14,6))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (14,1)-(14,2))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: (14,2)-(14,3) = "."
+ │ │ │ ├── message_loc: (14,3)-(14,6) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "foo="
+ │ │ └── @ CallNode (location: (14,8)-(14,13))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (14,8)-(14,9))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: (14,9)-(14,10) = "."
+ │ │ ├── message_loc: (14,10)-(14,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar="
+ │ ├── lparen_loc: (14,0)-(14,1) = "("
+ │ ├── rparen_loc: (14,13)-(14,14) = ")"
+ │ ├── operator_loc: (14,15)-(14,16) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (14,17)-(14,23))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (14,18)-(14,19))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (14,21)-(14,22))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (14,17)-(14,18) = "["
+ │ └── closing_loc: (14,22)-(14,23) = "]"
+ ├── @ MultiWriteNode (location: (15,0)-(15,24))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ CallNode (location: (15,1)-(15,8))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (15,1)-(15,2))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (15,2)-(15,8) = "[*foo]"
+ │ │ │ ├── opening_loc: (15,2)-(15,3) = "["
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (15,3)-(15,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SplatNode (location: (15,3)-(15,7))
+ │ │ │ │ ├── operator_loc: (15,3)-(15,4) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableReadNode (location: (15,4)-(15,7))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: (15,7)-(15,8) = "]"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "[]="
+ │ │ └── @ CallNode (location: (15,10)-(15,14))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (15,10)-(15,11))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,11)-(15,14) = "[1]"
+ │ │ ├── opening_loc: (15,11)-(15,12) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,12)-(15,13))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (15,12)-(15,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (15,13)-(15,14) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]="
+ │ ├── lparen_loc: (15,0)-(15,1) = "("
+ │ ├── rparen_loc: (15,14)-(15,15) = ")"
+ │ ├── operator_loc: (15,16)-(15,17) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (15,18)-(15,24))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (15,19)-(15,20))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (15,22)-(15,23))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (15,18)-(15,19) = "["
+ │ └── closing_loc: (15,23)-(15,24) = "]"
+ ├── @ MultiWriteNode (location: (16,0)-(16,21))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ CallNode (location: (16,1)-(16,5))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (16,1)-(16,2))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (16,2)-(16,5) = "[0]"
+ │ │ │ ├── opening_loc: (16,2)-(16,3) = "["
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (16,3)-(16,4))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (16,3)-(16,4))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── closing_loc: (16,4)-(16,5) = "]"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "[]="
+ │ │ └── @ CallNode (location: (16,7)-(16,11))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (16,7)-(16,8))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,8)-(16,11) = "[1]"
+ │ │ ├── opening_loc: (16,8)-(16,9) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (16,9)-(16,10))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (16,9)-(16,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (16,10)-(16,11) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]="
+ │ ├── lparen_loc: (16,0)-(16,1) = "("
+ │ ├── rparen_loc: (16,11)-(16,12) = ")"
+ │ ├── operator_loc: (16,13)-(16,14) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (16,15)-(16,21))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (16,16)-(16,17))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (16,19)-(16,20))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (16,15)-(16,16) = "["
+ │ └── closing_loc: (16,20)-(16,21) = "]"
+ ├── @ MultiWriteNode (location: (17,0)-(17,12))
+ │ ├── targets: (length: 1)
+ │ │ └── @ SplatNode (location: (17,1)-(17,7))
+ │ │ ├── operator_loc: (17,1)-(17,2) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (17,2)-(17,7))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (17,2)-(17,3))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: (17,3)-(17,4) = "."
+ │ │ ├── message_loc: (17,4)-(17,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo="
+ │ ├── lparen_loc: (17,0)-(17,1) = "("
+ │ ├── rparen_loc: (17,7)-(17,8) = ")"
+ │ ├── operator_loc: (17,9)-(17,10) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (17,11)-(17,12))
+ │ └── flags: decimal
+ ├── @ ConstantPathWriteNode (location: (18,0)-(18,13))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (18,0)-(18,5))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (18,2)-(18,5))
+ │ │ │ └── name: :Foo
+ │ │ └── delimiter_loc: (18,0)-(18,2) = "::"
+ │ ├── operator_loc: (18,6)-(18,7) = "="
+ │ └── value:
+ │ @ ConstantPathNode (location: (18,8)-(18,13))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (18,10)-(18,13))
+ │ │ └── name: :Bar
+ │ └── delimiter_loc: (18,8)-(18,10) = "::"
+ ├── @ ClassVariableWriteNode (location: (19,0)-(19,7))
+ │ ├── name: :@@a
+ │ ├── name_loc: (19,0)-(19,3) = "@@a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (19,6)-(19,7))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (19,4)-(19,5) = "="
+ ├── @ InstanceVariableWriteNode (location: (20,0)-(20,6))
+ │ ├── name: :@a
+ │ ├── name_loc: (20,0)-(20,2) = "@a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (20,5)-(20,6))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (20,3)-(20,4) = "="
+ ├── @ ConstantWriteNode (location: (21,0)-(21,9))
+ │ ├── name: :CONST
+ │ ├── name_loc: (21,0)-(21,5) = "CONST"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (21,8)-(21,9))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (21,6)-(21,7) = "="
+ ├── @ ConstantPathWriteNode (location: (22,0)-(22,23))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (22,0)-(22,19))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (22,0)-(22,12))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (22,0)-(22,4))
+ │ │ │ │ └── name: :Name
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (22,6)-(22,12))
+ │ │ │ │ └── name: :Spaced
+ │ │ │ └── delimiter_loc: (22,4)-(22,6) = "::"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (22,14)-(22,19))
+ │ │ │ └── name: :CONST
+ │ │ └── delimiter_loc: (22,12)-(22,14) = "::"
+ │ ├── operator_loc: (22,20)-(22,21) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (22,22)-(22,23))
+ │ └── flags: decimal
+ ├── @ LocalVariableWriteNode (location: (23,0)-(23,16))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (23,0)-(23,1) = "a"
+ │ ├── value:
+ │ │ @ ParenthesesNode (location: (23,4)-(23,16))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (23,5)-(23,15))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ MultiWriteNode (location: (23,5)-(23,15))
+ │ │ │ ├── targets: (length: 2)
+ │ │ │ │ ├── @ LocalVariableTargetNode (location: (23,6)-(23,7))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (23,9)-(23,10))
+ │ │ │ │ ├── name: :c
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── lparen_loc: (23,5)-(23,6) = "("
+ │ │ │ ├── rparen_loc: (23,10)-(23,11) = ")"
+ │ │ │ ├── operator_loc: (23,12)-(23,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (23,14)-(23,15))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (23,4)-(23,5) = "("
+ │ │ └── closing_loc: (23,15)-(23,16) = ")"
+ │ └── operator_loc: (23,2)-(23,3) = "="
+ ├── @ LocalVariableWriteNode (location: (24,0)-(24,5))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (24,0)-(24,1) = "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (24,4)-(24,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (24,2)-(24,3) = "="
+ ├── @ LocalVariableWriteNode (location: (25,0)-(25,11))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (25,0)-(25,3) = "foo"
+ │ ├── value:
+ │ │ @ CallNode (location: (25,6)-(25,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (25,6)-(25,9) = "foo"
+ │ │ ├── opening_loc: (25,9)-(25,10) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (25,10)-(25,11) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo"
+ │ └── operator_loc: (25,4)-(25,5) = "="
+ ├── @ CallNode (location: (26,0)-(26,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (26,0)-(26,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (26,3)-(26,4) = "."
+ │ ├── message_loc: (26,4)-(26,7) = "[]="
+ │ ├── opening_loc: (26,7)-(26,8) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (26,8)-(26,9) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (27,0)-(27,13))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (27,0)-(27,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (27,3)-(27,4) = "."
+ │ ├── message_loc: (27,4)-(27,7) = "[]="
+ │ ├── opening_loc: (27,7)-(27,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,8)-(27,12))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (27,8)-(27,9))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (27,11)-(27,12))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (27,12)-(27,13) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (28,0)-(28,11))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (28,0)-(28,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (28,3)-(28,4) = "."
+ │ ├── message_loc: (28,4)-(28,7) = "[]="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (28,7)-(28,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ TrueNode (location: (28,7)-(28,11))
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (29,0)-(29,19))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (29,0)-(29,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (29,3)-(29,11) = "[*index]"
+ │ ├── opening_loc: (29,3)-(29,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,4)-(29,19))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SplatNode (location: (29,4)-(29,10))
+ │ │ │ ├── operator_loc: (29,4)-(29,5) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (29,5)-(29,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,5)-(29,10) = "index"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "index"
+ │ │ └── @ CallNode (location: (29,14)-(29,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (29,14)-(29,19) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "value"
+ │ ├── closing_loc: (29,10)-(29,11) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (30,0)-(30,17))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (30,0)-(30,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (30,3)-(30,9) = "[1..2]"
+ │ ├── opening_loc: (30,3)-(30,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (30,4)-(30,17))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ RangeNode (location: (30,4)-(30,8))
+ │ │ │ ├── left:
+ │ │ │ │ @ IntegerNode (location: (30,4)-(30,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── right:
+ │ │ │ │ @ IntegerNode (location: (30,7)-(30,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── operator_loc: (30,5)-(30,7) = ".."
+ │ │ │ └── flags: ∅
+ │ │ └── @ CallNode (location: (30,12)-(30,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (30,12)-(30,17) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "value"
+ │ ├── closing_loc: (30,8)-(30,9) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (31,0)-(31,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (31,0)-(31,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,3)-(31,5) = "[]"
+ │ ├── opening_loc: (31,3)-(31,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,8)-(31,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,8)-(31,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (31,4)-(31,5) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (32,0)-(32,17))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (32,0)-(32,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (32,3)-(32,9) = "[a, b]"
+ │ ├── opening_loc: (32,3)-(32,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (32,4)-(32,17))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ LocalVariableReadNode (location: (32,4)-(32,5))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── @ LocalVariableReadNode (location: (32,7)-(32,8))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ └── @ CallNode (location: (32,12)-(32,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (32,12)-(32,17) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "value"
+ │ ├── closing_loc: (32,8)-(32,9) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (33,0)-(33,18))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (33,0)-(33,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (33,3)-(33,10) = "[index]"
+ │ ├── opening_loc: (33,3)-(33,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,4)-(33,18))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (33,4)-(33,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (33,4)-(33,9) = "index"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "index"
+ │ │ └── @ CallNode (location: (33,13)-(33,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (33,13)-(33,18) = "value"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "value"
+ │ ├── closing_loc: (33,9)-(33,10) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ LocalVariableWriteNode (location: (34,0)-(34,7))
+ │ ├── name: :x
+ │ ├── depth: 0
+ │ ├── name_loc: (34,0)-(34,1) = "x"
+ │ ├── value:
+ │ │ @ StringNode (location: (34,4)-(34,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (34,4)-(34,6) = "%("
+ │ │ ├── content_loc: (34,6)-(34,6) = ""
+ │ │ ├── closing_loc: (34,6)-(34,7) = ")"
+ │ │ └── unescaped: ""
+ │ └── operator_loc: (34,2)-(34,3) = "="
+ ├── @ CallNode (location: (35,0)-(35,7))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (35,0)-(35,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (35,1)-(35,2) = "."
+ │ ├── message_loc: (35,2)-(35,3) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,4)-(35,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (35,4)-(35,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (35,4)-(35,6) = "%("
+ │ │ ├── content_loc: (35,6)-(35,6) = ""
+ │ │ ├── closing_loc: (35,6)-(35,7) = ")"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "x="
+ ├── @ CallNode (location: (36,0)-(36,12))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (36,0)-(36,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (36,1)-(36,6) = "[%()]"
+ │ ├── opening_loc: (36,1)-(36,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (36,2)-(36,12))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ StringNode (location: (36,2)-(36,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (36,2)-(36,4) = "%("
+ │ │ │ ├── content_loc: (36,4)-(36,4) = ""
+ │ │ │ ├── closing_loc: (36,4)-(36,5) = ")"
+ │ │ │ └── unescaped: ""
+ │ │ └── @ CallNode (location: (36,9)-(36,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (36,9)-(36,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (36,5)-(36,6) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallOrWriteNode (location: (37,0)-(37,14))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (37,0)-(37,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,1)-(37,6) = "[%()]"
+ │ ├── opening_loc: (37,1)-(37,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,2)-(37,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (37,2)-(37,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (37,2)-(37,4) = "%("
+ │ │ ├── content_loc: (37,4)-(37,4) = ""
+ │ │ ├── closing_loc: (37,4)-(37,5) = ")"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: (37,5)-(37,6) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator_loc: (37,7)-(37,10) = "||="
+ │ └── value:
+ │ @ CallNode (location: (37,11)-(37,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,11)-(37,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ InstanceVariableOrWriteNode (location: (38,0)-(38,10))
+ │ ├── name: :@a
+ │ ├── name_loc: (38,0)-(38,2) = "@a"
+ │ ├── operator_loc: (38,3)-(38,6) = "||="
+ │ └── value:
+ │ @ StringNode (location: (38,7)-(38,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (38,7)-(38,9) = "%("
+ │ ├── content_loc: (38,9)-(38,9) = ""
+ │ ├── closing_loc: (38,9)-(38,10) = ")"
+ │ └── unescaped: ""
+ ├── @ LocalVariableWriteNode (location: (39,0)-(39,14))
+ │ ├── name: :x
+ │ ├── depth: 0
+ │ ├── name_loc: (39,0)-(39,1) = "x"
+ │ ├── value:
+ │ │ @ InterpolatedStringNode (location: (39,4)-(39,14))
+ │ │ ├── opening_loc: (39,4)-(39,14) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (40,0)-(40,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (40,0)-(40,2) = " "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (40,2)-(40,5))
+ │ │ │ │ ├── opening_loc: (40,2)-(40,4) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (40,4)-(40,5) = "}"
+ │ │ │ └── @ StringNode (location: (40,5)-(40,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (40,5)-(40,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (41,0)-(41,0) = "HEREDOC\n"
+ │ └── operator_loc: (39,2)-(39,3) = "="
+ ├── @ CallNode (location: (42,0)-(42,14))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (42,0)-(42,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (42,1)-(42,2) = "."
+ │ ├── message_loc: (42,2)-(42,3) = "x"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (42,4)-(42,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (42,4)-(42,14))
+ │ │ ├── opening_loc: (42,4)-(42,14) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (43,0)-(43,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (43,0)-(43,2) = " "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (43,2)-(43,5))
+ │ │ │ │ ├── opening_loc: (43,2)-(43,4) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (43,4)-(43,5) = "}"
+ │ │ │ └── @ StringNode (location: (43,5)-(43,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (43,5)-(43,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (44,0)-(44,0) = "HEREDOC\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "x="
+ ├── @ CallNode (location: (45,0)-(45,16))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (45,0)-(45,1))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (45,1)-(45,3) = "[]"
+ │ ├── opening_loc: (45,1)-(45,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (45,6)-(45,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (45,6)-(45,16))
+ │ │ ├── opening_loc: (45,6)-(45,16) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (46,0)-(46,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (46,0)-(46,2) = " "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (46,2)-(46,5))
+ │ │ │ │ ├── opening_loc: (46,2)-(46,4) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (46,4)-(46,5) = "}"
+ │ │ │ └── @ StringNode (location: (46,5)-(46,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (46,5)-(46,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (47,0)-(47,0) = "HEREDOC\n"
+ │ ├── closing_loc: (45,2)-(45,3) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallOrWriteNode (location: (48,0)-(48,21))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (48,0)-(48,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (48,1)-(48,13) = "[<<-HEREDOC]"
+ │ ├── opening_loc: (48,1)-(48,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (48,2)-(48,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (48,2)-(48,12))
+ │ │ ├── opening_loc: (48,2)-(48,12) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (49,0)-(49,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (49,0)-(49,2) = " "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (49,2)-(49,5))
+ │ │ │ │ ├── opening_loc: (49,2)-(49,4) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (49,4)-(49,5) = "}"
+ │ │ │ └── @ StringNode (location: (49,5)-(49,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (49,5)-(49,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (50,0)-(50,0) = "HEREDOC\n"
+ │ ├── closing_loc: (48,12)-(48,13) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator_loc: (48,14)-(48,17) = "||="
+ │ └── value:
+ │ @ CallNode (location: (48,18)-(48,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (48,18)-(48,21) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ └── @ InstanceVariableOrWriteNode (location: (51,0)-(51,17))
+ ├── name: :@a
+ ├── name_loc: (51,0)-(51,2) = "@a"
+ ├── operator_loc: (51,3)-(51,6) = "||="
+ └── value:
+ @ InterpolatedStringNode (location: (51,7)-(51,17))
+ ├── opening_loc: (51,7)-(51,17) = "<<-HEREDOC"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (52,0)-(52,2))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (52,0)-(52,2) = " "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " "
+ │ ├── @ EmbeddedStatementsNode (location: (52,2)-(52,5))
+ │ │ ├── opening_loc: (52,2)-(52,4) = "\#{"
+ │ │ ├── statements: ∅
+ │ │ └── closing_loc: (52,4)-(52,5) = "}"
+ │ └── @ StringNode (location: (52,5)-(52,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (52,5)-(52,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (53,0)-(53,0) = "HEREDOC\n"
diff --git a/test/prism/snapshots/unparser/corpus/literal/block.txt b/test/prism/snapshots/unparser/corpus/literal/block.txt
new file mode 100644
index 0000000000..3e8309a057
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/block.txt
@@ -0,0 +1,1366 @@
+@ ProgramNode (location: (1,0)-(96,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(96,1))
+ └── body: (length: 30)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,4)-(2,1))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,4)-(1,5) = "{"
+ │ │ └── closing_loc: (2,0)-(2,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (3,0)-(4,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,4)-(4,1))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (3,6)-(3,9))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (3,7)-(3,8))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (3,7)-(3,8))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (3,6)-(3,7) = "|"
+ │ │ │ └── closing_loc: (3,8)-(3,9) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (3,4)-(3,5) = "{"
+ │ │ └── closing_loc: (4,0)-(4,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (5,0)-(6,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,4)-(6,1))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (5,6)-(5,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (5,7)-(5,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (5,7)-(5,8))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (5,8)-(5,9))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (5,8)-(5,9) = ","
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (5,6)-(5,7) = "|"
+ │ │ │ └── closing_loc: (5,9)-(5,10) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,4)-(5,5) = "{"
+ │ │ └── closing_loc: (6,0)-(6,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (7,0)-(8,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (7,4)-(8,1))
+ │ │ ├── locals: [:a, :x]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (7,6)-(7,13))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (7,7)-(7,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (7,7)-(7,8))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (7,8)-(7,9))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (7,8)-(7,9) = ","
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 1)
+ │ │ │ │ └── @ BlockLocalVariableNode (location: (7,11)-(7,12))
+ │ │ │ │ └── name: :x
+ │ │ │ ├── opening_loc: (7,6)-(7,7) = "|"
+ │ │ │ └── closing_loc: (7,12)-(7,13) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (7,4)-(7,5) = "{"
+ │ │ └── closing_loc: (8,0)-(8,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (9,0)-(10,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (9,4)-(10,1))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (9,6)-(9,12))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (9,7)-(9,11))
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (9,7)-(9,8))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (9,10)-(9,11))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (9,6)-(9,7) = "|"
+ │ │ │ └── closing_loc: (9,11)-(9,12) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (9,4)-(9,5) = "{"
+ │ │ └── closing_loc: (10,0)-(10,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (11,0)-(13,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: (11,3)-(11,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (11,4)-(11,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (11,5)-(11,6) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (11,7)-(13,1))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (12,2)-(12,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NilNode (location: (12,2)-(12,5))
+ │ │ ├── opening_loc: (11,7)-(11,8) = "{"
+ │ │ └── closing_loc: (13,0)-(13,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (14,0)-(16,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (14,0)-(14,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (14,4)-(16,1))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (14,6)-(14,13))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (14,7)-(14,12))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (14,7)-(14,8))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (14,10)-(14,12))
+ │ │ │ │ │ ├── name: :b
+ │ │ │ │ │ ├── name_loc: (14,11)-(14,12) = "b"
+ │ │ │ │ │ └── operator_loc: (14,10)-(14,11) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (14,6)-(14,7) = "|"
+ │ │ │ └── closing_loc: (14,12)-(14,13) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (15,2)-(15,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NilNode (location: (15,2)-(15,5))
+ │ │ ├── opening_loc: (14,4)-(14,5) = "{"
+ │ │ └── closing_loc: (16,0)-(16,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (17,0)-(19,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,0)-(17,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (17,4)-(19,1))
+ │ │ ├── locals: [:a, :*]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (17,6)-(17,12))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (17,7)-(17,11))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (17,7)-(17,8))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (17,10)-(17,11))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (17,10)-(17,11) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (17,6)-(17,7) = "|"
+ │ │ │ └── closing_loc: (17,11)-(17,12) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (18,2)-(18,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ NilNode (location: (18,2)-(18,5))
+ │ │ ├── opening_loc: (17,4)-(17,5) = "{"
+ │ │ └── closing_loc: (19,0)-(19,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (20,0)-(22,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (20,0)-(20,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (20,4)-(22,1))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (21,2)-(21,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (21,2)-(21,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,2)-(21,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── opening_loc: (20,4)-(20,5) = "{"
+ │ │ └── closing_loc: (22,0)-(22,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (23,0)-(25,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,0)-(23,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (23,3)-(23,4) = "."
+ │ ├── message_loc: (23,4)-(23,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (23,8)-(25,1))
+ │ │ ├── locals: [:a, :b, :c]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (23,10)-(23,21))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (23,11)-(23,20))
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ RequiredDestructuredParameterNode (location: (23,11)-(23,17))
+ │ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (23,12)-(23,13))
+ │ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (23,15)-(23,16))
+ │ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ │ ├── opening_loc: (23,11)-(23,12) = "("
+ │ │ │ │ │ │ └── closing_loc: (23,16)-(23,17) = ")"
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (23,19)-(23,20))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (23,10)-(23,11) = "|"
+ │ │ │ └── closing_loc: (23,20)-(23,21) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (24,2)-(24,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (24,2)-(24,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (24,2)-(24,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (23,8)-(23,9) = "{"
+ │ │ └── closing_loc: (25,0)-(25,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (26,0)-(27,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (26,0)-(26,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (26,0)-(26,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (26,3)-(26,4) = "."
+ │ ├── message_loc: (26,4)-(26,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (26,8)-(27,1))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (26,10)-(26,17))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (26,11)-(26,13))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (26,11)-(26,13))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ ├── name_loc: (26,12)-(26,13) = "a"
+ │ │ │ │ │ └── operator_loc: (26,11)-(26,12) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 1)
+ │ │ │ │ └── @ BlockLocalVariableNode (location: (26,15)-(26,16))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── opening_loc: (26,10)-(26,11) = "|"
+ │ │ │ └── closing_loc: (26,16)-(26,17) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (26,8)-(26,9) = "{"
+ │ │ └── closing_loc: (27,0)-(27,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (28,0)-(29,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (28,0)-(28,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (28,0)-(28,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (28,3)-(28,4) = "."
+ │ ├── message_loc: (28,4)-(28,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (28,8)-(29,1))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (28,10)-(28,16))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (28,11)-(28,12))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (28,11)-(28,12))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 1)
+ │ │ │ │ └── @ BlockLocalVariableNode (location: (28,14)-(28,15))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── opening_loc: (28,10)-(28,11) = "|"
+ │ │ │ └── closing_loc: (28,15)-(28,16) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (28,8)-(28,9) = "{"
+ │ │ └── closing_loc: (29,0)-(29,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (30,0)-(31,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (30,0)-(30,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (30,0)-(30,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (30,3)-(30,4) = "."
+ │ ├── message_loc: (30,4)-(30,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (30,8)-(31,1))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (30,10)-(30,18))
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── locals: (length: 2)
+ │ │ │ │ ├── @ BlockLocalVariableNode (location: (30,13)-(30,14))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ BlockLocalVariableNode (location: (30,16)-(30,17))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── opening_loc: (30,10)-(30,11) = "|"
+ │ │ │ └── closing_loc: (30,17)-(30,18) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (30,8)-(30,9) = "{"
+ │ │ └── closing_loc: (31,0)-(31,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (32,0)-(34,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (32,0)-(32,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (32,0)-(32,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (32,3)-(32,4) = "."
+ │ ├── message_loc: (32,4)-(32,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (32,8)-(34,1))
+ │ │ ├── locals: [:*]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (32,10)-(32,13))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (32,11)-(32,12))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (32,11)-(32,12))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (32,11)-(32,12) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (32,10)-(32,11) = "|"
+ │ │ │ └── closing_loc: (32,12)-(32,13) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (33,2)-(33,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (33,2)-(33,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (33,2)-(33,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (32,8)-(32,9) = "{"
+ │ │ └── closing_loc: (34,0)-(34,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (35,0)-(37,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (35,0)-(35,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (35,0)-(35,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (35,3)-(35,4) = "."
+ │ ├── message_loc: (35,4)-(35,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (35,8)-(37,1))
+ │ │ ├── locals: []
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (35,10)-(35,15))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (35,11)-(35,14))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (35,11)-(35,14))
+ │ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ │ └── @ SplatNode (location: (35,12)-(35,13))
+ │ │ │ │ │ │ ├── operator_loc: (35,12)-(35,13) = "*"
+ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ ├── opening_loc: (35,11)-(35,12) = "("
+ │ │ │ │ │ └── closing_loc: (35,13)-(35,14) = ")"
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (35,10)-(35,11) = "|"
+ │ │ │ └── closing_loc: (35,14)-(35,15) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (36,2)-(36,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (36,2)-(36,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (36,2)-(36,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (35,8)-(35,9) = "{"
+ │ │ └── closing_loc: (37,0)-(37,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (38,0)-(40,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (38,0)-(38,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (38,0)-(38,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (38,3)-(38,4) = "."
+ │ ├── message_loc: (38,4)-(38,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (38,8)-(40,1))
+ │ │ ├── locals: []
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (38,10)-(38,17))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (38,11)-(38,16))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (38,11)-(38,16))
+ │ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (38,12)-(38,15))
+ │ │ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ │ │ └── @ SplatNode (location: (38,13)-(38,14))
+ │ │ │ │ │ │ │ ├── operator_loc: (38,13)-(38,14) = "*"
+ │ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ │ ├── opening_loc: (38,12)-(38,13) = "("
+ │ │ │ │ │ │ └── closing_loc: (38,14)-(38,15) = ")"
+ │ │ │ │ │ ├── opening_loc: (38,11)-(38,12) = "("
+ │ │ │ │ │ └── closing_loc: (38,15)-(38,16) = ")"
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (38,10)-(38,11) = "|"
+ │ │ │ └── closing_loc: (38,16)-(38,17) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (39,2)-(39,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (39,2)-(39,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (39,2)-(39,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (38,8)-(38,9) = "{"
+ │ │ └── closing_loc: (40,0)-(40,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (41,0)-(43,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (41,0)-(41,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (41,3)-(41,4) = "."
+ │ ├── message_loc: (41,4)-(41,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (41,8)-(43,1))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (41,10)-(41,20))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (41,11)-(41,19))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (41,11)-(41,19))
+ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (41,12)-(41,13))
+ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (41,15)-(41,18))
+ │ │ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ │ │ └── @ SplatNode (location: (41,16)-(41,17))
+ │ │ │ │ │ │ │ ├── operator_loc: (41,16)-(41,17) = "*"
+ │ │ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ │ │ ├── opening_loc: (41,15)-(41,16) = "("
+ │ │ │ │ │ │ └── closing_loc: (41,17)-(41,18) = ")"
+ │ │ │ │ │ ├── opening_loc: (41,11)-(41,12) = "("
+ │ │ │ │ │ └── closing_loc: (41,18)-(41,19) = ")"
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (41,10)-(41,11) = "|"
+ │ │ │ └── closing_loc: (41,19)-(41,20) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (42,2)-(42,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (42,2)-(42,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (42,2)-(42,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (41,8)-(41,9) = "{"
+ │ │ └── closing_loc: (43,0)-(43,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (44,0)-(46,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (44,0)-(44,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (44,0)-(44,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (44,3)-(44,4) = "."
+ │ ├── message_loc: (44,4)-(44,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (44,8)-(46,1))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (44,10)-(44,18))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (44,11)-(44,17))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (44,11)-(44,17))
+ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (44,12)-(44,13))
+ │ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (44,15)-(44,16))
+ │ │ │ │ │ │ └── name: :b
+ │ │ │ │ │ ├── opening_loc: (44,11)-(44,12) = "("
+ │ │ │ │ │ └── closing_loc: (44,16)-(44,17) = ")"
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (44,10)-(44,11) = "|"
+ │ │ │ └── closing_loc: (44,17)-(44,18) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (45,2)-(45,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (45,2)-(45,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (45,2)-(45,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── opening_loc: (44,8)-(44,9) = "{"
+ │ │ └── closing_loc: (46,0)-(46,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (47,0)-(48,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (47,0)-(48,1))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (47,0)-(47,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: (47,3)-(47,4) = "."
+ │ │ ├── message_loc: (47,4)-(47,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (47,8)-(48,1))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (47,8)-(47,9) = "{"
+ │ │ │ └── closing_loc: (48,0)-(48,1) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── call_operator_loc: (48,1)-(48,2) = "."
+ │ ├── message_loc: (48,2)-(48,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "baz"
+ ├── @ CallNode (location: (49,0)-(51,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (49,0)-(49,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (49,2)-(51,3))
+ │ │ ├── locals: [:e]
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (50,0)-(51,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (50,0)-(50,21))
+ │ │ │ │ ├── keyword_loc: (50,0)-(50,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 1)
+ │ │ │ │ │ └── @ ConstantReadNode (location: (50,7)-(50,16))
+ │ │ │ │ │ └── name: :Exception
+ │ │ │ │ ├── operator_loc: (50,17)-(50,19) = "=>"
+ │ │ │ │ ├── reference:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (50,20)-(50,21))
+ │ │ │ │ │ ├── name: :e
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
+ │ │ ├── opening_loc: (49,2)-(49,4) = "do"
+ │ │ └── closing_loc: (51,0)-(51,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (52,0)-(56,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (52,0)-(52,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (52,2)-(56,3))
+ │ │ ├── locals: [:bar]
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (53,2)-(56,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (53,2)-(53,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (53,2)-(53,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (53,2)-(53,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (54,0)-(55,5))
+ │ │ │ │ ├── keyword_loc: (54,0)-(54,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 1)
+ │ │ │ │ │ └── @ ConstantReadNode (location: (54,7)-(54,16))
+ │ │ │ │ │ └── name: :Exception
+ │ │ │ │ ├── operator_loc: (54,17)-(54,19) = "=>"
+ │ │ │ │ ├── reference:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (54,20)-(54,23))
+ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (55,2)-(55,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ LocalVariableReadNode (location: (55,2)-(55,5))
+ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (56,0)-(56,3) = "end"
+ │ │ ├── opening_loc: (52,2)-(52,4) = "do"
+ │ │ └── closing_loc: (56,0)-(56,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (57,0)-(61,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (57,0)-(57,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (57,2)-(61,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (58,2)-(61,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (58,2)-(58,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (58,2)-(58,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (58,2)-(58,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (59,0)-(60,5))
+ │ │ │ │ ├── keyword_loc: (59,0)-(59,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 2)
+ │ │ │ │ │ ├── @ ConstantReadNode (location: (59,7)-(59,16))
+ │ │ │ │ │ │ └── name: :SomeError
+ │ │ │ │ │ └── @ SplatNode (location: (59,18)-(59,22))
+ │ │ │ │ │ ├── operator_loc: (59,18)-(59,19) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ CallNode (location: (59,19)-(59,22))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (59,19)-(59,22) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (60,2)-(60,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (60,2)-(60,5))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (60,2)-(60,5) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (61,0)-(61,3) = "end"
+ │ │ ├── opening_loc: (57,2)-(57,4) = "do"
+ │ │ └── closing_loc: (61,0)-(61,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (62,0)-(66,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (62,0)-(62,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (62,2)-(66,3))
+ │ │ ├── locals: [:exception]
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (63,2)-(66,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (63,2)-(63,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (63,2)-(63,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (63,2)-(63,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (64,0)-(65,5))
+ │ │ │ │ ├── keyword_loc: (64,0)-(64,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 2)
+ │ │ │ │ │ ├── @ ConstantReadNode (location: (64,7)-(64,16))
+ │ │ │ │ │ │ └── name: :SomeError
+ │ │ │ │ │ └── @ SplatNode (location: (64,18)-(64,22))
+ │ │ │ │ │ ├── operator_loc: (64,18)-(64,19) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ CallNode (location: (64,19)-(64,22))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (64,19)-(64,22) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ ├── operator_loc: (64,23)-(64,25) = "=>"
+ │ │ │ │ ├── reference:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (64,26)-(64,35))
+ │ │ │ │ │ ├── name: :exception
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (65,2)-(65,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (65,2)-(65,5))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (65,2)-(65,5) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (66,0)-(66,3) = "end"
+ │ │ ├── opening_loc: (62,2)-(62,4) = "do"
+ │ │ └── closing_loc: (66,0)-(66,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (67,0)-(71,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (67,0)-(67,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (67,2)-(71,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (68,2)-(71,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (68,2)-(68,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (68,2)-(68,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (68,2)-(68,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (69,0)-(70,5))
+ │ │ │ │ ├── keyword_loc: (69,0)-(69,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 1)
+ │ │ │ │ │ └── @ SplatNode (location: (69,7)-(69,11))
+ │ │ │ │ │ ├── operator_loc: (69,7)-(69,8) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ CallNode (location: (69,8)-(69,11))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (69,8)-(69,11) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (70,2)-(70,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (70,2)-(70,5))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (70,2)-(70,5) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (71,0)-(71,3) = "end"
+ │ │ ├── opening_loc: (67,2)-(67,4) = "do"
+ │ │ └── closing_loc: (71,0)-(71,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (72,0)-(75,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (72,0)-(72,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (72,2)-(75,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (73,2)-(75,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (73,2)-(73,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (73,2)-(73,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (73,2)-(73,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (74,0)-(74,16))
+ │ │ │ │ ├── keyword_loc: (74,0)-(74,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 1)
+ │ │ │ │ │ └── @ ConstantReadNode (location: (74,7)-(74,16))
+ │ │ │ │ │ └── name: :LoadError
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (75,0)-(75,3) = "end"
+ │ │ ├── opening_loc: (72,2)-(72,4) = "do"
+ │ │ └── closing_loc: (75,0)-(75,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (76,0)-(81,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (76,0)-(76,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (76,2)-(81,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (77,2)-(81,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (77,2)-(77,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (77,2)-(77,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (77,2)-(77,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (78,0)-(78,6))
+ │ │ │ │ ├── keyword_loc: (78,0)-(78,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause:
+ │ │ │ │ @ ElseNode (location: (79,0)-(81,3))
+ │ │ │ │ ├── else_keyword_loc: (79,0)-(79,4) = "else"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (80,2)-(80,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (80,2)-(80,5))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (80,2)-(80,5) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
+ │ │ ├── opening_loc: (76,2)-(76,4) = "do"
+ │ │ └── closing_loc: (81,0)-(81,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (82,0)-(86,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (82,0)-(82,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (82,2)-(86,3))
+ │ │ ├── locals: [:exception]
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (83,2)-(86,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (83,2)-(83,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (83,2)-(83,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (83,2)-(83,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (84,0)-(85,5))
+ │ │ │ │ ├── keyword_loc: (84,0)-(84,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 1)
+ │ │ │ │ │ └── @ SplatNode (location: (84,7)-(84,11))
+ │ │ │ │ │ ├── operator_loc: (84,7)-(84,8) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ CallNode (location: (84,8)-(84,11))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (84,8)-(84,11) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ ├── operator_loc: (84,12)-(84,14) = "=>"
+ │ │ │ │ ├── reference:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (84,15)-(84,24))
+ │ │ │ │ │ ├── name: :exception
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (85,2)-(85,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (85,2)-(85,5))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (85,2)-(85,5) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (86,0)-(86,3) = "end"
+ │ │ ├── opening_loc: (82,2)-(82,4) = "do"
+ │ │ └── closing_loc: (86,0)-(86,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (87,0)-(89,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (87,0)-(87,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (87,2)-(89,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (88,0)-(89,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause:
+ │ │ │ │ @ EnsureNode (location: (88,0)-(89,3))
+ │ │ │ │ ├── ensure_keyword_loc: (88,0)-(88,6) = "ensure"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── end_keyword_loc: (89,0)-(89,3) = "end"
+ │ │ │ └── end_keyword_loc: (89,0)-(89,3) = "end"
+ │ │ ├── opening_loc: (87,2)-(87,4) = "do"
+ │ │ └── closing_loc: (89,0)-(89,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallNode (location: (90,0)-(93,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (90,0)-(90,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (90,2)-(93,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (91,0)-(93,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (91,0)-(91,6))
+ │ │ │ │ ├── keyword_loc: (91,0)-(91,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause:
+ │ │ │ │ @ EnsureNode (location: (92,0)-(93,3))
+ │ │ │ │ ├── ensure_keyword_loc: (92,0)-(92,6) = "ensure"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
+ │ │ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
+ │ │ ├── opening_loc: (90,2)-(90,4) = "do"
+ │ │ └── closing_loc: (93,0)-(93,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ └── @ CallNode (location: (94,0)-(96,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (94,0)-(94,3) = "bar"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (94,4)-(96,1))
+ │ ├── locals: [:_1, :_2]
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (95,2)-(95,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (95,2)-(95,9))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (95,2)-(95,4))
+ │ │ │ ├── name: :_1
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (95,5)-(95,6) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (95,7)-(95,9))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (95,7)-(95,9))
+ │ │ │ ├── name: :_2
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── opening_loc: (94,4)-(94,5) = "{"
+ │ └── closing_loc: (96,0)-(96,1) = "}"
+ ├── flags: ∅
+ └── name: "bar"
diff --git a/test/prism/snapshots/unparser/corpus/literal/case.txt b/test/prism/snapshots/unparser/corpus/literal/case.txt
new file mode 100644
index 0000000000..8cfc927794
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/case.txt
@@ -0,0 +1,429 @@
+@ ProgramNode (location: (1,0)-(37,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(37,3))
+ └── body: (length: 8)
+ ├── @ CaseNode (location: (1,0)-(6,3))
+ │ ├── predicate: ∅
+ │ ├── conditions: (length: 2)
+ │ │ ├── @ WhenNode (location: (2,0)-(3,5))
+ │ │ │ ├── keyword_loc: (2,0)-(2,4) = "when"
+ │ │ │ ├── conditions: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (2,5)-(2,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (2,5)-(2,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── statements:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,2)-(3,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,2)-(3,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── @ WhenNode (location: (4,0)-(5,5))
+ │ │ ├── keyword_loc: (4,0)-(4,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (4,5)-(4,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (4,5)-(4,8) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,2)-(5,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ ├── @ CaseNode (location: (7,0)-(11,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (7,5)-(7,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,5)-(7,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 2)
+ │ │ ├── @ WhenNode (location: (8,0)-(8,8))
+ │ │ │ ├── keyword_loc: (8,0)-(8,4) = "when"
+ │ │ │ ├── conditions: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (8,5)-(8,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (8,5)-(8,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── statements: ∅
+ │ │ └── @ WhenNode (location: (9,0)-(10,5))
+ │ │ ├── keyword_loc: (9,0)-(9,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (9,5)-(9,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,5)-(9,8) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (10,2)-(10,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (10,2)-(10,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (10,2)-(10,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (7,0)-(7,4) = "case"
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ CaseNode (location: (12,0)-(17,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (12,5)-(12,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (12,5)-(12,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 2)
+ │ │ ├── @ WhenNode (location: (13,0)-(14,5))
+ │ │ │ ├── keyword_loc: (13,0)-(13,4) = "when"
+ │ │ │ ├── conditions: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (13,5)-(13,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (13,5)-(13,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── statements:
+ │ │ │ @ StatementsNode (location: (14,2)-(14,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (14,2)-(14,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (14,2)-(14,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── @ WhenNode (location: (15,0)-(16,5))
+ │ │ ├── keyword_loc: (15,0)-(15,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (15,5)-(15,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (15,5)-(15,8) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (16,2)-(16,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (16,2)-(16,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,2)-(16,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (12,0)-(12,4) = "case"
+ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ ├── @ CaseNode (location: (18,0)-(21,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (18,5)-(18,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (18,5)-(18,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (19,0)-(20,8))
+ │ │ ├── keyword_loc: (19,0)-(19,4) = "when"
+ │ │ ├── conditions: (length: 2)
+ │ │ │ ├── @ CallNode (location: (19,5)-(19,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (19,5)-(19,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── @ CallNode (location: (19,10)-(19,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,10)-(19,13) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (20,2)-(20,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (20,2)-(20,8))
+ │ │ ├── opening_loc: (20,2)-(20,3) = ":"
+ │ │ ├── value_loc: (20,3)-(20,8) = "other"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "other"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (18,0)-(18,4) = "case"
+ │ └── end_keyword_loc: (21,0)-(21,3) = "end"
+ ├── @ CaseNode (location: (22,0)-(25,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (22,5)-(22,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (22,5)-(22,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (23,0)-(24,8))
+ │ │ ├── keyword_loc: (23,0)-(23,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ SplatNode (location: (23,5)-(23,9))
+ │ │ │ ├── operator_loc: (23,5)-(23,6) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (23,6)-(23,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (23,6)-(23,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (24,2)-(24,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (24,2)-(24,8))
+ │ │ ├── opening_loc: (24,2)-(24,3) = ":"
+ │ │ ├── value_loc: (24,3)-(24,8) = "value"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "value"
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (22,0)-(22,4) = "case"
+ │ └── end_keyword_loc: (25,0)-(25,3) = "end"
+ ├── @ CaseNode (location: (26,0)-(31,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (26,5)-(26,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (26,5)-(26,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (27,0)-(28,5))
+ │ │ ├── keyword_loc: (27,0)-(27,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ CallNode (location: (27,5)-(27,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (27,5)-(27,8) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (28,2)-(28,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (28,2)-(28,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (28,2)-(28,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (29,0)-(31,3))
+ │ │ ├── else_keyword_loc: (29,0)-(29,4) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (30,2)-(30,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (30,2)-(30,6))
+ │ │ │ ├── opening_loc: (30,2)-(30,3) = ":"
+ │ │ │ ├── value_loc: (30,3)-(30,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
+ │ ├── case_keyword_loc: (26,0)-(26,4) = "case"
+ │ └── end_keyword_loc: (31,0)-(31,3) = "end"
+ ├── @ CaseNode (location: (32,0)-(34,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (32,5)-(32,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (32,5)-(32,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ WhenNode (location: (33,0)-(33,15))
+ │ │ ├── keyword_loc: (33,0)-(33,4) = "when"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ SplatNode (location: (33,5)-(33,15))
+ │ │ │ ├── operator_loc: (33,5)-(33,6) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (33,6)-(33,15))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (33,6)-(33,9))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (33,6)-(33,9) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (33,10)-(33,11) = "|"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (33,12)-(33,15))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (33,12)-(33,15))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (33,12)-(33,15) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "|"
+ │ │ └── statements: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (32,0)-(32,4) = "case"
+ │ └── end_keyword_loc: (34,0)-(34,3) = "end"
+ └── @ CaseNode (location: (35,0)-(37,3))
+ ├── predicate:
+ │ @ CallNode (location: (35,5)-(35,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,5)-(35,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (36,0)-(36,15))
+ │ ├── keyword_loc: (36,0)-(36,4) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ SplatNode (location: (36,5)-(36,15))
+ │ │ ├── operator_loc: (36,5)-(36,6) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (36,6)-(36,15))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (36,6)-(36,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (36,6)-(36,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── call_operator_loc: (36,9)-(36,10) = "."
+ │ │ ├── message_loc: (36,10)-(36,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (36,14)-(36,15))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (36,14)-(36,15))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "baz="
+ │ └── statements: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (35,0)-(35,4) = "case"
+ └── end_keyword_loc: (37,0)-(37,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/class.txt b/test/prism/snapshots/unparser/corpus/literal/class.txt
new file mode 100644
index 0000000000..9e67bd753a
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/class.txt
@@ -0,0 +1,231 @@
+@ ProgramNode (location: (1,0)-(35,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(35,3))
+ └── body: (length: 10)
+ ├── @ ClassNode (location: (1,0)-(2,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (1,6)-(1,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (2,0)-(2,3) = "end"
+ │ └── name: :A
+ ├── @ SingletonClassNode (location: (4,0)-(5,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (4,0)-(4,5) = "class"
+ │ ├── operator_loc: (4,6)-(4,8) = "<<"
+ │ ├── expression:
+ │ │ @ CallNode (location: (4,9)-(4,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,9)-(4,10) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── body: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ ├── @ SingletonClassNode (location: (7,0)-(9,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (7,0)-(7,5) = "class"
+ │ ├── operator_loc: (7,6)-(7,8) = "<<"
+ │ ├── expression:
+ │ │ @ CallNode (location: (7,9)-(7,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,9)-(7,10) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (8,2)-(8,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (8,2)-(8,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (8,2)-(8,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ ├── @ ClassNode (location: (11,0)-(12,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (11,0)-(11,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (11,6)-(11,10))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (11,6)-(11,7))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (11,9)-(11,10))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (11,7)-(11,9) = "::"
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (12,0)-(12,3) = "end"
+ │ └── name: :B
+ ├── @ ClassNode (location: (14,0)-(15,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (14,0)-(14,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (14,6)-(14,13))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (14,6)-(14,10))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (14,6)-(14,7))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (14,9)-(14,10))
+ │ │ │ │ └── name: :B
+ │ │ │ └── delimiter_loc: (14,7)-(14,9) = "::"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (14,12)-(14,13))
+ │ │ │ └── name: :C
+ │ │ └── delimiter_loc: (14,10)-(14,12) = "::"
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (15,0)-(15,3) = "end"
+ │ └── name: :C
+ ├── @ ClassNode (location: (17,0)-(18,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (17,0)-(17,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (17,6)-(17,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: (17,8)-(17,9) = "<"
+ │ ├── superclass:
+ │ │ @ ConstantReadNode (location: (17,10)-(17,11))
+ │ │ └── name: :B
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (18,0)-(18,3) = "end"
+ │ └── name: :A
+ ├── @ ClassNode (location: (20,0)-(21,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (20,0)-(20,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (20,6)-(20,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: (20,8)-(20,9) = "<"
+ │ ├── superclass:
+ │ │ @ ConstantPathNode (location: (20,10)-(20,14))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (20,10)-(20,11))
+ │ │ │ └── name: :B
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (20,13)-(20,14))
+ │ │ │ └── name: :C
+ │ │ └── delimiter_loc: (20,11)-(20,13) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (21,0)-(21,3) = "end"
+ │ └── name: :A
+ ├── @ ClassNode (location: (23,0)-(24,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (23,0)-(23,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (23,6)-(23,10))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (23,6)-(23,7))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (23,9)-(23,10))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (23,7)-(23,9) = "::"
+ │ ├── inheritance_operator_loc: (23,11)-(23,12) = "<"
+ │ ├── superclass:
+ │ │ @ ConstantPathNode (location: (23,13)-(23,17))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (23,13)-(23,14))
+ │ │ │ └── name: :C
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (23,16)-(23,17))
+ │ │ │ └── name: :D
+ │ │ └── delimiter_loc: (23,14)-(23,16) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (24,0)-(24,3) = "end"
+ │ └── name: :B
+ ├── @ ClassNode (location: (26,0)-(32,3))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (26,0)-(26,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (26,6)-(26,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (27,2)-(31,5))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ CallNode (location: (27,2)-(27,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (27,2)-(27,9) = "include"
+ │ │ │ ├── opening_loc: (27,9)-(27,10) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (27,10)-(27,15))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (27,10)-(27,15))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ ConstantReadNode (location: (27,10)-(27,11))
+ │ │ │ │ │ └── name: :B
+ │ │ │ │ ├── call_operator_loc: (27,11)-(27,12) = "."
+ │ │ │ │ ├── message_loc: (27,12)-(27,15) = "new"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "new"
+ │ │ │ ├── closing_loc: (27,15)-(27,16) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "include"
+ │ │ └── @ DefNode (location: (29,2)-(31,5))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (29,6)-(29,9) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (30,4)-(30,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (30,4)-(30,8))
+ │ │ │ ├── opening_loc: (30,4)-(30,5) = ":"
+ │ │ │ ├── value_loc: (30,5)-(30,8) = "bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── locals: []
+ │ │ ├── def_keyword_loc: (29,2)-(29,5) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (31,2)-(31,5) = "end"
+ │ ├── end_keyword_loc: (32,0)-(32,3) = "end"
+ │ └── name: :A
+ └── @ ClassNode (location: (34,0)-(35,3))
+ ├── locals: []
+ ├── class_keyword_loc: (34,0)-(34,5) = "class"
+ ├── constant_path:
+ │ @ ConstantPathNode (location: (34,6)-(34,9))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (34,8)-(34,9))
+ │ │ └── name: :A
+ │ └── delimiter_loc: (34,6)-(34,8) = "::"
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body: ∅
+ ├── end_keyword_loc: (35,0)-(35,3) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/unparser/corpus/literal/control.txt b/test/prism/snapshots/unparser/corpus/literal/control.txt
new file mode 100644
index 0000000000..7ab821e051
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/control.txt
@@ -0,0 +1,129 @@
+@ ProgramNode (location: (1,0)-(15,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(15,3))
+ └── body: (length: 11)
+ ├── @ NextNode (location: (1,0)-(1,4))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (1,0)-(1,4) = "next"
+ ├── @ ReturnNode (location: (2,0)-(2,6))
+ │ ├── keyword_loc: (2,0)-(2,6) = "return"
+ │ └── arguments: ∅
+ ├── @ BreakNode (location: (3,0)-(3,5))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (3,0)-(3,5) = "break"
+ ├── @ RetryNode (location: (4,0)-(4,5))
+ ├── @ RedoNode (location: (5,0)-(5,4))
+ ├── @ ReturnNode (location: (6,0)-(6,8))
+ │ ├── keyword_loc: (6,0)-(6,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (6,7)-(6,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (6,7)-(6,8))
+ │ └── flags: decimal
+ ├── @ ReturnNode (location: (7,0)-(7,11))
+ │ ├── keyword_loc: (7,0)-(7,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (7,7)-(7,11))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (7,7)-(7,8))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (7,10)-(7,11))
+ │ └── flags: decimal
+ ├── @ ReturnNode (location: (8,0)-(8,19))
+ │ ├── keyword_loc: (8,0)-(8,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (8,7)-(8,19))
+ │ └── arguments: (length: 1)
+ │ └── @ IfNode (location: (8,7)-(8,19))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (8,7)-(8,11))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,14)-(8,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (8,14)-(8,15))
+ │ │ └── flags: decimal
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (8,16)-(8,19))
+ │ │ ├── else_keyword_loc: (8,16)-(8,17) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (8,18)-(8,19))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (8,18)-(8,19))
+ │ │ │ └── flags: decimal
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ BreakNode (location: (9,0)-(9,18))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,6)-(9,18))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IfNode (location: (9,6)-(9,18))
+ │ │ ├── if_keyword_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (9,6)-(9,10))
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (9,13)-(9,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (9,13)-(9,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── consequent:
+ │ │ │ @ ElseNode (location: (9,15)-(9,18))
+ │ │ │ ├── else_keyword_loc: (9,15)-(9,16) = ":"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (9,17)-(9,18))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (9,17)-(9,18))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ └── keyword_loc: (9,0)-(9,5) = "break"
+ ├── @ NextNode (location: (10,0)-(10,17))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (10,5)-(10,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IfNode (location: (10,5)-(10,17))
+ │ │ ├── if_keyword_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (10,5)-(10,9))
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (10,12)-(10,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (10,12)-(10,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── consequent:
+ │ │ │ @ ElseNode (location: (10,14)-(10,17))
+ │ │ │ ├── else_keyword_loc: (10,14)-(10,15) = ":"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (10,16)-(10,17))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (10,16)-(10,17))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ └── keyword_loc: (10,0)-(10,4) = "next"
+ └── @ ReturnNode (location: (11,0)-(15,3))
+ ├── keyword_loc: (11,0)-(11,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (11,7)-(15,3))
+ └── arguments: (length: 2)
+ ├── @ TrueNode (location: (11,7)-(11,11))
+ └── @ IfNode (location: (11,13)-(15,3))
+ ├── if_keyword_loc: (11,13)-(11,15) = "if"
+ ├── predicate:
+ │ @ TrueNode (location: (11,16)-(11,20))
+ ├── statements:
+ │ @ StatementsNode (location: (12,2)-(12,3))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (12,2)-(12,3))
+ │ └── flags: decimal
+ ├── consequent:
+ │ @ ElseNode (location: (13,0)-(15,3))
+ │ ├── else_keyword_loc: (13,0)-(13,4) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (14,2)-(14,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (14,2)-(14,3))
+ │ │ └── flags: decimal
+ │ └── end_keyword_loc: (15,0)-(15,3) = "end"
+ └── end_keyword_loc: (15,0)-(15,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/def.txt b/test/prism/snapshots/unparser/corpus/literal/def.txt
new file mode 100644
index 0000000000..421c45fd9b
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/def.txt
@@ -0,0 +1,1170 @@
+@ ProgramNode (location: (1,0)-(134,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(134,3))
+ └── body: (length: 30)
+ ├── @ DefNode (location: (1,0)-(9,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (2,2)-(9,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (3,0)-(4,3))
+ │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (4,2)-(4,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,2)-(4,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause:
+ │ │ │ @ ElseNode (location: (5,0)-(7,6))
+ │ │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (6,2)-(6,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (6,2)-(6,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (6,2)-(6,3) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "c"
+ │ │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (7,0)-(9,3))
+ │ │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (8,2)-(8,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (8,2)-(8,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (8,2)-(8,3) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "d"
+ │ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ ├── @ DefNode (location: (11,0)-(19,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (11,4)-(11,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (12,2)-(19,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (12,2)-(12,12))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ RescueModifierNode (location: (12,2)-(12,12))
+ │ │ │ ├── expression:
+ │ │ │ │ @ CallNode (location: (12,2)-(12,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (12,2)-(12,3) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── keyword_loc: (12,4)-(12,10) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ CallNode (location: (12,11)-(12,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (12,11)-(12,12) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (13,0)-(14,3))
+ │ │ │ ├── keyword_loc: (13,0)-(13,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (14,2)-(14,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (14,2)-(14,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (14,2)-(14,3) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause:
+ │ │ │ @ ElseNode (location: (15,0)-(17,6))
+ │ │ │ ├── else_keyword_loc: (15,0)-(15,4) = "else"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (16,2)-(16,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (16,2)-(16,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (16,2)-(16,3) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "c"
+ │ │ │ └── end_keyword_loc: (17,0)-(17,6) = "ensure"
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (17,0)-(19,3))
+ │ │ │ ├── ensure_keyword_loc: (17,0)-(17,6) = "ensure"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (18,2)-(18,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (18,2)-(18,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,2)-(18,3) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "d"
+ │ │ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ │ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (11,0)-(11,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ ├── @ DefNode (location: (21,0)-(22,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (21,4)-(21,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (21,8)-(21,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ KeywordParameterNode (location: (21,8)-(21,12))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── name_loc: (21,8)-(21,12) = "bar:"
+ │ │ │ │ └── value: ∅
+ │ │ │ └── @ KeywordParameterNode (location: (21,14)-(21,18))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (21,14)-(21,18) = "baz:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar, :baz]
+ │ ├── def_keyword_loc: (21,0)-(21,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (21,7)-(21,8) = "("
+ │ ├── rparen_loc: (21,18)-(21,19) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (22,0)-(22,3) = "end"
+ ├── @ DefNode (location: (24,0)-(25,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (24,4)-(24,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (24,0)-(24,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (25,0)-(25,3) = "end"
+ ├── @ DefNode (location: (27,0)-(29,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (27,4)-(27,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (28,2)-(28,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (28,2)-(28,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (28,2)-(28,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (29,0)-(29,3) = "end"
+ ├── @ DefNode (location: (31,0)-(37,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (31,4)-(31,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (32,2)-(37,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (32,2)-(32,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (32,2)-(32,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (32,2)-(32,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (33,0)-(34,5))
+ │ │ │ ├── keyword_loc: (33,0)-(33,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (34,2)-(34,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (34,2)-(34,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (34,2)-(34,5) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (35,0)-(37,3))
+ │ │ │ ├── ensure_keyword_loc: (35,0)-(35,6) = "ensure"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (36,2)-(36,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (36,2)-(36,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (36,2)-(36,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
+ │ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (31,0)-(31,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (37,0)-(37,3) = "end"
+ ├── @ DefNode (location: (39,0)-(43,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (39,4)-(39,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (40,2)-(43,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (40,2)-(40,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (40,2)-(40,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (40,2)-(40,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause:
+ │ │ │ @ EnsureNode (location: (41,0)-(43,3))
+ │ │ │ ├── ensure_keyword_loc: (41,0)-(41,6) = "ensure"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (42,2)-(42,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (42,2)-(42,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (42,2)-(42,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
+ │ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (39,0)-(39,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (43,0)-(43,3) = "end"
+ ├── @ DefNode (location: (45,0)-(49,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (45,4)-(45,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (46,2)-(49,3))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (46,2)-(46,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (46,2)-(46,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (46,2)-(46,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (47,0)-(48,5))
+ │ │ │ ├── keyword_loc: (47,0)-(47,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (48,2)-(48,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (48,2)-(48,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (48,2)-(48,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (49,0)-(49,3) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (45,0)-(45,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (49,0)-(49,3) = "end"
+ ├── @ DefNode (location: (51,0)-(53,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (51,4)-(51,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (51,8)-(51,11))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (51,8)-(51,11))
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (52,2)-(52,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (52,2)-(52,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (51,0)-(51,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (51,7)-(51,8) = "("
+ │ ├── rparen_loc: (51,11)-(51,12) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (53,0)-(53,3) = "end"
+ ├── @ DefNode (location: (55,0)-(57,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (55,4)-(55,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (55,8)-(55,16))
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ RequiredParameterNode (location: (55,8)-(55,11))
+ │ │ │ │ └── name: :bar
+ │ │ │ └── @ RequiredParameterNode (location: (55,13)-(55,16))
+ │ │ │ └── name: :baz
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (56,2)-(56,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (56,2)-(56,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar, :baz]
+ │ ├── def_keyword_loc: (55,0)-(55,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (55,7)-(55,8) = "("
+ │ ├── rparen_loc: (55,16)-(55,17) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (57,0)-(57,3) = "end"
+ ├── @ DefNode (location: (59,0)-(61,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (59,4)-(59,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (59,8)-(59,16))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (59,8)-(59,16))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (59,8)-(59,11) = "bar"
+ │ │ │ ├── operator_loc: (59,12)-(59,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (59,14)-(59,16))
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (59,14)-(59,15) = "("
+ │ │ │ └── closing_loc: (59,15)-(59,16) = ")"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (60,2)-(60,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (60,2)-(60,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (59,0)-(59,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (59,7)-(59,8) = "("
+ │ ├── rparen_loc: (59,16)-(59,17) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (61,0)-(61,3) = "end"
+ ├── @ DefNode (location: (63,0)-(64,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (63,4)-(63,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (63,8)-(63,24))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (63,8)-(63,24))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (63,8)-(63,11) = "bar"
+ │ │ │ ├── operator_loc: (63,12)-(63,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ ParenthesesNode (location: (63,14)-(63,24))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (63,15)-(63,23))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ CallNode (location: (63,15)-(63,18))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (63,15)-(63,18) = "baz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "baz"
+ │ │ │ │ └── @ NilNode (location: (63,20)-(63,23))
+ │ │ │ ├── opening_loc: (63,14)-(63,15) = "("
+ │ │ │ └── closing_loc: (63,23)-(63,24) = ")"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (63,0)-(63,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (63,7)-(63,8) = "("
+ │ ├── rparen_loc: (63,24)-(63,25) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (64,0)-(64,3) = "end"
+ ├── @ DefNode (location: (66,0)-(68,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (66,4)-(66,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (66,8)-(66,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (66,8)-(66,18))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (66,8)-(66,11) = "bar"
+ │ │ │ ├── operator_loc: (66,12)-(66,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ TrueNode (location: (66,14)-(66,18))
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (67,2)-(67,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (67,2)-(67,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (66,0)-(66,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (66,7)-(66,8) = "("
+ │ ├── rparen_loc: (66,18)-(66,19) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (68,0)-(68,3) = "end"
+ ├── @ DefNode (location: (70,0)-(72,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (70,4)-(70,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (70,8)-(70,23))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (70,8)-(70,11))
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (70,13)-(70,23))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (70,13)-(70,16) = "baz"
+ │ │ │ ├── operator_loc: (70,17)-(70,18) = "="
+ │ │ │ └── value:
+ │ │ │ @ TrueNode (location: (70,19)-(70,23))
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (71,2)-(71,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (71,2)-(71,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar, :baz]
+ │ ├── def_keyword_loc: (70,0)-(70,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (70,7)-(70,8) = "("
+ │ ├── rparen_loc: (70,23)-(70,24) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (72,0)-(72,3) = "end"
+ ├── @ DefNode (location: (74,0)-(75,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (74,4)-(74,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (74,8)-(74,14))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (74,8)-(74,14))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (74,8)-(74,12) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (74,13)-(74,14))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (74,0)-(74,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (74,7)-(74,8) = "("
+ │ ├── rparen_loc: (74,14)-(74,15) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (75,0)-(75,3) = "end"
+ ├── @ DefNode (location: (77,0)-(78,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (77,4)-(77,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (77,8)-(77,16))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (77,8)-(77,16))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (77,8)-(77,12) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (77,13)-(77,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (77,13)-(77,16) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (77,0)-(77,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (77,7)-(77,8) = "("
+ │ ├── rparen_loc: (77,16)-(77,17) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (78,0)-(78,3) = "end"
+ ├── @ DefNode (location: (80,0)-(81,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (80,4)-(80,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (80,8)-(80,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (80,8)-(80,18))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (80,8)-(80,12) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (80,13)-(80,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (80,13)-(80,16) = "bar"
+ │ │ │ ├── opening_loc: (80,16)-(80,17) = "("
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: (80,17)-(80,18) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "bar"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (80,0)-(80,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (80,7)-(80,8) = "("
+ │ ├── rparen_loc: (80,18)-(80,19) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
+ ├── @ DefNode (location: (83,0)-(85,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (83,4)-(83,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (83,8)-(83,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (83,8)-(83,9))
+ │ │ │ ├── name: nil
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (83,8)-(83,9) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (84,2)-(84,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (84,2)-(84,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (84,2)-(84,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: [:*]
+ │ ├── def_keyword_loc: (83,0)-(83,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (83,7)-(83,8) = "("
+ │ ├── rparen_loc: (83,9)-(83,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (85,0)-(85,3) = "end"
+ ├── @ DefNode (location: (87,0)-(89,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (87,4)-(87,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (87,8)-(87,12))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (87,8)-(87,12))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (87,9)-(87,12) = "bar"
+ │ │ │ └── operator_loc: (87,8)-(87,9) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (88,2)-(88,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (88,2)-(88,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar]
+ │ ├── def_keyword_loc: (87,0)-(87,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (87,7)-(87,8) = "("
+ │ ├── rparen_loc: (87,12)-(87,13) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (89,0)-(89,3) = "end"
+ ├── @ DefNode (location: (91,0)-(93,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (91,4)-(91,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (91,8)-(91,17))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (91,8)-(91,11))
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (91,13)-(91,17))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (91,14)-(91,17) = "baz"
+ │ │ │ └── operator_loc: (91,13)-(91,14) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (92,2)-(92,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (92,2)-(92,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar, :baz]
+ │ ├── def_keyword_loc: (91,0)-(91,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (91,7)-(91,8) = "("
+ │ ├── rparen_loc: (91,17)-(91,18) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
+ ├── @ DefNode (location: (95,0)-(97,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (95,4)-(95,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (95,8)-(95,24))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (95,8)-(95,18))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (95,8)-(95,11) = "baz"
+ │ │ │ ├── operator_loc: (95,12)-(95,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ TrueNode (location: (95,14)-(95,18))
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (95,20)-(95,24))
+ │ │ │ ├── name: :bor
+ │ │ │ ├── name_loc: (95,21)-(95,24) = "bor"
+ │ │ │ └── operator_loc: (95,20)-(95,21) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (96,2)-(96,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (96,2)-(96,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (96,2)-(96,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: [:baz, :bor]
+ │ ├── def_keyword_loc: (95,0)-(95,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (95,7)-(95,8) = "("
+ │ ├── rparen_loc: (95,24)-(95,25) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (97,0)-(97,3) = "end"
+ ├── @ DefNode (location: (99,0)-(101,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (99,4)-(99,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (99,8)-(99,32))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (99,8)-(99,18))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (99,8)-(99,11) = "baz"
+ │ │ │ ├── operator_loc: (99,12)-(99,13) = "="
+ │ │ │ └── value:
+ │ │ │ @ TrueNode (location: (99,14)-(99,18))
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (99,20)-(99,24))
+ │ │ │ ├── name: :bor
+ │ │ │ ├── name_loc: (99,21)-(99,24) = "bor"
+ │ │ │ └── operator_loc: (99,20)-(99,21) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (99,26)-(99,32))
+ │ │ ├── name: :block
+ │ │ ├── name_loc: (99,27)-(99,32) = "block"
+ │ │ └── operator_loc: (99,26)-(99,27) = "&"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (100,2)-(100,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (100,2)-(100,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (100,2)-(100,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: [:baz, :bor, :block]
+ │ ├── def_keyword_loc: (99,0)-(99,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (99,7)-(99,8) = "("
+ │ ├── rparen_loc: (99,32)-(99,33) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (101,0)-(101,3) = "end"
+ ├── @ DefNode (location: (103,0)-(105,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (103,4)-(103,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (103,8)-(103,29))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (103,8)-(103,11))
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (103,13)-(103,23))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (103,13)-(103,16) = "baz"
+ │ │ │ ├── operator_loc: (103,17)-(103,18) = "="
+ │ │ │ └── value:
+ │ │ │ @ TrueNode (location: (103,19)-(103,23))
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (103,25)-(103,29))
+ │ │ │ ├── name: :bor
+ │ │ │ ├── name_loc: (103,26)-(103,29) = "bor"
+ │ │ │ └── operator_loc: (103,25)-(103,26) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (104,2)-(104,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (104,2)-(104,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar, :baz, :bor]
+ │ ├── def_keyword_loc: (103,0)-(103,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (103,7)-(103,8) = "("
+ │ ├── rparen_loc: (103,29)-(103,30) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (105,0)-(105,3) = "end"
+ ├── @ DefNode (location: (107,0)-(109,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (107,4)-(107,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (107,8)-(107,14))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (107,8)-(107,14))
+ │ │ ├── name: :block
+ │ │ ├── name_loc: (107,9)-(107,14) = "block"
+ │ │ └── operator_loc: (107,8)-(107,9) = "&"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (108,2)-(108,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (108,2)-(108,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (108,2)-(108,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: [:block]
+ │ ├── def_keyword_loc: (107,0)-(107,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (107,7)-(107,8) = "("
+ │ ├── rparen_loc: (107,14)-(107,15) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (109,0)-(109,3) = "end"
+ ├── @ DefNode (location: (111,0)-(113,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (111,4)-(111,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (111,8)-(111,19))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (111,8)-(111,11))
+ │ │ │ └── name: :bar
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (111,13)-(111,19))
+ │ │ ├── name: :block
+ │ │ ├── name_loc: (111,14)-(111,19) = "block"
+ │ │ └── operator_loc: (111,13)-(111,14) = "&"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (112,2)-(112,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (112,2)-(112,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── locals: [:bar, :block]
+ │ ├── def_keyword_loc: (111,0)-(111,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (111,7)-(111,8) = "("
+ │ ├── rparen_loc: (111,19)-(111,20) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (113,0)-(113,3) = "end"
+ ├── @ DefNode (location: (115,0)-(118,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (115,4)-(115,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (116,2)-(117,5))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ CallNode (location: (116,2)-(116,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (116,2)-(116,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── @ CallNode (location: (117,2)-(117,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (117,2)-(117,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (115,0)-(115,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (118,0)-(118,3) = "end"
+ ├── @ DefNode (location: (120,0)-(121,3))
+ │ ├── name: :f
+ │ ├── name_loc: (120,4)-(120,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (120,6)-(120,11))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (120,6)-(120,11))
+ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (120,7)-(120,10))
+ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (120,8)-(120,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── opening_loc: (120,7)-(120,8) = "("
+ │ │ │ │ └── closing_loc: (120,9)-(120,10) = ")"
+ │ │ │ ├── opening_loc: (120,6)-(120,7) = "("
+ │ │ │ └── closing_loc: (120,10)-(120,11) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (120,0)-(120,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (120,5)-(120,6) = "("
+ │ ├── rparen_loc: (120,11)-(120,12) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (121,0)-(121,3) = "end"
+ ├── @ DefNode (location: (123,0)-(124,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (123,4)-(123,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (123,8)-(123,26))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ KeywordParameterNode (location: (123,8)-(123,12))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ ├── name_loc: (123,8)-(123,12) = "bar:"
+ │ │ │ │ └── value: ∅
+ │ │ │ └── @ KeywordParameterNode (location: (123,14)-(123,26))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (123,14)-(123,18) = "baz:"
+ │ │ │ └── value:
+ │ │ │ @ StringNode (location: (123,19)-(123,26))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (123,19)-(123,20) = "\""
+ │ │ │ ├── content_loc: (123,20)-(123,25) = "value"
+ │ │ │ ├── closing_loc: (123,25)-(123,26) = "\""
+ │ │ │ └── unescaped: "value"
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:bar, :baz]
+ │ ├── def_keyword_loc: (123,0)-(123,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (123,7)-(123,8) = "("
+ │ ├── rparen_loc: (123,26)-(123,27) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (124,0)-(124,3) = "end"
+ ├── @ DefNode (location: (126,0)-(130,3))
+ │ ├── name: :f
+ │ ├── name_loc: (126,4)-(126,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (127,2)-(127,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (127,2)-(127,12))
+ │ │ ├── opening_loc: (127,2)-(127,12) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (128,0)-(128,4))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (128,0)-(128,4) = " "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (128,4)-(128,7))
+ │ │ │ │ ├── opening_loc: (128,4)-(128,6) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (128,6)-(128,7) = "}"
+ │ │ │ └── @ StringNode (location: (128,7)-(128,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (128,7)-(128,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (129,0)-(129,0) = " HEREDOC\n"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (126,0)-(126,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (130,0)-(130,3) = "end"
+ └── @ DefNode (location: (132,0)-(134,3))
+ ├── name: :f
+ ├── name_loc: (132,4)-(132,5) = "f"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (133,2)-(133,5))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (133,2)-(133,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (133,2)-(133,4) = "%("
+ │ ├── content_loc: (133,4)-(133,4) = ""
+ │ ├── closing_loc: (133,4)-(133,5) = ")"
+ │ └── unescaped: ""
+ ├── locals: []
+ ├── def_keyword_loc: (132,0)-(132,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (134,0)-(134,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/defined.txt b/test/prism/snapshots/unparser/corpus/literal/defined.txt
new file mode 100644
index 0000000000..ffa9bfbba8
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/defined.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(3,27))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,27))
+ └── body: (length: 3)
+ ├── @ DefinedNode (location: (1,0)-(1,14))
+ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ ├── value:
+ │ │ @ InstanceVariableReadNode (location: (1,9)-(1,13))
+ │ │ └── name: :@foo
+ │ ├── rparen_loc: (1,13)-(1,14) = ")"
+ │ └── keyword_loc: (1,0)-(1,8) = "defined?"
+ ├── @ DefinedNode (location: (2,0)-(2,13))
+ │ ├── lparen_loc: (2,8)-(2,9) = "("
+ │ ├── value:
+ │ │ @ ConstantReadNode (location: (2,9)-(2,12))
+ │ │ └── name: :Foo
+ │ ├── rparen_loc: (2,12)-(2,13) = ")"
+ │ └── keyword_loc: (2,0)-(2,8) = "defined?"
+ └── @ DefinedNode (location: (3,0)-(3,27))
+ ├── lparen_loc: (3,8)-(3,9) = "("
+ ├── value:
+ │ @ ParenthesesNode (location: (3,9)-(3,26))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,10)-(3,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MultiWriteNode (location: (3,10)-(3,25))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (3,11)-(3,12))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (3,14)-(3,15))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: (3,10)-(3,11) = "("
+ │ │ ├── rparen_loc: (3,15)-(3,16) = ")"
+ │ │ ├── operator_loc: (3,17)-(3,18) = "="
+ │ │ └── value:
+ │ │ @ ArrayNode (location: (3,19)-(3,25))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (3,20)-(3,21))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (3,23)-(3,24))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (3,19)-(3,20) = "["
+ │ │ └── closing_loc: (3,24)-(3,25) = "]"
+ │ ├── opening_loc: (3,9)-(3,10) = "("
+ │ └── closing_loc: (3,25)-(3,26) = ")"
+ ├── rparen_loc: (3,26)-(3,27) = ")"
+ └── keyword_loc: (3,0)-(3,8) = "defined?"
diff --git a/test/prism/snapshots/unparser/corpus/literal/defs.txt b/test/prism/snapshots/unparser/corpus/literal/defs.txt
new file mode 100644
index 0000000000..a035c84066
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/defs.txt
@@ -0,0 +1,357 @@
+@ ProgramNode (location: (1,0)-(40,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(40,3))
+ └── body: (length: 10)
+ ├── @ DefNode (location: (1,0)-(2,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,9)-(1,12) = "foo"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (1,4)-(1,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: (1,8)-(1,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (2,0)-(2,3) = "end"
+ ├── @ DefNode (location: (4,0)-(6,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (4,9)-(4,12) = "foo"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (4,4)-(4,8))
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,2)-(5,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ │ ├── operator_loc: (4,8)-(4,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ ├── @ DefNode (location: (8,0)-(11,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (8,9)-(8,12) = "foo"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (8,4)-(8,8))
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (9,2)-(10,5))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ CallNode (location: (9,2)-(9,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,2)-(9,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── @ CallNode (location: (10,2)-(10,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (10,2)-(10,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (8,0)-(8,3) = "def"
+ │ ├── operator_loc: (8,8)-(8,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ DefNode (location: (13,0)-(15,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (13,8)-(13,11) = "bar"
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (13,4)-(13,7))
+ │ │ └── name: :Foo
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (14,2)-(14,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (14,2)-(14,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (14,2)-(14,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ │ ├── operator_loc: (13,7)-(13,8) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (15,0)-(15,3) = "end"
+ ├── @ DefNode (location: (17,0)-(20,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (18,3)-(18,6) = "bar"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (17,4)-(18,2))
+ │ │ ├── body:
+ │ │ │ @ CallNode (location: (17,5)-(18,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (17,5)-(17,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (17,9)-(18,1))
+ │ │ │ │ ├── locals: [:bar]
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ BlockParametersNode (location: (17,11)-(17,16))
+ │ │ │ │ │ ├── parameters:
+ │ │ │ │ │ │ @ ParametersNode (location: (17,12)-(17,15))
+ │ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (17,12)-(17,15))
+ │ │ │ │ │ │ │ └── name: :bar
+ │ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ │ └── block: ∅
+ │ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ │ ├── opening_loc: (17,11)-(17,12) = "|"
+ │ │ │ │ │ └── closing_loc: (17,15)-(17,16) = "|"
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (17,9)-(17,10) = "{"
+ │ │ │ │ └── closing_loc: (18,0)-(18,1) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "foo"
+ │ │ ├── opening_loc: (17,4)-(17,5) = "("
+ │ │ └── closing_loc: (18,1)-(18,2) = ")"
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (19,2)-(19,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (19,2)-(19,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,2)-(19,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (17,0)-(17,3) = "def"
+ │ ├── operator_loc: (18,2)-(18,3) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (20,0)-(20,3) = "end"
+ ├── @ DefNode (location: (22,0)-(24,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (22,13)-(22,16) = "bar"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (22,4)-(22,12))
+ │ │ ├── body:
+ │ │ │ @ CallNode (location: (22,5)-(22,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (22,5)-(22,8) = "foo"
+ │ │ │ ├── opening_loc: (22,8)-(22,9) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (22,9)-(22,10))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (22,9)-(22,10))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── closing_loc: (22,10)-(22,11) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "foo"
+ │ │ ├── opening_loc: (22,4)-(22,5) = "("
+ │ │ └── closing_loc: (22,11)-(22,12) = ")"
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (23,2)-(23,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (23,2)-(23,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,2)-(23,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (22,0)-(22,3) = "def"
+ │ ├── operator_loc: (22,12)-(22,13) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (24,0)-(24,3) = "end"
+ ├── @ DefNode (location: (26,0)-(28,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (26,19)-(26,22) = "bar"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (26,4)-(26,18))
+ │ │ ├── body:
+ │ │ │ @ CallNode (location: (26,5)-(26,17))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ConstantPathNode (location: (26,5)-(26,13))
+ │ │ │ │ ├── parent:
+ │ │ │ │ │ @ ConstantReadNode (location: (26,5)-(26,8))
+ │ │ │ │ │ └── name: :Foo
+ │ │ │ │ ├── child:
+ │ │ │ │ │ @ ConstantReadNode (location: (26,10)-(26,13))
+ │ │ │ │ │ └── name: :Bar
+ │ │ │ │ └── delimiter_loc: (26,8)-(26,10) = "::"
+ │ │ │ ├── call_operator_loc: (26,13)-(26,14) = "."
+ │ │ │ ├── message_loc: (26,14)-(26,17) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "baz"
+ │ │ ├── opening_loc: (26,4)-(26,5) = "("
+ │ │ └── closing_loc: (26,17)-(26,18) = ")"
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (27,2)-(27,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (27,2)-(27,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (27,2)-(27,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (26,0)-(26,3) = "def"
+ │ ├── operator_loc: (26,18)-(26,19) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (28,0)-(28,3) = "end"
+ ├── @ DefNode (location: (30,0)-(32,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (30,15)-(30,18) = "bar"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (30,4)-(30,14))
+ │ │ ├── body:
+ │ │ │ @ ConstantPathNode (location: (30,5)-(30,13))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (30,5)-(30,8))
+ │ │ │ │ └── name: :Foo
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (30,10)-(30,13))
+ │ │ │ │ └── name: :Bar
+ │ │ │ └── delimiter_loc: (30,8)-(30,10) = "::"
+ │ │ ├── opening_loc: (30,4)-(30,5) = "("
+ │ │ └── closing_loc: (30,13)-(30,14) = ")"
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (31,2)-(31,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (31,2)-(31,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (31,2)-(31,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (30,0)-(30,3) = "def"
+ │ ├── operator_loc: (30,14)-(30,15) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (32,0)-(32,3) = "end"
+ ├── @ DefNode (location: (34,0)-(36,3))
+ │ ├── name: :bar
+ │ ├── name_loc: (34,8)-(34,11) = "bar"
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (34,4)-(34,7))
+ │ │ └── name: :Foo
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (35,2)-(35,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (35,2)-(35,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (35,2)-(35,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (34,0)-(34,3) = "def"
+ │ ├── operator_loc: (34,7)-(34,8) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (36,0)-(36,3) = "end"
+ └── @ DefNode (location: (38,0)-(40,3))
+ ├── name: :bar
+ ├── name_loc: (38,8)-(38,11) = "bar"
+ ├── receiver:
+ │ @ CallNode (location: (38,4)-(38,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (38,4)-(38,7) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (39,2)-(39,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (39,2)-(39,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (39,2)-(39,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "baz"
+ ├── locals: []
+ ├── def_keyword_loc: (38,0)-(38,3) = "def"
+ ├── operator_loc: (38,7)-(38,8) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (40,0)-(40,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/dstr.txt b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
new file mode 100644
index 0000000000..52365b2946
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
@@ -0,0 +1,333 @@
+@ ProgramNode (location: (1,0)-(37,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(37,1))
+ └── body: (length: 11)
+ ├── @ IfNode (location: (1,0)-(3,3))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (1,3)-(1,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (2,2)-(2,8))
+ │ │ ├── opening_loc: (2,2)-(2,3) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (2,3)-(2,6))
+ │ │ │ │ ├── opening_loc: (2,3)-(2,5) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (2,5)-(2,6) = "}"
+ │ │ │ └── @ StringNode (location: (2,6)-(2,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (2,6)-(2,7) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── closing_loc: (2,7)-(2,8) = "\""
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── @ IfNode (location: (4,0)-(11,3))
+ │ ├── if_keyword_loc: (4,0)-(4,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (4,3)-(4,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(10,3))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ InterpolatedStringNode (location: (5,2)-(5,12))
+ │ │ │ ├── opening_loc: (5,2)-(5,12) = "<<-HEREDOC"
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (6,0)-(6,0))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (6,0)-(6,0) = "a\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a\n"
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (7,0)-(7,3))
+ │ │ │ │ │ ├── opening_loc: (7,0)-(7,2) = "\#{"
+ │ │ │ │ │ ├── statements: ∅
+ │ │ │ │ │ └── closing_loc: (7,2)-(7,3) = "}"
+ │ │ │ │ └── @ StringNode (location: (7,3)-(8,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (7,3)-(8,0) = "a\nb\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a\nb\n"
+ │ │ │ └── closing_loc: (9,0)-(9,0) = " HEREDOC\n"
+ │ │ └── @ CallNode (location: (10,2)-(10,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (10,2)-(10,3) = "x"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "x"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ InterpolatedStringNode (location: (12,0)-(12,10))
+ │ ├── opening_loc: (12,0)-(12,10) = "<<-HEREDOC"
+ │ ├── parts: (length: 7)
+ │ │ ├── @ StringNode (location: (13,0)-(13,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (13,0)-(13,0) = "\\\#{}\\\#{}\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\#{}\#{}\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (14,0)-(14,3))
+ │ │ │ ├── opening_loc: (14,0)-(14,2) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (14,2)-(14,3) = "}"
+ │ │ ├── @ StringNode (location: (14,3)-(14,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (14,3)-(14,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (15,0)-(15,3))
+ │ │ │ ├── opening_loc: (15,0)-(15,2) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (15,2)-(15,3) = "}"
+ │ │ ├── @ StringNode (location: (15,3)-(15,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (15,3)-(15,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (16,0)-(16,3))
+ │ │ │ ├── opening_loc: (16,0)-(16,2) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (16,2)-(16,3) = "}"
+ │ │ └── @ StringNode (location: (16,3)-(16,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (16,3)-(16,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (17,0)-(17,0) = "HEREDOC\n"
+ ├── @ RescueModifierNode (location: (18,0)-(18,21))
+ │ ├── expression:
+ │ │ @ InterpolatedStringNode (location: (18,0)-(18,10))
+ │ │ ├── opening_loc: (18,0)-(18,10) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (19,0)-(19,3))
+ │ │ │ │ ├── opening_loc: (19,0)-(19,2) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (19,2)-(19,3) = "}"
+ │ │ │ └── @ StringNode (location: (19,3)-(20,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (19,3)-(20,0) = "\na\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\na\n"
+ │ │ └── closing_loc: (21,0)-(21,0) = "HEREDOC\n"
+ │ ├── keyword_loc: (18,11)-(18,17) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (18,18)-(18,21))
+ ├── @ InterpolatedStringNode (location: (22,0)-(22,6))
+ │ ├── opening_loc: (22,0)-(22,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (22,1)-(22,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (22,1)-(22,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ EmbeddedVariableNode (location: (22,2)-(22,5))
+ │ │ ├── operator_loc: (22,2)-(22,3) = "#"
+ │ │ └── variable:
+ │ │ @ NumberedReferenceReadNode (location: (22,3)-(22,5))
+ │ │ └── number: 1
+ │ └── closing_loc: (22,5)-(22,6) = "\""
+ ├── @ InterpolatedStringNode (location: (23,0)-(23,6))
+ │ ├── opening_loc: (23,0)-(23,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (23,1)-(23,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (23,1)-(23,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ EmbeddedVariableNode (location: (23,2)-(23,5))
+ │ │ ├── operator_loc: (23,2)-(23,3) = "#"
+ │ │ └── variable:
+ │ │ @ GlobalVariableReadNode (location: (23,3)-(23,5))
+ │ │ └── name: :$a
+ │ └── closing_loc: (23,5)-(23,6) = "\""
+ ├── @ InterpolatedStringNode (location: (24,0)-(24,6))
+ │ ├── opening_loc: (24,0)-(24,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (24,1)-(24,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (24,1)-(24,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ EmbeddedVariableNode (location: (24,2)-(24,5))
+ │ │ ├── operator_loc: (24,2)-(24,3) = "#"
+ │ │ └── variable:
+ │ │ @ InstanceVariableReadNode (location: (24,3)-(24,5))
+ │ │ └── name: :@a
+ │ └── closing_loc: (24,5)-(24,6) = "\""
+ ├── @ InterpolatedStringNode (location: (25,0)-(25,7))
+ │ ├── opening_loc: (25,0)-(25,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (25,1)-(25,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (25,1)-(25,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ EmbeddedVariableNode (location: (25,2)-(25,6))
+ │ │ ├── operator_loc: (25,2)-(25,3) = "#"
+ │ │ └── variable:
+ │ │ @ ClassVariableReadNode (location: (25,3)-(25,6))
+ │ │ └── name: :@@a
+ │ └── closing_loc: (25,6)-(25,7) = "\""
+ ├── @ IfNode (location: (26,0)-(30,3))
+ │ ├── if_keyword_loc: (26,0)-(26,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (26,3)-(26,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (27,2)-(27,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (27,2)-(27,19))
+ │ │ ├── keyword_loc: (27,2)-(27,8) = "return"
+ │ │ └── arguments:
+ │ │ @ ArgumentsNode (location: (27,9)-(27,19))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (27,9)-(27,19))
+ │ │ ├── opening_loc: (27,9)-(27,19) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (28,0)-(28,4))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (28,0)-(28,4) = " "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (28,4)-(28,9))
+ │ │ │ │ ├── opening_loc: (28,4)-(28,6) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (28,6)-(28,8))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (28,6)-(28,8))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── closing_loc: (28,8)-(28,9) = "}"
+ │ │ │ └── @ StringNode (location: (28,9)-(28,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (28,9)-(28,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (29,0)-(29,0) = " HEREDOC\n"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (30,0)-(30,3) = "end"
+ ├── @ CallNode (location: (31,0)-(31,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ ├── opening_loc: (31,3)-(31,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,4)-(31,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (31,4)-(31,14))
+ │ │ ├── opening_loc: (31,4)-(31,14) = "<<-HEREDOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (32,0)-(32,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (32,0)-(32,2) = " "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " "
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (32,2)-(32,8))
+ │ │ │ │ ├── opening_loc: (32,2)-(32,4) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (32,4)-(32,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (32,4)-(32,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (32,4)-(32,7) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ └── closing_loc: (32,7)-(32,8) = "}"
+ │ │ │ └── @ StringNode (location: (32,8)-(32,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (32,8)-(32,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (33,0)-(33,0) = "HEREDOC\n"
+ │ ├── closing_loc: (31,14)-(31,15) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── @ CallNode (location: (34,0)-(37,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (34,0)-(34,3) = "foo"
+ ├── opening_loc: (34,3)-(34,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (34,4)-(34,14))
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (34,4)-(34,14))
+ │ ├── opening_loc: (34,4)-(34,14) = "<<-HEREDOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (35,0)-(35,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (35,0)-(35,2) = " "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " "
+ │ │ ├── @ EmbeddedStatementsNode (location: (35,2)-(35,8))
+ │ │ │ ├── opening_loc: (35,2)-(35,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (35,4)-(35,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (35,4)-(35,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (35,4)-(35,7) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── closing_loc: (35,7)-(35,8) = "}"
+ │ │ └── @ StringNode (location: (35,8)-(35,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (35,8)-(35,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (36,0)-(36,0) = "HEREDOC\n"
+ ├── closing_loc: (34,14)-(34,15) = ")"
+ ├── block:
+ │ @ BlockNode (location: (34,16)-(37,1))
+ │ ├── locals: [:x]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (34,18)-(34,21))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (34,19)-(34,20))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (34,19)-(34,20))
+ │ │ │ │ └── name: :x
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (34,18)-(34,19) = "|"
+ │ │ └── closing_loc: (34,20)-(34,21) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (34,16)-(34,17) = "{"
+ │ └── closing_loc: (37,0)-(37,1) = "}"
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/unparser/corpus/literal/empty.txt b/test/prism/snapshots/unparser/corpus/literal/empty.txt
new file mode 100644
index 0000000000..870bdb6ad5
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/empty.txt
@@ -0,0 +1,5 @@
+@ ProgramNode (location: (1,0)-(0,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(0,0))
+ └── body: (length: 0)
diff --git a/test/prism/snapshots/unparser/corpus/literal/empty_begin.txt b/test/prism/snapshots/unparser/corpus/literal/empty_begin.txt
new file mode 100644
index 0000000000..838b4bf6f0
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/empty_begin.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ ParenthesesNode (location: (1,0)-(1,2))
+ ├── body: ∅
+ ├── opening_loc: (1,0)-(1,1) = "("
+ └── closing_loc: (1,1)-(1,2) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/literal/flipflop.txt b/test/prism/snapshots/unparser/corpus/literal/flipflop.txt
new file mode 100644
index 0000000000..48913a9e3f
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/flipflop.txt
@@ -0,0 +1,183 @@
+@ ProgramNode (location: (1,0)-(6,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,3))
+ └── body: (length: 2)
+ ├── @ IfNode (location: (1,0)-(3,3))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ ParenthesesNode (location: (1,3)-(1,23))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,4)-(1,22))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FlipFlopNode (location: (1,4)-(1,22))
+ │ │ │ ├── left:
+ │ │ │ │ @ ParenthesesNode (location: (1,4)-(1,12))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (1,5)-(1,11))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,5)-(1,11))
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ CallNode (location: (1,5)-(1,6))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "i"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "i"
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,7)-(1,9) = "=="
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "=="
+ │ │ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ │ │ ├── right:
+ │ │ │ │ @ ParenthesesNode (location: (1,14)-(1,22))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (1,15)-(1,21))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,15)-(1,21))
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ CallNode (location: (1,15)-(1,16))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (1,15)-(1,16) = "i"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "i"
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,17)-(1,19) = "=="
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (1,20)-(1,21))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (1,20)-(1,21))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "=="
+ │ │ │ │ ├── opening_loc: (1,14)-(1,15) = "("
+ │ │ │ │ └── closing_loc: (1,21)-(1,22) = ")"
+ │ │ │ ├── operator_loc: (1,12)-(1,14) = ".."
+ │ │ │ └── flags: ∅
+ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ └── closing_loc: (1,22)-(1,23) = ")"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── @ IfNode (location: (4,0)-(6,3))
+ ├── if_keyword_loc: (4,0)-(4,2) = "if"
+ ├── predicate:
+ │ @ ParenthesesNode (location: (4,3)-(4,24))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (4,4)-(4,23))
+ │ │ └── body: (length: 1)
+ │ │ └── @ FlipFlopNode (location: (4,4)-(4,23))
+ │ │ ├── left:
+ │ │ │ @ ParenthesesNode (location: (4,4)-(4,12))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (4,5)-(4,11))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (4,5)-(4,11))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (4,5)-(4,6))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (4,5)-(4,6) = "i"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "i"
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,7)-(4,9) = "=="
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (4,10)-(4,11))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (4,10)-(4,11))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "=="
+ │ │ │ ├── opening_loc: (4,4)-(4,5) = "("
+ │ │ │ └── closing_loc: (4,11)-(4,12) = ")"
+ │ │ ├── right:
+ │ │ │ @ ParenthesesNode (location: (4,15)-(4,23))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (4,16)-(4,22))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (4,16)-(4,22))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ CallNode (location: (4,16)-(4,17))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (4,16)-(4,17) = "i"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "i"
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,18)-(4,20) = "=="
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (4,21)-(4,22))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (4,21)-(4,22))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "=="
+ │ │ │ ├── opening_loc: (4,15)-(4,16) = "("
+ │ │ │ └── closing_loc: (4,22)-(4,23) = ")"
+ │ │ ├── operator_loc: (4,12)-(4,15) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── opening_loc: (4,3)-(4,4) = "("
+ │ └── closing_loc: (4,23)-(4,24) = ")"
+ ├── statements:
+ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,2)-(5,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── consequent: ∅
+ └── end_keyword_loc: (6,0)-(6,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/for.txt b/test/prism/snapshots/unparser/corpus/literal/for.txt
new file mode 100644
index 0000000000..52fb1a4673
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/for.txt
@@ -0,0 +1,166 @@
+@ ProgramNode (location: (1,0)-(12,3))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(12,3))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(3,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "bar"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(3,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForNode (location: (1,4)-(3,3))
+ │ │ ├── index:
+ │ │ │ @ LocalVariableTargetNode (location: (1,8)-(1,9))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── collection:
+ │ │ │ @ CallNode (location: (1,13)-(1,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ ├── for_keyword_loc: (1,4)-(1,7) = "for"
+ │ │ ├── in_keyword_loc: (1,10)-(1,12) = "in"
+ │ │ ├── do_keyword_loc: (1,17)-(1,19) = "do"
+ │ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ │ ├── closing_loc: (3,3)-(3,4) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ ForNode (location: (4,0)-(6,3))
+ │ ├── index:
+ │ │ @ LocalVariableTargetNode (location: (4,4)-(4,5))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── collection:
+ │ │ @ CallNode (location: (4,9)-(4,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,9)-(4,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,2)-(5,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── for_keyword_loc: (4,0)-(4,3) = "for"
+ │ ├── in_keyword_loc: (4,6)-(4,8) = "in"
+ │ ├── do_keyword_loc: (4,13)-(4,15) = "do"
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ ├── @ ForNode (location: (7,0)-(9,3))
+ │ ├── index:
+ │ │ @ MultiTargetNode (location: (7,4)-(7,11))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (7,5)-(7,6))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ SplatNode (location: (7,8)-(7,10))
+ │ │ │ ├── operator_loc: (7,8)-(7,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (7,9)-(7,10))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: (7,4)-(7,5) = "("
+ │ │ └── rparen_loc: (7,10)-(7,11) = ")"
+ │ ├── collection:
+ │ │ @ CallNode (location: (7,15)-(7,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,15)-(7,18) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,2)-(8,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (8,2)-(8,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (8,2)-(8,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── for_keyword_loc: (7,0)-(7,3) = "for"
+ │ ├── in_keyword_loc: (7,12)-(7,14) = "in"
+ │ ├── do_keyword_loc: (7,19)-(7,21) = "do"
+ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ └── @ ForNode (location: (10,0)-(12,3))
+ ├── index:
+ │ @ MultiTargetNode (location: (10,4)-(10,10))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (10,5)-(10,6))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (10,8)-(10,9))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (10,4)-(10,5) = "("
+ │ └── rparen_loc: (10,9)-(10,10) = ")"
+ ├── collection:
+ │ @ CallNode (location: (10,14)-(10,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (10,14)-(10,17) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── statements:
+ │ @ StatementsNode (location: (11,2)-(11,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,2)-(11,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,2)-(11,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "baz"
+ ├── for_keyword_loc: (10,0)-(10,3) = "for"
+ ├── in_keyword_loc: (10,11)-(10,13) = "in"
+ ├── do_keyword_loc: (10,18)-(10,20) = "do"
+ └── end_keyword_loc: (12,0)-(12,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/hookexe.txt b/test/prism/snapshots/unparser/corpus/literal/hookexe.txt
new file mode 100644
index 0000000000..1637f95619
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/hookexe.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(7,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,1))
+ └── body: (length: 3)
+ ├── @ PreExecutionNode (location: (1,0)-(3,1))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── keyword_loc: (1,0)-(1,5) = "BEGIN"
+ │ ├── opening_loc: (1,6)-(1,7) = "{"
+ │ └── closing_loc: (3,0)-(3,1) = "}"
+ ├── @ CallNode (location: (4,0)-(4,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,0)-(4,3) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ └── @ PostExecutionNode (location: (5,0)-(7,1))
+ ├── statements:
+ │ @ StatementsNode (location: (6,2)-(6,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (6,2)-(6,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,2)-(6,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "baz"
+ ├── keyword_loc: (5,0)-(5,3) = "END"
+ ├── opening_loc: (5,4)-(5,5) = "{"
+ └── closing_loc: (7,0)-(7,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/if.txt b/test/prism/snapshots/unparser/corpus/literal/if.txt
new file mode 100644
index 0000000000..bf399d7dc9
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/if.txt
@@ -0,0 +1,268 @@
+@ ProgramNode (location: (1,0)-(36,3))
+├── locals: [:foo, :pair]
+└── statements:
+ @ StatementsNode (location: (1,0)-(36,3))
+ └── body: (length: 10)
+ ├── @ IfNode (location: (1,0)-(3,3))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ MatchLastLineNode (location: (1,3)-(1,8))
+ │ │ ├── opening_loc: (1,3)-(1,4) = "/"
+ │ │ ├── content_loc: (1,4)-(1,7) = "foo"
+ │ │ ├── closing_loc: (1,7)-(1,8) = "/"
+ │ │ ├── unescaped: "foo"
+ │ │ └── flags: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,5) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── @ IfNode (location: (4,0)-(6,3))
+ │ ├── if_keyword_loc: (4,0)-(4,2) = "if"
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (4,3)-(4,4))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,2)-(5,3))
+ │ │ └── flags: decimal
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ ├── @ IfNode (location: (7,0)-(11,3))
+ │ ├── if_keyword_loc: (7,0)-(7,2) = "if"
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (7,3)-(7,4))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,2)-(8,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (8,2)-(8,3))
+ │ │ └── flags: decimal
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (9,0)-(11,3))
+ │ │ ├── else_keyword_loc: (9,0)-(9,4) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (10,2)-(10,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (10,2)-(10,3))
+ │ │ │ └── flags: decimal
+ │ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ UnlessNode (location: (12,0)-(14,3))
+ │ ├── keyword_loc: (12,0)-(12,6) = "unless"
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (12,7)-(12,8))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (13,2)-(13,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (13,2)-(13,5))
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (14,0)-(14,3) = "end"
+ ├── @ UnlessNode (location: (15,0)-(17,3))
+ │ ├── keyword_loc: (15,0)-(15,6) = "unless"
+ │ ├── predicate:
+ │ │ @ IntegerNode (location: (15,7)-(15,8))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (16,2)-(16,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (16,2)-(16,3))
+ │ │ └── flags: decimal
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ ├── @ IfNode (location: (18,0)-(19,3))
+ │ ├── if_keyword_loc: (18,0)-(18,2) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (18,3)-(18,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (18,3)-(18,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ ├── @ ModuleNode (location: (21,0)-(23,3))
+ │ ├── locals: [:foo]
+ │ ├── module_keyword_loc: (21,0)-(21,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (21,7)-(21,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (22,2)-(22,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IfNode (location: (22,2)-(22,18))
+ │ │ ├── if_keyword_loc: (22,12)-(22,14) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ LocalVariableReadNode (location: (22,15)-(22,18))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (22,2)-(22,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (22,2)-(22,11))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (22,2)-(22,5) = "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (22,8)-(22,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (22,8)-(22,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── operator_loc: (22,6)-(22,7) = "="
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── end_keyword_loc: (23,0)-(23,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (25,0)-(27,3))
+ │ ├── locals: [:foo]
+ │ ├── module_keyword_loc: (25,0)-(25,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (25,7)-(25,8))
+ │ │ └── name: :B
+ │ ├── body:
+ │ │ @ StatementsNode (location: (26,2)-(26,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ UnlessNode (location: (26,2)-(26,22))
+ │ │ ├── keyword_loc: (26,12)-(26,18) = "unless"
+ │ │ ├── predicate:
+ │ │ │ @ LocalVariableReadNode (location: (26,19)-(26,22))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (26,2)-(26,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (26,2)-(26,11))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (26,2)-(26,5) = "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (26,8)-(26,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (26,8)-(26,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── operator_loc: (26,6)-(26,7) = "="
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── end_keyword_loc: (27,0)-(27,3) = "end"
+ │ └── name: :B
+ ├── @ UnlessNode (location: (28,0)-(30,3))
+ │ ├── keyword_loc: (28,0)-(28,6) = "unless"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (28,7)-(28,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (28,7)-(28,10) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (29,2)-(29,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (29,2)-(29,11))
+ │ │ ├── name: :foo
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (29,2)-(29,5) = "foo"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (29,8)-(29,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,8)-(29,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (29,6)-(29,7) = "="
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (30,0)-(30,3) = "end"
+ └── @ IfNode (location: (31,0)-(36,3))
+ ├── if_keyword_loc: (31,0)-(31,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (31,3)-(33,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,3)-(31,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (31,7)-(33,1))
+ │ │ ├── locals: [:pair]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (31,9)-(31,15))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (31,10)-(31,14))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (31,10)-(31,14))
+ │ │ │ │ │ └── name: :pair
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (31,9)-(31,10) = "|"
+ │ │ │ └── closing_loc: (31,14)-(31,15) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (32,2)-(32,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (32,2)-(32,6))
+ │ │ │ ├── name: :pair
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (31,7)-(31,8) = "{"
+ │ │ └── closing_loc: (33,0)-(33,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (34,2)-(35,5))
+ │ └── body: (length: 2)
+ │ ├── @ LocalVariableWriteNode (location: (34,2)-(34,13))
+ │ │ ├── name: :pair
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (34,2)-(34,6) = "pair"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (34,9)-(34,13))
+ │ │ │ ├── opening_loc: (34,9)-(34,10) = ":"
+ │ │ │ ├── value_loc: (34,10)-(34,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── operator_loc: (34,7)-(34,8) = "="
+ │ └── @ LocalVariableReadNode (location: (35,2)-(35,5))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── consequent: ∅
+ └── end_keyword_loc: (36,0)-(36,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/kwbegin.txt b/test/prism/snapshots/unparser/corpus/literal/kwbegin.txt
new file mode 100644
index 0000000000..06cf243ee8
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/kwbegin.txt
@@ -0,0 +1,489 @@
+@ ProgramNode (location: (1,0)-(80,3))
+├── locals: [:foo, :bar, :exception]
+└── statements:
+ @ StatementsNode (location: (1,0)-(80,3))
+ └── body: (length: 14)
+ ├── @ BeginNode (location: (1,0)-(3,3))
+ │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (2,0)-(2,6))
+ │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── @ BeginNode (location: (5,0)-(7,3))
+ │ ├── begin_keyword_loc: (5,0)-(5,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (6,0)-(7,3))
+ │ │ ├── ensure_keyword_loc: (6,0)-(6,6) = "ensure"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (7,0)-(7,3) = "end"
+ │ └── end_keyword_loc: (7,0)-(7,3) = "end"
+ ├── @ BeginNode (location: (9,0)-(11,3))
+ │ ├── begin_keyword_loc: (9,0)-(9,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (10,2)-(10,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (10,2)-(10,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (10,2)-(10,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ BeginNode (location: (13,0)-(17,3))
+ │ ├── begin_keyword_loc: (13,0)-(13,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (14,2)-(14,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (14,2)-(14,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (14,2)-(14,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (15,0)-(16,3))
+ │ │ ├── keyword_loc: (15,0)-(15,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (16,2)-(16,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (16,2)-(16,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (16,2)-(16,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ ├── @ BeginNode (location: (19,0)-(24,3))
+ │ ├── begin_keyword_loc: (19,0)-(19,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (20,2)-(21,3))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ CallNode (location: (20,2)-(20,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (20,2)-(20,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ └── @ CallNode (location: (21,2)-(21,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (21,2)-(21,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (22,0)-(23,3))
+ │ │ ├── keyword_loc: (22,0)-(22,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (23,2)-(23,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (23,2)-(23,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (23,2)-(23,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (24,0)-(24,3) = "end"
+ ├── @ BeginNode (location: (26,0)-(28,3))
+ │ ├── begin_keyword_loc: (26,0)-(26,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (27,0)-(27,8))
+ │ │ ├── keyword_loc: (27,0)-(27,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (27,7)-(27,8))
+ │ │ │ └── name: :A
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (28,0)-(28,3) = "end"
+ ├── @ BeginNode (location: (30,0)-(32,3))
+ │ ├── begin_keyword_loc: (30,0)-(30,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (31,0)-(31,15))
+ │ │ ├── keyword_loc: (31,0)-(31,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (31,7)-(31,8))
+ │ │ │ └── name: :A
+ │ │ ├── operator_loc: (31,9)-(31,11) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (31,12)-(31,15))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (32,0)-(32,3) = "end"
+ ├── @ BeginNode (location: (34,0)-(42,3))
+ │ ├── begin_keyword_loc: (34,0)-(34,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (35,2)-(35,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (35,2)-(35,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (35,2)-(35,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (36,0)-(39,3))
+ │ │ ├── keyword_loc: (36,0)-(36,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (36,7)-(36,8))
+ │ │ │ └── name: :A
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (37,2)-(37,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (37,2)-(37,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent:
+ │ │ @ RescueNode (location: (38,0)-(39,3))
+ │ │ ├── keyword_loc: (38,0)-(38,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (38,7)-(38,8))
+ │ │ │ └── name: :B
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (39,2)-(39,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (39,2)-(39,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (39,2)-(39,3) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause:
+ │ │ @ EnsureNode (location: (40,0)-(42,3))
+ │ │ ├── ensure_keyword_loc: (40,0)-(40,6) = "ensure"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (41,2)-(41,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (41,2)-(41,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (41,2)-(41,3) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
+ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
+ ├── @ BeginNode (location: (44,0)-(53,3))
+ │ ├── begin_keyword_loc: (44,0)-(44,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (45,2)-(49,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BeginNode (location: (45,2)-(49,5))
+ │ │ ├── begin_keyword_loc: (45,2)-(45,7) = "begin"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (46,4)-(47,7))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ LocalVariableReadNode (location: (46,4)-(46,7))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ CallNode (location: (47,4)-(47,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (47,4)-(47,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (48,2)-(48,8))
+ │ │ │ ├── keyword_loc: (48,2)-(48,8) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (49,2)-(49,5) = "end"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (50,0)-(52,5))
+ │ │ ├── keyword_loc: (50,0)-(50,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (51,2)-(52,5))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ CallNode (location: (51,2)-(51,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (51,2)-(51,5) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ └── @ CallNode (location: (52,2)-(52,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (52,2)-(52,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (53,0)-(53,3) = "end"
+ ├── @ BeginNode (location: (55,0)-(58,3))
+ │ ├── begin_keyword_loc: (55,0)-(55,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (56,2)-(56,35))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (56,2)-(56,35))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (56,2)-(56,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (56,2)-(56,7) = "raise"
+ │ │ │ ├── opening_loc: (56,7)-(56,8) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (56,8)-(56,17))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (56,8)-(56,17))
+ │ │ │ │ └── name: :Exception
+ │ │ │ ├── closing_loc: (56,17)-(56,18) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "raise"
+ │ │ ├── keyword_loc: (56,19)-(56,25) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ LocalVariableWriteNode (location: (56,26)-(56,35))
+ │ │ ├── name: :foo
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (56,26)-(56,29) = "foo"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (56,32)-(56,35))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (56,32)-(56,35) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (56,30)-(56,31) = "="
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (57,0)-(57,16))
+ │ │ ├── keyword_loc: (57,0)-(57,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (57,7)-(57,16))
+ │ │ │ └── name: :Exception
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (58,0)-(58,3) = "end"
+ ├── @ BeginNode (location: (60,0)-(64,3))
+ │ ├── begin_keyword_loc: (60,0)-(60,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (61,2)-(61,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (61,2)-(61,5))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (62,0)-(63,5))
+ │ │ ├── keyword_loc: (62,0)-(62,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: (62,7)-(62,9) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (62,10)-(62,13))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (63,2)-(63,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (63,2)-(63,5))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (64,0)-(64,3) = "end"
+ ├── @ BeginNode (location: (66,0)-(70,3))
+ │ ├── begin_keyword_loc: (66,0)-(66,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (67,2)-(67,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (67,2)-(67,5))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (68,0)-(69,5))
+ │ │ ├── keyword_loc: (68,0)-(68,6) = "rescue"
+ │ │ ├── exceptions: (length: 2)
+ │ │ │ ├── @ ConstantReadNode (location: (68,7)-(68,16))
+ │ │ │ │ └── name: :Exception
+ │ │ │ └── @ ConstantReadNode (location: (68,18)-(68,23))
+ │ │ │ └── name: :Other
+ │ │ ├── operator_loc: (68,24)-(68,26) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (68,27)-(68,30))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (69,2)-(69,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (69,2)-(69,5))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (70,0)-(70,3) = "end"
+ ├── @ BeginNode (location: (72,0)-(76,3))
+ │ ├── begin_keyword_loc: (72,0)-(72,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (73,2)-(73,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (73,2)-(73,5))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (74,0)-(75,5))
+ │ │ ├── keyword_loc: (74,0)-(74,6) = "rescue"
+ │ │ ├── exceptions: (length: 2)
+ │ │ │ ├── @ ConstantReadNode (location: (74,7)-(74,16))
+ │ │ │ │ └── name: :SomeError
+ │ │ │ └── @ SplatNode (location: (74,18)-(74,22))
+ │ │ │ ├── operator_loc: (74,18)-(74,19) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableReadNode (location: (74,19)-(74,22))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── operator_loc: (74,23)-(74,25) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ LocalVariableTargetNode (location: (74,26)-(74,35))
+ │ │ │ ├── name: :exception
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (75,2)-(75,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (75,2)-(75,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (75,2)-(75,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (76,0)-(76,3) = "end"
+ └── @ SingletonClassNode (location: (78,0)-(80,3))
+ ├── locals: []
+ ├── class_keyword_loc: (78,0)-(78,5) = "class"
+ ├── operator_loc: (78,6)-(78,8) = "<<"
+ ├── expression:
+ │ @ SelfNode (location: (78,9)-(78,13))
+ ├── body:
+ │ @ StatementsNode (location: (79,2)-(79,23))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (79,2)-(79,23))
+ │ ├── expression:
+ │ │ @ UndefNode (location: (79,2)-(79,12))
+ │ │ ├── names: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (79,8)-(79,12))
+ │ │ │ ├── opening_loc: (79,8)-(79,9) = ":"
+ │ │ │ ├── value_loc: (79,9)-(79,12) = "bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "bar"
+ │ │ └── keyword_loc: (79,2)-(79,7) = "undef"
+ │ ├── keyword_loc: (79,13)-(79,19) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (79,20)-(79,23))
+ └── end_keyword_loc: (80,0)-(80,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/lambda.txt b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
new file mode 100644
index 0000000000..d1c6c75987
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
@@ -0,0 +1,143 @@
+@ ProgramNode (location: (1,0)-(13,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,1))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,6) = "lambda"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,7)-(2,1))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,7)-(1,8) = "{"
+ │ │ └── closing_loc: (2,0)-(2,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "lambda"
+ ├── @ CallNode (location: (3,0)-(5,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,6) = "lambda"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,7)-(5,1))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (3,9)-(3,15))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (3,10)-(3,14))
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (3,10)-(3,11))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (3,13)-(3,14))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (3,9)-(3,10) = "|"
+ │ │ │ └── closing_loc: (3,14)-(3,15) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (4,2)-(4,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (4,2)-(4,3))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (3,7)-(3,8) = "{"
+ │ │ └── closing_loc: (5,0)-(5,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "lambda"
+ ├── @ LambdaNode (location: (6,0)-(7,1))
+ │ ├── locals: []
+ │ ├── operator_loc: (6,0)-(6,2) = "->"
+ │ ├── opening_loc: (6,5)-(6,6) = "{"
+ │ ├── closing_loc: (7,0)-(7,1) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (6,2)-(6,4))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (6,2)-(6,3) = "("
+ │ │ └── closing_loc: (6,3)-(6,4) = ")"
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (8,0)-(9,1))
+ │ ├── locals: [:a]
+ │ ├── operator_loc: (8,0)-(8,2) = "->"
+ │ ├── opening_loc: (8,6)-(8,7) = "{"
+ │ ├── closing_loc: (9,0)-(9,1) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (8,2)-(8,5))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (8,3)-(8,4))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (8,3)-(8,4))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (8,2)-(8,3) = "("
+ │ │ └── closing_loc: (8,4)-(8,5) = ")"
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (10,0)-(11,1))
+ │ ├── locals: [:a, :b]
+ │ ├── operator_loc: (10,0)-(10,2) = "->"
+ │ ├── opening_loc: (10,9)-(10,10) = "{"
+ │ ├── closing_loc: (11,0)-(11,1) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (10,2)-(10,8))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (10,3)-(10,7))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (10,3)-(10,4))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (10,6)-(10,7))
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (10,2)-(10,3) = "("
+ │ │ └── closing_loc: (10,7)-(10,8) = ")"
+ │ └── body: ∅
+ └── @ LambdaNode (location: (12,0)-(13,1))
+ ├── locals: [:a, :b, :c]
+ ├── operator_loc: (12,0)-(12,2) = "->"
+ ├── opening_loc: (12,12)-(12,13) = "{"
+ ├── closing_loc: (13,0)-(13,1) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (12,2)-(12,11))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (12,3)-(12,7))
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ RequiredParameterNode (location: (12,3)-(12,4))
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ RequiredParameterNode (location: (12,6)-(12,7))
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 1)
+ │ │ └── @ BlockLocalVariableNode (location: (12,9)-(12,10))
+ │ │ └── name: :c
+ │ ├── opening_loc: (12,2)-(12,3) = "("
+ │ └── closing_loc: (12,10)-(12,11) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/literal.txt b/test/prism/snapshots/unparser/corpus/literal/literal.txt
new file mode 100644
index 0000000000..63524c5ef8
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/literal.txt
@@ -0,0 +1,1108 @@
+@ ProgramNode (location: (1,0)-(91,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(91,2))
+ └── body: (length: 78)
+ ├── @ HashNode (location: (1,0)-(1,38))
+ │ ├── opening_loc: (1,0)-(1,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (1,2)-(1,21))
+ │ │ │ ├── key:
+ │ │ │ │ @ StringNode (location: (1,2)-(1,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ │ │ │ ├── content_loc: (1,3)-(1,6) = "foo"
+ │ │ │ │ ├── closing_loc: (1,6)-(1,7) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ InterpolatedStringNode (location: (1,11)-(1,21))
+ │ │ │ │ ├── opening_loc: (1,11)-(1,21) = "<<-HEREDOC"
+ │ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ │ ├── @ StringNode (location: (2,0)-(2,2))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── content_loc: (2,0)-(2,2) = " "
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: " "
+ │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (2,2)-(2,5))
+ │ │ │ │ │ │ ├── opening_loc: (2,2)-(2,4) = "\#{"
+ │ │ │ │ │ │ ├── statements: ∅
+ │ │ │ │ │ │ └── closing_loc: (2,4)-(2,5) = "}"
+ │ │ │ │ │ └── @ StringNode (location: (2,5)-(2,0))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (2,5)-(2,0) = "\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ └── closing_loc: (3,0)-(3,0) = "HEREDOC\n"
+ │ │ │ └── operator_loc: (1,8)-(1,10) = "=>"
+ │ │ └── @ AssocNode (location: (1,23)-(1,36))
+ │ │ ├── key:
+ │ │ │ @ StringNode (location: (1,23)-(1,28))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,23)-(1,24) = "\""
+ │ │ │ ├── content_loc: (1,24)-(1,27) = "bar"
+ │ │ │ ├── closing_loc: (1,27)-(1,28) = "\""
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (1,32)-(1,36))
+ │ │ │ ├── opening_loc: (1,32)-(1,33) = ":"
+ │ │ │ ├── value_loc: (1,33)-(1,36) = "baz"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "baz"
+ │ │ └── operator_loc: (1,29)-(1,31) = "=>"
+ │ └── closing_loc: (1,37)-(1,38) = "}"
+ ├── @ HashNode (location: (4,0)-(4,31))
+ │ ├── opening_loc: (4,0)-(4,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (4,2)-(4,14))
+ │ │ │ ├── key:
+ │ │ │ │ @ StringNode (location: (4,2)-(4,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (4,2)-(4,3) = "\""
+ │ │ │ │ ├── content_loc: (4,3)-(4,6) = "foo"
+ │ │ │ │ ├── closing_loc: (4,6)-(4,7) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ StringNode (location: (4,11)-(4,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (4,11)-(4,13) = "%("
+ │ │ │ │ ├── content_loc: (4,13)-(4,13) = ""
+ │ │ │ │ ├── closing_loc: (4,13)-(4,14) = ")"
+ │ │ │ │ └── unescaped: ""
+ │ │ │ └── operator_loc: (4,8)-(4,10) = "=>"
+ │ │ └── @ AssocNode (location: (4,16)-(4,29))
+ │ │ ├── key:
+ │ │ │ @ StringNode (location: (4,16)-(4,21))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (4,16)-(4,17) = "\""
+ │ │ │ ├── content_loc: (4,17)-(4,20) = "bar"
+ │ │ │ ├── closing_loc: (4,20)-(4,21) = "\""
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (4,25)-(4,29))
+ │ │ │ ├── opening_loc: (4,25)-(4,26) = ":"
+ │ │ │ ├── value_loc: (4,26)-(4,29) = "baz"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "baz"
+ │ │ └── operator_loc: (4,22)-(4,24) = "=>"
+ │ └── closing_loc: (4,30)-(4,31) = "}"
+ ├── @ ArrayNode (location: (5,0)-(5,12))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (5,1)-(5,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (5,1)-(5,2) = "\""
+ │ │ │ ├── content_loc: (5,2)-(5,5) = "foo"
+ │ │ │ ├── closing_loc: (5,5)-(5,6) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ StringNode (location: (5,8)-(5,11))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (5,8)-(5,10) = "%("
+ │ │ ├── content_loc: (5,10)-(5,10) = ""
+ │ │ ├── closing_loc: (5,10)-(5,11) = ")"
+ │ │ └── unescaped: ""
+ │ ├── opening_loc: (5,0)-(5,1) = "["
+ │ └── closing_loc: (5,11)-(5,12) = "]"
+ ├── @ CallNode (location: (6,0)-(6,15))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,0)-(6,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ │ ├── opening_loc: (6,1)-(6,2) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (6,2)-(6,12))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (6,2)-(6,12))
+ │ │ │ ├── opening_loc: (6,2)-(6,12) = "<<-HEREDOC"
+ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ ├── @ StringNode (location: (7,0)-(7,2))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (7,0)-(7,2) = " "
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: " "
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (7,2)-(7,5))
+ │ │ │ │ │ ├── opening_loc: (7,2)-(7,4) = "\#{"
+ │ │ │ │ │ ├── statements: ∅
+ │ │ │ │ │ └── closing_loc: (7,4)-(7,5) = "}"
+ │ │ │ │ └── @ StringNode (location: (7,5)-(7,0))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (7,5)-(7,0) = "\n"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\n"
+ │ │ │ └── closing_loc: (8,0)-(8,0) = "HEREDOC\n"
+ │ │ ├── closing_loc: (6,12)-(6,13) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (6,13)-(6,14) = "."
+ │ ├── message_loc: (6,14)-(6,15) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (9,0)-(9,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ │ ├── opening_loc: (9,1)-(9,2) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,2)-(9,5))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (9,2)-(9,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (9,2)-(9,4) = "%("
+ │ │ │ ├── content_loc: (9,4)-(9,4) = ""
+ │ │ │ ├── closing_loc: (9,4)-(9,5) = ")"
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: (9,5)-(9,6) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (9,6)-(9,7) = "."
+ │ ├── message_loc: (9,7)-(9,8) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ HashNode (location: (10,0)-(10,30))
+ │ ├── opening_loc: (10,0)-(10,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (10,2)-(10,21))
+ │ │ │ ├── key:
+ │ │ │ │ @ StringNode (location: (10,2)-(10,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (10,2)-(10,3) = "\""
+ │ │ │ │ ├── content_loc: (10,3)-(10,6) = "foo"
+ │ │ │ │ ├── closing_loc: (10,6)-(10,7) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ InterpolatedStringNode (location: (10,11)-(10,21))
+ │ │ │ │ ├── opening_loc: (10,11)-(10,21) = "<<-HEREDOC"
+ │ │ │ │ ├── parts: (length: 3)
+ │ │ │ │ │ ├── @ StringNode (location: (11,0)-(11,2))
+ │ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── content_loc: (11,0)-(11,2) = " "
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ └── unescaped: " "
+ │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (11,2)-(11,5))
+ │ │ │ │ │ │ ├── opening_loc: (11,2)-(11,4) = "\#{"
+ │ │ │ │ │ │ ├── statements: ∅
+ │ │ │ │ │ │ └── closing_loc: (11,4)-(11,5) = "}"
+ │ │ │ │ │ └── @ StringNode (location: (11,5)-(11,0))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (11,5)-(11,0) = "\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ └── closing_loc: (12,0)-(12,0) = "HEREDOC\n"
+ │ │ │ └── operator_loc: (10,8)-(10,10) = "=>"
+ │ │ └── @ AssocSplatNode (location: (10,23)-(10,28))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (10,25)-(10,28))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (10,25)-(10,28) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (10,23)-(10,25) = "**"
+ │ └── closing_loc: (10,29)-(10,30) = "}"
+ ├── @ HashNode (location: (13,0)-(13,23))
+ │ ├── opening_loc: (13,0)-(13,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (13,2)-(13,14))
+ │ │ │ ├── key:
+ │ │ │ │ @ StringNode (location: (13,2)-(13,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (13,2)-(13,3) = "\""
+ │ │ │ │ ├── content_loc: (13,3)-(13,6) = "foo"
+ │ │ │ │ ├── closing_loc: (13,6)-(13,7) = "\""
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ StringNode (location: (13,11)-(13,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (13,11)-(13,13) = "%("
+ │ │ │ │ ├── content_loc: (13,13)-(13,13) = ""
+ │ │ │ │ ├── closing_loc: (13,13)-(13,14) = ")"
+ │ │ │ │ └── unescaped: ""
+ │ │ │ └── operator_loc: (13,8)-(13,10) = "=>"
+ │ │ └── @ AssocSplatNode (location: (13,16)-(13,21))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (13,18)-(13,21))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,18)-(13,21) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (13,16)-(13,18) = "**"
+ │ └── closing_loc: (13,22)-(13,23) = "}"
+ ├── @ InterpolatedStringNode (location: (14,0)-(14,14))
+ │ ├── opening_loc: (14,0)-(14,1) = "\""
+ │ ├── parts: (length: 5)
+ │ │ ├── @ EmbeddedVariableNode (location: (14,1)-(14,4))
+ │ │ │ ├── operator_loc: (14,1)-(14,2) = "#"
+ │ │ │ └── variable:
+ │ │ │ @ InstanceVariableReadNode (location: (14,2)-(14,4))
+ │ │ │ └── name: :@a
+ │ │ ├── @ StringNode (location: (14,4)-(14,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (14,4)-(14,5) = " "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " "
+ │ │ ├── @ EmbeddedVariableNode (location: (14,5)-(14,9))
+ │ │ │ ├── operator_loc: (14,5)-(14,6) = "#"
+ │ │ │ └── variable:
+ │ │ │ @ ClassVariableReadNode (location: (14,6)-(14,9))
+ │ │ │ └── name: :@@a
+ │ │ ├── @ StringNode (location: (14,9)-(14,10))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (14,9)-(14,10) = " "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " "
+ │ │ └── @ EmbeddedVariableNode (location: (14,10)-(14,13))
+ │ │ ├── operator_loc: (14,10)-(14,11) = "#"
+ │ │ └── variable:
+ │ │ @ GlobalVariableReadNode (location: (14,11)-(14,13))
+ │ │ └── name: :$a
+ │ └── closing_loc: (14,13)-(14,14) = "\""
+ ├── @ IntegerNode (location: (15,0)-(15,1))
+ │ └── flags: decimal
+ ├── @ CallNode (location: (16,0)-(16,3))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (16,1)-(16,3))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (16,0)-(16,1) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+@"
+ ├── @ IntegerNode (location: (17,0)-(17,1))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (18,0)-(18,1))
+ │ └── flags: decimal
+ ├── @ RationalNode (location: (19,0)-(19,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (19,0)-(19,1))
+ │ └── flags: decimal
+ ├── @ RationalNode (location: (20,0)-(20,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (20,0)-(20,3))
+ ├── @ RationalNode (location: (21,0)-(21,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (21,0)-(21,3))
+ ├── @ ImaginaryNode (location: (22,0)-(22,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (22,0)-(22,1))
+ │ └── flags: decimal
+ ├── @ ImaginaryNode (location: (23,0)-(23,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (23,0)-(23,2))
+ │ └── flags: decimal
+ ├── @ ImaginaryNode (location: (24,0)-(24,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (24,0)-(24,3))
+ ├── @ ImaginaryNode (location: (25,0)-(25,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (25,0)-(25,4))
+ ├── @ ImaginaryNode (location: (26,0)-(26,32))
+ │ └── numeric:
+ │ @ IntegerNode (location: (26,0)-(26,31))
+ │ └── flags: decimal
+ ├── @ ImaginaryNode (location: (27,0)-(27,3))
+ │ └── numeric:
+ │ @ RationalNode (location: (27,0)-(27,2))
+ │ └── numeric:
+ │ @ IntegerNode (location: (27,0)-(27,1))
+ │ └── flags: decimal
+ ├── @ StringConcatNode (location: (28,0)-(28,11))
+ │ ├── left:
+ │ │ @ StringNode (location: (28,0)-(28,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (28,0)-(28,1) = "\""
+ │ │ ├── content_loc: (28,1)-(28,4) = "foo"
+ │ │ ├── closing_loc: (28,4)-(28,5) = "\""
+ │ │ └── unescaped: "foo"
+ │ └── right:
+ │ @ StringNode (location: (28,6)-(28,11))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (28,6)-(28,7) = "\""
+ │ ├── content_loc: (28,7)-(28,10) = "bar"
+ │ ├── closing_loc: (28,10)-(28,11) = "\""
+ │ └── unescaped: "bar"
+ ├── @ InterpolatedStringNode (location: (29,0)-(29,15))
+ │ ├── opening_loc: (29,0)-(29,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (29,1)-(29,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (29,1)-(29,8) = "foobar "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foobar "
+ │ │ └── @ EmbeddedStatementsNode (location: (29,8)-(29,14))
+ │ │ ├── opening_loc: (29,8)-(29,10) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (29,10)-(29,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (29,10)-(29,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,10)-(29,13) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── closing_loc: (29,13)-(29,14) = "}"
+ │ └── closing_loc: (29,14)-(29,15) = "\""
+ ├── @ InterpolatedStringNode (location: (30,0)-(30,12))
+ │ ├── opening_loc: (30,0)-(30,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (30,1)-(30,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (30,1)-(30,4) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── @ EmbeddedStatementsNode (location: (30,4)-(30,8))
+ │ │ │ ├── opening_loc: (30,4)-(30,6) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (30,6)-(30,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (30,6)-(30,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (30,7)-(30,8) = "}"
+ │ │ └── @ StringNode (location: (30,8)-(30,11))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (30,8)-(30,11) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── closing_loc: (30,11)-(30,12) = "\""
+ ├── @ InterpolatedStringNode (location: (31,0)-(31,9))
+ │ ├── opening_loc: (31,0)-(31,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (31,1)-(31,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (31,1)-(31,5) = "\\\\\\\\"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\\\\"
+ │ │ └── @ EmbeddedStatementsNode (location: (31,5)-(31,8))
+ │ │ ├── opening_loc: (31,5)-(31,7) = "\#{"
+ │ │ ├── statements: ∅
+ │ │ └── closing_loc: (31,7)-(31,8) = "}"
+ │ └── closing_loc: (31,8)-(31,9) = "\""
+ ├── @ InterpolatedStringNode (location: (32,0)-(32,9))
+ │ ├── opening_loc: (32,0)-(32,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (32,1)-(32,4))
+ │ │ │ ├── opening_loc: (32,1)-(32,3) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (32,3)-(32,4) = "}"
+ │ │ └── @ StringNode (location: (32,4)-(32,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (32,4)-(32,8) = "\\\#{}"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#{}"
+ │ └── closing_loc: (32,8)-(32,9) = "\""
+ ├── @ InterpolatedStringNode (location: (33,0)-(33,9))
+ │ ├── opening_loc: (33,0)-(33,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (33,1)-(33,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (33,1)-(33,5) = "\\\#{}"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\#{}"
+ │ │ └── @ EmbeddedStatementsNode (location: (33,5)-(33,8))
+ │ │ ├── opening_loc: (33,5)-(33,7) = "\#{"
+ │ │ ├── statements: ∅
+ │ │ └── closing_loc: (33,7)-(33,8) = "}"
+ │ └── closing_loc: (33,8)-(33,9) = "\""
+ ├── @ StringNode (location: (34,0)-(34,15))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (34,0)-(34,1) = "\""
+ │ ├── content_loc: (34,1)-(34,14) = "foo\\\\\\\#{@bar}"
+ │ ├── closing_loc: (34,14)-(34,15) = "\""
+ │ └── unescaped: "foo\\\#{@bar}"
+ ├── @ StringNode (location: (35,0)-(35,4))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (35,0)-(35,1) = "\""
+ │ ├── content_loc: (35,1)-(35,3) = "\\\""
+ │ ├── closing_loc: (35,3)-(35,4) = "\""
+ │ └── unescaped: "\""
+ ├── @ StringNode (location: (36,0)-(36,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (36,0)-(36,1) = "\""
+ │ ├── content_loc: (36,1)-(36,8) = "foo bar"
+ │ ├── closing_loc: (36,8)-(36,9) = "\""
+ │ └── unescaped: "foo bar"
+ ├── @ StringNode (location: (37,0)-(37,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (37,0)-(37,1) = "\""
+ │ ├── content_loc: (37,1)-(37,9) = "foo\\nbar"
+ │ ├── closing_loc: (37,9)-(37,10) = "\""
+ │ └── unescaped: "foo\nbar"
+ ├── @ XStringNode (location: (38,0)-(38,5))
+ │ ├── opening_loc: (38,0)-(38,1) = "`"
+ │ ├── content_loc: (38,1)-(38,4) = "foo"
+ │ ├── closing_loc: (38,4)-(38,5) = "`"
+ │ └── unescaped: "foo"
+ ├── @ InterpolatedXStringNode (location: (39,0)-(39,12))
+ │ ├── opening_loc: (39,0)-(39,1) = "`"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (39,1)-(39,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (39,1)-(39,4) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ EmbeddedStatementsNode (location: (39,4)-(39,11))
+ │ │ ├── opening_loc: (39,4)-(39,6) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (39,6)-(39,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ InstanceVariableReadNode (location: (39,6)-(39,10))
+ │ │ │ └── name: :@bar
+ │ │ └── closing_loc: (39,10)-(39,11) = "}"
+ │ └── closing_loc: (39,11)-(39,12) = "`"
+ ├── @ XStringNode (location: (40,0)-(40,3))
+ │ ├── opening_loc: (40,0)-(40,1) = "`"
+ │ ├── content_loc: (40,1)-(40,2) = ")"
+ │ ├── closing_loc: (40,2)-(40,3) = "`"
+ │ └── unescaped: ")"
+ ├── @ XStringNode (location: (41,0)-(41,4))
+ │ ├── opening_loc: (41,0)-(41,1) = "`"
+ │ ├── content_loc: (41,1)-(41,3) = "\\`"
+ │ ├── closing_loc: (41,3)-(41,4) = "`"
+ │ └── unescaped: "`"
+ ├── @ XStringNode (location: (42,0)-(42,3))
+ │ ├── opening_loc: (42,0)-(42,1) = "`"
+ │ ├── content_loc: (42,1)-(42,2) = "\""
+ │ ├── closing_loc: (42,2)-(42,3) = "`"
+ │ └── unescaped: "\""
+ ├── @ SymbolNode (location: (43,0)-(43,4))
+ │ ├── opening_loc: (43,0)-(43,1) = ":"
+ │ ├── value_loc: (43,1)-(43,4) = "foo"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "foo"
+ ├── @ SymbolNode (location: (44,0)-(44,6))
+ │ ├── opening_loc: (44,0)-(44,2) = ":\""
+ │ ├── value_loc: (44,2)-(44,5) = "A B"
+ │ ├── closing_loc: (44,5)-(44,6) = "\""
+ │ └── unescaped: "A B"
+ ├── @ SymbolNode (location: (45,0)-(45,4))
+ │ ├── opening_loc: (45,0)-(45,1) = ":"
+ │ ├── value_loc: (45,1)-(45,4) = "foo"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "foo"
+ ├── @ SymbolNode (location: (46,0)-(46,6))
+ │ ├── opening_loc: (46,0)-(46,2) = ":\""
+ │ ├── value_loc: (46,2)-(46,5) = "A B"
+ │ ├── closing_loc: (46,5)-(46,6) = "\""
+ │ └── unescaped: "A B"
+ ├── @ SymbolNode (location: (47,0)-(47,7))
+ │ ├── opening_loc: (47,0)-(47,2) = ":\""
+ │ ├── value_loc: (47,2)-(47,6) = "A\\\"B"
+ │ ├── closing_loc: (47,6)-(47,7) = "\""
+ │ └── unescaped: "A\"B"
+ ├── @ SymbolNode (location: (48,0)-(48,3))
+ │ ├── opening_loc: (48,0)-(48,2) = ":\""
+ │ ├── value_loc: (1,0)-(0,0) = ""
+ │ ├── closing_loc: (48,2)-(48,3) = "\""
+ │ └── unescaped: ""
+ ├── @ RegularExpressionNode (location: (49,0)-(49,5))
+ │ ├── opening_loc: (49,0)-(49,1) = "/"
+ │ ├── content_loc: (49,1)-(49,4) = "foo"
+ │ ├── closing_loc: (49,4)-(49,5) = "/"
+ │ ├── unescaped: "foo"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (50,0)-(50,28))
+ │ ├── opening_loc: (50,0)-(50,1) = "/"
+ │ ├── content_loc: (50,1)-(50,27) = "[^-+',.\\/:@[:alnum:]\\[\\]]+"
+ │ ├── closing_loc: (50,27)-(50,28) = "/"
+ │ ├── unescaped: "[^-+',./:@[:alnum:][]]+"
+ │ └── flags: ∅
+ ├── @ InterpolatedRegularExpressionNode (location: (51,0)-(51,12))
+ │ ├── opening_loc: (51,0)-(51,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (51,1)-(51,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (51,1)-(51,4) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ EmbeddedStatementsNode (location: (51,4)-(51,11))
+ │ │ ├── opening_loc: (51,4)-(51,6) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (51,6)-(51,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ InstanceVariableReadNode (location: (51,6)-(51,10))
+ │ │ │ └── name: :@bar
+ │ │ └── closing_loc: (51,10)-(51,11) = "}"
+ │ ├── closing_loc: (51,11)-(51,12) = "/"
+ │ └── flags: ∅
+ ├── @ InterpolatedRegularExpressionNode (location: (52,0)-(52,15))
+ │ ├── opening_loc: (52,0)-(52,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (52,1)-(52,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (52,1)-(52,4) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ EmbeddedStatementsNode (location: (52,4)-(52,11))
+ │ │ ├── opening_loc: (52,4)-(52,6) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (52,6)-(52,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ InstanceVariableReadNode (location: (52,6)-(52,10))
+ │ │ │ └── name: :@bar
+ │ │ └── closing_loc: (52,10)-(52,11) = "}"
+ │ ├── closing_loc: (52,11)-(52,15) = "/imx"
+ │ └── flags: ignore_case, extended, multi_line
+ ├── @ InterpolatedRegularExpressionNode (location: (53,0)-(53,13))
+ │ ├── opening_loc: (53,0)-(53,1) = "/"
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (53,1)-(53,12))
+ │ │ ├── opening_loc: (53,1)-(53,3) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (53,3)-(53,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ StringNode (location: (53,3)-(53,11))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (53,3)-(53,4) = "\""
+ │ │ │ ├── content_loc: (53,4)-(53,10) = "\\u0000"
+ │ │ │ ├── closing_loc: (53,10)-(53,11) = "\""
+ │ │ │ └── unescaped: "\u0000"
+ │ │ └── closing_loc: (53,11)-(53,12) = "}"
+ │ ├── closing_loc: (53,12)-(53,13) = "/"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (54,0)-(54,4))
+ │ ├── opening_loc: (54,0)-(54,1) = "/"
+ │ ├── content_loc: (54,1)-(54,3) = "\\n"
+ │ ├── closing_loc: (54,3)-(54,4) = "/"
+ │ ├── unescaped: "\n"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (55,0)-(55,4))
+ │ ├── opening_loc: (55,0)-(55,1) = "/"
+ │ ├── content_loc: (55,1)-(55,3) = "\\n"
+ │ ├── closing_loc: (55,3)-(55,4) = "/"
+ │ ├── unescaped: "\n"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (56,0)-(56,5))
+ │ ├── opening_loc: (56,0)-(56,1) = "/"
+ │ ├── content_loc: (56,1)-(56,3) = "\\n"
+ │ ├── closing_loc: (56,3)-(56,5) = "/x"
+ │ ├── unescaped: "\n"
+ │ └── flags: extended
+ ├── @ RegularExpressionNode (location: (57,0)-(57,7))
+ │ ├── opening_loc: (57,0)-(57,1) = "/"
+ │ ├── content_loc: (57,1)-(57,5) = "\\/\\/"
+ │ ├── closing_loc: (57,5)-(57,7) = "/x"
+ │ ├── unescaped: "//"
+ │ └── flags: extended
+ ├── @ InterpolatedSymbolNode (location: (58,0)-(58,15))
+ │ ├── opening_loc: (58,0)-(58,2) = ":\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (58,2)-(58,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (58,2)-(58,5) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── @ EmbeddedStatementsNode (location: (58,5)-(58,11))
+ │ │ │ ├── opening_loc: (58,5)-(58,7) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (58,7)-(58,10))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (58,7)-(58,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (58,7)-(58,10) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── closing_loc: (58,10)-(58,11) = "}"
+ │ │ └── @ StringNode (location: (58,11)-(58,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (58,11)-(58,14) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ └── closing_loc: (58,14)-(58,15) = "\""
+ ├── @ InterpolatedSymbolNode (location: (59,0)-(59,11))
+ │ ├── opening_loc: (59,0)-(59,2) = ":\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (59,2)-(59,10))
+ │ │ ├── opening_loc: (59,2)-(59,4) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (59,4)-(59,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ StringNode (location: (59,4)-(59,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (59,4)-(59,5) = "\""
+ │ │ │ ├── content_loc: (59,5)-(59,8) = "foo"
+ │ │ │ ├── closing_loc: (59,8)-(59,9) = "\""
+ │ │ │ └── unescaped: "foo"
+ │ │ └── closing_loc: (59,9)-(59,10) = "}"
+ │ └── closing_loc: (59,10)-(59,11) = "\""
+ ├── @ RangeNode (location: (60,0)-(60,14))
+ │ ├── left:
+ │ │ @ ParenthesesNode (location: (60,0)-(60,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (60,1)-(60,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (60,1)-(60,10))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ FloatNode (location: (60,1)-(60,4))
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (60,5)-(60,6) = "/"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (60,7)-(60,10))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (60,7)-(60,10))
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "/"
+ │ │ ├── opening_loc: (60,0)-(60,1) = "("
+ │ │ └── closing_loc: (60,10)-(60,11) = ")"
+ │ ├── right:
+ │ │ @ IntegerNode (location: (60,13)-(60,14))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (60,11)-(60,13) = ".."
+ │ └── flags: ∅
+ ├── @ RangeNode (location: (61,0)-(61,14))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (61,0)-(61,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ ParenthesesNode (location: (61,3)-(61,14))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (61,4)-(61,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (61,4)-(61,13))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ FloatNode (location: (61,4)-(61,7))
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (61,8)-(61,9) = "/"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (61,10)-(61,13))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (61,10)-(61,13))
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "/"
+ │ │ ├── opening_loc: (61,3)-(61,4) = "("
+ │ │ └── closing_loc: (61,13)-(61,14) = ")"
+ │ ├── operator_loc: (61,1)-(61,3) = ".."
+ │ └── flags: ∅
+ ├── @ RangeNode (location: (62,0)-(62,16))
+ │ ├── left:
+ │ │ @ ParenthesesNode (location: (62,0)-(62,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (62,1)-(62,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (62,1)-(62,10))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ FloatNode (location: (62,1)-(62,4))
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (62,5)-(62,6) = "/"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (62,7)-(62,10))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (62,7)-(62,10))
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "/"
+ │ │ ├── opening_loc: (62,0)-(62,1) = "("
+ │ │ └── closing_loc: (62,10)-(62,11) = ")"
+ │ ├── right:
+ │ │ @ IntegerNode (location: (62,13)-(62,16))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (62,11)-(62,13) = ".."
+ │ └── flags: ∅
+ ├── @ FloatNode (location: (63,0)-(63,4))
+ ├── @ FloatNode (location: (64,0)-(64,3))
+ ├── @ ArrayNode (location: (65,0)-(65,6))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (65,1)-(65,2))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (65,4)-(65,5))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (65,0)-(65,1) = "["
+ │ └── closing_loc: (65,5)-(65,6) = "]"
+ ├── @ ArrayNode (location: (66,0)-(66,11))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (66,1)-(66,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ ParenthesesNode (location: (66,4)-(66,6))
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (66,4)-(66,5) = "("
+ │ │ │ └── closing_loc: (66,5)-(66,6) = ")"
+ │ │ └── @ CallNode (location: (66,8)-(66,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (66,8)-(66,10) = "n2"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "n2"
+ │ ├── opening_loc: (66,0)-(66,1) = "["
+ │ └── closing_loc: (66,10)-(66,11) = "]"
+ ├── @ ArrayNode (location: (67,0)-(67,3))
+ │ ├── elements: (length: 1)
+ │ │ └── @ IntegerNode (location: (67,1)-(67,2))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (67,0)-(67,1) = "["
+ │ └── closing_loc: (67,2)-(67,3) = "]"
+ ├── @ ArrayNode (location: (68,0)-(68,2))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (68,0)-(68,1) = "["
+ │ └── closing_loc: (68,1)-(68,2) = "]"
+ ├── @ ArrayNode (location: (69,0)-(69,10))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (69,1)-(69,2))
+ │ │ │ └── flags: decimal
+ │ │ └── @ SplatNode (location: (69,4)-(69,9))
+ │ │ ├── operator_loc: (69,4)-(69,5) = "*"
+ │ │ └── expression:
+ │ │ @ InstanceVariableReadNode (location: (69,5)-(69,9))
+ │ │ └── name: :@foo
+ │ ├── opening_loc: (69,0)-(69,1) = "["
+ │ └── closing_loc: (69,9)-(69,10) = "]"
+ ├── @ ArrayNode (location: (70,0)-(70,10))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SplatNode (location: (70,1)-(70,6))
+ │ │ │ ├── operator_loc: (70,1)-(70,2) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ InstanceVariableReadNode (location: (70,2)-(70,6))
+ │ │ │ └── name: :@foo
+ │ │ └── @ IntegerNode (location: (70,8)-(70,9))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (70,0)-(70,1) = "["
+ │ └── closing_loc: (70,9)-(70,10) = "]"
+ ├── @ ArrayNode (location: (71,0)-(71,14))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SplatNode (location: (71,1)-(71,6))
+ │ │ │ ├── operator_loc: (71,1)-(71,2) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ InstanceVariableReadNode (location: (71,2)-(71,6))
+ │ │ │ └── name: :@foo
+ │ │ └── @ SplatNode (location: (71,8)-(71,13))
+ │ │ ├── operator_loc: (71,8)-(71,9) = "*"
+ │ │ └── expression:
+ │ │ @ InstanceVariableReadNode (location: (71,9)-(71,13))
+ │ │ └── name: :@baz
+ │ ├── opening_loc: (71,0)-(71,1) = "["
+ │ └── closing_loc: (71,13)-(71,14) = "]"
+ ├── @ HashNode (location: (72,0)-(72,2))
+ │ ├── opening_loc: (72,0)-(72,1) = "{"
+ │ ├── elements: (length: 0)
+ │ └── closing_loc: (72,1)-(72,2) = "}"
+ ├── @ HashNode (location: (73,0)-(73,12))
+ │ ├── opening_loc: (73,0)-(73,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (73,2)-(73,10))
+ │ │ ├── key:
+ │ │ │ @ ParenthesesNode (location: (73,2)-(73,4))
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (73,2)-(73,3) = "("
+ │ │ │ └── closing_loc: (73,3)-(73,4) = ")"
+ │ │ ├── value:
+ │ │ │ @ ParenthesesNode (location: (73,8)-(73,10))
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (73,8)-(73,9) = "("
+ │ │ │ └── closing_loc: (73,9)-(73,10) = ")"
+ │ │ └── operator_loc: (73,5)-(73,7) = "=>"
+ │ └── closing_loc: (73,11)-(73,12) = "}"
+ ├── @ HashNode (location: (74,0)-(74,10))
+ │ ├── opening_loc: (74,0)-(74,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (74,2)-(74,8))
+ │ │ ├── key:
+ │ │ │ @ IntegerNode (location: (74,2)-(74,3))
+ │ │ │ └── flags: decimal
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (74,7)-(74,8))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (74,4)-(74,6) = "=>"
+ │ └── closing_loc: (74,9)-(74,10) = "}"
+ ├── @ HashNode (location: (75,0)-(75,18))
+ │ ├── opening_loc: (75,0)-(75,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (75,2)-(75,8))
+ │ │ │ ├── key:
+ │ │ │ │ @ IntegerNode (location: (75,2)-(75,3))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (75,7)-(75,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (75,4)-(75,6) = "=>"
+ │ │ └── @ AssocNode (location: (75,10)-(75,16))
+ │ │ ├── key:
+ │ │ │ @ IntegerNode (location: (75,10)-(75,11))
+ │ │ │ └── flags: decimal
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (75,15)-(75,16))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (75,12)-(75,14) = "=>"
+ │ └── closing_loc: (75,17)-(75,18) = "}"
+ ├── @ HashNode (location: (76,0)-(76,27))
+ │ ├── opening_loc: (76,0)-(76,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (76,2)-(76,19))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (76,2)-(76,4))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (76,2)-(76,3) = "a"
+ │ │ │ │ ├── closing_loc: (76,3)-(76,4) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ParenthesesNode (location: (76,5)-(76,19))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (76,6)-(76,18))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ RescueModifierNode (location: (76,6)-(76,18))
+ │ │ │ │ │ ├── expression:
+ │ │ │ │ │ │ @ IntegerNode (location: (76,6)-(76,7))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ ├── keyword_loc: (76,8)-(76,14) = "rescue"
+ │ │ │ │ │ └── rescue_expression:
+ │ │ │ │ │ @ CallNode (location: (76,15)-(76,18))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (76,15)-(76,18) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "foo"
+ │ │ │ │ ├── opening_loc: (76,5)-(76,6) = "("
+ │ │ │ │ └── closing_loc: (76,18)-(76,19) = ")"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (76,21)-(76,25))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (76,21)-(76,23))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (76,21)-(76,22) = "b"
+ │ │ │ ├── closing_loc: (76,22)-(76,23) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (76,24)-(76,25))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (76,26)-(76,27) = "}"
+ ├── @ HashNode (location: (77,0)-(77,14))
+ │ ├── opening_loc: (77,0)-(77,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (77,2)-(77,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (77,2)-(77,4))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (77,2)-(77,3) = "a"
+ │ │ │ │ ├── closing_loc: (77,3)-(77,4) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (77,5)-(77,6))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (77,8)-(77,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (77,8)-(77,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (77,8)-(77,9) = "b"
+ │ │ │ ├── closing_loc: (77,9)-(77,10) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (77,11)-(77,12))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (77,13)-(77,14) = "}"
+ ├── @ HashNode (location: (78,0)-(78,9))
+ │ ├── opening_loc: (78,0)-(78,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (78,2)-(78,7))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (78,2)-(78,4))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (78,2)-(78,3) = "a"
+ │ │ │ ├── closing_loc: (78,3)-(78,4) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ SymbolNode (location: (78,5)-(78,7))
+ │ │ │ ├── opening_loc: (78,5)-(78,6) = ":"
+ │ │ │ ├── value_loc: (78,6)-(78,7) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (78,8)-(78,9) = "}"
+ ├── @ HashNode (location: (79,0)-(79,15))
+ │ ├── opening_loc: (79,0)-(79,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (79,2)-(79,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (79,2)-(79,8))
+ │ │ │ ├── opening_loc: (79,2)-(79,4) = ":\""
+ │ │ │ ├── value_loc: (79,4)-(79,7) = "a b"
+ │ │ │ ├── closing_loc: (79,7)-(79,8) = "\""
+ │ │ │ └── unescaped: "a b"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (79,12)-(79,13))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (79,9)-(79,11) = "=>"
+ │ └── closing_loc: (79,14)-(79,15) = "}"
+ ├── @ HashNode (location: (80,0)-(80,12))
+ │ ├── opening_loc: (80,0)-(80,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (80,2)-(80,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (80,2)-(80,5))
+ │ │ │ ├── opening_loc: (80,2)-(80,3) = ":"
+ │ │ │ ├── value_loc: (80,3)-(80,5) = "-@"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "-@"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (80,9)-(80,10))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (80,6)-(80,8) = "=>"
+ │ └── closing_loc: (80,11)-(80,12) = "}"
+ ├── @ InterpolatedStringNode (location: (81,0)-(82,7))
+ │ ├── opening_loc: (81,0)-(81,1) = "\""
+ │ ├── parts: (length: 4)
+ │ │ ├── @ EmbeddedStatementsNode (location: (81,1)-(81,4))
+ │ │ │ ├── opening_loc: (81,1)-(81,3) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (81,3)-(81,4) = "}"
+ │ │ ├── @ StringNode (location: (81,4)-(81,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (81,4)-(81,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (82,0)-(82,3))
+ │ │ │ ├── opening_loc: (82,0)-(82,2) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (82,2)-(82,3) = "}"
+ │ │ └── @ StringNode (location: (82,3)-(82,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (82,3)-(82,6) = "\\na"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\na"
+ │ └── closing_loc: (82,6)-(82,7) = "\""
+ ├── @ CallNode (location: (83,0)-(86,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (83,0)-(83,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (83,4)-(86,1))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (84,2)-(85,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ InterpolatedStringNode (location: (84,2)-(85,7))
+ │ │ │ ├── opening_loc: (84,2)-(84,3) = "\""
+ │ │ │ ├── parts: (length: 4)
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (84,3)-(84,6))
+ │ │ │ │ │ ├── opening_loc: (84,3)-(84,5) = "\#{"
+ │ │ │ │ │ ├── statements: ∅
+ │ │ │ │ │ └── closing_loc: (84,5)-(84,6) = "}"
+ │ │ │ │ ├── @ StringNode (location: (84,6)-(84,0))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (84,6)-(84,0) = "\n"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "\n"
+ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (85,0)-(85,3))
+ │ │ │ │ │ ├── opening_loc: (85,0)-(85,2) = "\#{"
+ │ │ │ │ │ ├── statements: ∅
+ │ │ │ │ │ └── closing_loc: (85,2)-(85,3) = "}"
+ │ │ │ │ └── @ StringNode (location: (85,3)-(85,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (85,3)-(85,6) = "\\na"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "\na"
+ │ │ │ └── closing_loc: (85,6)-(85,7) = "\""
+ │ │ ├── opening_loc: (83,4)-(83,5) = "{"
+ │ │ └── closing_loc: (86,0)-(86,1) = "}"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ SymbolNode (location: (87,0)-(88,2))
+ │ ├── opening_loc: (87,0)-(87,2) = ":\""
+ │ ├── value_loc: (87,2)-(88,1) = "a\\\\\nb"
+ │ ├── closing_loc: (88,1)-(88,2) = "\""
+ │ └── unescaped: "a\\\nb"
+ └── @ InterpolatedXStringNode (location: (89,0)-(91,2))
+ ├── opening_loc: (89,0)-(89,1) = "`"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (89,1)-(89,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (89,1)-(89,0) = " x\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " x\n"
+ │ ├── @ EmbeddedStatementsNode (location: (90,0)-(90,6))
+ │ │ ├── opening_loc: (90,0)-(90,2) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (90,2)-(90,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (90,2)-(90,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (90,2)-(90,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── closing_loc: (90,5)-(90,6) = "}"
+ │ └── @ StringNode (location: (90,6)-(91,1))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (90,6)-(91,1) = "\n#"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n#"
+ └── closing_loc: (91,1)-(91,2) = "`"
diff --git a/test/prism/snapshots/unparser/corpus/literal/module.txt b/test/prism/snapshots/unparser/corpus/literal/module.txt
new file mode 100644
index 0000000000..826b8628f7
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/module.txt
@@ -0,0 +1,105 @@
+@ ProgramNode (location: (1,0)-(16,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(16,3))
+ └── body: (length: 4)
+ ├── @ ModuleNode (location: (1,0)-(2,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (1,7)-(1,8))
+ │ │ └── name: :A
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (2,0)-(2,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (4,0)-(5,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (4,0)-(4,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (4,7)-(4,11))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (4,7)-(4,8))
+ │ │ │ └── name: :A
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (4,10)-(4,11))
+ │ │ │ └── name: :B
+ │ │ └── delimiter_loc: (4,8)-(4,10) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (5,0)-(5,3) = "end"
+ │ └── name: :B
+ ├── @ ModuleNode (location: (7,0)-(8,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (7,0)-(7,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (7,7)-(7,14))
+ │ │ ├── parent:
+ │ │ │ @ ConstantPathNode (location: (7,7)-(7,11))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (7,7)-(7,8))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (7,10)-(7,11))
+ │ │ │ │ └── name: :B
+ │ │ │ └── delimiter_loc: (7,8)-(7,10) = "::"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (7,13)-(7,14))
+ │ │ │ └── name: :C
+ │ │ └── delimiter_loc: (7,11)-(7,13) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (8,0)-(8,3) = "end"
+ │ └── name: :C
+ └── @ ModuleNode (location: (10,0)-(16,3))
+ ├── locals: []
+ ├── module_keyword_loc: (10,0)-(10,6) = "module"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (10,7)-(10,8))
+ │ └── name: :A
+ ├── body:
+ │ @ StatementsNode (location: (11,2)-(15,5))
+ │ └── body: (length: 2)
+ │ ├── @ CallNode (location: (11,2)-(11,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,2)-(11,9) = "include"
+ │ │ ├── opening_loc: (11,9)-(11,10) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,10)-(11,15))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (11,10)-(11,15))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ConstantReadNode (location: (11,10)-(11,11))
+ │ │ │ │ └── name: :B
+ │ │ │ ├── call_operator_loc: (11,11)-(11,12) = "."
+ │ │ │ ├── message_loc: (11,12)-(11,15) = "new"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "new"
+ │ │ ├── closing_loc: (11,15)-(11,16) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "include"
+ │ └── @ DefNode (location: (13,2)-(15,5))
+ │ ├── name: :foo
+ │ ├── name_loc: (13,6)-(13,9) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (14,4)-(14,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (14,4)-(14,8))
+ │ │ ├── opening_loc: (14,4)-(14,5) = ":"
+ │ │ ├── value_loc: (14,5)-(14,8) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (13,2)-(13,5) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (15,2)-(15,5) = "end"
+ ├── end_keyword_loc: (16,0)-(16,3) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/unparser/corpus/literal/opasgn.txt b/test/prism/snapshots/unparser/corpus/literal/opasgn.txt
new file mode 100644
index 0000000000..91f92de04d
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/opasgn.txt
@@ -0,0 +1,519 @@
+@ ProgramNode (location: (1,0)-(24,10))
+├── locals: [:a, :h]
+└── statements:
+ @ StatementsNode (location: (1,0)-(24,10))
+ └── body: (length: 24)
+ ├── @ LocalVariableOperatorWriteNode (location: (1,0)-(1,6))
+ │ ├── name_loc: (1,0)-(1,1) = "a"
+ │ ├── operator_loc: (1,2)-(1,4) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── name: :a
+ │ ├── operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (2,0)-(2,6))
+ │ ├── name_loc: (2,0)-(2,1) = "a"
+ │ ├── operator_loc: (2,2)-(2,4) = "-="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (2,5)-(2,6))
+ │ │ └── flags: decimal
+ │ ├── name: :a
+ │ ├── operator: :-
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,7))
+ │ ├── name_loc: (3,0)-(3,1) = "a"
+ │ ├── operator_loc: (3,2)-(3,5) = "**="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,6)-(3,7))
+ │ │ └── flags: decimal
+ │ ├── name: :a
+ │ ├── operator: :**
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (4,0)-(4,6))
+ │ ├── name_loc: (4,0)-(4,1) = "a"
+ │ ├── operator_loc: (4,2)-(4,4) = "*="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (4,5)-(4,6))
+ │ │ └── flags: decimal
+ │ ├── name: :a
+ │ ├── operator: :*
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (5,0)-(5,6))
+ │ ├── name_loc: (5,0)-(5,1) = "a"
+ │ ├── operator_loc: (5,2)-(5,4) = "/="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (5,5)-(5,6))
+ │ │ └── flags: decimal
+ │ ├── name: :a
+ │ ├── operator: :/
+ │ └── depth: 0
+ ├── @ LocalVariableAndWriteNode (location: (6,0)-(6,7))
+ │ ├── name_loc: (6,0)-(6,1) = "a"
+ │ ├── operator_loc: (6,2)-(6,5) = "&&="
+ │ ├── value:
+ │ │ @ CallNode (location: (6,6)-(6,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,6)-(6,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ LocalVariableOrWriteNode (location: (7,0)-(7,7))
+ │ ├── name_loc: (7,0)-(7,1) = "a"
+ │ ├── operator_loc: (7,2)-(7,5) = "||="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (7,6)-(7,7))
+ │ │ └── flags: decimal
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ CallNode (location: (8,0)-(8,13))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (8,0)-(8,9))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (8,1)-(8,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableOrWriteNode (location: (8,1)-(8,8))
+ │ │ │ ├── name_loc: (8,1)-(8,2) = "a"
+ │ │ │ ├── operator_loc: (8,3)-(8,6) = "||="
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (8,7)-(8,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (8,0)-(8,1) = "("
+ │ │ └── closing_loc: (8,8)-(8,9) = ")"
+ │ ├── call_operator_loc: (8,9)-(8,10) = "."
+ │ ├── message_loc: (8,10)-(8,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (9,0)-(9,17))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (9,0)-(9,10))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (9,1)-(9,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableOrWriteNode (location: (9,1)-(9,9))
+ │ │ │ ├── name_loc: (9,1)-(9,2) = "h"
+ │ │ │ ├── operator_loc: (9,3)-(9,6) = "||="
+ │ │ │ ├── value:
+ │ │ │ │ @ HashNode (location: (9,7)-(9,9))
+ │ │ │ │ ├── opening_loc: (9,7)-(9,8) = "{"
+ │ │ │ │ ├── elements: (length: 0)
+ │ │ │ │ └── closing_loc: (9,8)-(9,9) = "}"
+ │ │ │ ├── name: :h
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (9,0)-(9,1) = "("
+ │ │ └── closing_loc: (9,9)-(9,10) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,10)-(9,13) = "[k]"
+ │ ├── opening_loc: (9,10)-(9,11) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,11)-(9,17))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (9,11)-(9,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,11)-(9,12) = "k"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "k"
+ │ │ └── @ CallNode (location: (9,16)-(9,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,16)-(9,17) = "v"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "v"
+ │ ├── closing_loc: (9,12)-(9,13) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallOperatorWriteNode (location: (10,0)-(10,8))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (10,0)-(10,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (10,1)-(10,2) = "."
+ │ ├── message_loc: (10,2)-(10,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "b"
+ │ ├── write_name: "b="
+ │ ├── operator: :+
+ │ ├── operator_loc: (10,4)-(10,6) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (10,7)-(10,8))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (11,0)-(11,8))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (11,0)-(11,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (11,1)-(11,2) = "."
+ │ ├── message_loc: (11,2)-(11,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "b"
+ │ ├── write_name: "b="
+ │ ├── operator: :-
+ │ ├── operator_loc: (11,4)-(11,6) = "-="
+ │ └── value:
+ │ @ IntegerNode (location: (11,7)-(11,8))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (12,0)-(12,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (12,0)-(12,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (12,1)-(12,2) = "."
+ │ ├── message_loc: (12,2)-(12,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "b"
+ │ ├── write_name: "b="
+ │ ├── operator: :**
+ │ ├── operator_loc: (12,4)-(12,7) = "**="
+ │ └── value:
+ │ @ IntegerNode (location: (12,8)-(12,9))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (13,0)-(13,8))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (13,0)-(13,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (13,1)-(13,2) = "."
+ │ ├── message_loc: (13,2)-(13,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "b"
+ │ ├── write_name: "b="
+ │ ├── operator: :*
+ │ ├── operator_loc: (13,4)-(13,6) = "*="
+ │ └── value:
+ │ @ IntegerNode (location: (13,7)-(13,8))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (14,0)-(14,8))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (14,0)-(14,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (14,1)-(14,2) = "."
+ │ ├── message_loc: (14,2)-(14,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "b"
+ │ ├── write_name: "b="
+ │ ├── operator: :/
+ │ ├── operator_loc: (14,4)-(14,6) = "/="
+ │ └── value:
+ │ @ IntegerNode (location: (14,7)-(14,8))
+ │ └── flags: decimal
+ ├── @ CallAndWriteNode (location: (15,0)-(15,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (15,0)-(15,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (15,1)-(15,2) = "."
+ │ ├── message_loc: (15,2)-(15,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "b"
+ │ ├── write_name: "b="
+ │ ├── operator_loc: (15,4)-(15,7) = "&&="
+ │ └── value:
+ │ @ CallNode (location: (15,8)-(15,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,8)-(15,9) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── @ CallOrWriteNode (location: (16,0)-(16,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (16,0)-(16,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (16,1)-(16,2) = "."
+ │ ├── message_loc: (16,2)-(16,3) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "b"
+ │ ├── write_name: "b="
+ │ ├── operator_loc: (16,4)-(16,7) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (16,8)-(16,9))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (17,0)-(17,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (17,0)-(17,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,1)-(17,4) = "[b]"
+ │ ├── opening_loc: (17,1)-(17,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,2)-(17,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (17,2)-(17,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,2)-(17,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (17,3)-(17,4) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator: :+
+ │ ├── operator_loc: (17,5)-(17,7) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (17,8)-(17,9))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (18,0)-(18,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (18,0)-(18,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (18,1)-(18,4) = "[b]"
+ │ ├── opening_loc: (18,1)-(18,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (18,2)-(18,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (18,2)-(18,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (18,2)-(18,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (18,3)-(18,4) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator: :-
+ │ ├── operator_loc: (18,5)-(18,7) = "-="
+ │ └── value:
+ │ @ IntegerNode (location: (18,8)-(18,9))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (19,0)-(19,10))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (19,0)-(19,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,1)-(19,4) = "[b]"
+ │ ├── opening_loc: (19,1)-(19,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,2)-(19,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (19,2)-(19,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,2)-(19,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (19,3)-(19,4) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator: :**
+ │ ├── operator_loc: (19,5)-(19,8) = "**="
+ │ └── value:
+ │ @ IntegerNode (location: (19,9)-(19,10))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (20,0)-(20,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (20,0)-(20,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (20,1)-(20,4) = "[b]"
+ │ ├── opening_loc: (20,1)-(20,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (20,2)-(20,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (20,2)-(20,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (20,2)-(20,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (20,3)-(20,4) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator: :*
+ │ ├── operator_loc: (20,5)-(20,7) = "*="
+ │ └── value:
+ │ @ IntegerNode (location: (20,8)-(20,9))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (21,0)-(21,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (21,0)-(21,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (21,1)-(21,4) = "[b]"
+ │ ├── opening_loc: (21,1)-(21,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (21,2)-(21,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (21,2)-(21,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (21,3)-(21,4) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator: :/
+ │ ├── operator_loc: (21,5)-(21,7) = "/="
+ │ └── value:
+ │ @ IntegerNode (location: (21,8)-(21,9))
+ │ └── flags: decimal
+ ├── @ CallAndWriteNode (location: (22,0)-(22,10))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (22,0)-(22,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (22,1)-(22,4) = "[b]"
+ │ ├── opening_loc: (22,1)-(22,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (22,2)-(22,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (22,2)-(22,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (22,2)-(22,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (22,3)-(22,4) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator_loc: (22,5)-(22,8) = "&&="
+ │ └── value:
+ │ @ CallNode (location: (22,9)-(22,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (22,9)-(22,10) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── @ CallOrWriteNode (location: (23,0)-(23,10))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (23,0)-(23,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (23,1)-(23,4) = "[b]"
+ │ ├── opening_loc: (23,1)-(23,2) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,2)-(23,3))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (23,2)-(23,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,2)-(23,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (23,3)-(23,4) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator_loc: (23,5)-(23,8) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (23,9)-(23,10))
+ │ └── flags: decimal
+ └── @ CallOperatorWriteNode (location: (24,0)-(24,10))
+ ├── receiver:
+ │ @ CallNode (location: (24,0)-(24,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (24,0)-(24,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (24,3)-(24,4) = "."
+ ├── message_loc: (24,4)-(24,5) = "A"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: ∅
+ ├── read_name: "A"
+ ├── write_name: "A="
+ ├── operator: :+
+ ├── operator_loc: (24,6)-(24,8) = "+="
+ └── value:
+ @ IntegerNode (location: (24,9)-(24,10))
+ └── flags: decimal
diff --git a/test/prism/snapshots/unparser/corpus/literal/pattern.txt b/test/prism/snapshots/unparser/corpus/literal/pattern.txt
new file mode 100644
index 0000000000..a40093634c
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/pattern.txt
@@ -0,0 +1,426 @@
+@ ProgramNode (location: (1,0)-(41,8))
+├── locals: [:a, :x, :y]
+└── statements:
+ @ StatementsNode (location: (1,0)-(41,8))
+ └── body: (length: 4)
+ ├── @ CaseNode (location: (1,0)-(33,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 15)
+ │ │ ├── @ InNode (location: (2,0)-(3,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ ArrayPatternNode (location: (2,3)-(2,17))
+ │ │ │ │ ├── constant:
+ │ │ │ │ │ @ ConstantReadNode (location: (2,3)-(2,4))
+ │ │ │ │ │ └── name: :A
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ IntegerNode (location: (2,5)-(2,6))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ └── @ IntegerNode (location: (2,8)-(2,9))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ SplatNode (location: (2,11)-(2,13))
+ │ │ │ │ │ ├── operator_loc: (2,11)-(2,12) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (2,12)-(2,13))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ IntegerNode (location: (2,15)-(2,16))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "["
+ │ │ │ │ └── closing_loc: (2,16)-(2,17) = "]"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,2)-(3,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (3,2)-(3,6))
+ │ │ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ │ │ └── then_loc: (2,18)-(2,22) = "then"
+ │ │ ├── @ InNode (location: (4,0)-(5,3))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ ArrayPatternNode (location: (4,3)-(4,11))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ IntegerNode (location: (4,4)-(4,5))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ └── @ IntegerNode (location: (4,7)-(4,8))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (4,3)-(4,4) = "["
+ │ │ │ │ └── closing_loc: (4,10)-(4,11) = "]"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (5,2)-(5,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (5,2)-(5,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (5,2)-(5,3) = "y"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "y"
+ │ │ │ ├── in_loc: (4,0)-(4,2) = "in"
+ │ │ │ └── then_loc: (4,12)-(4,16) = "then"
+ │ │ ├── @ InNode (location: (6,0)-(7,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (6,3)-(6,8))
+ │ │ │ │ ├── constant:
+ │ │ │ │ │ @ ConstantReadNode (location: (6,3)-(6,4))
+ │ │ │ │ │ └── name: :A
+ │ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (6,5)-(6,7))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (6,5)-(6,7))
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── value_loc: (6,5)-(6,6) = "x"
+ │ │ │ │ │ │ ├── closing_loc: (6,6)-(6,7) = ":"
+ │ │ │ │ │ │ └── unescaped: "x"
+ │ │ │ │ │ ├── value: ∅
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ ├── opening_loc: (6,4)-(6,5) = "("
+ │ │ │ │ └── closing_loc: (6,7)-(6,8) = ")"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (7,2)-(7,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (7,2)-(7,6))
+ │ │ │ ├── in_loc: (6,0)-(6,2) = "in"
+ │ │ │ └── then_loc: (6,9)-(6,13) = "then"
+ │ │ ├── @ InNode (location: (8,0)-(9,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (8,3)-(8,8))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (8,4)-(8,7))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ AssocSplatNode (location: (8,4)-(8,7))
+ │ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ │ @ LocalVariableTargetNode (location: (8,6)-(8,7))
+ │ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ │ └── operator_loc: (8,4)-(8,6) = "**"
+ │ │ │ │ │ ├── value: ∅
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ ├── opening_loc: (8,3)-(8,4) = "{"
+ │ │ │ │ └── closing_loc: (8,7)-(8,8) = "}"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (9,2)-(9,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (9,2)-(9,6))
+ │ │ │ ├── in_loc: (8,0)-(8,2) = "in"
+ │ │ │ └── then_loc: (8,9)-(8,13) = "then"
+ │ │ ├── @ InNode (location: (10,0)-(11,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ IfNode (location: (10,3)-(10,13))
+ │ │ │ │ ├── if_keyword_loc: (10,6)-(10,8) = "if"
+ │ │ │ │ ├── predicate:
+ │ │ │ │ │ @ TrueNode (location: (10,9)-(10,13))
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (10,3)-(10,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ HashPatternNode (location: (10,3)-(10,5))
+ │ │ │ │ │ ├── constant: ∅
+ │ │ │ │ │ ├── assocs: (length: 0)
+ │ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ │ ├── opening_loc: (10,3)-(10,4) = "{"
+ │ │ │ │ │ └── closing_loc: (10,4)-(10,5) = "}"
+ │ │ │ │ ├── consequent: ∅
+ │ │ │ │ └── end_keyword_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (11,2)-(11,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (11,2)-(11,6))
+ │ │ │ ├── in_loc: (10,0)-(10,2) = "in"
+ │ │ │ └── then_loc: (10,14)-(10,18) = "then"
+ │ │ ├── @ InNode (location: (12,0)-(13,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ ArrayPatternNode (location: (12,3)-(12,12))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ LocalVariableTargetNode (location: (12,4)-(12,5))
+ │ │ │ │ │ │ ├── name: :x
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── @ LocalVariableTargetNode (location: (12,7)-(12,8))
+ │ │ │ │ │ ├── name: :y
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ SplatNode (location: (12,10)-(12,11))
+ │ │ │ │ │ ├── operator_loc: (12,10)-(12,11) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── opening_loc: (12,3)-(12,4) = "["
+ │ │ │ │ └── closing_loc: (12,11)-(12,12) = "]"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (13,2)-(13,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (13,2)-(13,6))
+ │ │ │ ├── in_loc: (12,0)-(12,2) = "in"
+ │ │ │ └── then_loc: (12,13)-(12,17) = "then"
+ │ │ ├── @ InNode (location: (14,0)-(15,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (14,3)-(14,16))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── assocs: (length: 2)
+ │ │ │ │ │ ├── @ AssocNode (location: (14,4)-(14,8))
+ │ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ │ @ SymbolNode (location: (14,4)-(14,6))
+ │ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ │ ├── value_loc: (14,4)-(14,5) = "a"
+ │ │ │ │ │ │ │ ├── closing_loc: (14,5)-(14,6) = ":"
+ │ │ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ │ @ IntegerNode (location: (14,7)-(14,8))
+ │ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ │ └── @ AssocNode (location: (14,10)-(14,15))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (14,10)-(14,13))
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── value_loc: (14,10)-(14,12) = "aa"
+ │ │ │ │ │ │ ├── closing_loc: (14,12)-(14,13) = ":"
+ │ │ │ │ │ │ └── unescaped: "aa"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ IntegerNode (location: (14,14)-(14,15))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ ├── opening_loc: (14,3)-(14,4) = "{"
+ │ │ │ │ └── closing_loc: (14,15)-(14,16) = "}"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (15,2)-(15,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (15,2)-(15,6))
+ │ │ │ ├── in_loc: (14,0)-(14,2) = "in"
+ │ │ │ └── then_loc: (14,17)-(14,21) = "then"
+ │ │ ├── @ InNode (location: (16,0)-(17,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (16,3)-(16,5))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── assocs: (length: 0)
+ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ ├── opening_loc: (16,3)-(16,4) = "{"
+ │ │ │ │ └── closing_loc: (16,4)-(16,5) = "}"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (17,2)-(17,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (17,2)-(17,6))
+ │ │ │ ├── in_loc: (16,0)-(16,2) = "in"
+ │ │ │ └── then_loc: (16,6)-(16,10) = "then"
+ │ │ ├── @ InNode (location: (18,0)-(19,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (18,3)-(18,10))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (18,4)-(18,9))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ NoKeywordsParameterNode (location: (18,4)-(18,9))
+ │ │ │ │ │ │ ├── operator_loc: (18,4)-(18,6) = "**"
+ │ │ │ │ │ │ └── keyword_loc: (18,6)-(18,9) = "nil"
+ │ │ │ │ │ ├── value: ∅
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ ├── opening_loc: (18,3)-(18,4) = "{"
+ │ │ │ │ └── closing_loc: (18,9)-(18,10) = "}"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (19,2)-(19,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (19,2)-(19,6))
+ │ │ │ ├── in_loc: (18,0)-(18,2) = "in"
+ │ │ │ └── then_loc: (18,11)-(18,15) = "then"
+ │ │ ├── @ InNode (location: (20,0)-(21,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (20,3)-(20,11))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (20,4)-(20,10))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (20,4)-(20,8))
+ │ │ │ │ │ │ ├── opening_loc: (20,4)-(20,5) = "\""
+ │ │ │ │ │ │ ├── value_loc: (20,5)-(20,6) = "a"
+ │ │ │ │ │ │ ├── closing_loc: (20,6)-(20,8) = "\":"
+ │ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ IntegerNode (location: (20,9)-(20,10))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ ├── opening_loc: (20,3)-(20,4) = "{"
+ │ │ │ │ └── closing_loc: (20,10)-(20,11) = "}"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (21,2)-(21,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (21,2)-(21,6))
+ │ │ │ ├── in_loc: (20,0)-(20,2) = "in"
+ │ │ │ └── then_loc: (20,12)-(20,16) = "then"
+ │ │ ├── @ InNode (location: (22,0)-(23,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ AlternationPatternNode (location: (22,3)-(22,8))
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ IntegerNode (location: (22,3)-(22,4))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ IntegerNode (location: (22,7)-(22,8))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── operator_loc: (22,5)-(22,6) = "|"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (23,2)-(23,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (23,2)-(23,6))
+ │ │ │ ├── in_loc: (22,0)-(22,2) = "in"
+ │ │ │ └── then_loc: (22,9)-(22,13) = "then"
+ │ │ ├── @ InNode (location: (24,0)-(25,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ CapturePatternNode (location: (24,3)-(24,9))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ IntegerNode (location: (24,3)-(24,4))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── target:
+ │ │ │ │ │ @ LocalVariableTargetNode (location: (24,8)-(24,9))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: (24,5)-(24,7) = "=>"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (25,2)-(25,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (25,2)-(25,6))
+ │ │ │ ├── in_loc: (24,0)-(24,2) = "in"
+ │ │ │ └── then_loc: (24,10)-(24,14) = "then"
+ │ │ ├── @ InNode (location: (26,0)-(27,6))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ PinnedVariableNode (location: (26,3)-(26,5))
+ │ │ │ │ ├── variable:
+ │ │ │ │ │ @ LocalVariableReadNode (location: (26,4)-(26,5))
+ │ │ │ │ │ ├── name: :x
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── operator_loc: (26,3)-(26,4) = "^"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (27,2)-(27,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ TrueNode (location: (27,2)-(27,6))
+ │ │ │ ├── in_loc: (26,0)-(26,2) = "in"
+ │ │ │ └── then_loc: (26,6)-(26,10) = "then"
+ │ │ ├── @ InNode (location: (28,0)-(28,4))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ IntegerNode (location: (28,3)-(28,4))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── in_loc: (28,0)-(28,2) = "in"
+ │ │ │ └── then_loc: ∅
+ │ │ └── @ InNode (location: (29,0)-(30,6))
+ │ │ ├── pattern:
+ │ │ │ @ IntegerNode (location: (29,3)-(29,4))
+ │ │ │ └── flags: decimal
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (30,2)-(30,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ TrueNode (location: (30,2)-(30,6))
+ │ │ ├── in_loc: (29,0)-(29,2) = "in"
+ │ │ └── then_loc: (29,5)-(29,9) = "then"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (31,0)-(33,3))
+ │ │ ├── else_keyword_loc: (31,0)-(31,4) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (32,2)-(32,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ TrueNode (location: (32,2)-(32,6))
+ │ │ └── end_keyword_loc: (33,0)-(33,3) = "end"
+ │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ │ └── end_keyword_loc: (33,0)-(33,3) = "end"
+ ├── @ CaseNode (location: (34,0)-(36,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (34,5)-(34,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (34,5)-(34,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (35,0)-(35,17))
+ │ │ ├── pattern:
+ │ │ │ @ ArrayPatternNode (location: (35,3)-(35,17))
+ │ │ │ ├── constant:
+ │ │ │ │ @ ConstantReadNode (location: (35,3)-(35,4))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (35,5)-(35,6))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── @ IntegerNode (location: (35,8)-(35,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── rest:
+ │ │ │ │ @ SplatNode (location: (35,11)-(35,13))
+ │ │ │ │ ├── operator_loc: (35,11)-(35,12) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableTargetNode (location: (35,12)-(35,13))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (35,15)-(35,16))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── opening_loc: (35,4)-(35,5) = "["
+ │ │ │ └── closing_loc: (35,16)-(35,17) = "]"
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (35,0)-(35,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (34,0)-(34,4) = "case"
+ │ └── end_keyword_loc: (36,0)-(36,3) = "end"
+ ├── @ CaseNode (location: (37,0)-(40,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (37,5)-(37,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,5)-(37,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ InNode (location: (38,0)-(38,4))
+ │ │ ├── pattern:
+ │ │ │ @ ConstantReadNode (location: (38,3)-(38,4))
+ │ │ │ └── name: :A
+ │ │ ├── statements: ∅
+ │ │ ├── in_loc: (38,0)-(38,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (39,0)-(40,3))
+ │ │ ├── else_keyword_loc: (39,0)-(39,4) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (40,0)-(40,3) = "end"
+ │ ├── case_keyword_loc: (37,0)-(37,4) = "case"
+ │ └── end_keyword_loc: (40,0)-(40,3) = "end"
+ └── @ MatchPredicateNode (location: (41,0)-(41,8))
+ ├── value:
+ │ @ IntegerNode (location: (41,0)-(41,1))
+ │ └── flags: decimal
+ ├── pattern:
+ │ @ ArrayPatternNode (location: (41,5)-(41,8))
+ │ ├── constant: ∅
+ │ ├── requireds: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (41,6)-(41,7))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── opening_loc: (41,5)-(41,6) = "["
+ │ └── closing_loc: (41,7)-(41,8) = "]"
+ └── operator_loc: (41,2)-(41,4) = "in"
diff --git a/test/prism/snapshots/unparser/corpus/literal/pragma.txt b/test/prism/snapshots/unparser/corpus/literal/pragma.txt
new file mode 100644
index 0000000000..5247dcc4f5
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/pragma.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(4,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,7))
+ └── body: (length: 4)
+ ├── @ SourceEncodingNode (location: (1,0)-(1,12))
+ ├── @ SourceFileNode (location: (2,0)-(2,8))
+ │ └── filepath: "unparser/corpus/literal/pragma.txt"
+ ├── @ SourceLineNode (location: (3,0)-(3,8))
+ └── @ CallNode (location: (4,0)-(4,7))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (4,0)-(4,7) = "__dir__"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "__dir__"
diff --git a/test/prism/snapshots/unparser/corpus/literal/range.txt b/test/prism/snapshots/unparser/corpus/literal/range.txt
new file mode 100644
index 0000000000..8d22fd530e
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/range.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(4,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,5))
+ └── body: (length: 4)
+ ├── @ ParenthesesNode (location: (1,0)-(1,5))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,1)-(1,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RangeNode (location: (1,1)-(1,4))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── right: ∅
+ │ │ ├── operator_loc: (1,2)-(1,4) = ".."
+ │ │ └── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "("
+ │ └── closing_loc: (1,4)-(1,5) = ")"
+ ├── @ RangeNode (location: (2,0)-(2,4))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (2,0)-(2,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ IntegerNode (location: (2,3)-(2,4))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (2,1)-(2,3) = ".."
+ │ └── flags: ∅
+ ├── @ ParenthesesNode (location: (3,0)-(3,6))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,1)-(3,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RangeNode (location: (3,1)-(3,5))
+ │ │ ├── left:
+ │ │ │ @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── right: ∅
+ │ │ ├── operator_loc: (3,2)-(3,5) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── opening_loc: (3,0)-(3,1) = "("
+ │ └── closing_loc: (3,5)-(3,6) = ")"
+ └── @ RangeNode (location: (4,0)-(4,5))
+ ├── left:
+ │ @ IntegerNode (location: (4,0)-(4,1))
+ │ └── flags: decimal
+ ├── right:
+ │ @ IntegerNode (location: (4,4)-(4,5))
+ │ └── flags: decimal
+ ├── operator_loc: (4,1)-(4,4) = "..."
+ └── flags: exclude_end
diff --git a/test/prism/snapshots/unparser/corpus/literal/rescue.txt b/test/prism/snapshots/unparser/corpus/literal/rescue.txt
new file mode 100644
index 0000000000..0472a94534
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/rescue.txt
@@ -0,0 +1,99 @@
+@ ProgramNode (location: (1,0)-(3,27))
+├── locals: [:x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,27))
+ └── body: (length: 3)
+ ├── @ RescueModifierNode (location: (1,0)-(1,14))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── keyword_loc: (1,4)-(1,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (1,11)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ RescueModifierNode (location: (2,0)-(2,21))
+ │ ├── expression:
+ │ │ @ CallNode (location: (2,0)-(2,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── keyword_loc: (2,4)-(2,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ ReturnNode (location: (2,11)-(2,21))
+ │ ├── keyword_loc: (2,11)-(2,17) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (2,18)-(2,21))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (2,18)-(2,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,18)-(2,21) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ └── @ LocalVariableWriteNode (location: (3,0)-(3,27))
+ ├── name: :x
+ ├── depth: 0
+ ├── name_loc: (3,0)-(3,1) = "x"
+ ├── value:
+ │ @ ParenthesesNode (location: (3,4)-(3,27))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,5)-(3,26))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (3,5)-(3,26))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (3,5)-(3,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,5)-(3,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── keyword_loc: (3,9)-(3,15) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ ReturnNode (location: (3,16)-(3,26))
+ │ │ ├── keyword_loc: (3,16)-(3,22) = "return"
+ │ │ └── arguments:
+ │ │ @ ArgumentsNode (location: (3,23)-(3,26))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,23)-(3,26))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,23)-(3,26) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── opening_loc: (3,4)-(3,5) = "("
+ │ └── closing_loc: (3,26)-(3,27) = ")"
+ └── operator_loc: (3,2)-(3,3) = "="
diff --git a/test/prism/snapshots/unparser/corpus/literal/send.txt b/test/prism/snapshots/unparser/corpus/literal/send.txt
new file mode 100644
index 0000000000..d2ec4b582f
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/send.txt
@@ -0,0 +1,2117 @@
+@ ProgramNode (location: (1,0)-(84,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(84,7))
+ └── body: (length: 62)
+ ├── @ ModuleNode (location: (1,0)-(3,3))
+ │ ├── locals: [:foo, :a, :_]
+ │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (1,7)-(1,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableOrWriteNode (location: (2,2)-(2,22))
+ │ │ ├── name_loc: (2,2)-(2,5) = "foo"
+ │ │ ├── operator_loc: (2,6)-(2,9) = "||="
+ │ │ ├── value:
+ │ │ │ @ ParenthesesNode (location: (2,10)-(2,22))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (2,11)-(2,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ MultiWriteNode (location: (2,11)-(2,21))
+ │ │ │ │ ├── targets: (length: 2)
+ │ │ │ │ │ ├── @ LocalVariableTargetNode (location: (2,12)-(2,13))
+ │ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── @ LocalVariableTargetNode (location: (2,15)-(2,16))
+ │ │ │ │ │ ├── name: :_
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── lparen_loc: (2,11)-(2,12) = "("
+ │ │ │ │ ├── rparen_loc: (2,16)-(2,17) = ")"
+ │ │ │ │ ├── operator_loc: (2,18)-(2,19) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (2,20)-(2,21))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ ├── opening_loc: (2,10)-(2,11) = "("
+ │ │ │ └── closing_loc: (2,21)-(2,22) = ")"
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── end_keyword_loc: (3,0)-(3,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (5,0)-(8,3))
+ │ ├── locals: [:local]
+ │ ├── module_keyword_loc: (5,0)-(5,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (5,7)-(5,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (6,2)-(7,11))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ LocalVariableWriteNode (location: (6,2)-(6,11))
+ │ │ │ ├── name: :local
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (6,2)-(6,7) = "local"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (6,10)-(6,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: (6,8)-(6,9) = "="
+ │ │ └── @ CallNode (location: (7,2)-(7,11))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (7,2)-(7,7))
+ │ │ │ ├── name: :local
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: (7,7)-(7,8) = "."
+ │ │ ├── message_loc: (7,8)-(7,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── end_keyword_loc: (8,0)-(8,3) = "end"
+ │ └── name: :A
+ ├── @ CallNode (location: (9,0)-(10,7))
+ │ ├── receiver:
+ │ │ @ ClassNode (location: (9,0)-(10,3))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (9,0)-(9,5) = "class"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (9,6)-(9,7))
+ │ │ │ └── name: :A
+ │ │ ├── inheritance_operator_loc: ∅
+ │ │ ├── superclass: ∅
+ │ │ ├── body: ∅
+ │ │ ├── end_keyword_loc: (10,0)-(10,3) = "end"
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (10,3)-(10,4) = "."
+ │ ├── message_loc: (10,4)-(10,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (11,0)-(12,7))
+ │ ├── receiver:
+ │ │ @ ModuleNode (location: (11,0)-(12,3))
+ │ │ ├── locals: []
+ │ │ ├── module_keyword_loc: (11,0)-(11,6) = "module"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (11,7)-(11,8))
+ │ │ │ └── name: :A
+ │ │ ├── body: ∅
+ │ │ ├── end_keyword_loc: (12,0)-(12,3) = "end"
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (12,3)-(12,4) = "."
+ │ ├── message_loc: (12,4)-(12,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (13,0)-(15,7))
+ │ ├── receiver:
+ │ │ @ BeginNode (location: (13,0)-(15,3))
+ │ │ ├── begin_keyword_loc: (13,0)-(13,5) = "begin"
+ │ │ ├── statements: ∅
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (14,0)-(14,6))
+ │ │ │ ├── keyword_loc: (14,0)-(14,6) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (15,0)-(15,3) = "end"
+ │ ├── call_operator_loc: (15,3)-(15,4) = "."
+ │ ├── message_loc: (15,4)-(15,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (16,0)-(19,7))
+ │ ├── receiver:
+ │ │ @ CaseNode (location: (16,0)-(19,3))
+ │ │ ├── predicate:
+ │ │ │ @ ParenthesesNode (location: (16,5)-(17,10))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (16,6)-(17,9))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ DefNode (location: (16,6)-(17,3))
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── name_loc: (16,10)-(16,13) = "foo"
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── def_keyword_loc: (16,6)-(16,9) = "def"
+ │ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ │ ├── lparen_loc: ∅
+ │ │ │ │ │ ├── rparen_loc: ∅
+ │ │ │ │ │ ├── equal_loc: ∅
+ │ │ │ │ │ └── end_keyword_loc: (17,0)-(17,3) = "end"
+ │ │ │ │ └── @ SymbolNode (location: (17,5)-(17,9))
+ │ │ │ │ ├── opening_loc: (17,5)-(17,6) = ":"
+ │ │ │ │ ├── value_loc: (17,6)-(17,9) = "bar"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "bar"
+ │ │ │ ├── opening_loc: (16,5)-(16,6) = "("
+ │ │ │ └── closing_loc: (17,9)-(17,10) = ")"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ WhenNode (location: (18,0)-(18,8))
+ │ │ │ ├── keyword_loc: (18,0)-(18,4) = "when"
+ │ │ │ ├── conditions: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (18,5)-(18,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,5)-(18,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── statements: ∅
+ │ │ ├── consequent: ∅
+ │ │ ├── case_keyword_loc: (16,0)-(16,4) = "case"
+ │ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ │ ├── call_operator_loc: (19,3)-(19,4) = "."
+ │ ├── message_loc: (19,4)-(19,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "baz"
+ ├── @ CallNode (location: (20,0)-(22,7))
+ │ ├── receiver:
+ │ │ @ CaseNode (location: (20,0)-(22,3))
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (20,5)-(20,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (20,5)-(20,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── conditions: (length: 1)
+ │ │ │ └── @ WhenNode (location: (21,0)-(21,8))
+ │ │ │ ├── keyword_loc: (21,0)-(21,4) = "when"
+ │ │ │ ├── conditions: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (21,5)-(21,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (21,5)-(21,8) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── statements: ∅
+ │ │ ├── consequent: ∅
+ │ │ ├── case_keyword_loc: (20,0)-(20,4) = "case"
+ │ │ └── end_keyword_loc: (22,0)-(22,3) = "end"
+ │ ├── call_operator_loc: (22,3)-(22,4) = "."
+ │ ├── message_loc: (22,4)-(22,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "baz"
+ ├── @ CallNode (location: (23,0)-(24,7))
+ │ ├── receiver:
+ │ │ @ SingletonClassNode (location: (23,0)-(24,3))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (23,0)-(23,5) = "class"
+ │ │ ├── operator_loc: (23,6)-(23,8) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (23,9)-(23,13))
+ │ │ ├── body: ∅
+ │ │ └── end_keyword_loc: (24,0)-(24,3) = "end"
+ │ ├── call_operator_loc: (24,3)-(24,4) = "."
+ │ ├── message_loc: (24,4)-(24,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (25,0)-(26,7))
+ │ ├── receiver:
+ │ │ @ DefNode (location: (25,0)-(26,3))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (25,9)-(25,12) = "foo"
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (25,4)-(25,8))
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── locals: []
+ │ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
+ │ │ ├── operator_loc: (25,8)-(25,9) = "."
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (26,0)-(26,3) = "end"
+ │ ├── call_operator_loc: (26,3)-(26,4) = "."
+ │ ├── message_loc: (26,4)-(26,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (27,0)-(28,7))
+ │ ├── receiver:
+ │ │ @ DefNode (location: (27,0)-(28,3))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (27,4)-(27,7) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── locals: []
+ │ │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (28,0)-(28,3) = "end"
+ │ ├── call_operator_loc: (28,3)-(28,4) = "."
+ │ ├── message_loc: (28,4)-(28,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (29,0)-(30,7))
+ │ ├── receiver:
+ │ │ @ UntilNode (location: (29,0)-(30,3))
+ │ │ ├── keyword_loc: (29,0)-(29,5) = "until"
+ │ │ ├── closing_loc: (30,0)-(30,3) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (29,6)-(29,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,6)-(29,9) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── statements: ∅
+ │ │ └── flags: ∅
+ │ ├── call_operator_loc: (30,3)-(30,4) = "."
+ │ ├── message_loc: (30,4)-(30,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (31,0)-(32,7))
+ │ ├── receiver:
+ │ │ @ WhileNode (location: (31,0)-(32,3))
+ │ │ ├── keyword_loc: (31,0)-(31,5) = "while"
+ │ │ ├── closing_loc: (32,0)-(32,3) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (31,6)-(31,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (31,6)-(31,9) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── statements: ∅
+ │ │ └── flags: ∅
+ │ ├── call_operator_loc: (32,3)-(32,4) = "."
+ │ ├── message_loc: (32,4)-(32,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (33,0)-(34,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (33,0)-(34,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (33,0)-(33,4) = "loop"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (33,5)-(34,1))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (33,5)-(33,6) = "{"
+ │ │ │ └── closing_loc: (34,0)-(34,1) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "loop"
+ │ ├── call_operator_loc: (34,1)-(34,2) = "."
+ │ ├── message_loc: (34,2)-(34,5) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (35,0)-(36,7))
+ │ ├── receiver:
+ │ │ @ IfNode (location: (35,0)-(36,3))
+ │ │ ├── if_keyword_loc: (35,0)-(35,2) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (35,3)-(35,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (35,3)-(35,6) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── statements: ∅
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: (36,0)-(36,3) = "end"
+ │ ├── call_operator_loc: (36,3)-(36,4) = "."
+ │ ├── message_loc: (36,4)-(36,7) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "baz"
+ ├── @ CallNode (location: (37,0)-(37,19))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (37,0)-(37,15))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (37,1)-(37,14))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (37,1)-(37,14))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ RegularExpressionNode (location: (37,1)-(37,6))
+ │ │ │ │ ├── opening_loc: (37,1)-(37,2) = "/"
+ │ │ │ │ ├── content_loc: (37,2)-(37,5) = "bar"
+ │ │ │ │ ├── closing_loc: (37,5)-(37,6) = "/"
+ │ │ │ │ ├── unescaped: "bar"
+ │ │ │ │ └── flags: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,7)-(37,9) = "=~"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (37,10)-(37,14))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (37,10)-(37,14))
+ │ │ │ │ ├── opening_loc: (37,10)-(37,11) = ":"
+ │ │ │ │ ├── value_loc: (37,11)-(37,14) = "foo"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "=~"
+ │ │ ├── opening_loc: (37,0)-(37,1) = "("
+ │ │ └── closing_loc: (37,14)-(37,15) = ")"
+ │ ├── call_operator_loc: (37,15)-(37,16) = "."
+ │ ├── message_loc: (37,16)-(37,19) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (38,0)-(38,10))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (38,0)-(38,6))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (38,1)-(38,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ RangeNode (location: (38,1)-(38,5))
+ │ │ │ ├── left:
+ │ │ │ │ @ IntegerNode (location: (38,1)-(38,2))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── right:
+ │ │ │ │ @ IntegerNode (location: (38,4)-(38,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── operator_loc: (38,2)-(38,4) = ".."
+ │ │ │ └── flags: ∅
+ │ │ ├── opening_loc: (38,0)-(38,1) = "("
+ │ │ └── closing_loc: (38,5)-(38,6) = ")"
+ │ ├── call_operator_loc: (38,6)-(38,7) = "."
+ │ ├── message_loc: (38,7)-(38,10) = "max"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "max"
+ ├── @ CallNode (location: (39,0)-(39,18))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (39,0)-(39,14))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (39,1)-(39,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (39,1)-(39,13))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (39,1)-(39,4))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (39,1)-(39,4) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (39,5)-(39,7) = "=~"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (39,8)-(39,13))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ RegularExpressionNode (location: (39,8)-(39,13))
+ │ │ │ │ ├── opening_loc: (39,8)-(39,9) = "/"
+ │ │ │ │ ├── content_loc: (39,9)-(39,12) = "bar"
+ │ │ │ │ ├── closing_loc: (39,12)-(39,13) = "/"
+ │ │ │ │ ├── unescaped: "bar"
+ │ │ │ │ └── flags: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "=~"
+ │ │ ├── opening_loc: (39,0)-(39,1) = "("
+ │ │ └── closing_loc: (39,13)-(39,14) = ")"
+ │ ├── call_operator_loc: (39,14)-(39,15) = "."
+ │ ├── message_loc: (39,15)-(39,18) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (40,0)-(40,13))
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (40,0)-(40,5))
+ │ │ ├── opening_loc: (40,0)-(40,1) = "/"
+ │ │ ├── content_loc: (40,1)-(40,4) = "bar"
+ │ │ ├── closing_loc: (40,4)-(40,5) = "/"
+ │ │ ├── unescaped: "bar"
+ │ │ └── flags: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (40,6)-(40,8) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (40,9)-(40,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (40,9)-(40,13))
+ │ │ ├── opening_loc: (40,9)-(40,10) = ":"
+ │ │ ├── value_loc: (40,10)-(40,13) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=~"
+ ├── @ CallNode (location: (41,0)-(41,12))
+ │ ├── receiver:
+ │ │ @ RegularExpressionNode (location: (41,0)-(41,5))
+ │ │ ├── opening_loc: (41,0)-(41,1) = "/"
+ │ │ ├── content_loc: (41,1)-(41,4) = "bar"
+ │ │ ├── closing_loc: (41,4)-(41,5) = "/"
+ │ │ ├── unescaped: "bar"
+ │ │ └── flags: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (41,6)-(41,8) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,9)-(41,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (41,9)-(41,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (41,9)-(41,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=~"
+ ├── @ RangeNode (location: (42,0)-(42,8))
+ │ ├── left:
+ │ │ @ IntegerNode (location: (42,0)-(42,1))
+ │ │ └── flags: decimal
+ │ ├── right:
+ │ │ @ CallNode (location: (42,3)-(42,8))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (42,3)-(42,4))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: (42,4)-(42,5) = "."
+ │ │ ├── message_loc: (42,5)-(42,8) = "max"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "max"
+ │ ├── operator_loc: (42,1)-(42,3) = ".."
+ │ └── flags: ∅
+ ├── @ CallNode (location: (43,0)-(43,5))
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (43,0)-(43,1))
+ │ │ └── name: :A
+ │ ├── call_operator_loc: (43,1)-(43,2) = "."
+ │ ├── message_loc: (43,2)-(43,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (44,0)-(44,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (44,0)-(44,3) = "FOO"
+ │ ├── opening_loc: (44,3)-(44,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (44,4)-(44,5) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "FOO"
+ ├── @ CallNode (location: (45,0)-(45,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (45,0)-(45,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,0)-(45,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (45,1)-(45,3) = "&."
+ │ ├── message_loc: (45,3)-(45,4) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "b"
+ ├── @ CallNode (location: (46,0)-(46,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (46,0)-(46,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (46,0)-(46,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (46,1)-(46,2) = "."
+ │ ├── message_loc: (46,2)-(46,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (47,0)-(47,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (47,0)-(47,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── @ CallNode (location: (48,0)-(48,18))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (48,0)-(48,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (48,0)-(48,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (48,4)-(48,6) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (48,7)-(48,18))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (48,7)-(48,18))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (48,8)-(48,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (48,8)-(48,17))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (48,8)-(48,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (48,8)-(48,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (48,12)-(48,13) = "*"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (48,14)-(48,17))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (48,14)-(48,17))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (48,14)-(48,17) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "*"
+ │ │ ├── opening_loc: (48,7)-(48,8) = "("
+ │ │ └── closing_loc: (48,17)-(48,18) = ")"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<<"
+ ├── @ CallNode (location: (49,0)-(49,12))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (49,0)-(49,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (49,0)-(49,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (49,4)-(49,6) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (49,7)-(49,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RegularExpressionNode (location: (49,7)-(49,12))
+ │ │ ├── opening_loc: (49,7)-(49,8) = "/"
+ │ │ ├── content_loc: (49,8)-(49,11) = "bar"
+ │ │ ├── closing_loc: (49,11)-(49,12) = "/"
+ │ │ ├── unescaped: "bar"
+ │ │ └── flags: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=~"
+ ├── @ CallNode (location: (50,0)-(50,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (50,0)-(50,3) = "foo"
+ │ ├── opening_loc: (50,3)-(50,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (50,17)-(50,18) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (50,4)-(50,17))
+ │ │ ├── expression:
+ │ │ │ @ ParenthesesNode (location: (50,5)-(50,17))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (50,6)-(50,16))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ OrNode (location: (50,6)-(50,16))
+ │ │ │ │ ├── left:
+ │ │ │ │ │ @ CallNode (location: (50,6)-(50,9))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (50,6)-(50,9) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "foo"
+ │ │ │ │ ├── right:
+ │ │ │ │ │ @ CallNode (location: (50,13)-(50,16))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (50,13)-(50,16) = "bar"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ └── operator_loc: (50,10)-(50,12) = "||"
+ │ │ │ ├── opening_loc: (50,5)-(50,6) = "("
+ │ │ │ └── closing_loc: (50,16)-(50,17) = ")"
+ │ │ └── operator_loc: (50,4)-(50,5) = "&"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (51,0)-(51,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (51,0)-(51,3) = "foo"
+ │ ├── opening_loc: (51,3)-(51,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (51,10)-(51,11) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (51,4)-(51,10))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (51,5)-(51,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (51,5)-(51,10) = "block"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "block"
+ │ │ └── operator_loc: (51,4)-(51,5) = "&"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (52,0)-(52,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (52,0)-(52,3) = "foo"
+ │ ├── opening_loc: (52,3)-(52,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (52,4)-(52,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (52,4)-(52,9))
+ │ │ ├── operator_loc: (52,4)-(52,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (52,5)-(52,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (52,5)-(52,9) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "args"
+ │ ├── closing_loc: (52,17)-(52,18) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (52,11)-(52,17))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (52,12)-(52,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (52,12)-(52,17) = "block"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "block"
+ │ │ └── operator_loc: (52,11)-(52,12) = "&"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (53,0)-(53,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (53,0)-(53,3) = "foo"
+ │ ├── opening_loc: (53,3)-(53,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (53,4)-(53,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (53,4)-(53,14))
+ │ │ ├── operator_loc: (53,4)-(53,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (53,5)-(53,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (53,5)-(53,14) = "arguments"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "arguments"
+ │ ├── closing_loc: (53,14)-(53,15) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (54,0)-(54,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (54,0)-(54,3) = "foo"
+ │ ├── opening_loc: (54,3)-(54,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (54,4)-(54,8))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (54,4)-(54,5))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (54,7)-(54,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (54,8)-(54,9) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (55,0)-(55,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (55,0)-(55,3) = "foo"
+ │ ├── opening_loc: (55,3)-(55,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (55,4)-(55,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (55,4)-(55,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (55,4)-(55,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (55,7)-(55,8) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (56,0)-(56,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (56,0)-(56,3) = "foo"
+ │ ├── opening_loc: (56,3)-(56,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (56,4)-(56,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (56,4)-(56,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (56,4)-(56,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── @ SplatNode (location: (56,9)-(56,14))
+ │ │ ├── operator_loc: (56,9)-(56,10) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (56,10)-(56,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (56,10)-(56,14) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "args"
+ │ ├── closing_loc: (56,14)-(56,15) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (57,0)-(57,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (57,0)-(57,3) = "foo"
+ │ ├── opening_loc: (57,3)-(57,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (57,4)-(57,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (57,4)-(57,16))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (57,4)-(57,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (57,4)-(57,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (57,8)-(57,10) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (57,11)-(57,16))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ RegularExpressionNode (location: (57,11)-(57,16))
+ │ │ │ ├── opening_loc: (57,11)-(57,12) = "/"
+ │ │ │ ├── content_loc: (57,12)-(57,15) = "bar"
+ │ │ │ ├── closing_loc: (57,15)-(57,16) = "/"
+ │ │ │ ├── unescaped: "bar"
+ │ │ │ └── flags: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "=~"
+ │ ├── closing_loc: (57,16)-(57,17) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (58,0)-(58,12))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (58,0)-(58,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (58,0)-(58,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (58,3)-(58,4) = "."
+ │ ├── message_loc: (58,4)-(58,7) = "bar"
+ │ ├── opening_loc: (58,7)-(58,8) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (58,12)-(58,13) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (58,8)-(58,12))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (58,9)-(58,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (58,9)-(58,12) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (58,8)-(58,9) = "&"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (59,0)-(59,26))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (59,0)-(59,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (59,0)-(59,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (59,3)-(59,4) = "."
+ │ ├── message_loc: (59,4)-(59,7) = "bar"
+ │ ├── opening_loc: (59,7)-(59,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (59,8)-(59,25))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ SplatNode (location: (59,8)-(59,13))
+ │ │ │ ├── operator_loc: (59,8)-(59,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (59,9)-(59,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (59,9)-(59,13) = "arga"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "arga"
+ │ │ ├── @ CallNode (location: (59,15)-(59,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (59,15)-(59,18) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ SplatNode (location: (59,20)-(59,25))
+ │ │ ├── operator_loc: (59,20)-(59,21) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (59,21)-(59,25))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (59,21)-(59,25) = "argb"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "argb"
+ │ ├── closing_loc: (59,25)-(59,26) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (60,0)-(60,14))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (60,0)-(60,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (60,0)-(60,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (60,3)-(60,4) = "."
+ │ ├── message_loc: (60,4)-(60,7) = "bar"
+ │ ├── opening_loc: (60,7)-(60,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (60,8)-(60,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (60,8)-(60,13))
+ │ │ ├── operator_loc: (60,8)-(60,9) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (60,9)-(60,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (60,9)-(60,13) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "args"
+ │ ├── closing_loc: (60,13)-(60,14) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (61,0)-(61,19))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (61,0)-(61,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (61,0)-(61,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (61,3)-(61,4) = "."
+ │ ├── message_loc: (61,4)-(61,7) = "bar"
+ │ ├── opening_loc: (61,7)-(61,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (61,8)-(61,18))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SplatNode (location: (61,8)-(61,13))
+ │ │ │ ├── operator_loc: (61,8)-(61,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (61,9)-(61,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (61,9)-(61,13) = "args"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "args"
+ │ │ └── @ CallNode (location: (61,15)-(61,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (61,15)-(61,18) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: (61,18)-(61,19) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (62,0)-(62,18))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (62,0)-(62,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (62,0)-(62,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (62,3)-(62,4) = "."
+ │ ├── message_loc: (62,4)-(62,7) = "bar"
+ │ ├── opening_loc: (62,7)-(62,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (62,8)-(62,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (62,8)-(62,12))
+ │ │ ├── opening_loc: (62,8)-(62,9) = ":"
+ │ │ ├── value_loc: (62,9)-(62,12) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ ├── closing_loc: (62,18)-(62,19) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (62,14)-(62,18))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (62,15)-(62,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (62,15)-(62,18) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (62,14)-(62,15) = "&"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (63,0)-(63,17))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (63,0)-(63,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (63,0)-(63,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (63,3)-(63,4) = "."
+ │ ├── message_loc: (63,4)-(63,7) = "bar"
+ │ ├── opening_loc: (63,7)-(63,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (63,8)-(63,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (63,8)-(63,16))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (63,8)-(63,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (63,8)-(63,12))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (63,8)-(63,11) = "baz"
+ │ │ │ ├── closing_loc: (63,11)-(63,12) = ":"
+ │ │ │ └── unescaped: "baz"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (63,13)-(63,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (63,13)-(63,16) = "boz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "boz"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (63,16)-(63,17) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (64,0)-(64,26))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (64,0)-(64,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (64,0)-(64,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (64,3)-(64,4) = "."
+ │ ├── message_loc: (64,4)-(64,7) = "bar"
+ │ ├── opening_loc: (64,7)-(64,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (64,8)-(64,25))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (64,8)-(64,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (64,8)-(64,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ KeywordHashNode (location: (64,13)-(64,25))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (64,13)-(64,25))
+ │ │ ├── key:
+ │ │ │ @ StringNode (location: (64,13)-(64,18))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (64,13)-(64,14) = "\""
+ │ │ │ ├── content_loc: (64,14)-(64,17) = "baz"
+ │ │ │ ├── closing_loc: (64,17)-(64,18) = "\""
+ │ │ │ └── unescaped: "baz"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (64,22)-(64,25))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (64,22)-(64,25) = "boz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "boz"
+ │ │ └── operator_loc: (64,19)-(64,21) = "=>"
+ │ ├── closing_loc: (64,25)-(64,26) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (65,0)-(65,19))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (65,0)-(65,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (65,0)-(65,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (65,3)-(65,4) = "."
+ │ ├── message_loc: (65,4)-(65,7) = "bar"
+ │ ├── opening_loc: (65,7)-(65,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (65,8)-(65,18))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (65,8)-(65,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (65,8)-(65,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ SplatNode (location: (65,13)-(65,18))
+ │ │ ├── operator_loc: (65,13)-(65,14) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (65,14)-(65,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (65,14)-(65,18) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "args"
+ │ ├── closing_loc: (65,18)-(65,19) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (66,0)-(66,26))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (66,0)-(66,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (66,0)-(66,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (66,3)-(66,4) = "."
+ │ ├── message_loc: (66,4)-(66,7) = "bar"
+ │ ├── opening_loc: (66,7)-(66,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (66,8)-(66,18))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (66,8)-(66,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (66,8)-(66,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ SplatNode (location: (66,13)-(66,18))
+ │ │ ├── operator_loc: (66,13)-(66,14) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (66,14)-(66,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (66,14)-(66,18) = "args"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "args"
+ │ ├── closing_loc: (66,26)-(66,27) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (66,20)-(66,26))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (66,21)-(66,26))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (66,21)-(66,26) = "block"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "block"
+ │ │ └── operator_loc: (66,20)-(66,21) = "&"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (67,0)-(67,16))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (67,0)-(67,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (67,0)-(67,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (67,3)-(67,4) = "."
+ │ ├── message_loc: (67,4)-(67,7) = "bar"
+ │ ├── opening_loc: (67,7)-(67,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (67,8)-(67,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (67,8)-(67,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (67,8)-(67,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ HashNode (location: (67,13)-(67,15))
+ │ │ ├── opening_loc: (67,13)-(67,14) = "{"
+ │ │ ├── elements: (length: 0)
+ │ │ └── closing_loc: (67,14)-(67,15) = "}"
+ │ ├── closing_loc: (67,15)-(67,16) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (68,0)-(68,26))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (68,0)-(68,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (68,0)-(68,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (68,3)-(68,4) = "."
+ │ ├── message_loc: (68,4)-(68,7) = "bar"
+ │ ├── opening_loc: (68,7)-(68,8) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (68,8)-(68,25))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ HashNode (location: (68,8)-(68,20))
+ │ │ │ ├── opening_loc: (68,8)-(68,9) = "{"
+ │ │ │ ├── elements: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (68,10)-(68,18))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (68,10)-(68,14))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (68,10)-(68,13) = "foo"
+ │ │ │ │ │ ├── closing_loc: (68,13)-(68,14) = ":"
+ │ │ │ │ │ └── unescaped: "foo"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (68,15)-(68,18))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (68,15)-(68,18) = "boz"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "boz"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── closing_loc: (68,19)-(68,20) = "}"
+ │ │ └── @ CallNode (location: (68,22)-(68,25))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (68,22)-(68,25) = "boz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "boz"
+ │ ├── closing_loc: (68,25)-(68,26) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── @ CallNode (location: (69,0)-(69,12))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (69,0)-(69,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (69,0)-(69,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (69,3)-(69,4) = "."
+ │ ├── message_loc: (69,4)-(69,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (69,8)-(69,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (69,8)-(69,12))
+ │ │ ├── opening_loc: (69,8)-(69,9) = ":"
+ │ │ ├── value_loc: (69,9)-(69,12) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar="
+ ├── @ CallNode (location: (70,0)-(70,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (70,0)-(70,3) = "foo"
+ │ ├── opening_loc: (70,3)-(70,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (70,4)-(70,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (70,4)-(70,8))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (70,4)-(70,8))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (70,4)-(70,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (70,4)-(70,5) = "a"
+ │ │ │ ├── closing_loc: (70,5)-(70,6) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (70,7)-(70,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (70,7)-(70,8) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (70,8)-(70,9) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (71,0)-(71,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (71,0)-(71,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (71,0)-(71,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (71,3)-(71,4) = "."
+ │ ├── message_loc: (71,4)-(71,5) = "&"
+ │ ├── opening_loc: (71,5)-(71,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (71,6)-(71,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (71,6)-(71,10))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (71,6)-(71,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (71,6)-(71,8))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (71,6)-(71,7) = "a"
+ │ │ │ ├── closing_loc: (71,7)-(71,8) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (71,9)-(71,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (71,9)-(71,10) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (71,10)-(71,11) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "&"
+ ├── @ CallNode (location: (72,0)-(72,10))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (72,0)-(72,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (72,0)-(72,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (72,3)-(72,4) = "."
+ │ ├── message_loc: (72,4)-(72,5) = "&"
+ │ ├── opening_loc: (72,5)-(72,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (72,6)-(72,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (72,6)-(72,9))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (72,6)-(72,9))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (72,8)-(72,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (72,8)-(72,9) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ └── operator_loc: (72,6)-(72,8) = "**"
+ │ ├── closing_loc: (72,9)-(72,10) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "&"
+ ├── @ CallNode (location: (73,0)-(73,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (73,0)-(73,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (73,0)-(73,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (73,3)-(73,9) = "[*baz]"
+ │ ├── opening_loc: (73,3)-(73,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (73,4)-(73,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (73,4)-(73,8))
+ │ │ ├── operator_loc: (73,4)-(73,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (73,5)-(73,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (73,5)-(73,8) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── closing_loc: (73,8)-(73,9) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (74,0)-(74,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (74,0)-(74,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (74,0)-(74,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (74,3)-(74,9) = "[1, 2]"
+ │ ├── opening_loc: (74,3)-(74,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (74,4)-(74,8))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ IntegerNode (location: (74,4)-(74,5))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (74,7)-(74,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (74,8)-(74,9) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (75,0)-(75,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (75,0)-(75,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (75,0)-(75,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (75,3)-(75,5) = "[]"
+ │ ├── opening_loc: (75,3)-(75,4) = "["
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (75,4)-(75,5) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ CallNode (location: (76,0)-(76,8))
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (76,0)-(76,4))
+ │ ├── call_operator_loc: (76,4)-(76,5) = "."
+ │ ├── message_loc: (76,5)-(76,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (77,0)-(77,13))
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (77,0)-(77,4))
+ │ ├── call_operator_loc: (77,4)-(77,5) = "."
+ │ ├── message_loc: (77,5)-(77,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (77,9)-(77,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (77,9)-(77,13))
+ │ │ ├── opening_loc: (77,9)-(77,10) = ":"
+ │ │ ├── value_loc: (77,10)-(77,13) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo="
+ ├── @ CallNode (location: (78,0)-(78,17))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (78,0)-(78,7))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (78,1)-(78,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (78,1)-(78,6))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (78,1)-(78,2))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (78,1)-(78,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (78,3)-(78,4) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (78,5)-(78,6))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (78,5)-(78,6))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (78,5)-(78,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── opening_loc: (78,0)-(78,1) = "("
+ │ │ └── closing_loc: (78,6)-(78,7) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (78,8)-(78,9) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (78,10)-(78,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (78,10)-(78,17))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (78,11)-(78,16))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (78,11)-(78,16))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (78,11)-(78,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (78,11)-(78,12) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (78,13)-(78,14) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (78,15)-(78,16))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (78,15)-(78,16))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (78,15)-(78,16) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "d"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "-"
+ │ │ ├── opening_loc: (78,10)-(78,11) = "("
+ │ │ └── closing_loc: (78,16)-(78,17) = ")"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "/"
+ ├── @ CallNode (location: (79,0)-(79,19))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (79,0)-(79,7))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (79,1)-(79,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (79,1)-(79,6))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (79,1)-(79,2))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (79,1)-(79,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (79,3)-(79,4) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (79,5)-(79,6))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (79,5)-(79,6))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (79,5)-(79,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── opening_loc: (79,0)-(79,1) = "("
+ │ │ └── closing_loc: (79,6)-(79,7) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (79,8)-(79,9) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (79,10)-(79,19))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (79,10)-(79,19))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (79,10)-(79,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (79,10)-(79,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── call_operator_loc: (79,11)-(79,12) = "."
+ │ │ ├── message_loc: (79,12)-(79,13) = "-"
+ │ │ ├── opening_loc: (79,13)-(79,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (79,14)-(79,18))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ CallNode (location: (79,14)-(79,15))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (79,14)-(79,15) = "e"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "e"
+ │ │ │ └── @ CallNode (location: (79,17)-(79,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (79,17)-(79,18) = "f"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "f"
+ │ │ ├── closing_loc: (79,18)-(79,19) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "-"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "/"
+ ├── @ CallNode (location: (80,0)-(80,17))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (80,0)-(80,7))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (80,1)-(80,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (80,1)-(80,6))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (80,1)-(80,2))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (80,1)-(80,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (80,3)-(80,4) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (80,5)-(80,6))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (80,5)-(80,6))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (80,5)-(80,6) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── opening_loc: (80,0)-(80,1) = "("
+ │ │ └── closing_loc: (80,6)-(80,7) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (80,8)-(80,9) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (80,10)-(80,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (80,10)-(80,17))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (80,10)-(80,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (80,10)-(80,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── call_operator_loc: (80,11)-(80,12) = "."
+ │ │ ├── message_loc: (80,12)-(80,13) = "-"
+ │ │ ├── opening_loc: (80,13)-(80,14) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (80,14)-(80,16))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SplatNode (location: (80,14)-(80,16))
+ │ │ │ ├── operator_loc: (80,14)-(80,15) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (80,15)-(80,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (80,15)-(80,16) = "f"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "f"
+ │ │ ├── closing_loc: (80,16)-(80,17) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "-"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "/"
+ ├── @ CallNode (location: (81,0)-(81,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (81,0)-(81,1) = "x"
+ │ ├── opening_loc: (81,1)-(81,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (81,2)-(81,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (81,2)-(81,7))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (81,2)-(81,7))
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (81,4)-(81,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (81,4)-(81,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── operator_loc: (81,2)-(81,4) = "**"
+ │ ├── closing_loc: (81,7)-(81,8) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "x"
+ ├── @ CallNode (location: (82,0)-(82,6))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (82,0)-(82,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (82,0)-(82,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (82,3)-(82,5) = "&."
+ │ ├── message_loc: (82,5)-(82,6) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "!"
+ ├── @ CallNode (location: (83,0)-(83,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (83,0)-(83,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (83,0)-(83,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (83,3)-(83,4) = "."
+ │ ├── message_loc: (83,4)-(83,5) = "~"
+ │ ├── opening_loc: (83,5)-(83,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (83,6)-(83,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (83,6)-(83,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (83,6)-(83,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: (83,7)-(83,8) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "~"
+ └── @ CallNode (location: (84,0)-(84,7))
+ ├── receiver:
+ │ @ CallNode (location: (84,0)-(84,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (84,0)-(84,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (84,1)-(84,3) = "&."
+ ├── message_loc: (84,3)-(84,4) = "+"
+ ├── opening_loc: (84,4)-(84,5) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (84,5)-(84,6))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (84,5)-(84,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (84,5)-(84,6) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── closing_loc: (84,6)-(84,7) = ")"
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "+"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/27.txt b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
new file mode 100644
index 0000000000..f9277521a3
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(4,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,5))
+ └── body: (length: 2)
+ ├── @ LambdaNode (location: (1,0)-(3,1))
+ │ ├── locals: [:_1, :_2]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,3)-(1,4) = "{"
+ │ ├── closing_loc: (3,0)-(3,1) = "}"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (2,2)-(2,9))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,2)-(2,9))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (2,2)-(2,4))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,5)-(2,6) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,7)-(2,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (2,7)-(2,9))
+ │ │ ├── name: :_2
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ └── @ ParenthesesNode (location: (4,0)-(4,5))
+ ├── body:
+ │ @ StatementsNode (location: (4,1)-(4,4))
+ │ └── body: (length: 1)
+ │ └── @ RangeNode (location: (4,1)-(4,4))
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (4,3)-(4,4))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (4,1)-(4,3) = ".."
+ │ └── flags: ∅
+ ├── opening_loc: (4,0)-(4,1) = "("
+ └── closing_loc: (4,4)-(4,5) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/30.txt b/test/prism/snapshots/unparser/corpus/literal/since/30.txt
new file mode 100644
index 0000000000..f595ebb780
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/30.txt
@@ -0,0 +1,83 @@
+@ ProgramNode (location: (1,0)-(4,17))
+├── locals: [:a, :foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,17))
+ └── body: (length: 4)
+ ├── @ MatchRequiredNode (location: (1,0)-(1,8))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ └── flags: decimal
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (1,5)-(1,8))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (1,5)-(1,6) = "["
+ │ │ └── closing_loc: (1,7)-(1,8) = "]"
+ │ └── operator_loc: (1,2)-(1,4) = "=>"
+ ├── @ MatchRequiredNode (location: (2,0)-(2,8))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (2,0)-(2,1))
+ │ │ └── flags: decimal
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,5)-(2,8))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (2,6)-(2,7))
+ │ │ │ ├── operator_loc: (2,6)-(2,7) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,5)-(2,6) = "["
+ │ │ └── closing_loc: (2,7)-(2,8) = "]"
+ │ └── operator_loc: (2,2)-(2,4) = "=>"
+ ├── @ MatchPredicateNode (location: (3,0)-(3,15))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,0)-(3,1))
+ │ │ └── flags: decimal
+ │ ├── pattern:
+ │ │ @ FindPatternNode (location: (3,5)-(3,15))
+ │ │ ├── constant: ∅
+ │ │ ├── left:
+ │ │ │ @ SplatNode (location: (3,6)-(3,7))
+ │ │ │ ├── operator_loc: (3,6)-(3,7) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,9)-(3,11))
+ │ │ │ └── flags: decimal
+ │ │ ├── right:
+ │ │ │ @ SplatNode (location: (3,13)-(3,14))
+ │ │ │ ├── operator_loc: (3,13)-(3,14) = "*"
+ │ │ │ └── expression: ∅
+ │ │ ├── opening_loc: (3,5)-(3,6) = "["
+ │ │ └── closing_loc: (3,14)-(3,15) = "]"
+ │ └── operator_loc: (3,2)-(3,4) = "in"
+ └── @ MatchPredicateNode (location: (4,0)-(4,17))
+ ├── value:
+ │ @ IntegerNode (location: (4,0)-(4,1))
+ │ └── flags: decimal
+ ├── pattern:
+ │ @ FindPatternNode (location: (4,5)-(4,17))
+ │ ├── constant: ∅
+ │ ├── left:
+ │ │ @ SplatNode (location: (4,6)-(4,7))
+ │ │ ├── operator_loc: (4,6)-(4,7) = "*"
+ │ │ └── expression: ∅
+ │ ├── requireds: (length: 1)
+ │ │ └── @ LocalVariableTargetNode (location: (4,9)-(4,10))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── right:
+ │ │ @ SplatNode (location: (4,12)-(4,16))
+ │ │ ├── operator_loc: (4,12)-(4,13) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (4,13)-(4,16))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── opening_loc: (4,5)-(4,6) = "["
+ │ └── closing_loc: (4,16)-(4,17) = "]"
+ └── operator_loc: (4,2)-(4,4) = "in"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/31.txt b/test/prism/snapshots/unparser/corpus/literal/since/31.txt
new file mode 100644
index 0000000000..d66a2017c2
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/31.txt
@@ -0,0 +1,87 @@
+@ ProgramNode (location: (1,0)-(7,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,3))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(3,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,8)-(1,9))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,8)-(1,9))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,8)-(1,9) = "&"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,5) = "bar"
+ │ │ ├── opening_loc: (2,5)-(2,6) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (2,7)-(2,8) = ")"
+ │ │ ├── block:
+ │ │ │ @ BlockArgumentNode (location: (2,6)-(2,7))
+ │ │ │ ├── expression: ∅
+ │ │ │ └── operator_loc: (2,6)-(2,7) = "&"
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:&]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ ├── rparen_loc: (1,9)-(1,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── @ DefNode (location: (5,0)-(7,3))
+ ├── name: :foo
+ ├── name_loc: (5,4)-(5,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (5,8)-(5,12))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (5,8)-(5,9))
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (5,11)-(5,12))
+ │ ├── name: nil
+ │ ├── name_loc: ∅
+ │ └── operator_loc: (5,11)-(5,12) = "&"
+ ├── body:
+ │ @ StatementsNode (location: (6,2)-(6,7))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (6,2)-(6,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,2)-(6,5) = "bar"
+ │ ├── opening_loc: (6,5)-(6,6) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (6,7)-(6,8) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (6,6)-(6,7))
+ │ │ ├── expression: ∅
+ │ │ └── operator_loc: (6,6)-(6,7) = "&"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:a, :&]
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (5,7)-(5,8) = "("
+ ├── rparen_loc: (5,12)-(5,13) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (7,0)-(7,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/32.txt b/test/prism/snapshots/unparser/corpus/literal/since/32.txt
new file mode 100644
index 0000000000..aa8c15e0fb
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/since/32.txt
@@ -0,0 +1,101 @@
+@ ProgramNode (location: (1,0)-(7,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,3))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(3,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,8)-(1,20))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,16))
+ │ │ │ └── name: :argument
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (1,18)-(1,20))
+ │ │ │ ├── name: nil
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (1,18)-(1,20) = "**"
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,5) = "bar"
+ │ │ ├── opening_loc: (2,5)-(2,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,6)-(2,18))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ LocalVariableReadNode (location: (2,6)-(2,14))
+ │ │ │ │ ├── name: :argument
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ KeywordHashNode (location: (2,16)-(2,18))
+ │ │ │ └── elements: (length: 1)
+ │ │ │ └── @ AssocSplatNode (location: (2,16)-(2,18))
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: (2,16)-(2,18) = "**"
+ │ │ ├── closing_loc: (2,18)-(2,19) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:argument, :**]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ ├── rparen_loc: (1,20)-(1,21) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── @ DefNode (location: (5,0)-(7,3))
+ ├── name: :foo
+ ├── name_loc: (5,4)-(5,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (5,8)-(5,19))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (5,8)-(5,16))
+ │ │ └── name: :argument
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (5,18)-(5,19))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (5,18)-(5,19) = "*"
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (6,2)-(6,18))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (6,2)-(6,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,2)-(6,5) = "bar"
+ │ ├── opening_loc: (6,5)-(6,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,6)-(6,17))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ LocalVariableReadNode (location: (6,6)-(6,14))
+ │ │ │ ├── name: :argument
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (6,16)-(6,17))
+ │ │ ├── operator_loc: (6,16)-(6,17) = "*"
+ │ │ └── expression: ∅
+ │ ├── closing_loc: (6,17)-(6,18) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:argument, :*]
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (5,7)-(5,8) = "("
+ ├── rparen_loc: (5,19)-(5,20) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (7,0)-(7,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/literal/singletons.txt b/test/prism/snapshots/unparser/corpus/literal/singletons.txt
new file mode 100644
index 0000000000..45c06f7b07
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/singletons.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(4,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,4))
+ └── body: (length: 4)
+ ├── @ FalseNode (location: (1,0)-(1,5))
+ ├── @ NilNode (location: (2,0)-(2,3))
+ ├── @ SelfNode (location: (3,0)-(3,4))
+ └── @ TrueNode (location: (4,0)-(4,4))
diff --git a/test/prism/snapshots/unparser/corpus/literal/super.txt b/test/prism/snapshots/unparser/corpus/literal/super.txt
new file mode 100644
index 0000000000..7a6c241d6f
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/super.txt
@@ -0,0 +1,271 @@
+@ ProgramNode (location: (1,0)-(21,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(21,1))
+ └── body: (length: 11)
+ ├── @ ForwardingSuperNode (location: (1,0)-(1,5))
+ │ └── block: ∅
+ ├── @ SuperNode (location: (2,0)-(2,7))
+ │ ├── keyword_loc: (2,0)-(2,5) = "super"
+ │ ├── lparen_loc: (2,5)-(2,6) = "("
+ │ ├── arguments: ∅
+ │ ├── rparen_loc: (2,6)-(2,7) = ")"
+ │ └── block: ∅
+ ├── @ SuperNode (location: (3,0)-(3,8))
+ │ ├── keyword_loc: (3,0)-(3,5) = "super"
+ │ ├── lparen_loc: (3,5)-(3,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,6)-(3,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,6)-(3,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rparen_loc: (3,7)-(3,8) = ")"
+ │ └── block: ∅
+ ├── @ SuperNode (location: (4,0)-(4,11))
+ │ ├── keyword_loc: (4,0)-(4,5) = "super"
+ │ ├── lparen_loc: (4,5)-(4,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (4,6)-(4,10))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (4,6)-(4,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (4,6)-(4,7) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ └── @ CallNode (location: (4,9)-(4,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,9)-(4,10) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── rparen_loc: (4,10)-(4,11) = ")"
+ │ └── block: ∅
+ ├── @ SuperNode (location: (5,0)-(5,12))
+ │ ├── keyword_loc: (5,0)-(5,5) = "super"
+ │ ├── lparen_loc: (5,5)-(5,6) = "("
+ │ ├── arguments: ∅
+ │ ├── rparen_loc: (5,12)-(5,13) = ")"
+ │ └── block:
+ │ @ BlockArgumentNode (location: (5,6)-(5,12))
+ │ ├── expression:
+ │ │ @ CallNode (location: (5,7)-(5,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,7)-(5,12) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "block"
+ │ └── operator_loc: (5,6)-(5,7) = "&"
+ ├── @ SuperNode (location: (6,0)-(6,15))
+ │ ├── keyword_loc: (6,0)-(6,5) = "super"
+ │ ├── lparen_loc: (6,5)-(6,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,6)-(6,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (6,6)-(6,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,6)-(6,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rparen_loc: (6,15)-(6,16) = ")"
+ │ └── block:
+ │ @ BlockArgumentNode (location: (6,9)-(6,15))
+ │ ├── expression:
+ │ │ @ CallNode (location: (6,10)-(6,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,10)-(6,15) = "block"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "block"
+ │ └── operator_loc: (6,9)-(6,10) = "&"
+ ├── @ SuperNode (location: (7,0)-(9,2))
+ │ ├── keyword_loc: (7,0)-(7,5) = "super"
+ │ ├── lparen_loc: (7,5)-(7,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,6)-(9,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,6)-(9,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,6)-(7,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (7,8)-(9,1))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (8,2)-(8,5))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (8,2)-(8,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (8,2)-(8,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── opening_loc: (7,8)-(7,9) = "{"
+ │ │ │ └── closing_loc: (9,0)-(9,1) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── rparen_loc: (9,1)-(9,2) = ")"
+ │ └── block: ∅
+ ├── @ ForwardingSuperNode (location: (10,0)-(12,1))
+ │ └── block:
+ │ @ BlockNode (location: (10,6)-(12,1))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (11,2)-(11,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (11,2)-(11,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,2)-(11,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (10,6)-(10,7) = "{"
+ │ └── closing_loc: (12,0)-(12,1) = "}"
+ ├── @ SuperNode (location: (13,0)-(15,1))
+ │ ├── keyword_loc: (13,0)-(13,5) = "super"
+ │ ├── lparen_loc: (13,5)-(13,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,6)-(13,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (13,6)-(13,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,6)-(13,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rparen_loc: (13,7)-(13,8) = ")"
+ │ └── block:
+ │ @ BlockNode (location: (13,9)-(15,1))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (14,2)-(14,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (14,2)-(14,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (14,2)-(14,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (13,9)-(13,10) = "{"
+ │ └── closing_loc: (15,0)-(15,1) = "}"
+ ├── @ SuperNode (location: (16,0)-(18,1))
+ │ ├── keyword_loc: (16,0)-(16,5) = "super"
+ │ ├── lparen_loc: (16,5)-(16,6) = "("
+ │ ├── arguments: ∅
+ │ ├── rparen_loc: (16,6)-(16,7) = ")"
+ │ └── block:
+ │ @ BlockNode (location: (16,8)-(18,1))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (17,2)-(17,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (17,2)-(17,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,2)-(17,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (16,8)-(16,9) = "{"
+ │ └── closing_loc: (18,0)-(18,1) = "}"
+ └── @ SuperNode (location: (19,0)-(21,1))
+ ├── keyword_loc: (19,0)-(19,5) = "super"
+ ├── lparen_loc: (19,5)-(19,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (19,6)-(19,10))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (19,6)-(19,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,6)-(19,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ └── @ CallNode (location: (19,9)-(19,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,9)-(19,10) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ ├── rparen_loc: (19,10)-(19,11) = ")"
+ └── block:
+ @ BlockNode (location: (19,12)-(21,1))
+ ├── locals: []
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (20,2)-(20,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (20,2)-(20,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (20,2)-(20,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── opening_loc: (19,12)-(19,13) = "{"
+ └── closing_loc: (21,0)-(21,1) = "}"
diff --git a/test/prism/snapshots/unparser/corpus/literal/unary.txt b/test/prism/snapshots/unparser/corpus/literal/unary.txt
new file mode 100644
index 0000000000..b8586036bf
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/unary.txt
@@ -0,0 +1,245 @@
+@ ProgramNode (location: (1,0)-(8,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,9))
+ └── body: (length: 8)
+ ├── @ CallNode (location: (1,0)-(1,2))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (1,1)-(1,2))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (2,0)-(2,5))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (2,1)-(2,5))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,4))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ IntegerNode (location: (2,3)-(2,4))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,3) = "!"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "!"
+ │ │ ├── opening_loc: (2,1)-(2,2) = "("
+ │ │ └── closing_loc: (2,4)-(2,5) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (3,0)-(3,16))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (3,1)-(3,16))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,2)-(3,15))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,2)-(3,15))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ParenthesesNode (location: (3,3)-(3,15))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (3,4)-(3,14))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ OrNode (location: (3,4)-(3,14))
+ │ │ │ │ │ ├── left:
+ │ │ │ │ │ │ @ CallNode (location: (3,4)-(3,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "foo"
+ │ │ │ │ │ ├── right:
+ │ │ │ │ │ │ @ CallNode (location: (3,11)-(3,14))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (3,11)-(3,14) = "bar"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ │ └── operator_loc: (3,8)-(3,10) = "||"
+ │ │ │ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ │ │ │ └── closing_loc: (3,14)-(3,15) = ")"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "!"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "!"
+ │ │ ├── opening_loc: (3,1)-(3,2) = "("
+ │ │ └── closing_loc: (3,15)-(3,16) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (4,0)-(4,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (4,1)-(4,9))
+ │ │ ├── receiver:
+ │ │ │ @ ParenthesesNode (location: (4,1)-(4,5))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (4,2)-(4,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (4,2)-(4,4))
+ │ │ │ │ ├── receiver:
+ │ │ │ │ │ @ IntegerNode (location: (4,3)-(4,4))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,2)-(4,3) = "!"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "!"
+ │ │ │ ├── opening_loc: (4,1)-(4,2) = "("
+ │ │ │ └── closing_loc: (4,4)-(4,5) = ")"
+ │ │ ├── call_operator_loc: (4,5)-(4,6) = "."
+ │ │ ├── message_loc: (4,6)-(4,9) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "baz"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,0)-(4,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (5,0)-(5,2))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,1)-(5,2))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,1)-(5,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "~"
+ ├── @ CallNode (location: (6,0)-(6,2))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,1)-(6,2))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,1)-(6,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,0)-(6,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "-@"
+ ├── @ CallNode (location: (7,0)-(7,2))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,1)-(7,2))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,1)-(7,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,1) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+@"
+ └── @ CallNode (location: (8,0)-(8,9))
+ ├── receiver:
+ │ @ CallNode (location: (8,1)-(8,9))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (8,1)-(8,5))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (8,2)-(8,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (8,2)-(8,4))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (8,3)-(8,4))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (8,3)-(8,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (8,2)-(8,3) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "-@"
+ │ │ ├── opening_loc: (8,1)-(8,2) = "("
+ │ │ └── closing_loc: (8,4)-(8,5) = ")"
+ │ ├── call_operator_loc: (8,5)-(8,6) = "."
+ │ ├── message_loc: (8,6)-(8,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (8,0)-(8,1) = "-"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "-@"
diff --git a/test/prism/snapshots/unparser/corpus/literal/undef.txt b/test/prism/snapshots/unparser/corpus/literal/undef.txt
new file mode 100644
index 0000000000..f89eb11fe5
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/undef.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(2,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,16))
+ └── body: (length: 2)
+ ├── @ UndefNode (location: (1,0)-(1,10))
+ │ ├── names: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,6)-(1,10))
+ │ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ │ ├── value_loc: (1,7)-(1,10) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── keyword_loc: (1,0)-(1,5) = "undef"
+ └── @ UndefNode (location: (2,0)-(2,16))
+ ├── names: (length: 2)
+ │ ├── @ SymbolNode (location: (2,6)-(2,10))
+ │ │ ├── opening_loc: (2,6)-(2,7) = ":"
+ │ │ ├── value_loc: (2,7)-(2,10) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ SymbolNode (location: (2,12)-(2,16))
+ │ ├── opening_loc: (2,12)-(2,13) = ":"
+ │ ├── value_loc: (2,13)-(2,16) = "bar"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "bar"
+ └── keyword_loc: (2,0)-(2,5) = "undef"
diff --git a/test/prism/snapshots/unparser/corpus/literal/variables.txt b/test/prism/snapshots/unparser/corpus/literal/variables.txt
new file mode 100644
index 0000000000..94b6f067dc
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/variables.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(10,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(10,17))
+ └── body: (length: 10)
+ ├── @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── @ InstanceVariableReadNode (location: (2,0)-(2,2))
+ │ └── name: :@a
+ ├── @ ClassVariableReadNode (location: (3,0)-(3,3))
+ │ └── name: :@@a
+ ├── @ GlobalVariableReadNode (location: (4,0)-(4,2))
+ │ └── name: :$a
+ ├── @ NumberedReferenceReadNode (location: (5,0)-(5,2))
+ │ └── number: 1
+ ├── @ BackReferenceReadNode (location: (6,0)-(6,2))
+ ├── @ ConstantReadNode (location: (7,0)-(7,5))
+ │ └── name: :CONST
+ ├── @ ConstantPathNode (location: (8,0)-(8,13))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (8,0)-(8,6))
+ │ │ └── name: :SCOPED
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (8,8)-(8,13))
+ │ │ └── name: :CONST
+ │ └── delimiter_loc: (8,6)-(8,8) = "::"
+ ├── @ ConstantPathNode (location: (9,0)-(9,10))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (9,2)-(9,10))
+ │ │ └── name: :TOPLEVEL
+ │ └── delimiter_loc: (9,0)-(9,2) = "::"
+ └── @ ConstantPathNode (location: (10,0)-(10,17))
+ ├── parent:
+ │ @ ConstantPathNode (location: (10,0)-(10,10))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (10,2)-(10,10))
+ │ │ └── name: :TOPLEVEL
+ │ └── delimiter_loc: (10,0)-(10,2) = "::"
+ ├── child:
+ │ @ ConstantReadNode (location: (10,12)-(10,17))
+ │ └── name: :CONST
+ └── delimiter_loc: (10,10)-(10,12) = "::"
diff --git a/test/prism/snapshots/unparser/corpus/literal/while.txt b/test/prism/snapshots/unparser/corpus/literal/while.txt
new file mode 100644
index 0000000000..aa47d33766
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/while.txt
@@ -0,0 +1,696 @@
+@ ProgramNode (location: (1,0)-(73,3))
+├── locals: [:x]
+└── statements:
+ @ StatementsNode (location: (1,0)-(73,3))
+ └── body: (length: 17)
+ ├── @ ModuleNode (location: (1,0)-(7,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (1,7)-(1,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(6,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(6,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,2)-(2,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (2,6)-(6,3))
+ │ │ │ ├── locals: [:bar, :foo]
+ │ │ │ ├── parameters:
+ │ │ │ │ @ BlockParametersNode (location: (2,8)-(2,13))
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ ParametersNode (location: (2,9)-(2,12))
+ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (2,9)-(2,12))
+ │ │ │ │ │ │ └── name: :bar
+ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ ├── opening_loc: (2,8)-(2,9) = "|"
+ │ │ │ │ └── closing_loc: (2,12)-(2,13) = "|"
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (3,4)-(5,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ WhileNode (location: (3,4)-(5,7))
+ │ │ │ │ ├── keyword_loc: (3,4)-(3,9) = "while"
+ │ │ │ │ ├── closing_loc: (5,4)-(5,7) = "end"
+ │ │ │ │ ├── predicate:
+ │ │ │ │ │ @ CallNode (location: (3,10)-(3,13))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (3,10)-(3,13) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "foo"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (4,6)-(4,15))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ LocalVariableWriteNode (location: (4,6)-(4,15))
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── depth: 0
+ │ │ │ │ │ ├── name_loc: (4,6)-(4,9) = "foo"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ LocalVariableReadNode (location: (4,12)-(4,15))
+ │ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ │ └── depth: 0
+ │ │ │ │ │ └── operator_loc: (4,10)-(4,11) = "="
+ │ │ │ │ └── flags: ∅
+ │ │ │ ├── opening_loc: (2,6)-(2,7) = "{"
+ │ │ │ └── closing_loc: (6,2)-(6,3) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo"
+ │ ├── end_keyword_loc: (7,0)-(7,3) = "end"
+ │ └── name: :A
+ ├── @ DefNode (location: (9,0)-(11,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (9,4)-(9,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (10,2)-(10,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (10,2)-(10,28))
+ │ │ ├── keyword_loc: (10,12)-(10,17) = "while"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (10,18)-(10,28))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (10,18)-(10,21))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (10,22)-(10,24) = "!="
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (10,25)-(10,28))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (10,25)-(10,28))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (10,25)-(10,28) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "!="
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (10,2)-(10,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (10,2)-(10,11))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (10,2)-(10,5) = "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (10,8)-(10,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (10,8)-(10,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── operator_loc: (10,6)-(10,7) = "="
+ │ │ └── flags: ∅
+ │ ├── locals: [:foo]
+ │ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (11,0)-(11,3) = "end"
+ ├── @ ModuleNode (location: (13,0)-(15,3))
+ │ ├── locals: [:foo]
+ │ ├── module_keyword_loc: (13,0)-(13,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (13,7)-(13,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (14,2)-(14,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (14,2)-(14,21))
+ │ │ ├── keyword_loc: (14,12)-(14,17) = "while"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ LocalVariableReadNode (location: (14,18)-(14,21))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (14,2)-(14,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (14,2)-(14,11))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (14,2)-(14,5) = "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (14,8)-(14,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (14,8)-(14,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── operator_loc: (14,6)-(14,7) = "="
+ │ │ └── flags: ∅
+ │ ├── end_keyword_loc: (15,0)-(15,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (17,0)-(19,3))
+ │ ├── locals: [:foo]
+ │ ├── module_keyword_loc: (17,0)-(17,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (17,7)-(17,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (18,2)-(18,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ UntilNode (location: (18,2)-(18,21))
+ │ │ ├── keyword_loc: (18,12)-(18,17) = "until"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ LocalVariableReadNode (location: (18,18)-(18,21))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (18,2)-(18,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (18,2)-(18,11))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (18,2)-(18,5) = "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (18,8)-(18,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (18,8)-(18,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── operator_loc: (18,6)-(18,7) = "="
+ │ │ └── flags: ∅
+ │ ├── end_keyword_loc: (19,0)-(19,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (21,0)-(25,3))
+ │ ├── locals: [:foo]
+ │ ├── module_keyword_loc: (21,0)-(21,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (21,7)-(21,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (22,2)-(24,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ WhileNode (location: (22,2)-(24,5))
+ │ │ ├── keyword_loc: (22,2)-(22,7) = "while"
+ │ │ ├── closing_loc: (24,2)-(24,5) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (22,8)-(22,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (22,8)-(22,11) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (23,4)-(23,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (23,4)-(23,13))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (23,4)-(23,7) = "foo"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (23,10)-(23,13))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (23,10)-(23,13) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── operator_loc: (23,8)-(23,9) = "="
+ │ │ └── flags: ∅
+ │ ├── end_keyword_loc: (25,0)-(25,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (27,0)-(33,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (27,0)-(27,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (27,7)-(27,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (28,2)-(32,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (28,2)-(32,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (28,2)-(28,6) = "each"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (28,7)-(32,3))
+ │ │ │ ├── locals: [:baz, :foo]
+ │ │ │ ├── parameters:
+ │ │ │ │ @ BlockParametersNode (location: (28,9)-(28,14))
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ ParametersNode (location: (28,10)-(28,13))
+ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (28,10)-(28,13))
+ │ │ │ │ │ │ └── name: :baz
+ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ ├── opening_loc: (28,9)-(28,10) = "|"
+ │ │ │ │ └── closing_loc: (28,13)-(28,14) = "|"
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (29,4)-(31,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ WhileNode (location: (29,4)-(31,7))
+ │ │ │ │ ├── keyword_loc: (29,4)-(29,9) = "while"
+ │ │ │ │ ├── closing_loc: (31,4)-(31,7) = "end"
+ │ │ │ │ ├── predicate:
+ │ │ │ │ │ @ CallNode (location: (29,10)-(29,13))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (29,10)-(29,13) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "foo"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (30,6)-(30,15))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ LocalVariableWriteNode (location: (30,6)-(30,15))
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── depth: 0
+ │ │ │ │ │ ├── name_loc: (30,6)-(30,9) = "foo"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ CallNode (location: (30,12)-(30,15))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (30,12)-(30,15) = "bar"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ │ └── operator_loc: (30,10)-(30,11) = "="
+ │ │ │ │ └── flags: ∅
+ │ │ │ ├── opening_loc: (28,7)-(28,8) = "{"
+ │ │ │ └── closing_loc: (32,2)-(32,3) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "each"
+ │ ├── end_keyword_loc: (33,0)-(33,3) = "end"
+ │ └── name: :A
+ ├── @ ModuleNode (location: (35,0)-(41,3))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (35,0)-(35,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (35,7)-(35,8))
+ │ │ └── name: :A
+ │ ├── body:
+ │ │ @ StatementsNode (location: (36,2)-(40,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (36,2)-(40,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (36,2)-(36,6) = "each"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (36,7)-(40,3))
+ │ │ │ ├── locals: [:foo]
+ │ │ │ ├── parameters:
+ │ │ │ │ @ BlockParametersNode (location: (36,9)-(36,14))
+ │ │ │ │ ├── parameters:
+ │ │ │ │ │ @ ParametersNode (location: (36,10)-(36,13))
+ │ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (36,10)-(36,13))
+ │ │ │ │ │ │ └── name: :foo
+ │ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ │ ├── rest: ∅
+ │ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ │ └── block: ∅
+ │ │ │ │ ├── locals: (length: 0)
+ │ │ │ │ ├── opening_loc: (36,9)-(36,10) = "|"
+ │ │ │ │ └── closing_loc: (36,13)-(36,14) = "|"
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (37,4)-(39,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ WhileNode (location: (37,4)-(39,7))
+ │ │ │ │ ├── keyword_loc: (37,4)-(37,9) = "while"
+ │ │ │ │ ├── closing_loc: (39,4)-(39,7) = "end"
+ │ │ │ │ ├── predicate:
+ │ │ │ │ │ @ LocalVariableReadNode (location: (37,10)-(37,13))
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (38,6)-(38,15))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ LocalVariableWriteNode (location: (38,6)-(38,15))
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── depth: 0
+ │ │ │ │ │ ├── name_loc: (38,6)-(38,9) = "foo"
+ │ │ │ │ │ ├── value:
+ │ │ │ │ │ │ @ CallNode (location: (38,12)-(38,15))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (38,12)-(38,15) = "bar"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "bar"
+ │ │ │ │ │ └── operator_loc: (38,10)-(38,11) = "="
+ │ │ │ │ └── flags: ∅
+ │ │ │ ├── opening_loc: (36,7)-(36,8) = "{"
+ │ │ │ └── closing_loc: (40,2)-(40,3) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "each"
+ │ ├── end_keyword_loc: (41,0)-(41,3) = "end"
+ │ └── name: :A
+ ├── @ LocalVariableWriteNode (location: (42,0)-(44,14))
+ │ ├── name: :x
+ │ ├── depth: 0
+ │ ├── name_loc: (42,0)-(42,1) = "x"
+ │ ├── value:
+ │ │ @ ParenthesesNode (location: (42,4)-(44,14))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (42,5)-(44,13))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ WhileNode (location: (42,5)-(44,13))
+ │ │ │ ├── keyword_loc: (44,4)-(44,9) = "while"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── predicate:
+ │ │ │ │ @ CallNode (location: (44,10)-(44,13))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (44,10)-(44,13) = "baz"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "baz"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (42,5)-(44,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ BeginNode (location: (42,5)-(44,3))
+ │ │ │ │ ├── begin_keyword_loc: (42,5)-(42,10) = "begin"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (43,2)-(43,5))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (43,2)-(43,5))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (43,2)-(43,5) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "foo"
+ │ │ │ │ ├── rescue_clause: ∅
+ │ │ │ │ ├── else_clause: ∅
+ │ │ │ │ ├── ensure_clause: ∅
+ │ │ │ │ └── end_keyword_loc: (44,0)-(44,3) = "end"
+ │ │ │ └── flags: begin_modifier
+ │ │ ├── opening_loc: (42,4)-(42,5) = "("
+ │ │ └── closing_loc: (44,13)-(44,14) = ")"
+ │ └── operator_loc: (42,2)-(42,3) = "="
+ ├── @ WhileNode (location: (45,0)-(47,13))
+ │ ├── keyword_loc: (47,4)-(47,9) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (47,10)-(47,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (47,10)-(47,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (45,0)-(47,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BeginNode (location: (45,0)-(47,3))
+ │ │ ├── begin_keyword_loc: (45,0)-(45,5) = "begin"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (46,2)-(46,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (46,2)-(46,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (46,2)-(46,5) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (47,0)-(47,3) = "end"
+ │ └── flags: begin_modifier
+ ├── @ UntilNode (location: (48,0)-(51,13))
+ │ ├── keyword_loc: (51,4)-(51,9) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (51,10)-(51,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (51,10)-(51,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (48,0)-(51,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BeginNode (location: (48,0)-(51,3))
+ │ │ ├── begin_keyword_loc: (48,0)-(48,5) = "begin"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (49,2)-(50,5))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ CallNode (location: (49,2)-(49,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (49,2)-(49,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ └── @ CallNode (location: (50,2)-(50,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (50,2)-(50,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
+ │ └── flags: begin_modifier
+ ├── @ WhileNode (location: (52,0)-(55,13))
+ │ ├── keyword_loc: (55,4)-(55,9) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (55,10)-(55,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (55,10)-(55,13) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (52,0)-(55,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BeginNode (location: (52,0)-(55,3))
+ │ │ ├── begin_keyword_loc: (52,0)-(52,5) = "begin"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (53,2)-(54,5))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ CallNode (location: (53,2)-(53,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (53,2)-(53,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ └── @ CallNode (location: (54,2)-(54,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (54,2)-(54,5) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── rescue_clause: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (55,0)-(55,3) = "end"
+ │ └── flags: begin_modifier
+ ├── @ WhileNode (location: (56,0)-(57,3))
+ │ ├── keyword_loc: (56,0)-(56,5) = "while"
+ │ ├── closing_loc: (57,0)-(57,3) = "end"
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (56,6)-(56,11))
+ │ ├── statements: ∅
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (58,0)-(60,3))
+ │ ├── keyword_loc: (58,0)-(58,5) = "while"
+ │ ├── closing_loc: (60,0)-(60,3) = "end"
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (58,6)-(58,11))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (59,2)-(59,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (59,2)-(59,3))
+ │ │ └── flags: decimal
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (61,0)-(64,3))
+ │ ├── keyword_loc: (61,0)-(61,5) = "while"
+ │ ├── closing_loc: (64,0)-(64,3) = "end"
+ │ ├── predicate:
+ │ │ @ ParenthesesNode (location: (61,6)-(62,2))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (61,7)-(62,1))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (61,7)-(62,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (61,7)-(61,10) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (61,11)-(62,1))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (61,11)-(61,12) = "{"
+ │ │ │ │ └── closing_loc: (62,0)-(62,1) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "foo"
+ │ │ ├── opening_loc: (61,6)-(61,7) = "("
+ │ │ └── closing_loc: (62,1)-(62,2) = ")"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (63,2)-(63,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (63,2)-(63,7))
+ │ │ ├── opening_loc: (63,2)-(63,3) = ":"
+ │ │ ├── value_loc: (63,3)-(63,7) = "body"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "body"
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (65,0)-(66,3))
+ │ ├── keyword_loc: (65,0)-(65,5) = "until"
+ │ ├── closing_loc: (66,0)-(66,3) = "end"
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (65,6)-(65,11))
+ │ ├── statements: ∅
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (67,0)-(69,3))
+ │ ├── keyword_loc: (67,0)-(67,5) = "until"
+ │ ├── closing_loc: (69,0)-(69,3) = "end"
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (67,6)-(67,11))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (68,2)-(68,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (68,2)-(68,3))
+ │ │ └── flags: decimal
+ │ └── flags: ∅
+ └── @ UntilNode (location: (70,0)-(73,3))
+ ├── keyword_loc: (70,0)-(70,5) = "until"
+ ├── closing_loc: (73,0)-(73,3) = "end"
+ ├── predicate:
+ │ @ ParenthesesNode (location: (70,6)-(71,2))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (70,7)-(71,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (70,7)-(71,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (70,7)-(70,10) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (70,11)-(71,1))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (70,11)-(70,12) = "{"
+ │ │ │ └── closing_loc: (71,0)-(71,1) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (70,6)-(70,7) = "("
+ │ └── closing_loc: (71,1)-(71,2) = ")"
+ ├── statements:
+ │ @ StatementsNode (location: (72,2)-(72,7))
+ │ └── body: (length: 1)
+ │ └── @ SymbolNode (location: (72,2)-(72,7))
+ │ ├── opening_loc: (72,2)-(72,3) = ":"
+ │ ├── value_loc: (72,3)-(72,7) = "body"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "body"
+ └── flags: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/yield.txt b/test/prism/snapshots/unparser/corpus/literal/yield.txt
new file mode 100644
index 0000000000..fc9bc27cc1
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/yield.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(3,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,11))
+ └── body: (length: 3)
+ ├── @ YieldNode (location: (1,0)-(1,5))
+ │ ├── keyword_loc: (1,0)-(1,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments: ∅
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (2,0)-(2,8))
+ │ ├── keyword_loc: (2,0)-(2,5) = "yield"
+ │ ├── lparen_loc: (2,5)-(2,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,6)-(2,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (2,6)-(2,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,6)-(2,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ └── rparen_loc: (2,7)-(2,8) = ")"
+ └── @ YieldNode (location: (3,0)-(3,11))
+ ├── keyword_loc: (3,0)-(3,5) = "yield"
+ ├── lparen_loc: (3,5)-(3,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,6)-(3,10))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,6)-(3,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,6)-(3,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ └── @ CallNode (location: (3,9)-(3,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,9)-(3,10) = "b"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "b"
+ └── rparen_loc: (3,10)-(3,11) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/and.txt b/test/prism/snapshots/unparser/corpus/semantic/and.txt
new file mode 100644
index 0000000000..b4136ecdac
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/and.txt
@@ -0,0 +1,233 @@
+@ ProgramNode (location: (1,0)-(8,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,3))
+ └── body: (length: 4)
+ ├── @ OrNode (location: (1,0)-(1,14))
+ │ ├── left:
+ │ │ @ RangeNode (location: (1,0)-(1,5))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── operator_loc: (1,1)-(1,4) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── right:
+ │ │ @ RangeNode (location: (1,9)-(1,14))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (1,9)-(1,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,9)-(1,10) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (1,13)-(1,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,13)-(1,14) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── operator_loc: (1,10)-(1,13) = "..."
+ │ │ └── flags: exclude_end
+ │ └── operator_loc: (1,6)-(1,8) = "or"
+ ├── @ AndNode (location: (2,0)-(2,15))
+ │ ├── left:
+ │ │ @ RangeNode (location: (2,0)-(2,5))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (2,0)-(2,1))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,0)-(2,1) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (2,4)-(2,5))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,4)-(2,5) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── operator_loc: (2,1)-(2,4) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── right:
+ │ │ @ RangeNode (location: (2,10)-(2,15))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (2,10)-(2,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,10)-(2,11) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (2,14)-(2,15))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,14)-(2,15) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── operator_loc: (2,11)-(2,14) = "..."
+ │ │ └── flags: exclude_end
+ │ └── operator_loc: (2,6)-(2,9) = "and"
+ ├── @ IfNode (location: (4,0)-(5,3))
+ │ ├── if_keyword_loc: (4,0)-(4,2) = "if"
+ │ ├── predicate:
+ │ │ @ OrNode (location: (4,3)-(4,17))
+ │ │ ├── left:
+ │ │ │ @ FlipFlopNode (location: (4,3)-(4,8))
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (4,3)-(4,4))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,3)-(4,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (4,7)-(4,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,7)-(4,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ ├── operator_loc: (4,4)-(4,7) = "..."
+ │ │ │ └── flags: exclude_end
+ │ │ ├── right:
+ │ │ │ @ FlipFlopNode (location: (4,12)-(4,17))
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (4,12)-(4,13))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,12)-(4,13) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (4,16)-(4,17))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,16)-(4,17) = "d"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "d"
+ │ │ │ ├── operator_loc: (4,13)-(4,16) = "..."
+ │ │ │ └── flags: exclude_end
+ │ │ └── operator_loc: (4,9)-(4,11) = "or"
+ │ ├── statements: ∅
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (5,0)-(5,3) = "end"
+ └── @ IfNode (location: (7,0)-(8,3))
+ ├── if_keyword_loc: (7,0)-(7,2) = "if"
+ ├── predicate:
+ │ @ AndNode (location: (7,3)-(7,18))
+ │ ├── left:
+ │ │ @ FlipFlopNode (location: (7,3)-(7,8))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (7,3)-(7,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,3)-(7,4) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (7,7)-(7,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,7)-(7,8) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── operator_loc: (7,4)-(7,7) = "..."
+ │ │ └── flags: exclude_end
+ │ ├── right:
+ │ │ @ FlipFlopNode (location: (7,13)-(7,18))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (7,13)-(7,14))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,13)-(7,14) = "c"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "c"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (7,17)-(7,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,17)-(7,18) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── operator_loc: (7,14)-(7,17) = "..."
+ │ │ └── flags: exclude_end
+ │ └── operator_loc: (7,9)-(7,12) = "and"
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (8,0)-(8,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/block.txt b/test/prism/snapshots/unparser/corpus/semantic/block.txt
new file mode 100644
index 0000000000..741a810c4b
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/block.txt
@@ -0,0 +1,187 @@
+@ ProgramNode (location: (1,0)-(26,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(26,3))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(2,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,4)-(2,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ │ └── closing_loc: (2,0)-(2,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (4,0)-(6,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,0)-(4,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (4,4)-(6,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ BeginNode (location: (5,0)-(6,3))
+ │ │ │ ├── begin_keyword_loc: ∅
+ │ │ │ ├── statements: ∅
+ │ │ │ ├── rescue_clause:
+ │ │ │ │ @ RescueNode (location: (5,0)-(5,6))
+ │ │ │ │ ├── keyword_loc: (5,0)-(5,6) = "rescue"
+ │ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ │ ├── operator_loc: ∅
+ │ │ │ │ ├── reference: ∅
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── consequent: ∅
+ │ │ │ ├── else_clause: ∅
+ │ │ │ ├── ensure_clause: ∅
+ │ │ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ │ │ ├── opening_loc: (4,4)-(4,6) = "do"
+ │ │ └── closing_loc: (6,0)-(6,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (8,0)-(11,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (8,0)-(8,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (8,4)-(11,3))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (9,2)-(10,5))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ RescueModifierNode (location: (9,2)-(9,16))
+ │ │ │ │ ├── expression:
+ │ │ │ │ │ @ NilNode (location: (9,2)-(9,5))
+ │ │ │ │ ├── keyword_loc: (9,6)-(9,12) = "rescue"
+ │ │ │ │ └── rescue_expression:
+ │ │ │ │ @ NilNode (location: (9,13)-(9,16))
+ │ │ │ └── @ NilNode (location: (10,2)-(10,5))
+ │ │ ├── opening_loc: (8,4)-(8,6) = "do"
+ │ │ └── closing_loc: (11,0)-(11,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (13,0)-(14,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (13,4)-(14,3))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (13,7)-(13,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (13,8)-(13,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (13,8)-(13,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (13,7)-(13,8) = "|"
+ │ │ │ └── closing_loc: (13,9)-(13,10) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (13,4)-(13,6) = "do"
+ │ │ └── closing_loc: (14,0)-(14,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (16,0)-(20,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (16,0)-(16,3) = "foo"
+ │ ├── opening_loc: (16,3)-(16,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (16,4)-(16,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (16,4)-(16,10))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (16,4)-(16,10) = "<<-DOC"
+ │ │ ├── content_loc: (17,0)-(17,0) = " b\n"
+ │ │ ├── closing_loc: (18,0)-(18,0) = "DOC\n"
+ │ │ └── unescaped: " b\n"
+ │ ├── closing_loc: (16,10)-(16,11) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (16,12)-(20,3))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (16,15)-(16,18))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (16,16)-(16,17))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (16,16)-(16,17))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (16,15)-(16,16) = "|"
+ │ │ │ └── closing_loc: (16,17)-(16,18) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (19,2)-(19,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (19,2)-(19,3))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: (16,12)-(16,14) = "do"
+ │ │ └── closing_loc: (20,0)-(20,3) = "end"
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── @ CallNode (location: (22,0)-(26,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (22,0)-(22,3) = "foo"
+ ├── opening_loc: (22,3)-(22,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (22,4)-(22,10))
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (22,4)-(22,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (22,4)-(22,10) = "<<-DOC"
+ │ ├── content_loc: (23,0)-(23,0) = " b\n"
+ │ ├── closing_loc: (24,0)-(24,0) = "DOC\n"
+ │ └── unescaped: " b\n"
+ ├── closing_loc: (22,10)-(22,11) = ")"
+ ├── block:
+ │ @ BlockNode (location: (22,12)-(26,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (25,2)-(25,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (25,2)-(25,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (25,2)-(25,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── opening_loc: (22,12)-(22,14) = "do"
+ │ └── closing_loc: (26,0)-(26,3) = "end"
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/def.txt b/test/prism/snapshots/unparser/corpus/semantic/def.txt
new file mode 100644
index 0000000000..0f9242b53a
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/def.txt
@@ -0,0 +1,89 @@
+@ ProgramNode (location: (1,0)-(7,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,3))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(3,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (2,2)-(2,9))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (2,3)-(2,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,3)-(2,8))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (2,3)-(2,4))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (2,3)-(2,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,5)-(2,6) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,7)-(2,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (2,7)-(2,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (2,7)-(2,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "-"
+ │ │ ├── opening_loc: (2,2)-(2,3) = "("
+ │ │ └── closing_loc: (2,8)-(2,9) = ")"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── @ DefNode (location: (5,0)-(7,3))
+ ├── name: :foo
+ ├── name_loc: (5,4)-(5,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (6,2)-(6,20))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (6,2)-(6,20))
+ │ ├── expression:
+ │ │ @ CallNode (location: (6,2)-(6,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,2)-(6,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── keyword_loc: (6,4)-(6,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ ConstantReadNode (location: (6,11)-(6,20))
+ │ └── name: :Exception
+ ├── locals: []
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (7,0)-(7,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/dstr.txt b/test/prism/snapshots/unparser/corpus/semantic/dstr.txt
new file mode 100644
index 0000000000..126886f3e0
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/dstr.txt
@@ -0,0 +1,547 @@
+@ ProgramNode (location: (1,0)-(127,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(127,11))
+ └── body: (length: 33)
+ ├── @ StringNode (location: (1,0)-(1,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,5) = "<<DOC"
+ │ ├── content_loc: (2,0)-(1,0) = ""
+ │ ├── closing_loc: (2,0)-(2,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (4,0)-(4,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (4,0)-(4,7) = "<<'DOC'"
+ │ ├── content_loc: (5,0)-(4,0) = ""
+ │ ├── closing_loc: (5,0)-(5,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (7,0)-(7,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,6) = "<<~DOC"
+ │ ├── content_loc: (8,0)-(7,0) = ""
+ │ ├── closing_loc: (8,0)-(8,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (10,0)-(10,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (10,0)-(10,8) = "<<~'DOC'"
+ │ ├── content_loc: (11,0)-(10,0) = ""
+ │ ├── closing_loc: (11,0)-(11,0) = "DOC\n"
+ │ └── unescaped: ""
+ ├── @ StringNode (location: (13,0)-(13,5))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (13,0)-(13,5) = "<<DOC"
+ │ ├── content_loc: (14,0)-(14,0) = " a\n"
+ │ ├── closing_loc: (15,0)-(15,0) = "DOC\n"
+ │ └── unescaped: " a\n"
+ ├── @ StringNode (location: (17,0)-(17,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (17,0)-(17,7) = "<<'DOC'"
+ │ ├── content_loc: (18,0)-(18,0) = " a\n"
+ │ ├── closing_loc: (19,0)-(19,0) = "DOC\n"
+ │ └── unescaped: " a\n"
+ ├── @ InterpolatedStringNode (location: (21,0)-(21,5))
+ │ ├── opening_loc: (21,0)-(21,5) = "<<DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (22,0)-(23,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (22,0)-(23,2) = " a\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a\n "
+ │ │ ├── @ EmbeddedStatementsNode (location: (23,2)-(23,5))
+ │ │ │ ├── opening_loc: (23,2)-(23,4) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (23,4)-(23,5) = "}"
+ │ │ └── @ StringNode (location: (23,5)-(23,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (23,5)-(23,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (24,0)-(24,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (26,0)-(26,6))
+ │ ├── opening_loc: (26,0)-(26,6) = "<<~DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (27,0)-(28,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (27,0)-(28,2) = " a\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (28,2)-(28,5))
+ │ │ │ ├── opening_loc: (28,2)-(28,4) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (28,4)-(28,5) = "}"
+ │ │ └── @ StringNode (location: (28,5)-(28,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (28,5)-(28,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (29,0)-(29,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (31,0)-(31,6))
+ │ ├── opening_loc: (31,0)-(31,6) = "<<~DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (32,0)-(33,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (32,0)-(33,2) = " a\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (33,2)-(33,5))
+ │ │ │ ├── opening_loc: (33,2)-(33,4) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (33,4)-(33,5) = "}"
+ │ │ └── @ StringNode (location: (33,5)-(34,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (33,5)-(34,0) = "\n b\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\nb\n"
+ │ └── closing_loc: (35,0)-(35,0) = "DOC\n"
+ ├── @ StringNode (location: (37,0)-(37,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (37,0)-(37,6) = "<<~DOC"
+ │ ├── content_loc: (38,0)-(39,0) = " a\n b\n"
+ │ ├── closing_loc: (40,0)-(40,0) = "DOC\n"
+ │ └── unescaped: "a\n b\n"
+ ├── @ StringNode (location: (42,0)-(42,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (42,0)-(42,7) = "<<'DOC'"
+ │ ├── content_loc: (43,0)-(45,0) = "a\n\nb\n"
+ │ ├── closing_loc: (46,0)-(46,0) = "DOC\n"
+ │ └── unescaped: "a\n\nb\n"
+ ├── @ StringNode (location: (48,0)-(48,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (48,0)-(48,7) = "<<'DOC'"
+ │ ├── content_loc: (49,0)-(51,0) = " a\n\n b\n"
+ │ ├── closing_loc: (52,0)-(52,0) = "DOC\n"
+ │ └── unescaped: " a\n\n b\n"
+ ├── @ StringNode (location: (54,0)-(54,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (54,0)-(54,7) = "<<'DOC'"
+ │ ├── content_loc: (55,0)-(55,0) = " a\\nb\n"
+ │ ├── closing_loc: (56,0)-(56,0) = "DOC\n"
+ │ └── unescaped: " a\\nb\n"
+ ├── @ InterpolatedStringNode (location: (58,0)-(58,5))
+ │ ├── opening_loc: (58,0)-(58,5) = "<<DOC"
+ │ ├── parts: (length: 4)
+ │ │ ├── @ EmbeddedStatementsNode (location: (59,0)-(59,3))
+ │ │ │ ├── opening_loc: (59,0)-(59,2) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (59,2)-(59,3) = "}"
+ │ │ ├── @ StringNode (location: (59,3)-(60,1))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (59,3)-(60,1) = "a\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n "
+ │ │ ├── @ EmbeddedStatementsNode (location: (60,1)-(60,4))
+ │ │ │ ├── opening_loc: (60,1)-(60,3) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (60,3)-(60,4) = "}"
+ │ │ └── @ StringNode (location: (60,4)-(60,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (60,4)-(60,0) = "a\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\n"
+ │ └── closing_loc: (61,0)-(61,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (63,0)-(63,5))
+ │ ├── opening_loc: (63,0)-(63,5) = "<<DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (64,0)-(64,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (64,0)-(64,2) = " "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " "
+ │ │ ├── @ EmbeddedStatementsNode (location: (64,2)-(64,5))
+ │ │ │ ├── opening_loc: (64,2)-(64,4) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (64,4)-(64,5) = "}"
+ │ │ └── @ StringNode (location: (64,5)-(65,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (64,5)-(65,0) = "\n \\\#{}\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n \#{}\n"
+ │ └── closing_loc: (66,0)-(66,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (68,0)-(68,5))
+ │ ├── opening_loc: (68,0)-(68,5) = "<<DOC"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (69,0)-(69,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (69,0)-(69,2) = " a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " a"
+ │ │ ├── @ EmbeddedStatementsNode (location: (69,2)-(69,5))
+ │ │ │ ├── opening_loc: (69,2)-(69,4) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (69,4)-(69,5) = "}"
+ │ │ └── @ StringNode (location: (69,5)-(70,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (69,5)-(70,0) = "b\n c\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b\n c\n"
+ │ └── closing_loc: (71,0)-(71,0) = "DOC\n"
+ ├── @ InterpolatedStringNode (location: (73,0)-(73,6))
+ │ ├── opening_loc: (73,0)-(73,6) = "<<~DOC"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (74,2)-(74,5))
+ │ │ │ ├── opening_loc: (74,2)-(74,4) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (74,4)-(74,5) = "}"
+ │ │ └── @ StringNode (location: (74,5)-(74,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (74,5)-(74,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (75,0)-(75,0) = "DOC\n"
+ ├── @ IfNode (location: (77,0)-(81,3))
+ │ ├── if_keyword_loc: (77,0)-(77,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (77,3)-(77,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (78,2)-(78,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (78,2)-(78,8))
+ │ │ ├── opening_loc: (78,2)-(78,8) = "<<~DOC"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (79,4)-(79,7))
+ │ │ │ │ ├── opening_loc: (79,4)-(79,6) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (79,6)-(79,7) = "}"
+ │ │ │ └── @ StringNode (location: (79,7)-(79,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (79,7)-(79,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (80,0)-(80,0) = " DOC\n"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
+ ├── @ IfNode (location: (83,0)-(87,3))
+ │ ├── if_keyword_loc: (83,0)-(83,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (83,3)-(83,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (84,2)-(84,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (84,2)-(84,8))
+ │ │ ├── opening_loc: (84,2)-(84,8) = "<<~DOC"
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (85,0)-(85,5))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (85,0)-(85,5) = " b"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (85,5)-(85,8))
+ │ │ │ │ ├── opening_loc: (85,5)-(85,7) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (85,7)-(85,8) = "}"
+ │ │ │ └── @ StringNode (location: (85,8)-(85,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (85,8)-(85,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (86,0)-(86,0) = " DOC\n"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (87,0)-(87,3) = "end"
+ ├── @ IfNode (location: (89,0)-(93,3))
+ │ ├── if_keyword_loc: (89,0)-(89,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (89,3)-(89,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (90,2)-(90,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (90,2)-(90,8))
+ │ │ ├── opening_loc: (90,2)-(90,8) = "<<~DOC"
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (91,4)-(91,7))
+ │ │ │ │ ├── opening_loc: (91,4)-(91,6) = "\#{"
+ │ │ │ │ ├── statements: ∅
+ │ │ │ │ └── closing_loc: (91,6)-(91,7) = "}"
+ │ │ │ └── @ StringNode (location: (91,7)-(91,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (91,7)-(91,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ └── closing_loc: (92,0)-(92,0) = " DOC\n"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
+ ├── @ IfNode (location: (95,0)-(101,3))
+ │ ├── if_keyword_loc: (95,0)-(95,2) = "if"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (95,3)-(95,7))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (96,2)-(96,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ StringNode (location: (96,2)-(96,10))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (96,2)-(96,10) = "<<-'DOC'"
+ │ │ ├── content_loc: (97,0)-(99,0) = " a\n\n b\n"
+ │ │ ├── closing_loc: (100,0)-(100,0) = " DOC\n"
+ │ │ └── unescaped: " a\n\n b\n"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (101,0)-(101,3) = "end"
+ ├── @ InterpolatedStringNode (location: (103,0)-(103,6))
+ │ ├── opening_loc: (103,0)-(103,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (103,1)-(103,4))
+ │ │ │ ├── opening_loc: (103,1)-(103,3) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (103,3)-(103,4) = "}"
+ │ │ └── @ StringNode (location: (103,4)-(103,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (103,4)-(103,5) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ └── closing_loc: (103,5)-(103,6) = "\""
+ ├── @ InterpolatedStringNode (location: (105,0)-(105,12))
+ │ ├── opening_loc: (105,0)-(105,2) = "%("
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (105,2)-(105,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (105,2)-(105,5) = "\\n\""
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n\""
+ │ │ ├── @ EmbeddedStatementsNode (location: (105,5)-(105,8))
+ │ │ │ ├── opening_loc: (105,5)-(105,7) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (105,7)-(105,8) = "}"
+ │ │ └── @ StringNode (location: (105,8)-(105,11))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (105,8)-(105,11) = "\"\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\"\n"
+ │ └── closing_loc: (105,11)-(105,12) = ")"
+ ├── @ InterpolatedStringNode (location: (107,0)-(107,14))
+ │ ├── opening_loc: (107,0)-(107,3) = "%Q("
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (107,3)-(107,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (107,3)-(107,7) = "-\\n\""
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "-\n\""
+ │ │ ├── @ EmbeddedStatementsNode (location: (107,7)-(107,10))
+ │ │ │ ├── opening_loc: (107,7)-(107,9) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (107,9)-(107,10) = "}"
+ │ │ └── @ StringNode (location: (107,10)-(107,13))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (107,10)-(107,13) = "\"\\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\"\n"
+ │ └── closing_loc: (107,13)-(107,14) = ")"
+ ├── @ InterpolatedStringNode (location: (109,0)-(111,2))
+ │ ├── opening_loc: (109,0)-(109,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (109,1)-(109,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (109,1)-(109,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (110,0)-(110,3))
+ │ │ │ ├── opening_loc: (110,0)-(110,2) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (110,2)-(110,3) = "}"
+ │ │ └── @ StringNode (location: (110,3)-(111,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (110,3)-(111,1) = "\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\nb"
+ │ └── closing_loc: (111,1)-(111,2) = "\""
+ ├── @ InterpolatedStringNode (location: (113,0)-(114,2))
+ │ ├── opening_loc: (113,0)-(113,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (113,1)-(113,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (113,1)-(113,4) = "a\\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (113,4)-(113,7))
+ │ │ │ ├── opening_loc: (113,4)-(113,6) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (113,6)-(113,7) = "}"
+ │ │ └── @ StringNode (location: (113,7)-(114,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (113,7)-(114,1) = "\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\nb"
+ │ └── closing_loc: (114,1)-(114,2) = "\""
+ ├── @ InterpolatedStringNode (location: (116,0)-(117,7))
+ │ ├── opening_loc: (116,0)-(116,1) = "\""
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (116,1)-(116,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (116,1)-(116,0) = "a\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (117,0)-(117,3))
+ │ │ │ ├── opening_loc: (117,0)-(117,2) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (117,2)-(117,3) = "}"
+ │ │ └── @ StringNode (location: (117,3)-(117,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (117,3)-(117,6) = "\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\nb"
+ │ └── closing_loc: (117,6)-(117,7) = "\""
+ ├── @ StringConcatNode (location: (119,0)-(120,5))
+ │ ├── left:
+ │ │ @ StringNode (location: (119,0)-(119,3))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (119,0)-(119,1) = "'"
+ │ │ ├── content_loc: (119,1)-(119,2) = "a"
+ │ │ ├── closing_loc: (119,2)-(119,3) = "'"
+ │ │ └── unescaped: "a"
+ │ └── right:
+ │ @ InterpolatedStringNode (location: (120,0)-(120,5))
+ │ ├── opening_loc: (120,0)-(120,1) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (120,1)-(120,4))
+ │ │ ├── opening_loc: (120,1)-(120,3) = "\#{"
+ │ │ ├── statements: ∅
+ │ │ └── closing_loc: (120,3)-(120,4) = "}"
+ │ └── closing_loc: (120,4)-(120,5) = "\""
+ ├── @ StringConcatNode (location: (122,0)-(122,8))
+ │ ├── left:
+ │ │ @ StringConcatNode (location: (122,0)-(122,5))
+ │ │ ├── left:
+ │ │ │ @ StringNode (location: (122,0)-(122,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (122,0)-(122,1) = "\""
+ │ │ │ ├── content_loc: (122,1)-(122,1) = ""
+ │ │ │ ├── closing_loc: (122,1)-(122,2) = "\""
+ │ │ │ └── unescaped: ""
+ │ │ └── right:
+ │ │ @ StringNode (location: (122,3)-(122,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (122,3)-(122,4) = "\""
+ │ │ ├── content_loc: (122,4)-(122,4) = ""
+ │ │ ├── closing_loc: (122,4)-(122,5) = "\""
+ │ │ └── unescaped: ""
+ │ └── right:
+ │ @ StringNode (location: (122,6)-(122,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (122,6)-(122,7) = "\""
+ │ ├── content_loc: (122,7)-(122,7) = ""
+ │ ├── closing_loc: (122,7)-(122,8) = "\""
+ │ └── unescaped: ""
+ ├── @ StringConcatNode (location: (124,0)-(124,12))
+ │ ├── left:
+ │ │ @ InterpolatedStringNode (location: (124,0)-(124,8))
+ │ │ ├── opening_loc: (124,0)-(124,1) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (124,1)-(124,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (124,1)-(124,2) = "a"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ └── @ EmbeddedStatementsNode (location: (124,2)-(124,7))
+ │ │ │ ├── opening_loc: (124,2)-(124,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (124,4)-(124,6))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ InstanceVariableReadNode (location: (124,4)-(124,6))
+ │ │ │ │ └── name: :@a
+ │ │ │ └── closing_loc: (124,6)-(124,7) = "}"
+ │ │ └── closing_loc: (124,7)-(124,8) = "\""
+ │ └── right:
+ │ @ StringNode (location: (124,9)-(124,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (124,9)-(124,10) = "\""
+ │ ├── content_loc: (124,10)-(124,11) = "b"
+ │ ├── closing_loc: (124,11)-(124,12) = "\""
+ │ └── unescaped: "b"
+ ├── @ StringConcatNode (location: (125,0)-(125,10))
+ │ ├── left:
+ │ │ @ InterpolatedStringNode (location: (125,0)-(125,6))
+ │ │ ├── opening_loc: (125,0)-(125,1) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (125,1)-(125,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (125,1)-(125,2) = "a"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ └── @ EmbeddedVariableNode (location: (125,2)-(125,5))
+ │ │ │ ├── operator_loc: (125,2)-(125,3) = "#"
+ │ │ │ └── variable:
+ │ │ │ @ InstanceVariableReadNode (location: (125,3)-(125,5))
+ │ │ │ └── name: :@a
+ │ │ └── closing_loc: (125,5)-(125,6) = "\""
+ │ └── right:
+ │ @ StringNode (location: (125,7)-(125,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (125,7)-(125,8) = "\""
+ │ ├── content_loc: (125,8)-(125,9) = "b"
+ │ ├── closing_loc: (125,9)-(125,10) = "\""
+ │ └── unescaped: "b"
+ ├── @ StringConcatNode (location: (126,0)-(126,10))
+ │ ├── left:
+ │ │ @ InterpolatedStringNode (location: (126,0)-(126,6))
+ │ │ ├── opening_loc: (126,0)-(126,1) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (126,1)-(126,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (126,1)-(126,2) = "a"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ └── @ EmbeddedVariableNode (location: (126,2)-(126,5))
+ │ │ │ ├── operator_loc: (126,2)-(126,3) = "#"
+ │ │ │ └── variable:
+ │ │ │ @ GlobalVariableReadNode (location: (126,3)-(126,5))
+ │ │ │ └── name: :$a
+ │ │ └── closing_loc: (126,5)-(126,6) = "\""
+ │ └── right:
+ │ @ StringNode (location: (126,7)-(126,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (126,7)-(126,8) = "\""
+ │ ├── content_loc: (126,8)-(126,9) = "b"
+ │ ├── closing_loc: (126,9)-(126,10) = "\""
+ │ └── unescaped: "b"
+ └── @ StringConcatNode (location: (127,0)-(127,11))
+ ├── left:
+ │ @ InterpolatedStringNode (location: (127,0)-(127,7))
+ │ ├── opening_loc: (127,0)-(127,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (127,1)-(127,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (127,1)-(127,2) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ EmbeddedVariableNode (location: (127,2)-(127,6))
+ │ │ ├── operator_loc: (127,2)-(127,3) = "#"
+ │ │ └── variable:
+ │ │ @ ClassVariableReadNode (location: (127,3)-(127,6))
+ │ │ └── name: :@@a
+ │ └── closing_loc: (127,6)-(127,7) = "\""
+ └── right:
+ @ StringNode (location: (127,8)-(127,11))
+ ├── flags: ∅
+ ├── opening_loc: (127,8)-(127,9) = "\""
+ ├── content_loc: (127,9)-(127,10) = "b"
+ ├── closing_loc: (127,10)-(127,11) = "\""
+ └── unescaped: "b"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt b/test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt
new file mode 100644
index 0000000000..5a4881abd6
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/kwbegin.txt
@@ -0,0 +1,259 @@
+@ ProgramNode (location: (1,0)-(42,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(42,3))
+ └── body: (length: 8)
+ ├── @ BeginNode (location: (1,0)-(3,3))
+ │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (2,0)-(2,6))
+ │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ ├── @ BeginNode (location: (5,0)-(8,3))
+ │ ├── begin_keyword_loc: (5,0)-(5,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (6,0)-(6,6))
+ │ │ ├── keyword_loc: (6,0)-(6,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause:
+ │ │ @ ElseNode (location: (7,0)-(8,3))
+ │ │ ├── else_keyword_loc: (7,0)-(7,4) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
+ ├── @ BeginNode (location: (10,0)-(12,3))
+ │ ├── begin_keyword_loc: (10,0)-(10,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (11,2)-(11,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (11,2)-(11,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,2)-(11,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (12,0)-(12,3) = "end"
+ ├── @ BeginNode (location: (14,0)-(18,3))
+ │ ├── begin_keyword_loc: (14,0)-(14,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (15,2)-(15,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (15,2)-(15,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,2)-(15,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (16,0)-(17,3))
+ │ │ ├── keyword_loc: (16,0)-(16,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (17,2)-(17,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (17,2)-(17,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (17,2)-(17,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (18,0)-(18,3) = "end"
+ ├── @ BeginNode (location: (20,0)-(25,3))
+ │ ├── begin_keyword_loc: (20,0)-(20,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (21,2)-(22,3))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ CallNode (location: (21,2)-(21,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,2)-(21,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ └── @ CallNode (location: (22,2)-(22,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (22,2)-(22,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (23,0)-(24,3))
+ │ │ ├── keyword_loc: (23,0)-(23,6) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (24,2)-(24,3))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (24,2)-(24,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (24,2)-(24,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (25,0)-(25,3) = "end"
+ ├── @ BeginNode (location: (27,0)-(30,3))
+ │ ├── begin_keyword_loc: (27,0)-(27,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (28,0)-(28,8))
+ │ │ ├── keyword_loc: (28,0)-(28,6) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (28,7)-(28,8))
+ │ │ │ └── name: :A
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause:
+ │ │ @ ElseNode (location: (29,0)-(30,3))
+ │ │ ├── else_keyword_loc: (29,0)-(29,4) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (30,0)-(30,3) = "end"
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (30,0)-(30,3) = "end"
+ ├── @ BeginNode (location: (32,0)-(32,26))
+ │ ├── begin_keyword_loc: (32,0)-(32,5) = "begin"
+ │ ├── statements: ∅
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (32,7)-(32,15))
+ │ │ ├── keyword_loc: (32,7)-(32,13) = "rescue"
+ │ │ ├── exceptions: (length: 1)
+ │ │ │ └── @ ConstantReadNode (location: (32,14)-(32,15))
+ │ │ │ └── name: :A
+ │ │ ├── operator_loc: ∅
+ │ │ ├── reference: ∅
+ │ │ ├── statements: ∅
+ │ │ └── consequent: ∅
+ │ ├── else_clause:
+ │ │ @ ElseNode (location: (32,17)-(32,26))
+ │ │ ├── else_keyword_loc: (32,17)-(32,21) = "else"
+ │ │ ├── statements: ∅
+ │ │ └── end_keyword_loc: (32,23)-(32,26) = "end"
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (32,23)-(32,26) = "end"
+ └── @ BeginNode (location: (34,0)-(42,3))
+ ├── begin_keyword_loc: (34,0)-(34,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (35,2)-(35,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (35,2)-(35,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,2)-(35,3) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (36,0)-(39,3))
+ │ ├── keyword_loc: (36,0)-(36,6) = "rescue"
+ │ ├── exceptions: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (36,7)-(36,8))
+ │ │ └── name: :A
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (37,2)-(37,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (37,2)-(37,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── consequent:
+ │ @ RescueNode (location: (38,0)-(39,3))
+ │ ├── keyword_loc: (38,0)-(38,6) = "rescue"
+ │ ├── exceptions: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (38,7)-(38,8))
+ │ │ └── name: :B
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (39,2)-(39,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (39,2)-(39,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,2)-(39,3) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (40,0)-(42,3))
+ │ ├── ensure_keyword_loc: (40,0)-(40,6) = "ensure"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (41,2)-(41,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (41,2)-(41,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (41,2)-(41,3) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "d"
+ │ └── end_keyword_loc: (42,0)-(42,3) = "end"
+ └── end_keyword_loc: (42,0)-(42,3) = "end"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/literal.txt b/test/prism/snapshots/unparser/corpus/semantic/literal.txt
new file mode 100644
index 0000000000..c7f4fa8f9b
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/literal.txt
@@ -0,0 +1,92 @@
+@ ProgramNode (location: (1,0)-(14,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(14,10))
+ └── body: (length: 14)
+ ├── @ RationalNode (location: (1,0)-(1,4))
+ │ └── numeric:
+ │ @ FloatNode (location: (1,0)-(1,3))
+ ├── @ RationalNode (location: (2,0)-(2,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (2,0)-(2,2))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (3,0)-(3,3))
+ │ └── flags: hexadecimal
+ ├── @ IntegerNode (location: (4,0)-(4,5))
+ │ └── flags: decimal
+ ├── @ FloatNode (location: (5,0)-(5,4))
+ ├── @ FloatNode (location: (6,0)-(6,14))
+ ├── @ FloatNode (location: (7,0)-(7,15))
+ ├── @ StringNode (location: (8,0)-(8,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (8,0)-(8,1) = "?"
+ │ ├── content_loc: (8,1)-(8,2) = "c"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "c"
+ ├── @ RegularExpressionNode (location: (9,0)-(9,5))
+ │ ├── opening_loc: (9,0)-(9,3) = "%r("
+ │ ├── content_loc: (9,3)-(9,4) = "/"
+ │ ├── closing_loc: (9,4)-(9,5) = ")"
+ │ ├── unescaped: "/"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (10,0)-(10,6))
+ │ ├── opening_loc: (10,0)-(10,3) = "%r("
+ │ ├── content_loc: (10,3)-(10,5) = "\\)"
+ │ ├── closing_loc: (10,5)-(10,6) = ")"
+ │ ├── unescaped: ")"
+ │ └── flags: ∅
+ ├── @ InterpolatedRegularExpressionNode (location: (11,0)-(11,14))
+ │ ├── opening_loc: (11,0)-(11,3) = "%r("
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (11,3)-(11,10))
+ │ │ │ ├── opening_loc: (11,3)-(11,5) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (11,5)-(11,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ InstanceVariableReadNode (location: (11,5)-(11,9))
+ │ │ │ │ └── name: :@bar
+ │ │ │ └── closing_loc: (11,9)-(11,10) = "}"
+ │ │ └── @ StringNode (location: (11,10)-(11,13))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (11,10)-(11,13) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ ├── closing_loc: (11,13)-(11,14) = ")"
+ │ └── flags: ∅
+ ├── @ FloatNode (location: (12,0)-(12,16))
+ ├── @ FloatNode (location: (13,0)-(13,17))
+ └── @ CallNode (location: (14,0)-(14,10))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (14,0)-(14,1) = "w"
+ ├── opening_loc: (14,1)-(14,2) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (14,2)-(14,9))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (14,2)-(14,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (14,2)-(14,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (14,6)-(14,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (14,6)-(14,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (14,6)-(14,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── closing_loc: (14,9)-(14,10) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "w"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/send.txt b/test/prism/snapshots/unparser/corpus/semantic/send.txt
new file mode 100644
index 0000000000..700b94d8ec
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/send.txt
@@ -0,0 +1,157 @@
+@ ProgramNode (location: (1,0)-(6,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,15))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── @ CallNode (location: (2,0)-(2,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,0)-(2,3) = "foo"
+ │ ├── opening_loc: (2,3)-(2,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (2,4)-(2,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (2,4)-(2,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (2,5)-(2,6) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (4,0)-(4,15))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (4,0)-(4,10))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (4,0)-(4,8))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (4,0)-(4,1))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,0)-(4,1) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "a"
+ │ │ │ ├── call_operator_loc: (4,1)-(4,2) = "."
+ │ │ │ ├── message_loc: (4,2)-(4,5) = "==="
+ │ │ │ ├── opening_loc: (4,5)-(4,6) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (4,6)-(4,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (4,6)-(4,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (4,6)-(4,7) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "b"
+ │ │ │ ├── closing_loc: (4,7)-(4,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "==="
+ │ │ ├── call_operator_loc: (4,8)-(4,9) = "."
+ │ │ ├── message_loc: (4,9)-(4,10) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "c"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (4,11)-(4,13) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (4,14)-(4,15))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (4,14)-(4,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,14)-(4,15) = "d"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "d"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=="
+ └── @ CallNode (location: (6,0)-(6,15))
+ ├── receiver:
+ │ @ CallNode (location: (6,0)-(6,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (6,2)-(6,4) = "=="
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (6,5)-(6,15))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (6,5)-(6,15))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,5)-(6,8))
+ │ │ ├── receiver:
+ │ │ │ @ CallNode (location: (6,5)-(6,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (6,5)-(6,6) = "d"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "d"
+ │ │ ├── call_operator_loc: (6,6)-(6,7) = "."
+ │ │ ├── message_loc: (6,7)-(6,8) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "c"
+ │ ├── call_operator_loc: (6,8)-(6,9) = "."
+ │ ├── message_loc: (6,9)-(6,12) = "==="
+ │ ├── opening_loc: (6,12)-(6,13) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,13)-(6,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (6,13)-(6,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,13)-(6,14) = "c"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "c"
+ │ ├── closing_loc: (6,14)-(6,15) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "==="
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "=="
diff --git a/test/prism/snapshots/unparser/corpus/semantic/undef.txt b/test/prism/snapshots/unparser/corpus/semantic/undef.txt
new file mode 100644
index 0000000000..ec7eb7ad3e
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/undef.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(2,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,14))
+ └── body: (length: 2)
+ ├── @ UndefNode (location: (1,0)-(1,9))
+ │ ├── names: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,6)-(1,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── keyword_loc: (1,0)-(1,5) = "undef"
+ └── @ UndefNode (location: (2,0)-(2,14))
+ ├── names: (length: 2)
+ │ ├── @ SymbolNode (location: (2,6)-(2,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (2,6)-(2,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ SymbolNode (location: (2,11)-(2,14))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (2,11)-(2,14) = "bar"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "bar"
+ └── keyword_loc: (2,0)-(2,5) = "undef"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/while.txt b/test/prism/snapshots/unparser/corpus/semantic/while.txt
new file mode 100644
index 0000000000..f723dc6305
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/while.txt
@@ -0,0 +1,276 @@
+@ ProgramNode (location: (1,0)-(25,3))
+├── locals: [:foo, :a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(25,3))
+ └── body: (length: 7)
+ ├── @ UntilNode (location: (1,0)-(1,13))
+ │ ├── keyword_loc: (1,2)-(1,7) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,8)-(1,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,8)-(1,10) = "b?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,11)-(1,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,11)-(1,12) = "{"
+ │ │ │ └── closing_loc: (1,12)-(1,13) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "b?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,0)-(1,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (3,0)-(5,3))
+ │ ├── keyword_loc: (3,0)-(3,5) = "until"
+ │ ├── closing_loc: (5,0)-(5,3) = "end"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (3,6)-(3,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,6)-(3,8) = "b?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (3,9)-(3,11))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (3,9)-(3,10) = "{"
+ │ │ │ └── closing_loc: (3,10)-(3,11) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "b?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (4,2)-(4,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (4,2)-(4,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,2)-(4,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (7,0)-(7,19))
+ │ ├── keyword_loc: (7,10)-(7,15) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ LocalVariableReadNode (location: (7,16)-(7,19))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (7,0)-(7,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (7,0)-(7,9))
+ │ │ ├── name: :foo
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (7,6)-(7,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,6)-(7,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (7,4)-(7,5) = "="
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (9,0)-(9,18))
+ │ ├── keyword_loc: (9,2)-(9,7) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ AndNode (location: (9,8)-(9,18))
+ │ │ ├── left:
+ │ │ │ @ CallNode (location: (9,8)-(9,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,8)-(9,9) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ ├── right:
+ │ │ │ @ CallNode (location: (9,13)-(9,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,13)-(9,14) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (9,15)-(9,18))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (9,15)-(9,16) = "{"
+ │ │ │ │ └── closing_loc: (9,17)-(9,18) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "a"
+ │ │ └── operator_loc: (9,10)-(9,12) = "&&"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (9,0)-(9,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (9,0)-(9,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (11,0)-(13,3))
+ │ ├── keyword_loc: (11,0)-(11,5) = "while"
+ │ ├── closing_loc: (13,0)-(13,3) = "end"
+ │ ├── predicate:
+ │ │ @ LocalVariableWriteNode (location: (11,6)-(11,11))
+ │ │ ├── name: :a
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (11,6)-(11,7) = "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (11,10)-(11,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,10)-(11,11) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "b"
+ │ │ └── operator_loc: (11,8)-(11,9) = "="
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (12,2)-(12,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (12,2)-(12,3))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (15,0)-(18,3))
+ │ ├── keyword_loc: (15,2)-(15,7) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (15,8)-(18,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,8)-(15,9) = "b"
+ │ │ ├── opening_loc: (15,9)-(15,10) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,10)-(15,16))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (15,10)-(15,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (15,10)-(15,16) = "<<-FOO"
+ │ │ │ ├── content_loc: (16,0)-(15,0) = ""
+ │ │ │ ├── closing_loc: (16,0)-(16,0) = "FOO\n"
+ │ │ │ └── unescaped: ""
+ │ │ ├── closing_loc: (15,16)-(15,17) = ")"
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (15,18)-(18,3))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (17,2)-(17,3))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (17,2)-(17,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (17,2)-(17,3) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── opening_loc: (15,18)-(15,20) = "do"
+ │ │ │ └── closing_loc: (18,0)-(18,3) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (15,0)-(15,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (15,0)-(15,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── flags: ∅
+ └── @ ModuleNode (location: (20,0)-(25,3))
+ ├── locals: [:foo]
+ ├── module_keyword_loc: (20,0)-(20,6) = "module"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (20,7)-(20,8))
+ │ └── name: :A
+ ├── body:
+ │ @ StatementsNode (location: (21,2)-(24,5))
+ │ └── body: (length: 2)
+ │ ├── @ LocalVariableWriteNode (location: (21,2)-(21,11))
+ │ │ ├── name: :foo
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (21,2)-(21,5) = "foo"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (21,8)-(21,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,8)-(21,11) = "exp"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "exp"
+ │ │ └── operator_loc: (21,6)-(21,7) = "="
+ │ └── @ WhileNode (location: (22,2)-(24,5))
+ │ ├── keyword_loc: (22,2)-(22,7) = "while"
+ │ ├── closing_loc: (24,2)-(24,5) = "end"
+ │ ├── predicate:
+ │ │ @ LocalVariableReadNode (location: (22,8)-(22,11))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (23,4)-(23,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (23,4)-(23,13))
+ │ │ ├── name: :foo
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (23,4)-(23,7) = "foo"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (23,10)-(23,13))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (23,10)-(23,13) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── operator_loc: (23,8)-(23,9) = "="
+ │ └── flags: ∅
+ ├── end_keyword_loc: (25,0)-(25,3) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/until.txt b/test/prism/snapshots/until.txt
new file mode 100644
index 0000000000..e707dad95a
--- /dev/null
+++ b/test/prism/snapshots/until.txt
@@ -0,0 +1,103 @@
+@ ProgramNode (location: (1,0)-(11,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,21))
+ └── body: (length: 6)
+ ├── @ UntilNode (location: (1,0)-(1,18))
+ │ ├── keyword_loc: (1,0)-(1,5) = "until"
+ │ ├── closing_loc: (1,15)-(1,18) = "end"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (1,6)-(1,10))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ │ └── flags: decimal
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (3,0)-(3,12))
+ │ ├── keyword_loc: (3,2)-(3,7) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (3,8)-(3,12))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,0)-(3,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,0)-(3,1))
+ │ │ └── flags: decimal
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (5,0)-(5,16))
+ │ ├── keyword_loc: (5,6)-(5,11) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (5,12)-(5,16))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,0)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (5,0)-(5,5))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (5,0)-(5,5) = "break"
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (7,0)-(7,15))
+ │ ├── keyword_loc: (7,5)-(7,10) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (7,11)-(7,15))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (7,0)-(7,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (7,0)-(7,4))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (7,0)-(7,4) = "next"
+ │ └── flags: ∅
+ ├── @ UntilNode (location: (9,0)-(9,17))
+ │ ├── keyword_loc: (9,7)-(9,12) = "until"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (9,13)-(9,17))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (9,0)-(9,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (9,0)-(9,6))
+ │ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ │ └── arguments: ∅
+ │ └── flags: ∅
+ └── @ UntilNode (location: (11,0)-(11,21))
+ ├── keyword_loc: (11,11)-(11,16) = "until"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (11,17)-(11,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,17)-(11,21) = "bar?"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar?"
+ ├── statements:
+ │ @ StatementsNode (location: (11,0)-(11,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,0)-(11,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,4)-(11,10))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (11,4)-(11,6))
+ │ │ │ ├── opening_loc: (11,4)-(11,5) = ":"
+ │ │ │ ├── value_loc: (11,5)-(11,6) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ └── @ SymbolNode (location: (11,8)-(11,10))
+ │ │ ├── opening_loc: (11,8)-(11,9) = ":"
+ │ │ ├── value_loc: (11,9)-(11,10) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── flags: ∅
diff --git a/test/prism/snapshots/variables.txt b/test/prism/snapshots/variables.txt
new file mode 100644
index 0000000000..8366c5b9e4
--- /dev/null
+++ b/test/prism/snapshots/variables.txt
@@ -0,0 +1,322 @@
+@ ProgramNode (location: (1,0)-(45,9))
+├── locals: [:abc, :foo, :bar, :baz]
+└── statements:
+ @ StatementsNode (location: (1,0)-(45,9))
+ └── body: (length: 24)
+ ├── @ ClassVariableReadNode (location: (1,0)-(1,5))
+ │ └── name: :@@abc
+ ├── @ ClassVariableWriteNode (location: (3,0)-(3,9))
+ │ ├── name: :@@abc
+ │ ├── name_loc: (3,0)-(3,5) = "@@abc"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,8)-(3,9))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (3,6)-(3,7) = "="
+ ├── @ MultiWriteNode (location: (5,0)-(5,16))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ ClassVariableTargetNode (location: (5,0)-(5,5))
+ │ │ │ └── name: :@@foo
+ │ │ └── @ ClassVariableTargetNode (location: (5,7)-(5,12))
+ │ │ └── name: :@@bar
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (5,13)-(5,14) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (5,15)-(5,16))
+ │ └── flags: decimal
+ ├── @ ClassVariableWriteNode (location: (7,0)-(7,12))
+ │ ├── name: :@@foo
+ │ ├── name_loc: (7,0)-(7,5) = "@@foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (7,8)-(7,12))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (7,8)-(7,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (7,11)-(7,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (7,6)-(7,7) = "="
+ ├── @ GlobalVariableWriteNode (location: (9,0)-(9,8))
+ │ ├── name: :$abc
+ │ ├── name_loc: (9,0)-(9,4) = "$abc"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (9,7)-(9,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (9,5)-(9,6) = "="
+ ├── @ GlobalVariableReadNode (location: (11,0)-(11,4))
+ │ └── name: :$abc
+ ├── @ InstanceVariableReadNode (location: (13,0)-(13,4))
+ │ └── name: :@abc
+ ├── @ InstanceVariableWriteNode (location: (15,0)-(15,8))
+ │ ├── name: :@abc
+ │ ├── name_loc: (15,0)-(15,4) = "@abc"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (15,7)-(15,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (15,5)-(15,6) = "="
+ ├── @ CallNode (location: (17,0)-(17,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── @ LocalVariableWriteNode (location: (19,0)-(19,7))
+ │ ├── name: :abc
+ │ ├── depth: 0
+ │ ├── name_loc: (19,0)-(19,3) = "abc"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (19,6)-(19,7))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (19,4)-(19,5) = "="
+ ├── @ MultiWriteNode (location: (21,0)-(21,14))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ GlobalVariableTargetNode (location: (21,0)-(21,4))
+ │ │ │ └── name: :$foo
+ │ │ └── @ GlobalVariableTargetNode (location: (21,6)-(21,10))
+ │ │ └── name: :$bar
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (21,11)-(21,12) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (21,13)-(21,14))
+ │ └── flags: decimal
+ ├── @ GlobalVariableWriteNode (location: (23,0)-(23,11))
+ │ ├── name: :$foo
+ │ ├── name_loc: (23,0)-(23,4) = "$foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (23,7)-(23,11))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (23,7)-(23,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (23,10)-(23,11))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (23,5)-(23,6) = "="
+ ├── @ MultiWriteNode (location: (25,0)-(25,14))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ InstanceVariableTargetNode (location: (25,0)-(25,4))
+ │ │ │ └── name: :@foo
+ │ │ └── @ InstanceVariableTargetNode (location: (25,6)-(25,10))
+ │ │ └── name: :@bar
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (25,11)-(25,12) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (25,13)-(25,14))
+ │ └── flags: decimal
+ ├── @ InstanceVariableWriteNode (location: (27,0)-(27,11))
+ │ ├── name: :@foo
+ │ ├── name_loc: (27,0)-(27,4) = "@foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (27,7)-(27,11))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (27,7)-(27,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (27,10)-(27,11))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (27,5)-(27,6) = "="
+ ├── @ LocalVariableWriteNode (location: (29,0)-(29,7))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (29,0)-(29,3) = "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (29,6)-(29,7))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (29,4)-(29,5) = "="
+ ├── @ LocalVariableWriteNode (location: (29,9)-(29,19))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (29,9)-(29,12) = "foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (29,15)-(29,19))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (29,15)-(29,16))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (29,18)-(29,19))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (29,13)-(29,14) = "="
+ ├── @ LocalVariableWriteNode (location: (31,0)-(31,10))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (31,0)-(31,3) = "foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (31,6)-(31,10))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (31,6)-(31,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (31,9)-(31,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (31,4)-(31,5) = "="
+ ├── @ MultiWriteNode (location: (33,0)-(33,13))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (33,0)-(33,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (33,5)-(33,6))
+ │ │ ├── operator_loc: (33,5)-(33,6) = "*"
+ │ │ └── expression: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (33,7)-(33,8) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (33,9)-(33,13))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (33,9)-(33,10))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (33,12)-(33,13))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (35,0)-(35,11))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (35,0)-(35,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (35,3)-(35,4))
+ │ │ ├── operator_loc: (35,3)-(35,4) = ","
+ │ │ └── expression: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (35,5)-(35,6) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (35,7)-(35,11))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (35,7)-(35,8))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (35,10)-(35,11))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (37,0)-(37,16))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (37,0)-(37,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (37,5)-(37,9))
+ │ │ ├── operator_loc: (37,5)-(37,6) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (37,6)-(37,9))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (37,10)-(37,11) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (37,12)-(37,16))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (37,12)-(37,13))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (37,15)-(37,16))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (39,0)-(39,27))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (39,0)-(39,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ MultiTargetNode (location: (39,5)-(39,15))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (39,6)-(39,9))
+ │ │ │ │ ├── name: :bar
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (39,11)-(39,14))
+ │ │ │ ├── name: :baz
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: (39,5)-(39,6) = "("
+ │ │ └── rparen_loc: (39,14)-(39,15) = ")"
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (39,16)-(39,17) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (39,18)-(39,27))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (39,18)-(39,19))
+ │ │ │ └── flags: decimal
+ │ │ └── @ ArrayNode (location: (39,21)-(39,27))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (39,22)-(39,23))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (39,25)-(39,26))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (39,21)-(39,22) = "["
+ │ │ └── closing_loc: (39,26)-(39,27) = "]"
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ LocalVariableWriteNode (location: (41,0)-(41,10))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (41,0)-(41,3) = "foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (41,6)-(41,10))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SplatNode (location: (41,6)-(41,10))
+ │ │ │ ├── operator_loc: (41,6)-(41,7) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableReadNode (location: (41,7)-(41,10))
+ │ │ │ ├── name: :bar
+ │ │ │ └── depth: 0
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (41,4)-(41,5) = "="
+ ├── @ ConstantWriteNode (location: (43,0)-(43,10))
+ │ ├── name: :Foo
+ │ ├── name_loc: (43,0)-(43,3) = "Foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (43,6)-(43,10))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (43,6)-(43,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (43,9)-(43,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (43,4)-(43,5) = "="
+ └── @ ParenthesesNode (location: (45,0)-(45,9))
+ ├── body:
+ │ @ StatementsNode (location: (45,1)-(45,8))
+ │ └── body: (length: 3)
+ │ ├── @ CallNode (location: (45,1)-(45,2))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,1)-(45,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── @ CallNode (location: (45,4)-(45,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (45,4)-(45,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ └── @ CallNode (location: (45,7)-(45,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (45,7)-(45,8) = "c"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "c"
+ ├── opening_loc: (45,0)-(45,1) = "("
+ └── closing_loc: (45,8)-(45,9) = ")"
diff --git a/test/prism/snapshots/while.txt b/test/prism/snapshots/while.txt
new file mode 100644
index 0000000000..0ad9740324
--- /dev/null
+++ b/test/prism/snapshots/while.txt
@@ -0,0 +1,283 @@
+@ ProgramNode (location: (1,0)-(19,52))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(19,52))
+ └── body: (length: 10)
+ ├── @ WhileNode (location: (1,0)-(1,18))
+ │ ├── keyword_loc: (1,0)-(1,5) = "while"
+ │ ├── closing_loc: (1,15)-(1,18) = "end"
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (1,6)-(1,10))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ │ └── flags: decimal
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (3,0)-(3,12))
+ │ ├── keyword_loc: (3,2)-(3,7) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (3,8)-(3,12))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,0)-(3,1))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,0)-(3,1))
+ │ │ └── flags: decimal
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (5,0)-(5,16))
+ │ ├── keyword_loc: (5,6)-(5,11) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (5,12)-(5,16))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,0)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (5,0)-(5,5))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (5,0)-(5,5) = "break"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (7,0)-(7,15))
+ │ ├── keyword_loc: (7,5)-(7,10) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (7,11)-(7,15))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (7,0)-(7,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NextNode (location: (7,0)-(7,4))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (7,0)-(7,4) = "next"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (9,0)-(9,17))
+ │ ├── keyword_loc: (9,7)-(9,12) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ TrueNode (location: (9,13)-(9,17))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (9,0)-(9,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (9,0)-(9,6))
+ │ │ ├── keyword_loc: (9,0)-(9,6) = "return"
+ │ │ └── arguments: ∅
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (11,0)-(11,21))
+ │ ├── keyword_loc: (11,11)-(11,16) = "while"
+ │ ├── closing_loc: ∅
+ │ ├── predicate:
+ │ │ @ CallNode (location: (11,17)-(11,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,17)-(11,21) = "bar?"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar?"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (11,0)-(11,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (11,0)-(11,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,4)-(11,10))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ SymbolNode (location: (11,4)-(11,6))
+ │ │ │ │ ├── opening_loc: (11,4)-(11,5) = ":"
+ │ │ │ │ ├── value_loc: (11,5)-(11,6) = "a"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ └── @ SymbolNode (location: (11,8)-(11,10))
+ │ │ │ ├── opening_loc: (11,8)-(11,9) = ":"
+ │ │ │ ├── value_loc: (11,9)-(11,10) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (13,0)-(13,50))
+ │ ├── keyword_loc: (13,0)-(13,5) = "while"
+ │ ├── closing_loc: (13,47)-(13,50) = "end"
+ │ ├── predicate:
+ │ │ @ DefNode (location: (13,6)-(13,38))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (13,15)-(13,18) = "foo"
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (13,10)-(13,14))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (13,19)-(13,33))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (13,19)-(13,33))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (13,19)-(13,20) = "a"
+ │ │ │ │ ├── operator_loc: (13,21)-(13,22) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (13,23)-(13,33))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (13,23)-(13,26) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (13,27)-(13,33))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (13,27)-(13,29) = "do"
+ │ │ │ │ │ └── closing_loc: (13,30)-(13,33) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "tap"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── body: ∅
+ │ │ ├── locals: [:a]
+ │ │ ├── def_keyword_loc: (13,6)-(13,9) = "def"
+ │ │ ├── operator_loc: (13,14)-(13,15) = "."
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (13,35)-(13,38) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (13,40)-(13,45))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (13,40)-(13,45))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (13,40)-(13,45) = "break"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (15,0)-(15,47))
+ │ ├── keyword_loc: (15,0)-(15,5) = "while"
+ │ ├── closing_loc: (15,44)-(15,47) = "end"
+ │ ├── predicate:
+ │ │ @ ClassNode (location: (15,6)-(15,35))
+ │ │ ├── locals: [:a]
+ │ │ ├── class_keyword_loc: (15,6)-(15,11) = "class"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (15,12)-(15,15))
+ │ │ │ └── name: :Foo
+ │ │ ├── inheritance_operator_loc: ∅
+ │ │ ├── superclass: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (15,16)-(15,30))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (15,16)-(15,30))
+ │ │ │ ├── name: :a
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (15,16)-(15,17) = "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (15,20)-(15,30))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (15,20)-(15,23) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (15,24)-(15,30))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (15,24)-(15,26) = "do"
+ │ │ │ │ │ └── closing_loc: (15,27)-(15,30) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "tap"
+ │ │ │ └── operator_loc: (15,18)-(15,19) = "="
+ │ │ ├── end_keyword_loc: (15,32)-(15,35) = "end"
+ │ │ └── name: :Foo
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (15,37)-(15,42))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (15,37)-(15,42))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (15,37)-(15,42) = "break"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (17,0)-(17,48))
+ │ ├── keyword_loc: (17,0)-(17,5) = "while"
+ │ ├── closing_loc: (17,45)-(17,48) = "end"
+ │ ├── predicate:
+ │ │ @ SingletonClassNode (location: (17,6)-(17,36))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (17,6)-(17,11) = "class"
+ │ │ ├── operator_loc: (17,12)-(17,14) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (17,15)-(17,19))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (17,21)-(17,31))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (17,21)-(17,31))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (17,21)-(17,24) = "tap"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (17,25)-(17,31))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (17,25)-(17,27) = "do"
+ │ │ │ │ └── closing_loc: (17,28)-(17,31) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "tap"
+ │ │ └── end_keyword_loc: (17,33)-(17,36) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (17,38)-(17,43))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (17,38)-(17,43))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (17,38)-(17,43) = "break"
+ │ └── flags: ∅
+ └── @ WhileNode (location: (19,0)-(19,52))
+ ├── keyword_loc: (19,0)-(19,5) = "while"
+ ├── closing_loc: (19,49)-(19,52) = "end"
+ ├── predicate:
+ │ @ SingletonClassNode (location: (19,6)-(19,40))
+ │ ├── locals: [:a]
+ │ ├── class_keyword_loc: (19,6)-(19,11) = "class"
+ │ ├── operator_loc: (19,12)-(19,14) = "<<"
+ │ ├── expression:
+ │ │ @ SelfNode (location: (19,15)-(19,19))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (19,21)-(19,35))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableWriteNode (location: (19,21)-(19,35))
+ │ │ ├── name: :a
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (19,21)-(19,22) = "a"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (19,25)-(19,35))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,25)-(19,28) = "tap"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (19,29)-(19,35))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (19,29)-(19,31) = "do"
+ │ │ │ │ └── closing_loc: (19,32)-(19,35) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "tap"
+ │ │ └── operator_loc: (19,23)-(19,24) = "="
+ │ └── end_keyword_loc: (19,37)-(19,40) = "end"
+ ├── statements:
+ │ @ StatementsNode (location: (19,42)-(19,47))
+ │ └── body: (length: 1)
+ │ └── @ BreakNode (location: (19,42)-(19,47))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (19,42)-(19,47) = "break"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/__ENCODING__.txt b/test/prism/snapshots/whitequark/__ENCODING__.txt
new file mode 100644
index 0000000000..1b223bd8fe
--- /dev/null
+++ b/test/prism/snapshots/whitequark/__ENCODING__.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ SourceEncodingNode (location: (1,0)-(1,12))
diff --git a/test/prism/snapshots/whitequark/__ENCODING___legacy_.txt b/test/prism/snapshots/whitequark/__ENCODING___legacy_.txt
new file mode 100644
index 0000000000..1b223bd8fe
--- /dev/null
+++ b/test/prism/snapshots/whitequark/__ENCODING___legacy_.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ SourceEncodingNode (location: (1,0)-(1,12))
diff --git a/test/prism/snapshots/whitequark/alias.txt b/test/prism/snapshots/whitequark/alias.txt
new file mode 100644
index 0000000000..4a9e6727e1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/alias.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ AliasMethodNode (location: (1,0)-(1,14))
+ ├── new_name:
+ │ @ SymbolNode (location: (1,6)-(1,10))
+ │ ├── opening_loc: (1,6)-(1,7) = ":"
+ │ ├── value_loc: (1,7)-(1,10) = "foo"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "foo"
+ ├── old_name:
+ │ @ SymbolNode (location: (1,11)-(1,14))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,11)-(1,14) = "bar"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "bar"
+ └── keyword_loc: (1,0)-(1,5) = "alias"
diff --git a/test/prism/snapshots/whitequark/alias_gvar.txt b/test/prism/snapshots/whitequark/alias_gvar.txt
new file mode 100644
index 0000000000..56357fa15c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/alias_gvar.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(3,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,11))
+ └── body: (length: 2)
+ ├── @ AliasGlobalVariableNode (location: (1,0)-(1,11))
+ │ ├── new_name:
+ │ │ @ GlobalVariableReadNode (location: (1,6)-(1,8))
+ │ │ └── name: :$a
+ │ ├── old_name:
+ │ │ @ BackReferenceReadNode (location: (1,9)-(1,11))
+ │ └── keyword_loc: (1,0)-(1,5) = "alias"
+ └── @ AliasGlobalVariableNode (location: (3,0)-(3,11))
+ ├── new_name:
+ │ @ GlobalVariableReadNode (location: (3,6)-(3,8))
+ │ └── name: :$a
+ ├── old_name:
+ │ @ GlobalVariableReadNode (location: (3,9)-(3,11))
+ │ └── name: :$b
+ └── keyword_loc: (3,0)-(3,5) = "alias"
diff --git a/test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt b/test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt
new file mode 100644
index 0000000000..3d68cecdc2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ambiuous_quoted_label_in_ternary_operator.txt
@@ -0,0 +1,58 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,15))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── statements:
+ │ @ StatementsNode (location: (1,4)-(1,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,10))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,5) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,7) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (1,8)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,8)-(1,9) = "'"
+ │ │ ├── content_loc: (1,9)-(1,9) = ""
+ │ │ ├── closing_loc: (1,9)-(1,10) = "'"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "&"
+ ├── consequent:
+ │ @ ElseNode (location: (1,10)-(1,15))
+ │ ├── else_keyword_loc: (1,10)-(1,11) = ":"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ NilNode (location: (1,12)-(1,15))
+ │ └── end_keyword_loc: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/and.txt b/test/prism/snapshots/whitequark/and.txt
new file mode 100644
index 0000000000..ae1b5880d8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/and.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(3,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,11))
+ └── body: (length: 2)
+ ├── @ AndNode (location: (1,0)-(1,10))
+ │ ├── left:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── right:
+ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── operator_loc: (1,4)-(1,6) = "&&"
+ └── @ AndNode (location: (3,0)-(3,11))
+ ├── left:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── right:
+ │ @ CallNode (location: (3,8)-(3,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ └── operator_loc: (3,4)-(3,7) = "and"
diff --git a/test/prism/snapshots/whitequark/and_asgn.txt b/test/prism/snapshots/whitequark/and_asgn.txt
new file mode 100644
index 0000000000..5e4675ac91
--- /dev/null
+++ b/test/prism/snapshots/whitequark/and_asgn.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(3,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,15))
+ └── body: (length: 2)
+ ├── @ CallAndWriteNode (location: (1,0)-(1,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "a"
+ │ ├── write_name: "a="
+ │ ├── operator_loc: (1,6)-(1,9) = "&&="
+ │ └── value:
+ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ └── flags: decimal
+ └── @ CallAndWriteNode (location: (3,0)-(3,15))
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,3)-(3,9) = "[0, 1]"
+ ├── opening_loc: (3,3)-(3,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (3,4)-(3,5))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (3,7)-(3,8))
+ │ └── flags: decimal
+ ├── closing_loc: (3,8)-(3,9) = "]"
+ ├── flags: ∅
+ ├── read_name: "[]"
+ ├── write_name: "[]="
+ ├── operator_loc: (3,10)-(3,13) = "&&="
+ └── value:
+ @ IntegerNode (location: (3,14)-(3,15))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/and_or_masgn.txt b/test/prism/snapshots/whitequark/and_or_masgn.txt
new file mode 100644
index 0000000000..9b6bb94096
--- /dev/null
+++ b/test/prism/snapshots/whitequark/and_or_masgn.txt
@@ -0,0 +1,89 @@
+@ ProgramNode (location: (1,0)-(3,19))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,19))
+ └── body: (length: 2)
+ ├── @ AndNode (location: (1,0)-(1,19))
+ │ ├── left:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── right:
+ │ │ @ ParenthesesNode (location: (1,7)-(1,19))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,8)-(1,18))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ MultiWriteNode (location: (1,8)-(1,18))
+ │ │ │ ├── targets: (length: 2)
+ │ │ │ │ ├── @ LocalVariableTargetNode (location: (1,8)-(1,9))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── @ LocalVariableTargetNode (location: (1,11)-(1,12))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── lparen_loc: ∅
+ │ │ │ ├── rparen_loc: ∅
+ │ │ │ ├── operator_loc: (1,13)-(1,14) = "="
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (1,15)-(1,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,15)-(1,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── opening_loc: (1,7)-(1,8) = "("
+ │ │ └── closing_loc: (1,18)-(1,19) = ")"
+ │ └── operator_loc: (1,4)-(1,6) = "&&"
+ └── @ OrNode (location: (3,0)-(3,19))
+ ├── left:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── right:
+ │ @ ParenthesesNode (location: (3,7)-(3,19))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,8)-(3,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MultiWriteNode (location: (3,8)-(3,18))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (3,8)-(3,9))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (3,11)-(3,12))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (3,13)-(3,14) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (3,15)-(3,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,15)-(3,18) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── opening_loc: (3,7)-(3,8) = "("
+ │ └── closing_loc: (3,18)-(3,19) = ")"
+ └── operator_loc: (3,4)-(3,6) = "||"
diff --git a/test/prism/snapshots/whitequark/anonymous_blockarg.txt b/test/prism/snapshots/whitequark/anonymous_blockarg.txt
new file mode 100644
index 0000000000..3afc2995f2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/anonymous_blockarg.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,23))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,9))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (1,8)-(1,9))
+ │ ├── name: nil
+ │ ├── name_loc: ∅
+ │ └── operator_loc: (1,8)-(1,9) = "&"
+ ├── body:
+ │ @ StatementsNode (location: (1,12)-(1,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,12)-(1,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ ├── opening_loc: (1,15)-(1,16) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (1,17)-(1,18) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (1,16)-(1,17))
+ │ │ ├── expression: ∅
+ │ │ └── operator_loc: (1,16)-(1,17) = "&"
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:&]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,9)-(1,10) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,20)-(1,23) = "end"
diff --git a/test/prism/snapshots/whitequark/arg.txt b/test/prism/snapshots/whitequark/arg.txt
new file mode 100644
index 0000000000..d87f10db23
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(3,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,20))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(1,15))
+ │ ├── name: :f
+ │ ├── name_loc: (1,4)-(1,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,6)-(1,9))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,9))
+ │ │ │ └── name: :foo
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:foo]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ ├── rparen_loc: (1,9)-(1,10) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,12)-(1,15) = "end"
+ └── @ DefNode (location: (3,0)-(3,20))
+ ├── name: :f
+ ├── name_loc: (3,4)-(3,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (3,6)-(3,14))
+ │ ├── requireds: (length: 2)
+ │ │ ├── @ RequiredParameterNode (location: (3,6)-(3,9))
+ │ │ │ └── name: :foo
+ │ │ └── @ RequiredParameterNode (location: (3,11)-(3,14))
+ │ │ └── name: :bar
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:foo, :bar]
+ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (3,5)-(3,6) = "("
+ ├── rparen_loc: (3,14)-(3,15) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (3,17)-(3,20) = "end"
diff --git a/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt b/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt
new file mode 100644
index 0000000000..4db92126d7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg_duplicate_ignored.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(3,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,20))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(1,18))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,8)-(1,12))
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ RequiredParameterNode (location: (1,8)-(1,9))
+ │ │ │ │ └── name: :_
+ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
+ │ │ │ └── name: :_
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:_]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ ├── rparen_loc: (1,12)-(1,13) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,15)-(1,18) = "end"
+ └── @ DefNode (location: (3,0)-(3,20))
+ ├── name: :foo
+ ├── name_loc: (3,4)-(3,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (3,8)-(3,14))
+ │ ├── requireds: (length: 2)
+ │ │ ├── @ RequiredParameterNode (location: (3,8)-(3,10))
+ │ │ │ └── name: :_a
+ │ │ └── @ RequiredParameterNode (location: (3,12)-(3,14))
+ │ │ └── name: :_a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:_a]
+ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (3,7)-(3,8) = "("
+ ├── rparen_loc: (3,14)-(3,15) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (3,17)-(3,20) = "end"
diff --git a/test/prism/snapshots/whitequark/arg_label.txt b/test/prism/snapshots/whitequark/arg_label.txt
new file mode 100644
index 0000000000..1d9b43332a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg_label.txt
@@ -0,0 +1,109 @@
+@ ProgramNode (location: (1,0)-(6,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(6,12))
+ └── body: (length: 3)
+ ├── @ DefNode (location: (1,0)-(2,8))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,1)-(2,4))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,1)-(2,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (2,1)-(2,2) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,2)-(2,4))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (2,2)-(2,4))
+ │ │ │ ├── opening_loc: (2,2)-(2,3) = ":"
+ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (2,5)-(2,8) = "end"
+ ├── @ DefNode (location: (4,0)-(4,17))
+ │ ├── name: :foo
+ │ ├── name_loc: (4,4)-(4,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (4,10)-(4,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (4,10)-(4,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (4,10)-(4,11) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (4,11)-(4,13))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (4,11)-(4,13))
+ │ │ │ ├── opening_loc: (4,11)-(4,12) = ":"
+ │ │ │ ├── value_loc: (4,12)-(4,13) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (4,0)-(4,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (4,7)-(4,8) = "("
+ │ ├── rparen_loc: (4,8)-(4,9) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (4,14)-(4,17) = "end"
+ └── @ CallNode (location: (6,0)-(6,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (6,0)-(6,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (6,2)-(6,12))
+ │ ├── locals: []
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (6,4)-(6,6))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (6,4)-(6,5) = "|"
+ │ │ └── closing_loc: (6,5)-(6,6) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (6,7)-(6,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (6,7)-(6,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,7)-(6,8) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (6,8)-(6,10))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (6,8)-(6,10))
+ │ │ │ ├── opening_loc: (6,8)-(6,9) = ":"
+ │ │ │ ├── value_loc: (6,9)-(6,10) = "b"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "b"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a"
+ │ ├── opening_loc: (6,2)-(6,3) = "{"
+ │ └── closing_loc: (6,11)-(6,12) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/whitequark/arg_scope.txt b/test/prism/snapshots/whitequark/arg_scope.txt
new file mode 100644
index 0000000000..cfe376d04d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/arg_scope.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,6) = "lambda"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,6)-(1,13))
+ │ ├── locals: [:a]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,7)-(1,11))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 1)
+ │ │ │ └── @ BlockLocalVariableNode (location: (1,9)-(1,10))
+ │ │ │ └── name: :a
+ │ │ ├── opening_loc: (1,7)-(1,8) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,11)-(1,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,11)-(1,12))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── opening_loc: (1,6)-(1,7) = "{"
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ ├── flags: ∅
+ └── name: "lambda"
diff --git a/test/prism/snapshots/whitequark/args.txt b/test/prism/snapshots/whitequark/args.txt
new file mode 100644
index 0000000000..1f3a3b5c74
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args.txt
@@ -0,0 +1,972 @@
+@ ProgramNode (location: (1,0)-(63,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(63,21))
+ └── body: (length: 31)
+ ├── @ DefNode (location: (1,0)-(1,13))
+ │ ├── name: :f
+ │ ├── name_loc: (1,4)-(1,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,6)-(1,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (1,6)-(1,8))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (1,7)-(1,8) = "b"
+ │ │ └── operator_loc: (1,6)-(1,7) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,10)-(1,13) = "end"
+ ├── @ DefNode (location: (3,0)-(3,18))
+ │ ├── name: :f
+ │ ├── name_loc: (3,4)-(3,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (3,7)-(3,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (3,7)-(3,12))
+ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (3,8)-(3,11))
+ │ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (3,9)-(3,10))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── opening_loc: (3,8)-(3,9) = "("
+ │ │ │ │ └── closing_loc: (3,10)-(3,11) = ")"
+ │ │ │ ├── opening_loc: (3,7)-(3,8) = "("
+ │ │ │ └── closing_loc: (3,11)-(3,12) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (3,6)-(3,7) = "("
+ │ ├── rparen_loc: (3,12)-(3,13) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,15)-(3,18) = "end"
+ ├── @ DefNode (location: (5,0)-(5,16))
+ │ ├── name: :f
+ │ ├── name_loc: (5,4)-(5,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (5,7)-(5,10))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (5,7)-(5,10))
+ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ └── @ SplatNode (location: (5,8)-(5,9))
+ │ │ │ │ ├── operator_loc: (5,8)-(5,9) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── opening_loc: (5,7)-(5,8) = "("
+ │ │ │ └── closing_loc: (5,9)-(5,10) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (5,6)-(5,7) = "("
+ │ ├── rparen_loc: (5,10)-(5,11) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,13)-(5,16) = "end"
+ ├── @ DefNode (location: (7,0)-(7,19))
+ │ ├── name: :f
+ │ ├── name_loc: (7,4)-(7,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (7,7)-(7,13))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (7,7)-(7,13))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ SplatNode (location: (7,8)-(7,9))
+ │ │ │ │ │ ├── operator_loc: (7,8)-(7,9) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ └── @ RequiredParameterNode (location: (7,11)-(7,12))
+ │ │ │ │ └── name: :p
+ │ │ │ ├── opening_loc: (7,7)-(7,8) = "("
+ │ │ │ └── closing_loc: (7,12)-(7,13) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:p]
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (7,6)-(7,7) = "("
+ │ ├── rparen_loc: (7,13)-(7,14) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (7,16)-(7,19) = "end"
+ ├── @ DefNode (location: (9,0)-(9,17))
+ │ ├── name: :f
+ │ ├── name_loc: (9,4)-(9,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (9,7)-(9,11))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (9,7)-(9,11))
+ │ │ │ ├── parameters: (length: 1)
+ │ │ │ │ └── @ SplatNode (location: (9,8)-(9,10))
+ │ │ │ │ ├── operator_loc: (9,8)-(9,9) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (9,9)-(9,10))
+ │ │ │ │ └── name: :r
+ │ │ │ ├── opening_loc: (9,7)-(9,8) = "("
+ │ │ │ └── closing_loc: (9,10)-(9,11) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:r]
+ │ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (9,6)-(9,7) = "("
+ │ ├── rparen_loc: (9,11)-(9,12) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (9,14)-(9,17) = "end"
+ ├── @ DefNode (location: (11,0)-(11,20))
+ │ ├── name: :f
+ │ ├── name_loc: (11,4)-(11,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (11,7)-(11,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (11,7)-(11,14))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ SplatNode (location: (11,8)-(11,10))
+ │ │ │ │ │ ├── operator_loc: (11,8)-(11,9) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (11,9)-(11,10))
+ │ │ │ │ │ └── name: :r
+ │ │ │ │ └── @ RequiredParameterNode (location: (11,12)-(11,13))
+ │ │ │ │ └── name: :p
+ │ │ │ ├── opening_loc: (11,7)-(11,8) = "("
+ │ │ │ └── closing_loc: (11,13)-(11,14) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:r, :p]
+ │ ├── def_keyword_loc: (11,0)-(11,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (11,6)-(11,7) = "("
+ │ ├── rparen_loc: (11,14)-(11,15) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (11,17)-(11,20) = "end"
+ ├── @ DefNode (location: (13,0)-(13,19))
+ │ ├── name: :f
+ │ ├── name_loc: (13,4)-(13,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (13,7)-(13,13))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (13,7)-(13,13))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (13,8)-(13,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ SplatNode (location: (13,11)-(13,12))
+ │ │ │ │ ├── operator_loc: (13,11)-(13,12) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── opening_loc: (13,7)-(13,8) = "("
+ │ │ │ └── closing_loc: (13,12)-(13,13) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a]
+ │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (13,6)-(13,7) = "("
+ │ ├── rparen_loc: (13,13)-(13,14) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (13,16)-(13,19) = "end"
+ ├── @ DefNode (location: (15,0)-(15,22))
+ │ ├── name: :f
+ │ ├── name_loc: (15,4)-(15,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (15,7)-(15,16))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (15,7)-(15,16))
+ │ │ │ ├── parameters: (length: 3)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (15,8)-(15,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── @ SplatNode (location: (15,11)-(15,12))
+ │ │ │ │ │ ├── operator_loc: (15,11)-(15,12) = "*"
+ │ │ │ │ │ └── expression: ∅
+ │ │ │ │ └── @ RequiredParameterNode (location: (15,14)-(15,15))
+ │ │ │ │ └── name: :p
+ │ │ │ ├── opening_loc: (15,7)-(15,8) = "("
+ │ │ │ └── closing_loc: (15,15)-(15,16) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :p]
+ │ ├── def_keyword_loc: (15,0)-(15,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (15,6)-(15,7) = "("
+ │ ├── rparen_loc: (15,16)-(15,17) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (15,19)-(15,22) = "end"
+ ├── @ DefNode (location: (17,0)-(17,20))
+ │ ├── name: :f
+ │ ├── name_loc: (17,4)-(17,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (17,7)-(17,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (17,7)-(17,14))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (17,8)-(17,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ SplatNode (location: (17,11)-(17,13))
+ │ │ │ │ ├── operator_loc: (17,11)-(17,12) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ RequiredParameterNode (location: (17,12)-(17,13))
+ │ │ │ │ └── name: :r
+ │ │ │ ├── opening_loc: (17,7)-(17,8) = "("
+ │ │ │ └── closing_loc: (17,13)-(17,14) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :r]
+ │ ├── def_keyword_loc: (17,0)-(17,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (17,6)-(17,7) = "("
+ │ ├── rparen_loc: (17,14)-(17,15) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (17,17)-(17,20) = "end"
+ ├── @ DefNode (location: (19,0)-(19,23))
+ │ ├── name: :f
+ │ ├── name_loc: (19,4)-(19,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (19,7)-(19,17))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (19,7)-(19,17))
+ │ │ │ ├── parameters: (length: 3)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (19,8)-(19,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── @ SplatNode (location: (19,11)-(19,13))
+ │ │ │ │ │ ├── operator_loc: (19,11)-(19,12) = "*"
+ │ │ │ │ │ └── expression:
+ │ │ │ │ │ @ RequiredParameterNode (location: (19,12)-(19,13))
+ │ │ │ │ │ └── name: :r
+ │ │ │ │ └── @ RequiredParameterNode (location: (19,15)-(19,16))
+ │ │ │ │ └── name: :p
+ │ │ │ ├── opening_loc: (19,7)-(19,8) = "("
+ │ │ │ └── closing_loc: (19,16)-(19,17) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :r, :p]
+ │ ├── def_keyword_loc: (19,0)-(19,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (19,6)-(19,7) = "("
+ │ ├── rparen_loc: (19,17)-(19,18) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (19,20)-(19,23) = "end"
+ ├── @ DefNode (location: (21,0)-(21,20))
+ │ ├── name: :f
+ │ ├── name_loc: (21,4)-(21,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (21,7)-(21,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredDestructuredParameterNode (location: (21,7)-(21,14))
+ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (21,8)-(21,9))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (21,11)-(21,13))
+ │ │ │ │ └── name: :a1
+ │ │ │ ├── opening_loc: (21,7)-(21,8) = "("
+ │ │ │ └── closing_loc: (21,13)-(21,14) = ")"
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :a1]
+ │ ├── def_keyword_loc: (21,0)-(21,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (21,6)-(21,7) = "("
+ │ ├── rparen_loc: (21,14)-(21,15) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (21,17)-(21,20) = "end"
+ ├── @ DefNode (location: (23,0)-(23,23))
+ │ ├── name: :f
+ │ ├── name_loc: (23,4)-(23,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (23,7)-(23,17))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (23,7)-(23,13))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (23,7)-(23,11) = "foo:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (23,12)-(23,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (23,15)-(23,17))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (23,16)-(23,17) = "b"
+ │ │ └── operator_loc: (23,15)-(23,16) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:foo, :b]
+ │ ├── def_keyword_loc: (23,0)-(23,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (23,6)-(23,7) = "("
+ │ ├── rparen_loc: (23,17)-(23,18) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (23,20)-(23,23) = "end"
+ ├── @ DefNode (location: (25,0)-(25,38))
+ │ ├── name: :f
+ │ ├── name_loc: (25,4)-(25,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (25,7)-(25,32))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 2)
+ │ │ │ ├── @ KeywordParameterNode (location: (25,7)-(25,13))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ ├── name_loc: (25,7)-(25,11) = "foo:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (25,12)-(25,13))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ KeywordParameterNode (location: (25,15)-(25,21))
+ │ │ │ ├── name: :bar
+ │ │ │ ├── name_loc: (25,15)-(25,19) = "bar:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (25,20)-(25,21))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (25,23)-(25,28))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (25,25)-(25,28) = "baz"
+ │ │ │ └── operator_loc: (25,23)-(25,25) = "**"
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (25,30)-(25,32))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (25,31)-(25,32) = "b"
+ │ │ └── operator_loc: (25,30)-(25,31) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:foo, :bar, :baz, :b]
+ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (25,6)-(25,7) = "("
+ │ ├── rparen_loc: (25,32)-(25,33) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (25,35)-(25,38) = "end"
+ ├── @ DefNode (location: (27,0)-(27,20))
+ │ ├── name: :f
+ │ ├── name_loc: (27,4)-(27,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (27,6)-(27,15))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (27,6)-(27,11))
+ │ │ │ ├── name: :baz
+ │ │ │ ├── name_loc: (27,8)-(27,11) = "baz"
+ │ │ │ └── operator_loc: (27,6)-(27,8) = "**"
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (27,13)-(27,15))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (27,14)-(27,15) = "b"
+ │ │ └── operator_loc: (27,13)-(27,14) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:baz, :b]
+ │ ├── def_keyword_loc: (27,0)-(27,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (27,17)-(27,20) = "end"
+ ├── @ DefNode (location: (29,0)-(29,16))
+ │ ├── name: :f
+ │ ├── name_loc: (29,4)-(29,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (29,6)-(29,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (29,6)-(29,7))
+ │ │ │ ├── name: nil
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (29,6)-(29,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ KeywordRestParameterNode (location: (29,9)-(29,11))
+ │ │ │ ├── name: nil
+ │ │ │ ├── name_loc: ∅
+ │ │ │ └── operator_loc: (29,9)-(29,11) = "**"
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:*, :**]
+ │ ├── def_keyword_loc: (29,0)-(29,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (29,13)-(29,16) = "end"
+ ├── @ DefNode (location: (31,0)-(31,17))
+ │ ├── name: :f
+ │ ├── name_loc: (31,4)-(31,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (31,6)-(31,12))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (31,6)-(31,8))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (31,7)-(31,8) = "r"
+ │ │ │ └── operator_loc: (31,6)-(31,7) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (31,10)-(31,12))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (31,11)-(31,12) = "b"
+ │ │ └── operator_loc: (31,10)-(31,11) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:r, :b]
+ │ ├── def_keyword_loc: (31,0)-(31,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (31,14)-(31,17) = "end"
+ ├── @ DefNode (location: (33,0)-(33,20))
+ │ ├── name: :f
+ │ ├── name_loc: (33,4)-(33,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (33,6)-(33,15))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (33,6)-(33,8))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (33,7)-(33,8) = "r"
+ │ │ │ └── operator_loc: (33,6)-(33,7) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (33,10)-(33,11))
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (33,13)-(33,15))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (33,14)-(33,15) = "b"
+ │ │ └── operator_loc: (33,13)-(33,14) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:r, :p, :b]
+ │ ├── def_keyword_loc: (33,0)-(33,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (33,17)-(33,20) = "end"
+ ├── @ DefNode (location: (35,0)-(35,11))
+ │ ├── name: :f
+ │ ├── name_loc: (35,4)-(35,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (35,0)-(35,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (35,8)-(35,11) = "end"
+ ├── @ DefNode (location: (37,0)-(37,16))
+ │ ├── name: :f
+ │ ├── name_loc: (37,4)-(37,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (37,6)-(37,11))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (37,6)-(37,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (37,9)-(37,11))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (37,10)-(37,11) = "b"
+ │ │ └── operator_loc: (37,9)-(37,10) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:a, :b]
+ │ ├── def_keyword_loc: (37,0)-(37,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (37,13)-(37,16) = "end"
+ ├── @ DefNode (location: (39,0)-(39,20))
+ │ ├── name: :f
+ │ ├── name_loc: (39,4)-(39,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (39,6)-(39,15))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (39,6)-(39,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (39,9)-(39,11))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (39,10)-(39,11) = "r"
+ │ │ │ └── operator_loc: (39,9)-(39,10) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (39,13)-(39,15))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (39,14)-(39,15) = "b"
+ │ │ └── operator_loc: (39,13)-(39,14) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:a, :r, :b]
+ │ ├── def_keyword_loc: (39,0)-(39,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (39,17)-(39,20) = "end"
+ ├── @ DefNode (location: (41,0)-(41,23))
+ │ ├── name: :f
+ │ ├── name_loc: (41,4)-(41,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (41,6)-(41,18))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (41,6)-(41,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (41,9)-(41,11))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (41,10)-(41,11) = "r"
+ │ │ │ └── operator_loc: (41,9)-(41,10) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (41,13)-(41,14))
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (41,16)-(41,18))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (41,17)-(41,18) = "b"
+ │ │ └── operator_loc: (41,16)-(41,17) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:a, :r, :p, :b]
+ │ ├── def_keyword_loc: (41,0)-(41,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (41,20)-(41,23) = "end"
+ ├── @ DefNode (location: (43,0)-(43,21))
+ │ ├── name: :f
+ │ ├── name_loc: (43,4)-(43,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (43,6)-(43,16))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (43,6)-(43,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (43,9)-(43,12))
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (43,9)-(43,10) = "o"
+ │ │ │ ├── operator_loc: (43,10)-(43,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (43,11)-(43,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (43,14)-(43,16))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (43,15)-(43,16) = "b"
+ │ │ └── operator_loc: (43,14)-(43,15) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:a, :o, :b]
+ │ ├── def_keyword_loc: (43,0)-(43,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (43,18)-(43,21) = "end"
+ ├── @ DefNode (location: (45,0)-(45,25))
+ │ ├── name: :f
+ │ ├── name_loc: (45,4)-(45,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (45,6)-(45,20))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (45,6)-(45,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (45,9)-(45,12))
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (45,9)-(45,10) = "o"
+ │ │ │ ├── operator_loc: (45,10)-(45,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (45,11)-(45,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (45,14)-(45,16))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (45,15)-(45,16) = "r"
+ │ │ │ └── operator_loc: (45,14)-(45,15) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (45,18)-(45,20))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (45,19)-(45,20) = "b"
+ │ │ └── operator_loc: (45,18)-(45,19) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:a, :o, :r, :b]
+ │ ├── def_keyword_loc: (45,0)-(45,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (45,22)-(45,25) = "end"
+ ├── @ DefNode (location: (47,0)-(47,28))
+ │ ├── name: :f
+ │ ├── name_loc: (47,4)-(47,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (47,6)-(47,23))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (47,6)-(47,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (47,9)-(47,12))
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (47,9)-(47,10) = "o"
+ │ │ │ ├── operator_loc: (47,10)-(47,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (47,11)-(47,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (47,14)-(47,16))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (47,15)-(47,16) = "r"
+ │ │ │ └── operator_loc: (47,14)-(47,15) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (47,18)-(47,19))
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (47,21)-(47,23))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (47,22)-(47,23) = "b"
+ │ │ └── operator_loc: (47,21)-(47,22) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:a, :o, :r, :p, :b]
+ │ ├── def_keyword_loc: (47,0)-(47,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (47,25)-(47,28) = "end"
+ ├── @ DefNode (location: (49,0)-(49,24))
+ │ ├── name: :f
+ │ ├── name_loc: (49,4)-(49,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (49,6)-(49,19))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (49,6)-(49,7))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (49,9)-(49,12))
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (49,9)-(49,10) = "o"
+ │ │ │ ├── operator_loc: (49,10)-(49,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (49,11)-(49,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (49,14)-(49,15))
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (49,17)-(49,19))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (49,18)-(49,19) = "b"
+ │ │ └── operator_loc: (49,17)-(49,18) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:a, :o, :p, :b]
+ │ ├── def_keyword_loc: (49,0)-(49,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (49,21)-(49,24) = "end"
+ ├── @ DefNode (location: (51,0)-(52,5))
+ │ ├── name: :f
+ │ ├── name_loc: (51,4)-(51,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (51,6)-(51,10))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (51,6)-(51,10))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (51,6)-(51,10) = "foo:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:foo]
+ │ ├── def_keyword_loc: (51,0)-(51,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (52,2)-(52,5) = "end"
+ ├── @ DefNode (location: (54,0)-(55,5))
+ │ ├── name: :f
+ │ ├── name_loc: (54,4)-(54,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (54,6)-(54,13))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (54,6)-(54,13))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (54,6)-(54,10) = "foo:"
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (54,11)-(54,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:foo]
+ │ ├── def_keyword_loc: (54,0)-(54,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (55,2)-(55,5) = "end"
+ ├── @ DefNode (location: (57,0)-(57,18))
+ │ ├── name: :f
+ │ ├── name_loc: (57,4)-(57,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (57,6)-(57,13))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (57,6)-(57,9))
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (57,6)-(57,7) = "o"
+ │ │ │ ├── operator_loc: (57,7)-(57,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (57,8)-(57,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (57,11)-(57,13))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (57,12)-(57,13) = "b"
+ │ │ └── operator_loc: (57,11)-(57,12) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:o, :b]
+ │ ├── def_keyword_loc: (57,0)-(57,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (57,15)-(57,18) = "end"
+ ├── @ DefNode (location: (59,0)-(59,22))
+ │ ├── name: :f
+ │ ├── name_loc: (59,4)-(59,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (59,6)-(59,17))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (59,6)-(59,9))
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (59,6)-(59,7) = "o"
+ │ │ │ ├── operator_loc: (59,7)-(59,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (59,8)-(59,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (59,11)-(59,13))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (59,12)-(59,13) = "r"
+ │ │ │ └── operator_loc: (59,11)-(59,12) = "*"
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (59,15)-(59,17))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (59,16)-(59,17) = "b"
+ │ │ └── operator_loc: (59,15)-(59,16) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:o, :r, :b]
+ │ ├── def_keyword_loc: (59,0)-(59,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (59,19)-(59,22) = "end"
+ ├── @ DefNode (location: (61,0)-(61,25))
+ │ ├── name: :f
+ │ ├── name_loc: (61,4)-(61,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (61,6)-(61,20))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (61,6)-(61,9))
+ │ │ │ ├── name: :o
+ │ │ │ ├── name_loc: (61,6)-(61,7) = "o"
+ │ │ │ ├── operator_loc: (61,7)-(61,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (61,8)-(61,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest:
+ │ │ │ @ RestParameterNode (location: (61,11)-(61,13))
+ │ │ │ ├── name: :r
+ │ │ │ ├── name_loc: (61,12)-(61,13) = "r"
+ │ │ │ └── operator_loc: (61,11)-(61,12) = "*"
+ │ │ ├── posts: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (61,15)-(61,16))
+ │ │ │ └── name: :p
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block:
+ │ │ @ BlockParameterNode (location: (61,18)-(61,20))
+ │ │ ├── name: :b
+ │ │ ├── name_loc: (61,19)-(61,20) = "b"
+ │ │ └── operator_loc: (61,18)-(61,19) = "&"
+ │ ├── body: ∅
+ │ ├── locals: [:o, :r, :p, :b]
+ │ ├── def_keyword_loc: (61,0)-(61,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (61,22)-(61,25) = "end"
+ └── @ DefNode (location: (63,0)-(63,21))
+ ├── name: :f
+ ├── name_loc: (63,4)-(63,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (63,6)-(63,16))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 1)
+ │ │ └── @ OptionalParameterNode (location: (63,6)-(63,9))
+ │ │ ├── name: :o
+ │ │ ├── name_loc: (63,6)-(63,7) = "o"
+ │ │ ├── operator_loc: (63,7)-(63,8) = "="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (63,8)-(63,9))
+ │ │ └── flags: decimal
+ │ ├── rest: ∅
+ │ ├── posts: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (63,11)-(63,12))
+ │ │ └── name: :p
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (63,14)-(63,16))
+ │ ├── name: :b
+ │ ├── name_loc: (63,15)-(63,16) = "b"
+ │ └── operator_loc: (63,14)-(63,15) = "&"
+ ├── body: ∅
+ ├── locals: [:o, :p, :b]
+ ├── def_keyword_loc: (63,0)-(63,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (63,18)-(63,21) = "end"
diff --git a/test/prism/snapshots/whitequark/args_args_assocs.txt b/test/prism/snapshots/whitequark/args_args_assocs.txt
new file mode 100644
index 0000000000..38d1a2622d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_assocs.txt
@@ -0,0 +1,88 @@
+@ ProgramNode (location: (1,0)-(3,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,24))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ KeywordHashNode (location: (1,9)-(1,18))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,9)-(1,18))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,9)-(1,13))
+ │ │ │ ├── opening_loc: (1,9)-(1,10) = ":"
+ │ │ │ ├── value_loc: (1,10)-(1,13) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,17)-(1,18))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,14)-(1,16) = "=>"
+ │ ├── closing_loc: (1,18)-(1,19) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── @ CallNode (location: (3,0)-(3,24))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,3) = "fun"
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,18))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,4)-(3,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── @ KeywordHashNode (location: (3,9)-(3,18))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (3,9)-(3,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,9)-(3,13))
+ │ │ ├── opening_loc: (3,9)-(3,10) = ":"
+ │ │ ├── value_loc: (3,10)-(3,13) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,17)-(3,18))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (3,14)-(3,16) = "=>"
+ ├── closing_loc: (3,24)-(3,25) = ")"
+ ├── block:
+ │ @ BlockArgumentNode (location: (3,20)-(3,24))
+ │ ├── expression:
+ │ │ @ CallNode (location: (3,21)-(3,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,21)-(3,24) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── operator_loc: (3,20)-(3,21) = "&"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/args_args_assocs_comma.txt b/test/prism/snapshots/whitequark/args_args_assocs_comma.txt
new file mode 100644
index 0000000000..80a6079616
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_assocs_comma.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,20))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,20) = "[bar, :baz => 1,]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,18))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── @ KeywordHashNode (location: (1,9)-(1,18))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,9)-(1,18))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,9)-(1,13))
+ │ │ ├── opening_loc: (1,9)-(1,10) = ":"
+ │ │ ├── value_loc: (1,10)-(1,13) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,17)-(1,18))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,14)-(1,16) = "=>"
+ ├── closing_loc: (1,19)-(1,20) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/whitequark/args_args_comma.txt b/test/prism/snapshots/whitequark/args_args_comma.txt
new file mode 100644
index 0000000000..1b2709bfcc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_comma.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,9) = "[bar,]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/whitequark/args_args_star.txt b/test/prism/snapshots/whitequark/args_args_star.txt
new file mode 100644
index 0000000000..64ea48909c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_args_star.txt
@@ -0,0 +1,88 @@
+@ ProgramNode (location: (1,0)-(3,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,19))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ SplatNode (location: (1,9)-(1,13))
+ │ │ ├── operator_loc: (1,9)-(1,10) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,10)-(1,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,10)-(1,13) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (1,13)-(1,14) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── @ CallNode (location: (3,0)-(3,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,3) = "fun"
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,13))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,4)-(3,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,4)-(3,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── @ SplatNode (location: (3,9)-(3,13))
+ │ ├── operator_loc: (3,9)-(3,10) = "*"
+ │ └── expression:
+ │ @ CallNode (location: (3,10)-(3,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,10)-(3,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── closing_loc: (3,19)-(3,20) = ")"
+ ├── block:
+ │ @ BlockArgumentNode (location: (3,15)-(3,19))
+ │ ├── expression:
+ │ │ @ CallNode (location: (3,16)-(3,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,16)-(3,19) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── operator_loc: (3,15)-(3,16) = "&"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/args_assocs.txt b/test/prism/snapshots/whitequark/args_assocs.txt
new file mode 100644
index 0000000000..518b760764
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_assocs.txt
@@ -0,0 +1,171 @@
+@ ProgramNode (location: (1,0)-(11,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,17))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,4)-(1,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,4)-(1,8))
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ │ ├── value_loc: (1,5)-(1,8) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,9)-(1,11) = "=>"
+ │ ├── closing_loc: (1,13)-(1,14) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "fun"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (3,4)-(3,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,4)-(3,8))
+ │ │ │ ├── opening_loc: (3,4)-(3,5) = ":"
+ │ │ │ ├── value_loc: (3,5)-(3,8) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,12)-(3,13))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (3,9)-(3,11) = "=>"
+ │ ├── closing_loc: (3,19)-(3,20) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (3,15)-(3,19))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (3,16)-(3,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,16)-(3,19) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (3,15)-(3,16) = "&"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (5,0)-(5,4))
+ │ ├── call_operator_loc: (5,4)-(5,5) = "."
+ │ ├── message_loc: (5,5)-(5,8) = "[]="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,9)-(5,21))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,9)-(5,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,14)-(5,21))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,14)-(5,16))
+ │ │ │ ├── opening_loc: (5,14)-(5,15) = ":"
+ │ │ │ ├── value_loc: (5,15)-(5,16) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (5,20)-(5,21))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (5,17)-(5,19) = "=>"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (7,0)-(7,15))
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (7,0)-(7,4))
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,4)-(7,15) = "[:bar => 1]"
+ │ ├── opening_loc: (7,4)-(7,5) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,5)-(7,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (7,5)-(7,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (7,5)-(7,9))
+ │ │ │ ├── opening_loc: (7,5)-(7,6) = ":"
+ │ │ │ ├── value_loc: (7,6)-(7,9) = "bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (7,13)-(7,14))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (7,10)-(7,12) = "=>"
+ │ ├── closing_loc: (7,14)-(7,15) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ SuperNode (location: (9,0)-(9,17))
+ │ ├── keyword_loc: (9,0)-(9,5) = "super"
+ │ ├── lparen_loc: (9,5)-(9,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,6)-(9,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (9,6)-(9,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,6)-(9,10))
+ │ │ │ ├── opening_loc: (9,6)-(9,7) = ":"
+ │ │ │ ├── value_loc: (9,7)-(9,10) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (9,14)-(9,16))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (9,11)-(9,13) = "=>"
+ │ ├── rparen_loc: (9,16)-(9,17) = ")"
+ │ └── block: ∅
+ └── @ YieldNode (location: (11,0)-(11,17))
+ ├── keyword_loc: (11,0)-(11,5) = "yield"
+ ├── lparen_loc: (11,5)-(11,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,6)-(11,16))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (11,6)-(11,16))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (11,6)-(11,16))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (11,6)-(11,10))
+ │ │ ├── opening_loc: (11,6)-(11,7) = ":"
+ │ │ ├── value_loc: (11,7)-(11,10) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (11,14)-(11,16))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (11,11)-(11,13) = "=>"
+ └── rparen_loc: (11,16)-(11,17) = ")"
diff --git a/test/prism/snapshots/whitequark/args_assocs_comma.txt b/test/prism/snapshots/whitequark/args_assocs_comma.txt
new file mode 100644
index 0000000000..238ba6ff28
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_assocs_comma.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,15) = "[:baz => 1,]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,4)-(1,13))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,4)-(1,8))
+ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ ├── value_loc: (1,5)-(1,8) = "baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "baz"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,9)-(1,11) = "=>"
+ ├── closing_loc: (1,14)-(1,15) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/whitequark/args_assocs_legacy.txt b/test/prism/snapshots/whitequark/args_assocs_legacy.txt
new file mode 100644
index 0000000000..518b760764
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_assocs_legacy.txt
@@ -0,0 +1,171 @@
+@ ProgramNode (location: (1,0)-(11,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,17))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,4)-(1,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,4)-(1,8))
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
+ │ │ │ ├── value_loc: (1,5)-(1,8) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,9)-(1,11) = "=>"
+ │ ├── closing_loc: (1,13)-(1,14) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "fun"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,4)-(3,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (3,4)-(3,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,4)-(3,8))
+ │ │ │ ├── opening_loc: (3,4)-(3,5) = ":"
+ │ │ │ ├── value_loc: (3,5)-(3,8) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,12)-(3,13))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (3,9)-(3,11) = "=>"
+ │ ├── closing_loc: (3,19)-(3,20) = ")"
+ │ ├── block:
+ │ │ @ BlockArgumentNode (location: (3,15)-(3,19))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (3,16)-(3,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,16)-(3,19) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── operator_loc: (3,15)-(3,16) = "&"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (5,0)-(5,4))
+ │ ├── call_operator_loc: (5,4)-(5,5) = "."
+ │ ├── message_loc: (5,5)-(5,8) = "[]="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,9)-(5,21))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,9)-(5,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,14)-(5,21))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,14)-(5,16))
+ │ │ │ ├── opening_loc: (5,14)-(5,15) = ":"
+ │ │ │ ├── value_loc: (5,15)-(5,16) = "a"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (5,20)-(5,21))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (5,17)-(5,19) = "=>"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]="
+ ├── @ CallNode (location: (7,0)-(7,15))
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (7,0)-(7,4))
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,4)-(7,15) = "[:bar => 1]"
+ │ ├── opening_loc: (7,4)-(7,5) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,5)-(7,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (7,5)-(7,14))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (7,5)-(7,9))
+ │ │ │ ├── opening_loc: (7,5)-(7,6) = ":"
+ │ │ │ ├── value_loc: (7,6)-(7,9) = "bar"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (7,13)-(7,14))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (7,10)-(7,12) = "=>"
+ │ ├── closing_loc: (7,14)-(7,15) = "]"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "[]"
+ ├── @ SuperNode (location: (9,0)-(9,17))
+ │ ├── keyword_loc: (9,0)-(9,5) = "super"
+ │ ├── lparen_loc: (9,5)-(9,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,6)-(9,16))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (9,6)-(9,16))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,6)-(9,10))
+ │ │ │ ├── opening_loc: (9,6)-(9,7) = ":"
+ │ │ │ ├── value_loc: (9,7)-(9,10) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (9,14)-(9,16))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (9,11)-(9,13) = "=>"
+ │ ├── rparen_loc: (9,16)-(9,17) = ")"
+ │ └── block: ∅
+ └── @ YieldNode (location: (11,0)-(11,17))
+ ├── keyword_loc: (11,0)-(11,5) = "yield"
+ ├── lparen_loc: (11,5)-(11,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (11,6)-(11,16))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (11,6)-(11,16))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (11,6)-(11,16))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (11,6)-(11,10))
+ │ │ ├── opening_loc: (11,6)-(11,7) = ":"
+ │ │ ├── value_loc: (11,7)-(11,10) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (11,14)-(11,16))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (11,11)-(11,13) = "=>"
+ └── rparen_loc: (11,16)-(11,17) = ")"
diff --git a/test/prism/snapshots/whitequark/args_block_pass.txt b/test/prism/snapshots/whitequark/args_block_pass.txt
new file mode 100644
index 0000000000..2cc3008c2e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_block_pass.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (1,8)-(1,9) = ")"
+ ├── block:
+ │ @ BlockArgumentNode (location: (1,4)-(1,8))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── operator_loc: (1,4)-(1,5) = "&"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/args_cmd.txt b/test/prism/snapshots/whitequark/args_cmd.txt
new file mode 100644
index 0000000000..cd16a4d354
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_cmd.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── closing_loc: (1,9)-(1,10) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/args_star.txt b/test/prism/snapshots/whitequark/args_star.txt
new file mode 100644
index 0000000000..13b48ff6bb
--- /dev/null
+++ b/test/prism/snapshots/whitequark/args_star.txt
@@ -0,0 +1,68 @@
+@ ProgramNode (location: (1,0)-(3,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,14))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (1,4)-(1,8))
+ │ │ ├── operator_loc: (1,4)-(1,5) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,8) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (1,8)-(1,9) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── @ CallNode (location: (3,0)-(3,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,3) = "fun"
+ ├── opening_loc: (3,3)-(3,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ └── arguments: (length: 1)
+ │ └── @ SplatNode (location: (3,4)-(3,8))
+ │ ├── operator_loc: (3,4)-(3,5) = "*"
+ │ └── expression:
+ │ @ CallNode (location: (3,5)-(3,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,5)-(3,8) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── closing_loc: (3,14)-(3,15) = ")"
+ ├── block:
+ │ @ BlockArgumentNode (location: (3,10)-(3,14))
+ │ ├── expression:
+ │ │ @ CallNode (location: (3,11)-(3,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,11)-(3,14) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── operator_loc: (3,10)-(3,11) = "&"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/array_assocs.txt b/test/prism/snapshots/whitequark/array_assocs.txt
new file mode 100644
index 0000000000..4509ddde8b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_assocs.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(3,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,13))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,10))
+ │ ├── elements: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,2)-(1,8))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,2)-(1,8))
+ │ │ ├── key:
+ │ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ │ └── flags: decimal
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,4)-(1,6) = "=>"
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,9)-(1,10) = "]"
+ └── @ ArrayNode (location: (3,0)-(3,13))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (3,2)-(3,3))
+ │ │ └── flags: decimal
+ │ └── @ KeywordHashNode (location: (3,5)-(3,11))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (3,5)-(3,11))
+ │ ├── key:
+ │ │ @ IntegerNode (location: (3,5)-(3,6))
+ │ │ └── flags: decimal
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,10)-(3,11))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (3,7)-(3,9) = "=>"
+ ├── opening_loc: (3,0)-(3,1) = "["
+ └── closing_loc: (3,12)-(3,13) = "]"
diff --git a/test/prism/snapshots/whitequark/array_plain.txt b/test/prism/snapshots/whitequark/array_plain.txt
new file mode 100644
index 0000000000..4bf2b19039
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_plain.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,6))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── opening_loc: (1,0)-(1,1) = "["
+ └── closing_loc: (1,5)-(1,6) = "]"
diff --git a/test/prism/snapshots/whitequark/array_splat.txt b/test/prism/snapshots/whitequark/array_splat.txt
new file mode 100644
index 0000000000..c25c8719b6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_splat.txt
@@ -0,0 +1,62 @@
+@ ProgramNode (location: (1,0)-(5,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,9))
+ └── body: (length: 3)
+ ├── @ ArrayNode (location: (1,0)-(1,6))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SplatNode (location: (1,1)-(1,5))
+ │ │ ├── operator_loc: (1,1)-(1,2) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,2)-(1,5))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,5) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ └── closing_loc: (1,5)-(1,6) = "]"
+ ├── @ ArrayNode (location: (3,0)-(3,12))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── @ SplatNode (location: (3,4)-(3,8))
+ │ │ │ ├── operator_loc: (3,4)-(3,5) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (3,5)-(3,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,5)-(3,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ └── @ IntegerNode (location: (3,10)-(3,11))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (3,0)-(3,1) = "["
+ │ └── closing_loc: (3,11)-(3,12) = "]"
+ └── @ ArrayNode (location: (5,0)-(5,9))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (5,1)-(5,2))
+ │ │ └── flags: decimal
+ │ └── @ SplatNode (location: (5,4)-(5,8))
+ │ ├── operator_loc: (5,4)-(5,5) = "*"
+ │ └── expression:
+ │ @ CallNode (location: (5,5)-(5,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,5)-(5,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── opening_loc: (5,0)-(5,1) = "["
+ └── closing_loc: (5,8)-(5,9) = "]"
diff --git a/test/prism/snapshots/whitequark/array_symbols.txt b/test/prism/snapshots/whitequark/array_symbols.txt
new file mode 100644
index 0000000000..cca5be139a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_symbols.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,11))
+ ├── elements: (length: 2)
+ │ ├── @ SymbolNode (location: (1,3)-(1,6))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ SymbolNode (location: (1,7)-(1,10))
+ │ ├── opening_loc: ∅
+ │ ├── value_loc: (1,7)-(1,10) = "bar"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "bar"
+ ├── opening_loc: (1,0)-(1,3) = "%i["
+ └── closing_loc: (1,10)-(1,11) = "]"
diff --git a/test/prism/snapshots/whitequark/array_symbols_empty.txt b/test/prism/snapshots/whitequark/array_symbols_empty.txt
new file mode 100644
index 0000000000..3beafc362a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_symbols_empty.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,4))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (1,0)-(1,3) = "%I("
+ │ └── closing_loc: (1,3)-(1,4) = ")"
+ └── @ ArrayNode (location: (3,0)-(3,4))
+ ├── elements: (length: 0)
+ ├── opening_loc: (3,0)-(3,3) = "%i["
+ └── closing_loc: (3,3)-(3,4) = "]"
diff --git a/test/prism/snapshots/whitequark/array_symbols_interp.txt b/test/prism/snapshots/whitequark/array_symbols_interp.txt
new file mode 100644
index 0000000000..de1a25f97e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_symbols_interp.txt
@@ -0,0 +1,64 @@
+@ ProgramNode (location: (1,0)-(3,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,13))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,14))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,3)-(1,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,3)-(1,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ InterpolatedSymbolNode (location: (1,7)-(1,13))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 1)
+ │ │ │ └── @ EmbeddedStatementsNode (location: (1,7)-(1,13))
+ │ │ │ ├── opening_loc: (1,7)-(1,9) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,9)-(1,12))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,9)-(1,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── closing_loc: (1,12)-(1,13) = "}"
+ │ │ └── closing_loc: ∅
+ │ ├── opening_loc: (1,0)-(1,3) = "%I["
+ │ └── closing_loc: (1,13)-(1,14) = "]"
+ └── @ ArrayNode (location: (3,0)-(3,13))
+ ├── elements: (length: 1)
+ │ └── @ InterpolatedSymbolNode (location: (3,3)-(3,12))
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (3,3)-(3,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,3)-(3,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ EmbeddedStatementsNode (location: (3,6)-(3,12))
+ │ │ ├── opening_loc: (3,6)-(3,8) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,8)-(3,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,8)-(3,11))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── closing_loc: (3,11)-(3,12) = "}"
+ │ └── closing_loc: ∅
+ ├── opening_loc: (3,0)-(3,3) = "%I["
+ └── closing_loc: (3,12)-(3,13) = "]"
diff --git a/test/prism/snapshots/whitequark/array_words.txt b/test/prism/snapshots/whitequark/array_words.txt
new file mode 100644
index 0000000000..4301158d05
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_words.txt
@@ -0,0 +1,21 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ ArrayNode (location: (1,0)-(1,11))
+ ├── elements: (length: 2)
+ │ ├── @ StringNode (location: (1,3)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ StringNode (location: (1,7)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,7)-(1,10) = "bar"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "bar"
+ ├── opening_loc: (1,0)-(1,3) = "%w["
+ └── closing_loc: (1,10)-(1,11) = "]"
diff --git a/test/prism/snapshots/whitequark/array_words_empty.txt b/test/prism/snapshots/whitequark/array_words_empty.txt
new file mode 100644
index 0000000000..dff4df5662
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_words_empty.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,4))
+ │ ├── elements: (length: 0)
+ │ ├── opening_loc: (1,0)-(1,3) = "%W("
+ │ └── closing_loc: (1,3)-(1,4) = ")"
+ └── @ ArrayNode (location: (3,0)-(3,4))
+ ├── elements: (length: 0)
+ ├── opening_loc: (3,0)-(3,3) = "%w["
+ └── closing_loc: (3,3)-(3,4) = "]"
diff --git a/test/prism/snapshots/whitequark/array_words_interp.txt b/test/prism/snapshots/whitequark/array_words_interp.txt
new file mode 100644
index 0000000000..8645425e25
--- /dev/null
+++ b/test/prism/snapshots/whitequark/array_words_interp.txt
@@ -0,0 +1,76 @@
+@ ProgramNode (location: (1,0)-(3,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,22))
+ └── body: (length: 2)
+ ├── @ ArrayNode (location: (1,0)-(1,14))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ StringNode (location: (1,3)-(1,6))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (1,3)-(1,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ InterpolatedStringNode (location: (1,7)-(1,13))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── parts: (length: 1)
+ │ │ │ └── @ EmbeddedStatementsNode (location: (1,7)-(1,13))
+ │ │ │ ├── opening_loc: (1,7)-(1,9) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,9)-(1,12))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,9)-(1,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── closing_loc: (1,12)-(1,13) = "}"
+ │ │ └── closing_loc: ∅
+ │ ├── opening_loc: (1,0)-(1,3) = "%W["
+ │ └── closing_loc: (1,13)-(1,14) = "]"
+ └── @ ArrayNode (location: (3,0)-(3,22))
+ ├── elements: (length: 2)
+ │ ├── @ StringNode (location: (3,3)-(3,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,3)-(3,6) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ InterpolatedStringNode (location: (3,7)-(3,21))
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 3)
+ │ │ ├── @ EmbeddedStatementsNode (location: (3,7)-(3,13))
+ │ │ │ ├── opening_loc: (3,7)-(3,9) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,9)-(3,12))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,9)-(3,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,9)-(3,12) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── closing_loc: (3,12)-(3,13) = "}"
+ │ │ ├── @ StringNode (location: (3,13)-(3,16))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,13)-(3,16) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ EmbeddedVariableNode (location: (3,16)-(3,21))
+ │ │ ├── operator_loc: (3,16)-(3,17) = "#"
+ │ │ └── variable:
+ │ │ @ InstanceVariableReadNode (location: (3,17)-(3,21))
+ │ │ └── name: :@baz
+ │ └── closing_loc: ∅
+ ├── opening_loc: (3,0)-(3,3) = "%W["
+ └── closing_loc: (3,21)-(3,22) = "]"
diff --git a/test/prism/snapshots/whitequark/asgn_cmd.txt b/test/prism/snapshots/whitequark/asgn_cmd.txt
new file mode 100644
index 0000000000..13268c70b1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/asgn_cmd.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(3,11))
+├── locals: [:foo, :bar]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,11))
+ └── body: (length: 2)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,17))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,3) = "foo"
+ │ ├── value:
+ │ │ @ LocalVariableWriteNode (location: (1,6)-(1,17))
+ │ │ ├── name: :bar
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (1,6)-(1,9) = "bar"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (1,12)-(1,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,12)-(1,13) = "m"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,14)-(1,17))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (1,14)-(1,17))
+ │ │ │ │ ├── name: :foo
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "m"
+ │ │ └── operator_loc: (1,10)-(1,11) = "="
+ │ └── operator_loc: (1,4)-(1,5) = "="
+ └── @ LocalVariableWriteNode (location: (3,0)-(3,11))
+ ├── name: :foo
+ ├── depth: 0
+ ├── name_loc: (3,0)-(3,3) = "foo"
+ ├── value:
+ │ @ CallNode (location: (3,6)-(3,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,6)-(3,7) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,8)-(3,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (3,8)-(3,11))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ └── operator_loc: (3,4)-(3,5) = "="
diff --git a/test/prism/snapshots/whitequark/asgn_mrhs.txt b/test/prism/snapshots/whitequark/asgn_mrhs.txt
new file mode 100644
index 0000000000..bb86015289
--- /dev/null
+++ b/test/prism/snapshots/whitequark/asgn_mrhs.txt
@@ -0,0 +1,83 @@
+@ ProgramNode (location: (1,0)-(5,15))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,15))
+ └── body: (length: 3)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,10))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,3) = "foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (1,6)-(1,10))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ SplatNode (location: (1,6)-(1,10))
+ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (1,4)-(1,5) = "="
+ ├── @ LocalVariableWriteNode (location: (3,0)-(3,12))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (3,0)-(3,3) = "foo"
+ │ ├── value:
+ │ │ @ ArrayNode (location: (3,6)-(3,12))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ CallNode (location: (3,6)-(3,9))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,6)-(3,9) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── @ IntegerNode (location: (3,11)-(3,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (3,4)-(3,5) = "="
+ └── @ LocalVariableWriteNode (location: (5,0)-(5,15))
+ ├── name: :foo
+ ├── depth: 0
+ ├── name_loc: (5,0)-(5,3) = "foo"
+ ├── value:
+ │ @ ArrayNode (location: (5,6)-(5,15))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ CallNode (location: (5,6)-(5,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,6)-(5,9) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── @ SplatNode (location: (5,11)-(5,15))
+ │ │ ├── operator_loc: (5,11)-(5,12) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (5,12)-(5,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,12)-(5,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── operator_loc: (5,4)-(5,5) = "="
diff --git a/test/prism/snapshots/whitequark/back_ref.txt b/test/prism/snapshots/whitequark/back_ref.txt
new file mode 100644
index 0000000000..eafd6f144a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/back_ref.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ BackReferenceReadNode (location: (1,0)-(1,2))
diff --git a/test/prism/snapshots/whitequark/bang.txt b/test/prism/snapshots/whitequark/bang.txt
new file mode 100644
index 0000000000..da83d817a5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bang.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,1)-(1,4) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/whitequark/bang_cmd.txt b/test/prism/snapshots/whitequark/bang_cmd.txt
new file mode 100644
index 0000000000..27b0a1ebdf
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bang_cmd.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,6))
+ ├── receiver:
+ │ @ CallNode (location: (1,1)-(1,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,1)-(1,2) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,3)-(1,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/whitequark/begin_cmdarg.txt b/test/prism/snapshots/whitequark/begin_cmdarg.txt
new file mode 100644
index 0000000000..833863958f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/begin_cmdarg.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,28))
+ │ └── arguments: (length: 1)
+ │ └── @ BeginNode (location: (1,2)-(1,28))
+ │ ├── begin_keyword_loc: (1,2)-(1,7) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,8)-(1,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,8)-(1,24))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: (1,9)-(1,10) = "."
+ │ │ ├── message_loc: (1,10)-(1,15) = "times"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,16)-(1,24))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (1,19)-(1,20))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,19)-(1,20))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── opening_loc: (1,16)-(1,18) = "do"
+ │ │ │ └── closing_loc: (1,21)-(1,24) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "times"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (1,25)-(1,28) = "end"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/beginless_erange_after_newline.txt b/test/prism/snapshots/whitequark/beginless_erange_after_newline.txt
new file mode 100644
index 0000000000..0bea43c7f2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/beginless_erange_after_newline.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(2,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,6))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ └── @ RangeNode (location: (2,0)-(2,6))
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (2,3)-(2,6))
+ │ └── flags: decimal
+ ├── operator_loc: (2,0)-(2,3) = "..."
+ └── flags: exclude_end
diff --git a/test/prism/snapshots/whitequark/beginless_irange_after_newline.txt b/test/prism/snapshots/whitequark/beginless_irange_after_newline.txt
new file mode 100644
index 0000000000..ab2fa8064f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/beginless_irange_after_newline.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(2,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,5))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ └── @ RangeNode (location: (2,0)-(2,5))
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (2,2)-(2,5))
+ │ └── flags: decimal
+ ├── operator_loc: (2,0)-(2,2) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/beginless_range.txt b/test/prism/snapshots/whitequark/beginless_range.txt
new file mode 100644
index 0000000000..7ec06309c4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/beginless_range.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(3,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,5))
+ └── body: (length: 2)
+ ├── @ RangeNode (location: (1,0)-(1,6))
+ │ ├── left: ∅
+ │ ├── right:
+ │ │ @ IntegerNode (location: (1,3)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── operator_loc: (1,0)-(1,3) = "..."
+ │ └── flags: exclude_end
+ └── @ RangeNode (location: (3,0)-(3,5))
+ ├── left: ∅
+ ├── right:
+ │ @ IntegerNode (location: (3,2)-(3,5))
+ │ └── flags: decimal
+ ├── operator_loc: (3,0)-(3,2) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/blockarg.txt b/test/prism/snapshots/whitequark/blockarg.txt
new file mode 100644
index 0000000000..ce1c33a0f0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/blockarg.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,18))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,12))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block:
+ │ @ BlockParameterNode (location: (1,6)-(1,12))
+ │ ├── name: :block
+ │ ├── name_loc: (1,7)-(1,12) = "block"
+ │ └── operator_loc: (1,6)-(1,7) = "&"
+ ├── body: ∅
+ ├── locals: [:block]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,12)-(1,13) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,15)-(1,18) = "end"
diff --git a/test/prism/snapshots/whitequark/blockargs.txt b/test/prism/snapshots/whitequark/blockargs.txt
new file mode 100644
index 0000000000..a9692cbaed
--- /dev/null
+++ b/test/prism/snapshots/whitequark/blockargs.txt
@@ -0,0 +1,1260 @@
+@ ProgramNode (location: (1,0)-(71,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(71,7))
+ └── body: (length: 35)
+ ├── @ CallNode (location: (1,0)-(1,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,1)-(1,5))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,1)-(1,2) = "{"
+ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,1)-(3,8))
+ │ │ ├── locals: []
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (3,3)-(3,6))
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (3,3)-(3,4) = "|"
+ │ │ │ └── closing_loc: (3,5)-(3,6) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (3,1)-(3,2) = "{"
+ │ │ └── closing_loc: (3,7)-(3,8) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (5,0)-(5,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,1)-(5,9))
+ │ │ ├── locals: [:b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (5,3)-(5,7))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (5,4)-(5,6))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (5,4)-(5,6))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (5,5)-(5,6) = "b"
+ │ │ │ │ └── operator_loc: (5,4)-(5,5) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (5,3)-(5,4) = "|"
+ │ │ │ └── closing_loc: (5,6)-(5,7) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,1)-(5,2) = "{"
+ │ │ └── closing_loc: (5,8)-(5,9) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (7,0)-(7,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (7,1)-(7,16))
+ │ │ ├── locals: [:baz, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (7,3)-(7,14))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (7,4)-(7,13))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest:
+ │ │ │ │ │ @ KeywordRestParameterNode (location: (7,4)-(7,9))
+ │ │ │ │ │ ├── name: :baz
+ │ │ │ │ │ ├── name_loc: (7,6)-(7,9) = "baz"
+ │ │ │ │ │ └── operator_loc: (7,4)-(7,6) = "**"
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (7,11)-(7,13))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (7,12)-(7,13) = "b"
+ │ │ │ │ └── operator_loc: (7,11)-(7,12) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (7,3)-(7,4) = "|"
+ │ │ │ └── closing_loc: (7,13)-(7,14) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (7,1)-(7,2) = "{"
+ │ │ └── closing_loc: (7,15)-(7,16) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (9,0)-(9,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,0)-(9,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (9,1)-(9,12))
+ │ │ ├── locals: [:*, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (9,3)-(9,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (9,4)-(9,9))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (9,4)-(9,5))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (9,4)-(9,5) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (9,7)-(9,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (9,8)-(9,9) = "b"
+ │ │ │ │ └── operator_loc: (9,7)-(9,8) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (9,3)-(9,4) = "|"
+ │ │ │ └── closing_loc: (9,9)-(9,10) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (9,1)-(9,2) = "{"
+ │ │ └── closing_loc: (9,11)-(9,12) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (11,0)-(11,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (11,1)-(11,16))
+ │ │ ├── locals: [:r, :p, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (11,3)-(11,14))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (11,4)-(11,13))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (11,4)-(11,6))
+ │ │ │ │ │ ├── name: :r
+ │ │ │ │ │ ├── name_loc: (11,5)-(11,6) = "r"
+ │ │ │ │ │ └── operator_loc: (11,4)-(11,5) = "*"
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (11,8)-(11,9))
+ │ │ │ │ │ └── name: :p
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (11,11)-(11,13))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (11,12)-(11,13) = "b"
+ │ │ │ │ └── operator_loc: (11,11)-(11,12) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (11,3)-(11,4) = "|"
+ │ │ │ └── closing_loc: (11,13)-(11,14) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (11,1)-(11,2) = "{"
+ │ │ └── closing_loc: (11,15)-(11,16) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (13,0)-(13,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (13,1)-(13,13))
+ │ │ ├── locals: [:s, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (13,3)-(13,11))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (13,4)-(13,10))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (13,4)-(13,6))
+ │ │ │ │ │ ├── name: :s
+ │ │ │ │ │ ├── name_loc: (13,5)-(13,6) = "s"
+ │ │ │ │ │ └── operator_loc: (13,4)-(13,5) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (13,8)-(13,10))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (13,9)-(13,10) = "b"
+ │ │ │ │ └── operator_loc: (13,8)-(13,9) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (13,3)-(13,4) = "|"
+ │ │ │ └── closing_loc: (13,10)-(13,11) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (13,1)-(13,2) = "{"
+ │ │ └── closing_loc: (13,12)-(13,13) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (15,0)-(15,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,0)-(15,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (15,1)-(15,9))
+ │ │ ├── locals: [:s]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (15,3)-(15,7))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (15,4)-(15,6))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (15,4)-(15,6))
+ │ │ │ │ │ ├── name: :s
+ │ │ │ │ │ ├── name_loc: (15,5)-(15,6) = "s"
+ │ │ │ │ │ └── operator_loc: (15,4)-(15,5) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (15,3)-(15,4) = "|"
+ │ │ │ └── closing_loc: (15,6)-(15,7) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (15,1)-(15,2) = "{"
+ │ │ └── closing_loc: (15,8)-(15,9) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (17,0)-(17,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,0)-(17,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (17,1)-(17,8))
+ │ │ ├── locals: [:*]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (17,3)-(17,6))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (17,4)-(17,5))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (17,4)-(17,5))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (17,4)-(17,5) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (17,3)-(17,4) = "|"
+ │ │ │ └── closing_loc: (17,5)-(17,6) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (17,1)-(17,2) = "{"
+ │ │ └── closing_loc: (17,7)-(17,8) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (19,0)-(21,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,0)-(19,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (19,1)-(21,3))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (19,3)-(21,1))
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── locals: (length: 1)
+ │ │ │ │ └── @ BlockLocalVariableNode (location: (20,0)-(20,1))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── opening_loc: (19,3)-(19,4) = "|"
+ │ │ │ └── closing_loc: (21,0)-(21,1) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (19,1)-(19,2) = "{"
+ │ │ └── closing_loc: (21,2)-(21,3) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (23,0)-(23,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (23,0)-(23,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (23,1)-(23,9))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (23,3)-(23,7))
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── locals: (length: 1)
+ │ │ │ │ └── @ BlockLocalVariableNode (location: (23,5)-(23,6))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── opening_loc: (23,3)-(23,4) = "|"
+ │ │ │ └── closing_loc: (23,6)-(23,7) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (23,1)-(23,2) = "{"
+ │ │ └── closing_loc: (23,8)-(23,9) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (25,0)-(25,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,0)-(25,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (25,1)-(25,12))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (25,3)-(25,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (25,4)-(25,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (25,4)-(25,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (25,7)-(25,9))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (25,8)-(25,9) = "b"
+ │ │ │ │ └── operator_loc: (25,7)-(25,8) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (25,3)-(25,4) = "|"
+ │ │ │ └── closing_loc: (25,9)-(25,10) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (25,1)-(25,2) = "{"
+ │ │ └── closing_loc: (25,11)-(25,12) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (27,0)-(27,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,0)-(27,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (27,1)-(27,15))
+ │ │ ├── locals: [:a, :*, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (27,3)-(27,13))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (27,4)-(27,12))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (27,4)-(27,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (27,7)-(27,8))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (27,7)-(27,8) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (27,10)-(27,12))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (27,11)-(27,12) = "b"
+ │ │ │ │ └── operator_loc: (27,10)-(27,11) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (27,3)-(27,4) = "|"
+ │ │ │ └── closing_loc: (27,12)-(27,13) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (27,1)-(27,2) = "{"
+ │ │ └── closing_loc: (27,14)-(27,15) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (29,0)-(29,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (29,0)-(29,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (29,1)-(29,19))
+ │ │ ├── locals: [:a, :r, :p, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (29,3)-(29,17))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (29,4)-(29,16))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (29,4)-(29,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (29,7)-(29,9))
+ │ │ │ │ │ ├── name: :r
+ │ │ │ │ │ ├── name_loc: (29,8)-(29,9) = "r"
+ │ │ │ │ │ └── operator_loc: (29,7)-(29,8) = "*"
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (29,11)-(29,12))
+ │ │ │ │ │ └── name: :p
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (29,14)-(29,16))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (29,15)-(29,16) = "b"
+ │ │ │ │ └── operator_loc: (29,14)-(29,15) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (29,3)-(29,4) = "|"
+ │ │ │ └── closing_loc: (29,16)-(29,17) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (29,1)-(29,2) = "{"
+ │ │ └── closing_loc: (29,18)-(29,19) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (31,0)-(31,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,0)-(31,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (31,1)-(31,16))
+ │ │ ├── locals: [:a, :s, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (31,3)-(31,14))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (31,4)-(31,13))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (31,4)-(31,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (31,7)-(31,9))
+ │ │ │ │ │ ├── name: :s
+ │ │ │ │ │ ├── name_loc: (31,8)-(31,9) = "s"
+ │ │ │ │ │ └── operator_loc: (31,7)-(31,8) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (31,11)-(31,13))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (31,12)-(31,13) = "b"
+ │ │ │ │ └── operator_loc: (31,11)-(31,12) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (31,3)-(31,4) = "|"
+ │ │ │ └── closing_loc: (31,13)-(31,14) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (31,1)-(31,2) = "{"
+ │ │ └── closing_loc: (31,15)-(31,16) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (33,0)-(33,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (33,0)-(33,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (33,1)-(33,12))
+ │ │ ├── locals: [:a, :s]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (33,3)-(33,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (33,4)-(33,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (33,4)-(33,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (33,7)-(33,9))
+ │ │ │ │ │ ├── name: :s
+ │ │ │ │ │ ├── name_loc: (33,8)-(33,9) = "s"
+ │ │ │ │ │ └── operator_loc: (33,7)-(33,8) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (33,3)-(33,4) = "|"
+ │ │ │ └── closing_loc: (33,9)-(33,10) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (33,1)-(33,2) = "{"
+ │ │ └── closing_loc: (33,11)-(33,12) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (35,0)-(35,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,0)-(35,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (35,1)-(35,11))
+ │ │ ├── locals: [:a, :*]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (35,3)-(35,9))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (35,4)-(35,8))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (35,4)-(35,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (35,7)-(35,8))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (35,7)-(35,8) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (35,3)-(35,4) = "|"
+ │ │ │ └── closing_loc: (35,8)-(35,9) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (35,1)-(35,2) = "{"
+ │ │ └── closing_loc: (35,10)-(35,11) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (37,0)-(37,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,0)-(37,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (37,1)-(37,12))
+ │ │ ├── locals: [:a, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (37,3)-(37,10))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (37,4)-(37,9))
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (37,4)-(37,5))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (37,7)-(37,8))
+ │ │ │ │ │ └── name: :b
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (37,8)-(37,9))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (37,8)-(37,9) = ","
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (37,3)-(37,4) = "|"
+ │ │ │ └── closing_loc: (37,9)-(37,10) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (37,1)-(37,2) = "{"
+ │ │ └── closing_loc: (37,11)-(37,12) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (39,0)-(39,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (39,0)-(39,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (39,1)-(39,11))
+ │ │ ├── locals: [:a, :c]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (39,3)-(39,9))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (39,4)-(39,8))
+ │ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ │ ├── @ RequiredParameterNode (location: (39,4)-(39,5))
+ │ │ │ │ │ │ └── name: :a
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (39,7)-(39,8))
+ │ │ │ │ │ └── name: :c
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (39,3)-(39,4) = "|"
+ │ │ │ └── closing_loc: (39,8)-(39,9) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (39,1)-(39,2) = "{"
+ │ │ └── closing_loc: (39,10)-(39,11) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (41,0)-(41,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (41,0)-(41,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (41,1)-(41,17))
+ │ │ ├── locals: [:a, :o, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (41,3)-(41,15))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (41,4)-(41,14))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (41,4)-(41,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (41,7)-(41,10))
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (41,7)-(41,8) = "o"
+ │ │ │ │ │ ├── operator_loc: (41,8)-(41,9) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (41,9)-(41,10))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (41,12)-(41,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (41,13)-(41,14) = "b"
+ │ │ │ │ └── operator_loc: (41,12)-(41,13) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (41,3)-(41,4) = "|"
+ │ │ │ └── closing_loc: (41,14)-(41,15) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (41,1)-(41,2) = "{"
+ │ │ └── closing_loc: (41,16)-(41,17) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (43,0)-(43,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (43,0)-(43,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (43,1)-(43,24))
+ │ │ ├── locals: [:a, :o, :r, :p, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (43,3)-(43,22))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (43,4)-(43,21))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (43,4)-(43,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (43,7)-(43,10))
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (43,7)-(43,8) = "o"
+ │ │ │ │ │ ├── operator_loc: (43,8)-(43,9) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (43,9)-(43,10))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (43,12)-(43,14))
+ │ │ │ │ │ ├── name: :r
+ │ │ │ │ │ ├── name_loc: (43,13)-(43,14) = "r"
+ │ │ │ │ │ └── operator_loc: (43,12)-(43,13) = "*"
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (43,16)-(43,17))
+ │ │ │ │ │ └── name: :p
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (43,19)-(43,21))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (43,20)-(43,21) = "b"
+ │ │ │ │ └── operator_loc: (43,19)-(43,20) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (43,3)-(43,4) = "|"
+ │ │ │ └── closing_loc: (43,21)-(43,22) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (43,1)-(43,2) = "{"
+ │ │ └── closing_loc: (43,23)-(43,24) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (45,0)-(45,27))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (45,0)-(45,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (45,1)-(45,27))
+ │ │ ├── locals: [:a, :o, :o1, :r, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (45,3)-(45,25))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (45,4)-(45,24))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (45,4)-(45,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 2)
+ │ │ │ │ │ ├── @ OptionalParameterNode (location: (45,7)-(45,10))
+ │ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ │ ├── name_loc: (45,7)-(45,8) = "o"
+ │ │ │ │ │ │ ├── operator_loc: (45,8)-(45,9) = "="
+ │ │ │ │ │ │ └── value:
+ │ │ │ │ │ │ @ IntegerNode (location: (45,9)-(45,10))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (45,12)-(45,16))
+ │ │ │ │ │ ├── name: :o1
+ │ │ │ │ │ ├── name_loc: (45,12)-(45,14) = "o1"
+ │ │ │ │ │ ├── operator_loc: (45,14)-(45,15) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (45,15)-(45,16))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (45,18)-(45,20))
+ │ │ │ │ │ ├── name: :r
+ │ │ │ │ │ ├── name_loc: (45,19)-(45,20) = "r"
+ │ │ │ │ │ └── operator_loc: (45,18)-(45,19) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (45,22)-(45,24))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (45,23)-(45,24) = "b"
+ │ │ │ │ └── operator_loc: (45,22)-(45,23) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (45,3)-(45,4) = "|"
+ │ │ │ └── closing_loc: (45,24)-(45,25) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (45,1)-(45,2) = "{"
+ │ │ └── closing_loc: (45,26)-(45,27) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (47,0)-(47,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (47,0)-(47,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (47,1)-(47,20))
+ │ │ ├── locals: [:a, :o, :p, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (47,3)-(47,18))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (47,4)-(47,17))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (47,4)-(47,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (47,7)-(47,10))
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (47,7)-(47,8) = "o"
+ │ │ │ │ │ ├── operator_loc: (47,8)-(47,9) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (47,9)-(47,10))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (47,12)-(47,13))
+ │ │ │ │ │ └── name: :p
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (47,15)-(47,17))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (47,16)-(47,17) = "b"
+ │ │ │ │ └── operator_loc: (47,15)-(47,16) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (47,3)-(47,4) = "|"
+ │ │ │ └── closing_loc: (47,17)-(47,18) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (47,1)-(47,2) = "{"
+ │ │ └── closing_loc: (47,19)-(47,20) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (49,0)-(49,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (49,0)-(49,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (49,1)-(49,9))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (49,3)-(49,7))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (49,4)-(49,6))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (49,4)-(49,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (49,5)-(49,6))
+ │ │ │ │ │ ├── name: nil
+ │ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ │ └── operator_loc: (49,5)-(49,6) = ","
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (49,3)-(49,4) = "|"
+ │ │ │ └── closing_loc: (49,6)-(49,7) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (49,1)-(49,2) = "{"
+ │ │ └── closing_loc: (49,8)-(49,9) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (51,0)-(51,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (51,0)-(51,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (51,1)-(51,8))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (51,3)-(51,6))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (51,4)-(51,5))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (51,4)-(51,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (51,3)-(51,4) = "|"
+ │ │ │ └── closing_loc: (51,5)-(51,6) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (51,1)-(51,2) = "{"
+ │ │ └── closing_loc: (51,7)-(51,8) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (53,0)-(53,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (53,0)-(53,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (53,1)-(53,8))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (53,3)-(53,6))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (53,4)-(53,5))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (53,4)-(53,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (53,3)-(53,4) = "|"
+ │ │ │ └── closing_loc: (53,5)-(53,6) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (53,1)-(53,2) = "{"
+ │ │ └── closing_loc: (53,7)-(53,8) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (55,0)-(55,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (55,0)-(55,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (55,1)-(55,8))
+ │ │ ├── locals: [:a]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (55,3)-(55,6))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (55,4)-(55,5))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (55,4)-(55,5))
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (55,3)-(55,4) = "|"
+ │ │ │ └── closing_loc: (55,5)-(55,6) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (55,1)-(55,2) = "{"
+ │ │ └── closing_loc: (55,7)-(55,8) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (57,0)-(57,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (57,0)-(57,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (57,1)-(57,17))
+ │ │ ├── locals: [:foo, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (57,3)-(57,15))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (57,4)-(57,14))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ │ └── @ KeywordParameterNode (location: (57,4)-(57,10))
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── name_loc: (57,4)-(57,8) = "foo:"
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (57,9)-(57,10))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (57,12)-(57,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (57,13)-(57,14) = "b"
+ │ │ │ │ └── operator_loc: (57,12)-(57,13) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (57,3)-(57,4) = "|"
+ │ │ │ └── closing_loc: (57,14)-(57,15) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (57,1)-(57,2) = "{"
+ │ │ └── closing_loc: (57,16)-(57,17) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (59,0)-(59,32))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (59,0)-(59,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (59,1)-(59,32))
+ │ │ ├── locals: [:foo, :bar, :baz, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (59,3)-(59,30))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (59,4)-(59,29))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 2)
+ │ │ │ │ │ ├── @ KeywordParameterNode (location: (59,4)-(59,10))
+ │ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ │ ├── name_loc: (59,4)-(59,8) = "foo:"
+ │ │ │ │ │ │ └── value:
+ │ │ │ │ │ │ @ IntegerNode (location: (59,9)-(59,10))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ └── @ KeywordParameterNode (location: (59,12)-(59,18))
+ │ │ │ │ │ ├── name: :bar
+ │ │ │ │ │ ├── name_loc: (59,12)-(59,16) = "bar:"
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (59,17)-(59,18))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── keyword_rest:
+ │ │ │ │ │ @ KeywordRestParameterNode (location: (59,20)-(59,25))
+ │ │ │ │ │ ├── name: :baz
+ │ │ │ │ │ ├── name_loc: (59,22)-(59,25) = "baz"
+ │ │ │ │ │ └── operator_loc: (59,20)-(59,22) = "**"
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (59,27)-(59,29))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (59,28)-(59,29) = "b"
+ │ │ │ │ └── operator_loc: (59,27)-(59,28) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (59,3)-(59,4) = "|"
+ │ │ │ └── closing_loc: (59,29)-(59,30) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (59,1)-(59,2) = "{"
+ │ │ └── closing_loc: (59,31)-(59,32) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (61,0)-(61,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (61,0)-(61,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (61,1)-(61,11))
+ │ │ ├── locals: [:foo]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (61,3)-(61,9))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (61,4)-(61,8))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ │ └── @ KeywordParameterNode (location: (61,4)-(61,8))
+ │ │ │ │ │ ├── name: :foo
+ │ │ │ │ │ ├── name_loc: (61,4)-(61,8) = "foo:"
+ │ │ │ │ │ └── value: ∅
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (61,3)-(61,4) = "|"
+ │ │ │ └── closing_loc: (61,8)-(61,9) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (61,1)-(61,2) = "{"
+ │ │ └── closing_loc: (61,10)-(61,11) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (63,0)-(63,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (63,0)-(63,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (63,1)-(63,14))
+ │ │ ├── locals: [:o, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (63,3)-(63,12))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (63,4)-(63,11))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (63,4)-(63,7))
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (63,4)-(63,5) = "o"
+ │ │ │ │ │ ├── operator_loc: (63,5)-(63,6) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (63,6)-(63,7))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (63,9)-(63,11))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (63,10)-(63,11) = "b"
+ │ │ │ │ └── operator_loc: (63,9)-(63,10) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (63,3)-(63,4) = "|"
+ │ │ │ └── closing_loc: (63,11)-(63,12) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (63,1)-(63,2) = "{"
+ │ │ └── closing_loc: (63,13)-(63,14) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (65,0)-(65,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (65,0)-(65,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (65,1)-(65,18))
+ │ │ ├── locals: [:o, :r, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (65,3)-(65,16))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (65,4)-(65,15))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (65,4)-(65,7))
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (65,4)-(65,5) = "o"
+ │ │ │ │ │ ├── operator_loc: (65,5)-(65,6) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (65,6)-(65,7))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (65,9)-(65,11))
+ │ │ │ │ │ ├── name: :r
+ │ │ │ │ │ ├── name_loc: (65,10)-(65,11) = "r"
+ │ │ │ │ │ └── operator_loc: (65,9)-(65,10) = "*"
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (65,13)-(65,15))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (65,14)-(65,15) = "b"
+ │ │ │ │ └── operator_loc: (65,13)-(65,14) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (65,3)-(65,4) = "|"
+ │ │ │ └── closing_loc: (65,15)-(65,16) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (65,1)-(65,2) = "{"
+ │ │ └── closing_loc: (65,17)-(65,18) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (67,0)-(67,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (67,0)-(67,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (67,1)-(67,21))
+ │ │ ├── locals: [:o, :r, :p, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (67,3)-(67,19))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (67,4)-(67,18))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (67,4)-(67,7))
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (67,4)-(67,5) = "o"
+ │ │ │ │ │ ├── operator_loc: (67,5)-(67,6) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (67,6)-(67,7))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest:
+ │ │ │ │ │ @ RestParameterNode (location: (67,9)-(67,11))
+ │ │ │ │ │ ├── name: :r
+ │ │ │ │ │ ├── name_loc: (67,10)-(67,11) = "r"
+ │ │ │ │ │ └── operator_loc: (67,9)-(67,10) = "*"
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (67,13)-(67,14))
+ │ │ │ │ │ └── name: :p
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (67,16)-(67,18))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (67,17)-(67,18) = "b"
+ │ │ │ │ └── operator_loc: (67,16)-(67,17) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (67,3)-(67,4) = "|"
+ │ │ │ └── closing_loc: (67,18)-(67,19) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (67,1)-(67,2) = "{"
+ │ │ └── closing_loc: (67,20)-(67,21) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ CallNode (location: (69,0)-(69,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (69,0)-(69,1) = "f"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (69,1)-(69,17))
+ │ │ ├── locals: [:o, :p, :b]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (69,3)-(69,15))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (69,4)-(69,14))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (69,4)-(69,7))
+ │ │ │ │ │ ├── name: :o
+ │ │ │ │ │ ├── name_loc: (69,4)-(69,5) = "o"
+ │ │ │ │ │ ├── operator_loc: (69,5)-(69,6) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ IntegerNode (location: (69,6)-(69,7))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (69,9)-(69,10))
+ │ │ │ │ │ └── name: :p
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block:
+ │ │ │ │ @ BlockParameterNode (location: (69,12)-(69,14))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── name_loc: (69,13)-(69,14) = "b"
+ │ │ │ │ └── operator_loc: (69,12)-(69,13) = "&"
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (69,3)-(69,4) = "|"
+ │ │ │ └── closing_loc: (69,14)-(69,15) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (69,1)-(69,2) = "{"
+ │ │ └── closing_loc: (69,16)-(69,17) = "}"
+ │ ├── flags: ∅
+ │ └── name: "f"
+ └── @ CallNode (location: (71,0)-(71,7))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (71,0)-(71,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (71,1)-(71,7))
+ │ ├── locals: []
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (71,3)-(71,5))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (71,3)-(71,4) = "|"
+ │ │ └── closing_loc: (71,4)-(71,5) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (71,1)-(71,2) = "{"
+ │ └── closing_loc: (71,6)-(71,7) = "}"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/whitequark/break.txt b/test/prism/snapshots/whitequark/break.txt
new file mode 100644
index 0000000000..7f375d2d3f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/break.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(7,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,10))
+ └── body: (length: 4)
+ ├── @ BreakNode (location: (1,0)-(1,5))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (1,0)-(1,5) = "break"
+ ├── @ BreakNode (location: (3,0)-(3,9))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,6)-(3,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,6)-(3,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── keyword_loc: (3,0)-(3,5) = "break"
+ ├── @ BreakNode (location: (5,0)-(5,7))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,5)-(5,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (5,5)-(5,7))
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,5)-(5,6) = "("
+ │ │ └── closing_loc: (5,6)-(5,7) = ")"
+ │ └── keyword_loc: (5,0)-(5,5) = "break"
+ └── @ BreakNode (location: (7,0)-(7,10))
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,5)-(7,10))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (7,5)-(7,10))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,6)-(7,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,6)-(7,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,6)-(7,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (7,5)-(7,6) = "("
+ │ └── closing_loc: (7,9)-(7,10) = ")"
+ └── keyword_loc: (7,0)-(7,5) = "break"
diff --git a/test/prism/snapshots/whitequark/break_block.txt b/test/prism/snapshots/whitequark/break_block.txt
new file mode 100644
index 0000000000..58e972f226
--- /dev/null
+++ b/test/prism/snapshots/whitequark/break_block.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ BreakNode (location: (1,0)-(1,20))
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,6)-(1,20))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,6)-(1,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,9) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,10)-(1,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,10)-(1,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,10)-(1,13) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,14)-(1,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
+ │ │ └── closing_loc: (1,17)-(1,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── keyword_loc: (1,0)-(1,5) = "break"
diff --git a/test/prism/snapshots/whitequark/bug_435.txt b/test/prism/snapshots/whitequark/bug_435.txt
new file mode 100644
index 0000000000..fd7380e15d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_435.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,14))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 1)
+ │ └── @ EmbeddedStatementsNode (location: (1,1)-(1,13))
+ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,3)-(1,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LambdaNode (location: (1,3)-(1,12))
+ │ │ ├── locals: [:foo]
+ │ │ ├── operator_loc: (1,3)-(1,5) = "->"
+ │ │ ├── opening_loc: (1,10)-(1,11) = "{"
+ │ │ ├── closing_loc: (1,11)-(1,12) = "}"
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (1,6)-(1,9))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (1,6)-(1,9))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,9))
+ │ │ │ │ │ └── name: :foo
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ └── body: ∅
+ │ └── closing_loc: (1,12)-(1,13) = "}"
+ └── closing_loc: (1,13)-(1,14) = "\""
diff --git a/test/prism/snapshots/whitequark/bug_447.txt b/test/prism/snapshots/whitequark/bug_447.txt
new file mode 100644
index 0000000000..40a6d81e4c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_447.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(3,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,14))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ArrayNode (location: (1,2)-(1,4))
+ │ │ ├── elements: (length: 0)
+ │ │ ├── opening_loc: (1,2)-(1,3) = "["
+ │ │ └── closing_loc: (1,3)-(1,4) = "]"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,5)-(1,11))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ │ └── closing_loc: (1,8)-(1,11) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ └── @ CallNode (location: (3,0)-(3,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,2)-(3,7))
+ │ └── arguments: (length: 2)
+ │ ├── @ ArrayNode (location: (3,2)-(3,4))
+ │ │ ├── elements: (length: 0)
+ │ │ ├── opening_loc: (3,2)-(3,3) = "["
+ │ │ └── closing_loc: (3,3)-(3,4) = "]"
+ │ └── @ IntegerNode (location: (3,6)-(3,7))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (3,8)-(3,14))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (3,8)-(3,10) = "do"
+ │ └── closing_loc: (3,11)-(3,14) = "end"
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/bug_452.txt b/test/prism/snapshots/whitequark/bug_452.txt
new file mode 100644
index 0000000000..e7ecdcb2c7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_452.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(1,37))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,37))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,2) = "td"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,3)-(1,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,3)-(1,21))
+ │ │ ├── receiver:
+ │ │ │ @ ParenthesesNode (location: (1,3)-(1,10))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (1,4)-(1,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,4)-(1,9))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ │ └── closing_loc: (1,9)-(1,10) = ")"
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── message_loc: (1,11)-(1,19) = "toString"
+ │ │ ├── opening_loc: (1,19)-(1,20) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (1,20)-(1,21) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "toString"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "td"
+ └── @ CallNode (location: (1,23)-(1,37))
+ ├── receiver:
+ │ @ CallNode (location: (1,23)-(1,25))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,23)-(1,25) = "td"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "td"
+ ├── call_operator_loc: (1,25)-(1,26) = "."
+ ├── message_loc: (1,26)-(1,29) = "num"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,30)-(1,37))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,30)-(1,32) = "do"
+ │ └── closing_loc: (1,34)-(1,37) = "end"
+ ├── flags: ∅
+ └── name: "num"
diff --git a/test/prism/snapshots/whitequark/bug_466.txt b/test/prism/snapshots/whitequark/bug_466.txt
new file mode 100644
index 0000000000..f69841c32d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_466.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(1,27))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,27))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,27))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,19))
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,4)-(1,19))
+ │ ├── opening_loc: (1,4)-(1,5) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (1,5)-(1,18))
+ │ │ ├── opening_loc: (1,5)-(1,7) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,7)-(1,17))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,7)-(1,17))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ ParenthesesNode (location: (1,7)-(1,12))
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (1,8)-(1,11))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,8)-(1,11))
+ │ │ │ │ │ ├── receiver:
+ │ │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,9)-(1,10) = "+"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "+"
+ │ │ │ │ ├── opening_loc: (1,7)-(1,8) = "("
+ │ │ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ │ │ ├── call_operator_loc: (1,12)-(1,13) = "."
+ │ │ │ ├── message_loc: (1,13)-(1,17) = "to_i"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "to_i"
+ │ │ └── closing_loc: (1,17)-(1,18) = "}"
+ │ └── closing_loc: (1,18)-(1,19) = "\""
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,20)-(1,27))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,20)-(1,22) = "do"
+ │ └── closing_loc: (1,24)-(1,27) = "end"
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/whitequark/bug_473.txt b/test/prism/snapshots/whitequark/bug_473.txt
new file mode 100644
index 0000000000..cfdeb9d2f3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_473.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,9))
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,2)-(1,9))
+ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,8))
+ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,5)-(1,7))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ ArrayNode (location: (1,5)-(1,7))
+ │ │ │ ├── elements: (length: 0)
+ │ │ │ ├── opening_loc: (1,5)-(1,6) = "["
+ │ │ │ └── closing_loc: (1,6)-(1,7) = "]"
+ │ │ └── closing_loc: (1,7)-(1,8) = "}"
+ │ └── closing_loc: (1,8)-(1,9) = "\""
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/bug_480.txt b/test/prism/snapshots/whitequark/bug_480.txt
new file mode 100644
index 0000000000..d7beb238e7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_480.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,12))
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (1,2)-(1,12))
+ │ ├── opening_loc: (1,2)-(1,3) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (1,3)-(1,6))
+ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{"
+ │ │ │ ├── statements: ∅
+ │ │ │ └── closing_loc: (1,5)-(1,6) = "}"
+ │ │ └── @ EmbeddedStatementsNode (location: (1,6)-(1,11))
+ │ │ ├── opening_loc: (1,6)-(1,8) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,8)-(1,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ ParenthesesNode (location: (1,8)-(1,10))
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ │ └── closing_loc: (1,9)-(1,10) = ")"
+ │ │ └── closing_loc: (1,10)-(1,11) = "}"
+ │ └── closing_loc: (1,11)-(1,12) = "\""
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/bug_481.txt b/test/prism/snapshots/whitequark/bug_481.txt
new file mode 100644
index 0000000000..7baad1034c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_481.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ DefNode (location: (1,2)-(1,14))
+ │ │ ├── name: :x
+ │ │ ├── name_loc: (1,6)-(1,7) = "x"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── locals: []
+ │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ │ ├── rparen_loc: (1,8)-(1,9) = ")"
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (1,11)-(1,14) = "end"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ └── @ CallNode (location: (1,16)-(1,28))
+ ├── receiver:
+ │ @ IntegerNode (location: (1,16)-(1,17))
+ │ └── flags: decimal
+ ├── call_operator_loc: (1,17)-(1,18) = "."
+ ├── message_loc: (1,18)-(1,21) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,22)-(1,28))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,22)-(1,24) = "do"
+ │ └── closing_loc: (1,25)-(1,28) = "end"
+ ├── flags: ∅
+ └── name: "tap"
diff --git a/test/prism/snapshots/whitequark/bug_ascii_8bit_in_literal.txt b/test/prism/snapshots/whitequark/bug_ascii_8bit_in_literal.txt
new file mode 100644
index 0000000000..65d733166a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_ascii_8bit_in_literal.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (2,9)-(2,75))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (2,9)-(2,75))
+ └── body: (length: 1)
+ └── @ StringNode (location: (2,9)-(2,75))
+ ├── flags: ∅
+ ├── opening_loc: (2,9)-(2,10) = "\""
+ ├── content_loc: (2,10)-(2,74) = "\\xD0\\xBF\\xD1\\x80\\xD0\\xBE\\xD0\\xB2\\xD0\\xB5\\xD1\\x80\\xD0\\xBA\\xD0\\xB0"
+ ├── closing_loc: (2,74)-(2,75) = "\""
+ └── unescaped: "проверка"
diff --git a/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt b/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt
new file mode 100644
index 0000000000..6945f3e301
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_cmd_string_lookahead.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,4) = "desc"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,10))
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,5)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,5)-(1,6) = "\""
+ │ ├── content_loc: (1,6)-(1,9) = "foo"
+ │ ├── closing_loc: (1,9)-(1,10) = "\""
+ │ └── unescaped: "foo"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,11)-(1,17))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,11)-(1,13) = "do"
+ │ └── closing_loc: (1,14)-(1,17) = "end"
+ ├── flags: ∅
+ └── name: "desc"
diff --git a/test/prism/snapshots/whitequark/bug_cmdarg.txt b/test/prism/snapshots/whitequark/bug_cmdarg.txt
new file mode 100644
index 0000000000..d3968f4eab
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_cmdarg.txt
@@ -0,0 +1,99 @@
+@ ProgramNode (location: (1,0)-(5,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,26))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,6) = "assert"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,7)-(1,15))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,7)-(1,15))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,7)-(1,15))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,7)-(1,10))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,7)-(1,9) = "do"
+ │ │ │ ├── closing_loc: (1,9)-(1,10) = ":"
+ │ │ │ └── unescaped: "do"
+ │ │ ├── value:
+ │ │ │ @ TrueNode (location: (1,11)-(1,15))
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "assert"
+ ├── @ CallNode (location: (3,0)-(3,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,6) = "assert"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,7)-(3,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,7)-(3,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,7)-(3,11) = "dogs"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "dogs"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "assert"
+ └── @ CallNode (location: (5,0)-(5,26))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,2)-(5,26))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (5,2)-(5,26))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (5,2)-(5,26))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (5,2)-(5,4))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (5,2)-(5,3) = "x"
+ │ │ ├── closing_loc: (5,3)-(5,4) = ":"
+ │ │ └── unescaped: "x"
+ │ ├── value:
+ │ │ @ LambdaNode (location: (5,5)-(5,26))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (5,5)-(5,7) = "->"
+ │ │ ├── opening_loc: (5,8)-(5,10) = "do"
+ │ │ ├── closing_loc: (5,23)-(5,26) = "end"
+ │ │ ├── parameters: ∅
+ │ │ └── body:
+ │ │ @ StatementsNode (location: (5,11)-(5,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,11)-(5,22))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,11)-(5,15) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (5,16)-(5,22))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (5,16)-(5,18) = "do"
+ │ │ │ └── closing_loc: (5,19)-(5,22) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "meth"
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
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
new file mode 100644
index 0000000000..1b45d0132b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_def_no_paren_eql_begin.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(4,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(4,3))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(4,3))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (4,0)-(4,3) = "end"
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
new file mode 100644
index 0000000000..75be678df6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_call_args.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,33))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,33))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,33))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "bar"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,33))
+ │ └── arguments: (length: 1)
+ │ └── @ DefNode (location: (1,4)-(1,33))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,8)-(1,11) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,13)-(1,29))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,13)-(1,29))
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (1,13)-(1,17))
+ │ │ ├── call_operator_loc: (1,17)-(1,18) = "."
+ │ │ ├── message_loc: (1,18)-(1,22) = "each"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,23)-(1,29))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,23)-(1,25) = "do"
+ │ │ │ └── closing_loc: (1,26)-(1,29) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "each"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,4)-(1,7) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,30)-(1,33) = "end"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "bar"
diff --git a/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt b/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt
new file mode 100644
index 0000000000..2a0fc1fa70
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_cmdarg.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,17))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "tap"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,17))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(1,17))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,5)-(1,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,5)-(1,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,9) = "proc"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,10)-(1,16))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,10)-(1,12) = "do"
+ │ │ │ └── closing_loc: (1,13)-(1,16) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "proc"
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,16)-(1,17) = ")"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "tap"
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
new file mode 100644
index 0000000000..d1212e077a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_do_block_in_hash_brace.txt
@@ -0,0 +1,365 @@
+@ ProgramNode (location: (1,0)-(9,52))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,52))
+ └── body: (length: 5)
+ ├── @ CallNode (location: (1,0)-(1,42))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,42))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (1,2)-(1,6))
+ │ │ │ ├── opening_loc: (1,2)-(1,3) = ":"
+ │ │ │ ├── value_loc: (1,3)-(1,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ HashNode (location: (1,8)-(1,42))
+ │ │ ├── opening_loc: (1,8)-(1,9) = "{"
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (1,9)-(1,25))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (1,9)-(1,13))
+ │ │ │ │ │ ├── opening_loc: (1,9)-(1,10) = "\""
+ │ │ │ │ │ ├── value_loc: (1,10)-(1,11) = "a"
+ │ │ │ │ │ ├── closing_loc: (1,11)-(1,13) = "\":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (1,14)-(1,25))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,14)-(1,18) = "proc"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (1,19)-(1,25))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── opening_loc: (1,19)-(1,21) = "do"
+ │ │ │ │ │ │ └── closing_loc: (1,22)-(1,25) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "proc"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (1,27)-(1,41))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (1,27)-(1,29))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (1,27)-(1,28) = "b"
+ │ │ │ │ ├── closing_loc: (1,28)-(1,29) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (1,30)-(1,41))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,30)-(1,34) = "proc"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (1,35)-(1,41))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (1,35)-(1,37) = "do"
+ │ │ │ │ │ └── closing_loc: (1,38)-(1,41) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "proc"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (1,41)-(1,42) = "}"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (3,0)-(3,40))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,40))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (3,2)-(3,6))
+ │ │ │ ├── opening_loc: (3,2)-(3,3) = ":"
+ │ │ │ ├── value_loc: (3,3)-(3,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ HashNode (location: (3,8)-(3,40))
+ │ │ ├── opening_loc: (3,8)-(3,9) = "{"
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ AssocSplatNode (location: (3,9)-(3,23))
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (3,12)-(3,23))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (3,12)-(3,16) = "proc"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (3,17)-(3,23))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── opening_loc: (3,17)-(3,19) = "do"
+ │ │ │ │ │ │ └── closing_loc: (3,20)-(3,23) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "proc"
+ │ │ │ │ └── operator_loc: (3,9)-(3,11) = "**"
+ │ │ │ └── @ AssocNode (location: (3,25)-(3,39))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (3,25)-(3,27))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (3,25)-(3,26) = "b"
+ │ │ │ │ ├── closing_loc: (3,26)-(3,27) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (3,28)-(3,39))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,28)-(3,32) = "proc"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (3,33)-(3,39))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (3,33)-(3,35) = "do"
+ │ │ │ │ │ └── closing_loc: (3,36)-(3,39) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "proc"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (3,39)-(3,40) = "}"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (5,0)-(5,43))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,43))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (5,2)-(5,6))
+ │ │ │ ├── opening_loc: (5,2)-(5,3) = ":"
+ │ │ │ ├── value_loc: (5,3)-(5,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ HashNode (location: (5,8)-(5,43))
+ │ │ ├── opening_loc: (5,8)-(5,9) = "{"
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (5,9)-(5,26))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (5,9)-(5,11))
+ │ │ │ │ │ ├── opening_loc: (5,9)-(5,10) = ":"
+ │ │ │ │ │ ├── value_loc: (5,10)-(5,11) = "a"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (5,15)-(5,26))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (5,15)-(5,19) = "proc"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (5,20)-(5,26))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── opening_loc: (5,20)-(5,22) = "do"
+ │ │ │ │ │ │ └── closing_loc: (5,23)-(5,26) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "proc"
+ │ │ │ │ └── operator_loc: (5,12)-(5,14) = "=>"
+ │ │ │ └── @ AssocNode (location: (5,28)-(5,42))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (5,28)-(5,30))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (5,28)-(5,29) = "b"
+ │ │ │ │ ├── closing_loc: (5,29)-(5,30) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (5,31)-(5,42))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (5,31)-(5,35) = "proc"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (5,36)-(5,42))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (5,36)-(5,38) = "do"
+ │ │ │ │ │ └── closing_loc: (5,39)-(5,42) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "proc"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (5,42)-(5,43) = "}"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (7,0)-(7,40))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,2)-(7,40))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ SymbolNode (location: (7,2)-(7,6))
+ │ │ │ ├── opening_loc: (7,2)-(7,3) = ":"
+ │ │ │ ├── value_loc: (7,3)-(7,6) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ HashNode (location: (7,8)-(7,40))
+ │ │ ├── opening_loc: (7,8)-(7,9) = "{"
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ AssocNode (location: (7,9)-(7,23))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (7,9)-(7,11))
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── value_loc: (7,9)-(7,10) = "a"
+ │ │ │ │ │ ├── closing_loc: (7,10)-(7,11) = ":"
+ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ ├── value:
+ │ │ │ │ │ @ CallNode (location: (7,12)-(7,23))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (7,12)-(7,16) = "proc"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block:
+ │ │ │ │ │ │ @ BlockNode (location: (7,17)-(7,23))
+ │ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ │ ├── opening_loc: (7,17)-(7,19) = "do"
+ │ │ │ │ │ │ └── closing_loc: (7,20)-(7,23) = "end"
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "proc"
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ └── @ AssocNode (location: (7,25)-(7,39))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (7,25)-(7,27))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (7,25)-(7,26) = "b"
+ │ │ │ │ ├── closing_loc: (7,26)-(7,27) = ":"
+ │ │ │ │ └── unescaped: "b"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (7,28)-(7,39))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (7,28)-(7,32) = "proc"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (7,33)-(7,39))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (7,33)-(7,35) = "do"
+ │ │ │ │ │ └── closing_loc: (7,36)-(7,39) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "proc"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (7,39)-(7,40) = "}"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ └── @ CallNode (location: (9,0)-(9,52))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (9,0)-(9,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (9,2)-(9,52))
+ │ └── arguments: (length: 2)
+ │ ├── @ SymbolNode (location: (9,2)-(9,6))
+ │ │ ├── opening_loc: (9,2)-(9,3) = ":"
+ │ │ ├── value_loc: (9,3)-(9,6) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ └── @ HashNode (location: (9,8)-(9,52))
+ │ ├── opening_loc: (9,8)-(9,9) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (9,9)-(9,35))
+ │ │ │ ├── key:
+ │ │ │ │ @ CallNode (location: (9,9)-(9,20))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (9,9)-(9,13) = "proc"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (9,14)-(9,20))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (9,14)-(9,16) = "do"
+ │ │ │ │ │ └── closing_loc: (9,17)-(9,20) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "proc"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (9,24)-(9,35))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (9,24)-(9,28) = "proc"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (9,29)-(9,35))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (9,29)-(9,31) = "do"
+ │ │ │ │ │ └── closing_loc: (9,32)-(9,35) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "proc"
+ │ │ │ └── operator_loc: (9,21)-(9,23) = "=>"
+ │ │ └── @ AssocNode (location: (9,37)-(9,51))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (9,37)-(9,39))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (9,37)-(9,38) = "b"
+ │ │ │ ├── closing_loc: (9,38)-(9,39) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (9,40)-(9,51))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,40)-(9,44) = "proc"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (9,45)-(9,51))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (9,45)-(9,47) = "do"
+ │ │ │ │ └── closing_loc: (9,48)-(9,51) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "proc"
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (9,51)-(9,52) = "}"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/bug_heredoc_do.txt b/test/prism/snapshots/whitequark/bug_heredoc_do.txt
new file mode 100644
index 0000000000..306de35b95
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_heredoc_do.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(3,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,10))
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,2)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,2)-(1,10) = "<<-TABLE"
+ │ ├── content_loc: (2,0)-(1,0) = ""
+ │ ├── closing_loc: (2,0)-(2,0) = "TABLE\n"
+ │ └── unescaped: ""
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,11)-(3,3))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,11)-(1,13) = "do"
+ │ └── closing_loc: (3,0)-(3,3) = "end"
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/whitequark/bug_interp_single.txt b/test/prism/snapshots/whitequark/bug_interp_single.txt
new file mode 100644
index 0000000000..ce78954f81
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_interp_single.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 2)
+ ├── @ InterpolatedStringNode (location: (1,0)-(1,6))
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (1,1)-(1,5))
+ │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,3)-(1,4))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,3)-(1,4))
+ │ │ │ └── flags: decimal
+ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ └── closing_loc: (1,5)-(1,6) = "\""
+ └── @ ArrayNode (location: (3,0)-(3,8))
+ ├── elements: (length: 1)
+ │ └── @ InterpolatedStringNode (location: (3,3)-(3,7))
+ │ ├── opening_loc: ∅
+ │ ├── parts: (length: 1)
+ │ │ └── @ EmbeddedStatementsNode (location: (3,3)-(3,7))
+ │ │ ├── opening_loc: (3,3)-(3,5) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,5)-(3,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,5)-(3,6))
+ │ │ │ └── flags: decimal
+ │ │ └── closing_loc: (3,6)-(3,7) = "}"
+ │ └── closing_loc: ∅
+ ├── opening_loc: (3,0)-(3,3) = "%W\""
+ └── closing_loc: (3,7)-(3,8) = "\""
diff --git a/test/prism/snapshots/whitequark/bug_lambda_leakage.txt b/test/prism/snapshots/whitequark/bug_lambda_leakage.txt
new file mode 100644
index 0000000000..ff21708d38
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_lambda_leakage.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 2)
+ ├── @ LambdaNode (location: (1,0)-(1,12))
+ │ ├── locals: [:scope]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,10)-(1,11) = "{"
+ │ ├── closing_loc: (1,11)-(1,12) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,2)-(1,9))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,3)-(1,8))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,8))
+ │ │ │ │ └── name: :scope
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ │ └── closing_loc: (1,8)-(1,9) = ")"
+ │ └── body: ∅
+ └── @ CallNode (location: (1,14)-(1,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,14)-(1,19) = "scope"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "scope"
diff --git a/test/prism/snapshots/whitequark/bug_regex_verification.txt b/test/prism/snapshots/whitequark/bug_regex_verification.txt
new file mode 100644
index 0000000000..79ac10f3a5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_regex_verification.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ RegularExpressionNode (location: (1,0)-(1,5))
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,3) = "#)"
+ ├── closing_loc: (1,3)-(1,5) = "/x"
+ ├── unescaped: "#)"
+ └── flags: extended
diff --git a/test/prism/snapshots/whitequark/bug_rescue_empty_else.txt b/test/prism/snapshots/whitequark/bug_rescue_empty_else.txt
new file mode 100644
index 0000000000..52734cc1e9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_rescue_empty_else.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,34))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,34))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,34))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements: ∅
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,7)-(1,23))
+ │ ├── keyword_loc: (1,7)-(1,13) = "rescue"
+ │ ├── exceptions: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (1,14)-(1,23))
+ │ │ └── name: :LoadError
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements: ∅
+ │ └── consequent: ∅
+ ├── else_clause:
+ │ @ ElseNode (location: (1,25)-(1,34))
+ │ ├── else_keyword_loc: (1,25)-(1,29) = "else"
+ │ ├── statements: ∅
+ │ └── end_keyword_loc: (1,31)-(1,34) = "end"
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,31)-(1,34) = "end"
diff --git a/test/prism/snapshots/whitequark/bug_while_not_parens_do.txt b/test/prism/snapshots/whitequark/bug_while_not_parens_do.txt
new file mode 100644
index 0000000000..1d71742a6f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/bug_while_not_parens_do.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ WhileNode (location: (1,0)-(1,23))
+ ├── keyword_loc: (1,0)-(1,5) = "while"
+ ├── closing_loc: (1,20)-(1,23) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (1,6)-(1,16))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (1,10)-(1,16))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,11)-(1,15))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ TrueNode (location: (1,11)-(1,15))
+ │ │ ├── opening_loc: (1,10)-(1,11) = "("
+ │ │ └── closing_loc: (1,15)-(1,16) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,6)-(1,9) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── statements: ∅
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/case_cond.txt b/test/prism/snapshots/whitequark/case_cond.txt
new file mode 100644
index 0000000000..c919344722
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_cond.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,26))
+ ├── predicate: ∅
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,6)-(1,21))
+ │ ├── keyword_loc: (1,6)-(1,10) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,16)-(1,21))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (1,16)-(1,21))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,16)-(1,17) = "'"
+ │ ├── content_loc: (1,17)-(1,20) = "foo"
+ │ ├── closing_loc: (1,20)-(1,21) = "'"
+ │ └── unescaped: "foo"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,23)-(1,26) = "end"
diff --git a/test/prism/snapshots/whitequark/case_cond_else.txt b/test/prism/snapshots/whitequark/case_cond_else.txt
new file mode 100644
index 0000000000..7e6b9ec30f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_cond_else.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,38))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,38))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,38))
+ ├── predicate: ∅
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,6)-(1,21))
+ │ ├── keyword_loc: (1,6)-(1,10) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,16)-(1,21))
+ │ └── body: (length: 1)
+ │ └── @ StringNode (location: (1,16)-(1,21))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,16)-(1,17) = "'"
+ │ ├── content_loc: (1,17)-(1,20) = "foo"
+ │ ├── closing_loc: (1,20)-(1,21) = "'"
+ │ └── unescaped: "foo"
+ ├── consequent:
+ │ @ ElseNode (location: (1,23)-(1,38))
+ │ ├── else_keyword_loc: (1,23)-(1,27) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,28)-(1,33))
+ │ │ └── body: (length: 1)
+ │ │ └── @ StringNode (location: (1,28)-(1,33))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,28)-(1,29) = "'"
+ │ │ ├── content_loc: (1,29)-(1,32) = "bar"
+ │ │ ├── closing_loc: (1,32)-(1,33) = "'"
+ │ │ └── unescaped: "bar"
+ │ └── end_keyword_loc: (1,35)-(1,38) = "end"
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,35)-(1,38) = "end"
diff --git a/test/prism/snapshots/whitequark/case_expr.txt b/test/prism/snapshots/whitequark/case_expr.txt
new file mode 100644
index 0000000000..44c8045a5f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_expr.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,30))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,30))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,30))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,10)-(1,25))
+ │ ├── keyword_loc: (1,10)-(1,14) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ StringNode (location: (1,15)-(1,20))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,15)-(1,16) = "'"
+ │ │ ├── content_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── closing_loc: (1,19)-(1,20) = "'"
+ │ │ └── unescaped: "bar"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,22)-(1,25))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,22)-(1,25))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,27)-(1,30) = "end"
diff --git a/test/prism/snapshots/whitequark/case_expr_else.txt b/test/prism/snapshots/whitequark/case_expr_else.txt
new file mode 100644
index 0000000000..2c6a5f8c65
--- /dev/null
+++ b/test/prism/snapshots/whitequark/case_expr_else.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,40))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,40))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,40))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,10)-(1,25))
+ │ ├── keyword_loc: (1,10)-(1,14) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ StringNode (location: (1,15)-(1,20))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,15)-(1,16) = "'"
+ │ │ ├── content_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── closing_loc: (1,19)-(1,20) = "'"
+ │ │ └── unescaped: "bar"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,22)-(1,25))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,22)-(1,25))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent:
+ │ @ ElseNode (location: (1,27)-(1,40))
+ │ ├── else_keyword_loc: (1,27)-(1,31) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,32)-(1,35))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,32)-(1,35))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,32)-(1,35) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── end_keyword_loc: (1,37)-(1,40) = "end"
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,37)-(1,40) = "end"
diff --git a/test/prism/snapshots/whitequark/casgn_scoped.txt b/test/prism/snapshots/whitequark/casgn_scoped.txt
new file mode 100644
index 0000000000..bb3a8b072a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/casgn_scoped.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ ConstantPathWriteNode (location: (1,0)-(1,13))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,8))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (1,0)-(1,3))
+ │ │ └── name: :Bar
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,5)-(1,8))
+ │ │ └── name: :Foo
+ │ └── delimiter_loc: (1,3)-(1,5) = "::"
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ IntegerNode (location: (1,11)-(1,13))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/casgn_toplevel.txt b/test/prism/snapshots/whitequark/casgn_toplevel.txt
new file mode 100644
index 0000000000..bc48b1e841
--- /dev/null
+++ b/test/prism/snapshots/whitequark/casgn_toplevel.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ ConstantPathWriteNode (location: (1,0)-(1,10))
+ ├── target:
+ │ @ ConstantPathNode (location: (1,0)-(1,5))
+ │ ├── parent: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (1,2)-(1,5))
+ │ │ └── name: :Foo
+ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ ├── operator_loc: (1,6)-(1,7) = "="
+ └── value:
+ @ IntegerNode (location: (1,8)-(1,10))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/casgn_unscoped.txt b/test/prism/snapshots/whitequark/casgn_unscoped.txt
new file mode 100644
index 0000000000..90434d39db
--- /dev/null
+++ b/test/prism/snapshots/whitequark/casgn_unscoped.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ ConstantWriteNode (location: (1,0)-(1,8))
+ ├── name: :Foo
+ ├── name_loc: (1,0)-(1,3) = "Foo"
+ ├── value:
+ │ @ IntegerNode (location: (1,6)-(1,8))
+ │ └── flags: decimal
+ └── operator_loc: (1,4)-(1,5) = "="
diff --git a/test/prism/snapshots/whitequark/character.txt b/test/prism/snapshots/whitequark/character.txt
new file mode 100644
index 0000000000..b70f05b544
--- /dev/null
+++ b/test/prism/snapshots/whitequark/character.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,2))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,2))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,1) = "?"
+ ├── content_loc: (1,1)-(1,2) = "a"
+ ├── closing_loc: ∅
+ └── unescaped: "a"
diff --git a/test/prism/snapshots/whitequark/class.txt b/test/prism/snapshots/whitequark/class.txt
new file mode 100644
index 0000000000..e38bec6c47
--- /dev/null
+++ b/test/prism/snapshots/whitequark/class.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(3,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,14))
+ └── body: (length: 2)
+ ├── @ ClassNode (location: (1,0)-(1,13))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (1,6)-(1,9))
+ │ │ └── name: :Foo
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (1,10)-(1,13) = "end"
+ │ └── name: :Foo
+ └── @ ClassNode (location: (3,0)-(3,14))
+ ├── locals: []
+ ├── class_keyword_loc: (3,0)-(3,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (3,6)-(3,9))
+ │ └── name: :Foo
+ ├── inheritance_operator_loc: ∅
+ ├── superclass: ∅
+ ├── body: ∅
+ ├── end_keyword_loc: (3,11)-(3,14) = "end"
+ └── name: :Foo
diff --git a/test/prism/snapshots/whitequark/class_definition_in_while_cond.txt b/test/prism/snapshots/whitequark/class_definition_in_while_cond.txt
new file mode 100644
index 0000000000..ce384a6a5a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/class_definition_in_while_cond.txt
@@ -0,0 +1,171 @@
+@ ProgramNode (location: (1,0)-(7,44))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,44))
+ └── body: (length: 4)
+ ├── @ WhileNode (location: (1,0)-(1,52))
+ │ ├── keyword_loc: (1,0)-(1,5) = "while"
+ │ ├── closing_loc: (1,49)-(1,52) = "end"
+ │ ├── predicate:
+ │ │ @ SingletonClassNode (location: (1,6)-(1,40))
+ │ │ ├── locals: [:a]
+ │ │ ├── class_keyword_loc: (1,6)-(1,11) = "class"
+ │ │ ├── operator_loc: (1,12)-(1,14) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (1,15)-(1,19))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,21)-(1,35))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (1,21)-(1,35))
+ │ │ │ ├── name: :a
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (1,21)-(1,22) = "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (1,25)-(1,35))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,25)-(1,28) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (1,29)-(1,35))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (1,29)-(1,31) = "do"
+ │ │ │ │ │ └── closing_loc: (1,32)-(1,35) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "tap"
+ │ │ │ └── operator_loc: (1,23)-(1,24) = "="
+ │ │ └── end_keyword_loc: (1,37)-(1,40) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,42)-(1,47))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (1,42)-(1,47))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (1,42)-(1,47) = "break"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (3,0)-(3,48))
+ │ ├── keyword_loc: (3,0)-(3,5) = "while"
+ │ ├── closing_loc: (3,45)-(3,48) = "end"
+ │ ├── predicate:
+ │ │ @ SingletonClassNode (location: (3,6)-(3,36))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (3,6)-(3,11) = "class"
+ │ │ ├── operator_loc: (3,12)-(3,14) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (3,15)-(3,19))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,21)-(3,31))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,21)-(3,31))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,21)-(3,24) = "tap"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (3,25)-(3,31))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (3,25)-(3,27) = "do"
+ │ │ │ │ └── closing_loc: (3,28)-(3,31) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "tap"
+ │ │ └── end_keyword_loc: (3,33)-(3,36) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,38)-(3,43))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (3,38)-(3,43))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (3,38)-(3,43) = "break"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (5,0)-(5,47))
+ │ ├── keyword_loc: (5,0)-(5,5) = "while"
+ │ ├── closing_loc: (5,44)-(5,47) = "end"
+ │ ├── predicate:
+ │ │ @ ClassNode (location: (5,6)-(5,35))
+ │ │ ├── locals: [:a]
+ │ │ ├── class_keyword_loc: (5,6)-(5,11) = "class"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (5,12)-(5,15))
+ │ │ │ └── name: :Foo
+ │ │ ├── inheritance_operator_loc: ∅
+ │ │ ├── superclass: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (5,16)-(5,30))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (5,16)-(5,30))
+ │ │ │ ├── name: :a
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (5,16)-(5,17) = "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (5,20)-(5,30))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (5,20)-(5,23) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (5,24)-(5,30))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (5,24)-(5,26) = "do"
+ │ │ │ │ │ └── closing_loc: (5,27)-(5,30) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "tap"
+ │ │ │ └── operator_loc: (5,18)-(5,19) = "="
+ │ │ ├── end_keyword_loc: (5,32)-(5,35) = "end"
+ │ │ └── name: :Foo
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,37)-(5,42))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (5,37)-(5,42))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (5,37)-(5,42) = "break"
+ │ └── flags: ∅
+ └── @ WhileNode (location: (7,0)-(7,44))
+ ├── keyword_loc: (7,0)-(7,5) = "while"
+ ├── closing_loc: (7,41)-(7,44) = "end"
+ ├── predicate:
+ │ @ ClassNode (location: (7,6)-(7,32))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (7,6)-(7,11) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (7,12)-(7,15))
+ │ │ └── name: :Foo
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,17)-(7,27))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,17)-(7,27))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,17)-(7,20) = "tap"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (7,21)-(7,27))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (7,21)-(7,23) = "do"
+ │ │ │ └── closing_loc: (7,24)-(7,27) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "tap"
+ │ ├── end_keyword_loc: (7,29)-(7,32) = "end"
+ │ └── name: :Foo
+ ├── statements:
+ │ @ StatementsNode (location: (7,34)-(7,39))
+ │ └── body: (length: 1)
+ │ └── @ BreakNode (location: (7,34)-(7,39))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (7,34)-(7,39) = "break"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/class_super.txt b/test/prism/snapshots/whitequark/class_super.txt
new file mode 100644
index 0000000000..ea8bbd70d9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/class_super.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ ClassNode (location: (1,0)-(1,20))
+ ├── locals: []
+ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (1,6)-(1,9))
+ │ └── name: :Foo
+ ├── inheritance_operator_loc: (1,10)-(1,11) = "<"
+ ├── superclass:
+ │ @ ConstantReadNode (location: (1,12)-(1,15))
+ │ └── name: :Bar
+ ├── body: ∅
+ ├── end_keyword_loc: (1,17)-(1,20) = "end"
+ └── name: :Foo
diff --git a/test/prism/snapshots/whitequark/class_super_label.txt b/test/prism/snapshots/whitequark/class_super_label.txt
new file mode 100644
index 0000000000..60826a72b9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/class_super_label.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ ClassNode (location: (1,0)-(1,20))
+ ├── locals: []
+ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (1,6)-(1,9))
+ │ └── name: :Foo
+ ├── inheritance_operator_loc: (1,10)-(1,11) = "<"
+ ├── superclass:
+ │ @ CallNode (location: (1,12)-(1,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,12)-(1,13) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,13)-(1,15))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,13)-(1,15))
+ │ │ ├── opening_loc: (1,13)-(1,14) = ":"
+ │ │ ├── value_loc: (1,14)-(1,15) = "b"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "b"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── body: ∅
+ ├── end_keyword_loc: (1,17)-(1,20) = "end"
+ └── name: :Foo
diff --git a/test/prism/snapshots/whitequark/comments_before_leading_dot__27.txt b/test/prism/snapshots/whitequark/comments_before_leading_dot__27.txt
new file mode 100644
index 0000000000..5315ed5d17
--- /dev/null
+++ b/test/prism/snapshots/whitequark/comments_before_leading_dot__27.txt
@@ -0,0 +1,85 @@
+@ ProgramNode (location: (1,0)-(18,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(18,4))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(3,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (3,0)-(3,2) = "&."
+ │ ├── message_loc: (3,2)-(3,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "foo"
+ ├── @ CallNode (location: (6,0)-(8,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (6,0)-(6,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (6,0)-(6,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (8,0)-(8,1) = "."
+ │ ├── message_loc: (8,1)-(8,4) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ ├── @ CallNode (location: (11,0)-(13,5))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,0)-(11,1))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,0)-(11,1) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: (13,0)-(13,2) = "&."
+ │ ├── message_loc: (13,2)-(13,5) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: safe_navigation
+ │ └── name: "foo"
+ └── @ CallNode (location: (16,0)-(18,4))
+ ├── receiver:
+ │ @ CallNode (location: (16,0)-(16,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (16,0)-(16,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (18,0)-(18,1) = "."
+ ├── message_loc: (18,1)-(18,4) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/whitequark/complex.txt b/test/prism/snapshots/whitequark/complex.txt
new file mode 100644
index 0000000000..f81564d700
--- /dev/null
+++ b/test/prism/snapshots/whitequark/complex.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(7,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,4))
+ └── body: (length: 4)
+ ├── @ ImaginaryNode (location: (1,0)-(1,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (1,0)-(1,4))
+ ├── @ ImaginaryNode (location: (3,0)-(3,6))
+ │ └── numeric:
+ │ @ RationalNode (location: (3,0)-(3,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (3,0)-(3,4))
+ ├── @ ImaginaryNode (location: (5,0)-(5,3))
+ │ └── numeric:
+ │ @ IntegerNode (location: (5,0)-(5,2))
+ │ └── flags: decimal
+ └── @ ImaginaryNode (location: (7,0)-(7,4))
+ └── numeric:
+ @ RationalNode (location: (7,0)-(7,3))
+ └── numeric:
+ @ IntegerNode (location: (7,0)-(7,2))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/cond_begin.txt b/test/prism/snapshots/whitequark/cond_begin.txt
new file mode 100644
index 0000000000..085f240ebd
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_begin.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,18))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ ParenthesesNode (location: (1,3)-(1,8))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,4)-(1,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,7)-(1,8) = ")"
+ ├── statements:
+ │ @ StatementsNode (location: (1,10)-(1,13))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,10)-(1,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,10)-(1,13) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,15)-(1,18) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_begin_masgn.txt b/test/prism/snapshots/whitequark/cond_begin_masgn.txt
new file mode 100644
index 0000000000..9ec167665e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_begin_masgn.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,25))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ ParenthesesNode (location: (1,3)-(1,20))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,4)-(1,19))
+ │ │ └── body: (length: 2)
+ │ │ ├── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── @ MultiWriteNode (location: (1,9)-(1,19))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,9)-(1,10))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,12)-(1,13))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (1,14)-(1,15) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,16)-(1,19) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,19)-(1,20) = ")"
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,22)-(1,25) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_eflipflop.txt b/test/prism/snapshots/whitequark/cond_eflipflop.txt
new file mode 100644
index 0000000000..89976af9e9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_eflipflop.txt
@@ -0,0 +1,77 @@
+@ ProgramNode (location: (1,0)-(3,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,17))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,12))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (1,1)-(1,12))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,2)-(1,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FlipFlopNode (location: (1,2)-(1,11))
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (1,2)-(1,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,2)-(1,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (1,8)-(1,11))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,8)-(1,11) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── operator_loc: (1,5)-(1,8) = "..."
+ │ │ │ └── flags: exclude_end
+ │ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ │ └── closing_loc: (1,11)-(1,12) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ └── @ IfNode (location: (3,0)-(3,17))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (3,3)-(3,12))
+ │ ├── left:
+ │ │ @ CallNode (location: (3,3)-(3,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── right:
+ │ │ @ CallNode (location: (3,9)-(3,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,9)-(3,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── operator_loc: (3,6)-(3,9) = "..."
+ │ └── flags: exclude_end
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,14)-(3,17) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_iflipflop.txt b/test/prism/snapshots/whitequark/cond_iflipflop.txt
new file mode 100644
index 0000000000..1dcece1aef
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_iflipflop.txt
@@ -0,0 +1,77 @@
+@ ProgramNode (location: (1,0)-(3,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,16))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (1,1)-(1,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,2)-(1,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FlipFlopNode (location: (1,2)-(1,10))
+ │ │ │ ├── left:
+ │ │ │ │ @ CallNode (location: (1,2)-(1,5))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,2)-(1,5) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ ├── right:
+ │ │ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── operator_loc: (1,5)-(1,7) = ".."
+ │ │ │ └── flags: ∅
+ │ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ └── @ IfNode (location: (3,0)-(3,16))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ FlipFlopNode (location: (3,3)-(3,11))
+ │ ├── left:
+ │ │ @ CallNode (location: (3,3)-(3,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── right:
+ │ │ @ CallNode (location: (3,8)-(3,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── operator_loc: (3,6)-(3,8) = ".."
+ │ └── flags: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,13)-(3,16) = "end"
diff --git a/test/prism/snapshots/whitequark/cond_match_current_line.txt b/test/prism/snapshots/whitequark/cond_match_current_line.txt
new file mode 100644
index 0000000000..679e903681
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cond_match_current_line.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(3,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,13))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,6))
+ │ ├── receiver:
+ │ │ @ MatchLastLineNode (location: (1,1)-(1,6))
+ │ │ ├── opening_loc: (1,1)-(1,2) = "/"
+ │ │ ├── content_loc: (1,2)-(1,5) = "wat"
+ │ │ ├── closing_loc: (1,5)-(1,6) = "/"
+ │ │ ├── unescaped: "wat"
+ │ │ └── flags: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ └── @ IfNode (location: (3,0)-(3,13))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ MatchLastLineNode (location: (3,3)-(3,8))
+ │ ├── opening_loc: (3,3)-(3,4) = "/"
+ │ ├── content_loc: (3,4)-(3,7) = "wat"
+ │ ├── closing_loc: (3,7)-(3,8) = "/"
+ │ ├── unescaped: "wat"
+ │ └── flags: ∅
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,10)-(3,13) = "end"
diff --git a/test/prism/snapshots/whitequark/const_op_asgn.txt b/test/prism/snapshots/whitequark/const_op_asgn.txt
new file mode 100644
index 0000000000..fc6533ccd0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/const_op_asgn.txt
@@ -0,0 +1,96 @@
+@ ProgramNode (location: (1,0)-(9,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,25))
+ └── body: (length: 5)
+ ├── @ ConstantPathOperatorWriteNode (location: (1,0)-(1,8))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (1,0)-(1,3))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (1,2)-(1,3))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ │ ├── operator_loc: (1,4)-(1,6) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ └── operator: :+
+ ├── @ ConstantOperatorWriteNode (location: (3,0)-(3,6))
+ │ ├── name: :A
+ │ ├── name_loc: (3,0)-(3,1) = "A"
+ │ ├── operator_loc: (3,2)-(3,4) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,5)-(3,6))
+ │ │ └── flags: decimal
+ │ └── operator: :+
+ ├── @ ConstantPathOperatorWriteNode (location: (5,0)-(5,9))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (5,0)-(5,4))
+ │ │ ├── parent:
+ │ │ │ @ ConstantReadNode (location: (5,0)-(5,1))
+ │ │ │ └── name: :B
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (5,3)-(5,4))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (5,1)-(5,3) = "::"
+ │ ├── operator_loc: (5,5)-(5,7) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (5,8)-(5,9))
+ │ │ └── flags: decimal
+ │ └── operator: :+
+ ├── @ DefNode (location: (7,0)-(7,21))
+ │ ├── name: :x
+ │ ├── name_loc: (7,4)-(7,5) = "x"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,7)-(7,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ConstantPathOrWriteNode (location: (7,7)-(7,16))
+ │ │ ├── target:
+ │ │ │ @ ConstantPathNode (location: (7,7)-(7,10))
+ │ │ │ ├── parent: ∅
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (7,9)-(7,10))
+ │ │ │ │ └── name: :A
+ │ │ │ └── delimiter_loc: (7,7)-(7,9) = "::"
+ │ │ ├── operator_loc: (7,11)-(7,14) = "||="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (7,15)-(7,16))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (7,18)-(7,21) = "end"
+ └── @ DefNode (location: (9,0)-(9,25))
+ ├── name: :x
+ ├── name_loc: (9,4)-(9,5) = "x"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (9,7)-(9,20))
+ │ └── body: (length: 1)
+ │ └── @ ConstantPathOrWriteNode (location: (9,7)-(9,20))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (9,7)-(9,14))
+ │ │ ├── parent:
+ │ │ │ @ SelfNode (location: (9,7)-(9,11))
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (9,13)-(9,14))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (9,11)-(9,13) = "::"
+ │ ├── operator_loc: (9,15)-(9,18) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (9,19)-(9,20))
+ │ └── flags: decimal
+ ├── locals: []
+ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (9,22)-(9,25) = "end"
diff --git a/test/prism/snapshots/whitequark/const_scoped.txt b/test/prism/snapshots/whitequark/const_scoped.txt
new file mode 100644
index 0000000000..1e2bccef96
--- /dev/null
+++ b/test/prism/snapshots/whitequark/const_scoped.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ ConstantPathNode (location: (1,0)-(1,8))
+ ├── parent:
+ │ @ ConstantReadNode (location: (1,0)-(1,3))
+ │ └── name: :Bar
+ ├── child:
+ │ @ ConstantReadNode (location: (1,5)-(1,8))
+ │ └── name: :Foo
+ └── delimiter_loc: (1,3)-(1,5) = "::"
diff --git a/test/prism/snapshots/whitequark/const_toplevel.txt b/test/prism/snapshots/whitequark/const_toplevel.txt
new file mode 100644
index 0000000000..b54b069d06
--- /dev/null
+++ b/test/prism/snapshots/whitequark/const_toplevel.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ConstantPathNode (location: (1,0)-(1,5))
+ ├── parent: ∅
+ ├── child:
+ │ @ ConstantReadNode (location: (1,2)-(1,5))
+ │ └── name: :Foo
+ └── delimiter_loc: (1,0)-(1,2) = "::"
diff --git a/test/prism/snapshots/whitequark/const_unscoped.txt b/test/prism/snapshots/whitequark/const_unscoped.txt
new file mode 100644
index 0000000000..5e272e1775
--- /dev/null
+++ b/test/prism/snapshots/whitequark/const_unscoped.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ ConstantReadNode (location: (1,0)-(1,3))
+ └── name: :Foo
diff --git a/test/prism/snapshots/whitequark/cpath.txt b/test/prism/snapshots/whitequark/cpath.txt
new file mode 100644
index 0000000000..b892525646
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cpath.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(3,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,20))
+ └── body: (length: 2)
+ ├── @ ModuleNode (location: (1,0)-(1,17))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (1,0)-(1,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (1,7)-(1,12))
+ │ │ ├── parent: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (1,9)-(1,12))
+ │ │ │ └── name: :Foo
+ │ │ └── delimiter_loc: (1,7)-(1,9) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (1,14)-(1,17) = "end"
+ │ └── name: :Foo
+ └── @ ModuleNode (location: (3,0)-(3,20))
+ ├── locals: []
+ ├── module_keyword_loc: (3,0)-(3,6) = "module"
+ ├── constant_path:
+ │ @ ConstantPathNode (location: (3,7)-(3,15))
+ │ ├── parent:
+ │ │ @ ConstantReadNode (location: (3,7)-(3,10))
+ │ │ └── name: :Bar
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (3,12)-(3,15))
+ │ │ └── name: :Foo
+ │ └── delimiter_loc: (3,10)-(3,12) = "::"
+ ├── body: ∅
+ ├── end_keyword_loc: (3,17)-(3,20) = "end"
+ └── name: :Foo
diff --git a/test/prism/snapshots/whitequark/cvar.txt b/test/prism/snapshots/whitequark/cvar.txt
new file mode 100644
index 0000000000..7847ce4495
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cvar.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ClassVariableReadNode (location: (1,0)-(1,5))
+ └── name: :@@foo
diff --git a/test/prism/snapshots/whitequark/cvasgn.txt b/test/prism/snapshots/whitequark/cvasgn.txt
new file mode 100644
index 0000000000..e6a1c7e973
--- /dev/null
+++ b/test/prism/snapshots/whitequark/cvasgn.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ ClassVariableWriteNode (location: (1,0)-(1,10))
+ ├── name: :@@var
+ ├── name_loc: (1,0)-(1,5) = "@@var"
+ ├── value:
+ │ @ IntegerNode (location: (1,8)-(1,10))
+ │ └── flags: decimal
+ └── operator_loc: (1,6)-(1,7) = "="
diff --git a/test/prism/snapshots/whitequark/dedenting_heredoc.txt b/test/prism/snapshots/whitequark/dedenting_heredoc.txt
new file mode 100644
index 0000000000..c0babc6ba1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/dedenting_heredoc.txt
@@ -0,0 +1,367 @@
+@ ProgramNode (location: (1,0)-(72,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(72,8))
+ └── body: (length: 16)
+ ├── @ CallNode (location: (1,0)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (1,2)-(1,8))
+ │ │ ├── opening_loc: (1,2)-(1,8) = "<<~\"E\""
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (2,0)-(3,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (2,0)-(3,2) = " x\n "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " x\n"
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (3,2)-(3,10))
+ │ │ │ │ ├── opening_loc: (3,2)-(3,4) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (3,4)-(3,9))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ StringNode (location: (3,4)-(3,9))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: (3,4)-(3,5) = "\""
+ │ │ │ │ │ ├── content_loc: (3,5)-(3,8) = " y"
+ │ │ │ │ │ ├── closing_loc: (3,8)-(3,9) = "\""
+ │ │ │ │ │ └── unescaped: " y"
+ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}"
+ │ │ │ └── @ StringNode (location: (3,10)-(3,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,10)-(3,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (4,0)-(4,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (6,0)-(6,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (6,0)-(6,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (6,2)-(6,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ InterpolatedStringNode (location: (6,2)-(6,8))
+ │ │ ├── opening_loc: (6,2)-(6,8) = "<<~\"E\""
+ │ │ ├── parts: (length: 3)
+ │ │ │ ├── @ StringNode (location: (7,0)-(8,2))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (7,0)-(8,2) = " x\n "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: " x\n"
+ │ │ │ ├── @ EmbeddedStatementsNode (location: (8,2)-(8,8))
+ │ │ │ │ ├── opening_loc: (8,2)-(8,4) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (8,4)-(8,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (8,4)-(8,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (8,4)-(8,7) = "foo"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "foo"
+ │ │ │ │ └── closing_loc: (8,7)-(8,8) = "}"
+ │ │ │ └── @ StringNode (location: (8,8)-(8,0))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (8,8)-(8,0) = "\n"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "\n"
+ │ │ └── closing_loc: (9,0)-(9,0) = "E\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (11,0)-(11,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,2)-(11,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (11,2)-(11,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (11,2)-(11,6) = "<<~E"
+ │ │ ├── content_loc: (12,0)-(13,0) = "\tx\n y\n"
+ │ │ ├── closing_loc: (14,0)-(14,0) = "E\n"
+ │ │ └── unescaped: "x\ny\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (16,0)-(16,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (16,0)-(16,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (16,2)-(16,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (16,2)-(16,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (16,2)-(16,6) = "<<~E"
+ │ │ ├── content_loc: (17,0)-(18,0) = "\tx\n y\n"
+ │ │ ├── closing_loc: (19,0)-(19,0) = "E\n"
+ │ │ └── unescaped: "\tx\ny\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (21,0)-(21,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (21,0)-(21,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (21,2)-(21,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (21,2)-(21,6) = "<<~E"
+ │ │ ├── content_loc: (22,0)-(23,0) = " \tx\n y\n"
+ │ │ ├── closing_loc: (24,0)-(24,0) = "E\n"
+ │ │ └── unescaped: "x\ny\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (26,0)-(26,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (26,0)-(26,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (26,2)-(26,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (26,2)-(26,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (26,2)-(26,6) = "<<~E"
+ │ │ ├── content_loc: (27,0)-(28,0) = " \tx\n\ty\n"
+ │ │ ├── closing_loc: (29,0)-(29,0) = "E\n"
+ │ │ └── unescaped: "\tx\ny\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (31,0)-(31,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,0)-(31,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,2)-(31,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (31,2)-(31,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (31,2)-(31,6) = "<<~E"
+ │ │ ├── content_loc: (32,0)-(33,0) = " x\n \\\ty\n"
+ │ │ ├── closing_loc: (34,0)-(34,0) = "E\n"
+ │ │ └── unescaped: " x\n\ty\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (36,0)-(36,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (36,0)-(36,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (36,2)-(36,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (36,2)-(36,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (36,2)-(36,6) = "<<~E"
+ │ │ ├── content_loc: (37,0)-(38,0) = " x\n \\ y\n"
+ │ │ ├── closing_loc: (39,0)-(39,0) = "E\n"
+ │ │ └── unescaped: " x\n y\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (41,0)-(41,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (41,0)-(41,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (41,2)-(41,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (41,2)-(41,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (41,2)-(41,6) = "<<~E"
+ │ │ ├── content_loc: (42,0)-(41,0) = ""
+ │ │ ├── closing_loc: (42,0)-(42,0) = " E\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (44,0)-(44,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (44,0)-(44,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (44,2)-(44,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (44,2)-(44,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (44,2)-(44,6) = "<<~E"
+ │ │ ├── content_loc: (45,0)-(47,0) = " x\n\ny\n"
+ │ │ ├── closing_loc: (48,0)-(48,0) = "E\n"
+ │ │ └── unescaped: " x\n\ny\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (50,0)-(50,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (50,0)-(50,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (50,2)-(50,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (50,2)-(50,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (50,2)-(50,6) = "<<~E"
+ │ │ ├── content_loc: (51,0)-(53,0) = " x\n \n y\n"
+ │ │ ├── closing_loc: (54,0)-(54,0) = "E\n"
+ │ │ └── unescaped: "x\n \ny\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (56,0)-(56,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (56,0)-(56,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (56,2)-(56,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (56,2)-(56,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (56,2)-(56,6) = "<<~E"
+ │ │ ├── content_loc: (57,0)-(58,0) = " x\n y\n"
+ │ │ ├── closing_loc: (59,0)-(59,0) = "E\n"
+ │ │ └── unescaped: "x\n y\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (61,0)-(61,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (61,0)-(61,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (61,2)-(61,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (61,2)-(61,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (61,2)-(61,6) = "<<~E"
+ │ │ ├── content_loc: (62,0)-(62,0) = " x\n"
+ │ │ ├── closing_loc: (63,0)-(63,0) = "E\n"
+ │ │ └── unescaped: "x\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (65,0)-(65,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (65,0)-(65,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (65,2)-(65,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (65,2)-(65,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (65,2)-(65,6) = "<<~E"
+ │ │ ├── content_loc: (66,0)-(66,0) = " ð\n"
+ │ │ ├── closing_loc: (67,0)-(67,0) = "E\n"
+ │ │ └── unescaped: "ð\n"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── @ CallNode (location: (69,0)-(69,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (69,0)-(69,1) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (69,2)-(69,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ StringNode (location: (69,2)-(69,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (69,2)-(69,6) = "<<~E"
+ │ │ ├── content_loc: (70,0)-(69,0) = ""
+ │ │ ├── closing_loc: (70,0)-(70,0) = "E\n"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ └── @ CallNode (location: (72,0)-(72,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (72,0)-(72,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (72,2)-(72,8))
+ │ └── arguments: (length: 1)
+ │ └── @ InterpolatedXStringNode (location: (72,2)-(72,8))
+ │ ├── opening_loc: (72,2)-(72,8) = "<<~`E`"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (73,0)-(74,2))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (73,0)-(74,2) = " x\n "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: " x\n"
+ │ │ ├── @ EmbeddedStatementsNode (location: (74,2)-(74,8))
+ │ │ │ ├── opening_loc: (74,2)-(74,4) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (74,4)-(74,7))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (74,4)-(74,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (74,4)-(74,7) = "foo"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "foo"
+ │ │ │ └── closing_loc: (74,7)-(74,8) = "}"
+ │ │ └── @ StringNode (location: (74,8)-(74,0))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (74,8)-(74,0) = "\n"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\n"
+ │ └── closing_loc: (75,0)-(75,0) = "E\n"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt b/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt
new file mode 100644
index 0000000000..ac083f3edc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,8) = "<<~'FOO'"
+ ├── content_loc: (2,0)-(3,0) = " baz\\\\\n qux\n"
+ ├── closing_loc: (4,0)-(4,0) = "FOO\n"
+ └── unescaped: "baz\\\nqux\n"
diff --git a/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt b/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt
new file mode 100644
index 0000000000..6d123a3387
--- /dev/null
+++ b/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,8))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,8) = "<<~'FOO'"
+ ├── content_loc: (2,0)-(3,0) = " baz\\\n qux\n"
+ ├── closing_loc: (4,0)-(4,0) = "FOO\n"
+ └── unescaped: "baz\\\nqux\n"
diff --git a/test/prism/snapshots/whitequark/def.txt b/test/prism/snapshots/whitequark/def.txt
new file mode 100644
index 0000000000..d5e1139c4d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/def.txt
@@ -0,0 +1,83 @@
+@ ProgramNode (location: (1,0)-(11,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,14))
+ └── body: (length: 6)
+ ├── @ DefNode (location: (1,0)-(1,14))
+ │ ├── name: :BEGIN
+ │ ├── name_loc: (1,4)-(1,9) = "BEGIN"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,11)-(1,14) = "end"
+ ├── @ DefNode (location: (3,0)-(3,12))
+ │ ├── name: :END
+ │ ├── name_loc: (3,4)-(3,7) = "END"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,9)-(3,12) = "end"
+ ├── @ DefNode (location: (5,0)-(5,15))
+ │ ├── name: :String
+ │ ├── name_loc: (5,4)-(5,10) = "String"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,12)-(5,15) = "end"
+ ├── @ DefNode (location: (7,0)-(7,16))
+ │ ├── name: :String=
+ │ ├── name_loc: (7,4)-(7,11) = "String="
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (7,13)-(7,16) = "end"
+ ├── @ DefNode (location: (9,0)-(9,12))
+ │ ├── name: :foo
+ │ ├── name_loc: (9,4)-(9,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (9,9)-(9,12) = "end"
+ └── @ DefNode (location: (11,0)-(11,14))
+ ├── name: :until
+ ├── name_loc: (11,4)-(11,9) = "until"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (11,0)-(11,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (11,11)-(11,14) = "end"
diff --git a/test/prism/snapshots/whitequark/defined.txt b/test/prism/snapshots/whitequark/defined.txt
new file mode 100644
index 0000000000..475e6a2734
--- /dev/null
+++ b/test/prism/snapshots/whitequark/defined.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(5,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,13))
+ └── body: (length: 3)
+ ├── @ DefinedNode (location: (1,0)-(1,13))
+ │ ├── lparen_loc: ∅
+ │ ├── value:
+ │ │ @ InstanceVariableReadNode (location: (1,9)-(1,13))
+ │ │ └── name: :@foo
+ │ ├── rparen_loc: ∅
+ │ └── keyword_loc: (1,0)-(1,8) = "defined?"
+ ├── @ DefinedNode (location: (3,0)-(3,12))
+ │ ├── lparen_loc: ∅
+ │ ├── value:
+ │ │ @ CallNode (location: (3,9)-(3,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,9)-(3,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── rparen_loc: ∅
+ │ └── keyword_loc: (3,0)-(3,8) = "defined?"
+ └── @ DefinedNode (location: (5,0)-(5,13))
+ ├── lparen_loc: (5,8)-(5,9) = "("
+ ├── value:
+ │ @ CallNode (location: (5,9)-(5,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,9)-(5,12) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── rparen_loc: (5,12)-(5,13) = ")"
+ └── keyword_loc: (5,0)-(5,8) = "defined?"
diff --git a/test/prism/snapshots/whitequark/defs.txt b/test/prism/snapshots/whitequark/defs.txt
new file mode 100644
index 0000000000..bdb96e83b0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/defs.txt
@@ -0,0 +1,90 @@
+@ ProgramNode (location: (1,0)-(9,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,18))
+ └── body: (length: 5)
+ ├── @ DefNode (location: (1,0)-(1,18))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,10)-(1,13) = "foo"
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (1,4)-(1,9))
+ │ │ ├── body:
+ │ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ └── closing_loc: (1,8)-(1,9) = ")"
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: (1,9)-(1,10) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,15)-(1,18) = "end"
+ ├── @ DefNode (location: (3,0)-(3,19))
+ │ ├── name: :foo
+ │ ├── name_loc: (3,11)-(3,14) = "foo"
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (3,4)-(3,10))
+ │ │ └── name: :String
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: (3,10)-(3,11) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,16)-(3,19) = "end"
+ ├── @ DefNode (location: (5,0)-(5,20))
+ │ ├── name: :foo
+ │ ├── name_loc: (5,12)-(5,15) = "foo"
+ │ ├── receiver:
+ │ │ @ ConstantReadNode (location: (5,4)-(5,10))
+ │ │ └── name: :String
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: (5,10)-(5,12) = "::"
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (5,17)-(5,20) = "end"
+ ├── @ DefNode (location: (7,0)-(7,17))
+ │ ├── name: :foo
+ │ ├── name_loc: (7,9)-(7,12) = "foo"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (7,4)-(7,8))
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: (7,8)-(7,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (7,14)-(7,17) = "end"
+ └── @ DefNode (location: (9,0)-(9,18))
+ ├── name: :foo
+ ├── name_loc: (9,10)-(9,13) = "foo"
+ ├── receiver:
+ │ @ SelfNode (location: (9,4)-(9,8))
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── locals: []
+ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ ├── operator_loc: (9,8)-(9,10) = "::"
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (9,15)-(9,18) = "end"
diff --git a/test/prism/snapshots/whitequark/empty_stmt.txt b/test/prism/snapshots/whitequark/empty_stmt.txt
new file mode 100644
index 0000000000..870bdb6ad5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/empty_stmt.txt
@@ -0,0 +1,5 @@
+@ ProgramNode (location: (1,0)-(0,0))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(0,0))
+ └── body: (length: 0)
diff --git a/test/prism/snapshots/whitequark/endless_comparison_method.txt b/test/prism/snapshots/whitequark/endless_comparison_method.txt
new file mode 100644
index 0000000000..ee65681c02
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_comparison_method.txt
@@ -0,0 +1,215 @@
+@ ProgramNode (location: (1,0)-(11,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,28))
+ └── body: (length: 6)
+ ├── @ DefNode (location: (1,0)-(1,28))
+ │ ├── name: :!=
+ │ ├── name_loc: (1,4)-(1,6) = "!="
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,7)-(1,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,7)-(1,12))
+ │ │ │ └── name: :other
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,16)-(1,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,28))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,16)-(1,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "do_something"
+ │ ├── locals: [:other]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,6)-(1,7) = "("
+ │ ├── rparen_loc: (1,12)-(1,13) = ")"
+ │ ├── equal_loc: (1,14)-(1,15) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (3,0)-(3,28))
+ │ ├── name: :!=
+ │ ├── name_loc: (3,4)-(3,6) = "!="
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (3,7)-(3,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (3,7)-(3,12))
+ │ │ │ └── name: :other
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,16)-(3,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,16)-(3,28))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,16)-(3,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "do_something"
+ │ ├── locals: [:other]
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (3,6)-(3,7) = "("
+ │ ├── rparen_loc: (3,12)-(3,13) = ")"
+ │ ├── equal_loc: (3,14)-(3,15) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (5,0)-(5,28))
+ │ ├── name: :<=
+ │ ├── name_loc: (5,4)-(5,6) = "<="
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (5,7)-(5,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (5,7)-(5,12))
+ │ │ │ └── name: :other
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,16)-(5,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,16)-(5,28))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,16)-(5,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "do_something"
+ │ ├── locals: [:other]
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (5,6)-(5,7) = "("
+ │ ├── rparen_loc: (5,12)-(5,13) = ")"
+ │ ├── equal_loc: (5,14)-(5,15) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (7,0)-(7,28))
+ │ ├── name: :==
+ │ ├── name_loc: (7,4)-(7,6) = "=="
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (7,7)-(7,12))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (7,7)-(7,12))
+ │ │ │ └── name: :other
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,16)-(7,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,16)-(7,28))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,16)-(7,28) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "do_something"
+ │ ├── locals: [:other]
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (7,6)-(7,7) = "("
+ │ ├── rparen_loc: (7,12)-(7,13) = ")"
+ │ ├── equal_loc: (7,14)-(7,15) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (9,0)-(9,29))
+ │ ├── name: :===
+ │ ├── name_loc: (9,4)-(9,7) = "==="
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (9,8)-(9,13))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (9,8)-(9,13))
+ │ │ │ └── name: :other
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (9,17)-(9,29))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (9,17)-(9,29))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,17)-(9,29) = "do_something"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "do_something"
+ │ ├── locals: [:other]
+ │ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (9,7)-(9,8) = "("
+ │ ├── rparen_loc: (9,13)-(9,14) = ")"
+ │ ├── equal_loc: (9,15)-(9,16) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (11,0)-(11,28))
+ ├── name: :>=
+ ├── name_loc: (11,4)-(11,6) = ">="
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (11,7)-(11,12))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (11,7)-(11,12))
+ │ │ └── name: :other
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (11,16)-(11,28))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,16)-(11,28))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,16)-(11,28) = "do_something"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "do_something"
+ ├── locals: [:other]
+ ├── def_keyword_loc: (11,0)-(11,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (11,6)-(11,7) = "("
+ ├── rparen_loc: (11,12)-(11,13) = ")"
+ ├── equal_loc: (11,14)-(11,15) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/endless_method.txt b/test/prism/snapshots/whitequark/endless_method.txt
new file mode 100644
index 0000000000..4d1d01bde0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method.txt
@@ -0,0 +1,143 @@
+@ ProgramNode (location: (1,0)-(7,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,22))
+ └── body: (length: 4)
+ ├── @ DefNode (location: (1,0)-(1,14))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,12)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,12)-(1,14))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ ├── rparen_loc: (1,8)-(1,9) = ")"
+ │ ├── equal_loc: (1,10)-(1,11) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (3,0)-(3,18))
+ │ ├── name: :inc
+ │ ├── name_loc: (3,4)-(3,7) = "inc"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (3,8)-(3,9))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (3,8)-(3,9))
+ │ │ │ └── name: :x
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,13)-(3,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,13)-(3,18))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (3,13)-(3,14))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,15)-(3,16) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,17)-(3,18))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,17)-(3,18))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (3,7)-(3,8) = "("
+ │ ├── rparen_loc: (3,9)-(3,10) = ")"
+ │ ├── equal_loc: (3,11)-(3,12) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (5,0)-(5,18))
+ │ ├── name: :foo
+ │ ├── name_loc: (5,8)-(5,11) = "foo"
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,4)-(5,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,4)-(5,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "obj"
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,16)-(5,18))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,16)-(5,18))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: (5,7)-(5,8) = "."
+ │ ├── lparen_loc: (5,11)-(5,12) = "("
+ │ ├── rparen_loc: (5,12)-(5,13) = ")"
+ │ ├── equal_loc: (5,14)-(5,15) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (7,0)-(7,22))
+ ├── name: :inc
+ ├── name_loc: (7,8)-(7,11) = "inc"
+ ├── receiver:
+ │ @ CallNode (location: (7,4)-(7,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,4)-(7,7) = "obj"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "obj"
+ ├── parameters:
+ │ @ ParametersNode (location: (7,12)-(7,13))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (7,12)-(7,13))
+ │ │ └── name: :x
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (7,17)-(7,22))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (7,17)-(7,22))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (7,17)-(7,18))
+ │ │ ├── name: :x
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,19)-(7,20) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,21)-(7,22))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,21)-(7,22))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── locals: [:x]
+ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ ├── operator_loc: (7,7)-(7,8) = "."
+ ├── lparen_loc: (7,11)-(7,12) = "("
+ ├── rparen_loc: (7,13)-(7,14) = ")"
+ ├── equal_loc: (7,15)-(7,16) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/endless_method_command_syntax.txt b/test/prism/snapshots/whitequark/endless_method_command_syntax.txt
new file mode 100644
index 0000000000..0943a1edf3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_command_syntax.txt
@@ -0,0 +1,380 @@
+@ ProgramNode (location: (1,0)-(15,62))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(15,62))
+ └── body: (length: 8)
+ ├── @ DefNode (location: (1,0)-(1,22))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,10)-(1,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,10)-(1,22))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,10)-(1,14) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,15)-(1,22))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (1,15)-(1,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,15)-(1,16) = "\""
+ │ │ │ ├── content_loc: (1,16)-(1,21) = "Hello"
+ │ │ │ ├── closing_loc: (1,21)-(1,22) = "\""
+ │ │ │ └── unescaped: "Hello"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (1,8)-(1,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (3,0)-(3,24))
+ │ ├── name: :foo
+ │ ├── name_loc: (3,4)-(3,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,12)-(3,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,12)-(3,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,12)-(3,16) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,17)-(3,24))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (3,17)-(3,24))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (3,17)-(3,18) = "\""
+ │ │ │ ├── content_loc: (3,18)-(3,23) = "Hello"
+ │ │ │ ├── closing_loc: (3,23)-(3,24) = "\""
+ │ │ │ └── unescaped: "Hello"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (3,7)-(3,8) = "("
+ │ ├── rparen_loc: (3,8)-(3,9) = ")"
+ │ ├── equal_loc: (3,10)-(3,11) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (5,0)-(5,19))
+ │ ├── name: :foo
+ │ ├── name_loc: (5,4)-(5,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (5,8)-(5,9))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (5,8)-(5,9))
+ │ │ │ └── name: :x
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,13)-(5,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,13)-(5,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,13)-(5,17) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,18)-(5,19))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (5,18)-(5,19))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (5,7)-(5,8) = "("
+ │ ├── rparen_loc: (5,9)-(5,10) = ")"
+ │ ├── equal_loc: (5,11)-(5,12) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (7,0)-(7,26))
+ │ ├── name: :foo
+ │ ├── name_loc: (7,8)-(7,11) = "foo"
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,4)-(7,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,4)-(7,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "obj"
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,14)-(7,26))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,14)-(7,26))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,14)-(7,18) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,19)-(7,26))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (7,19)-(7,26))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (7,19)-(7,20) = "\""
+ │ │ │ ├── content_loc: (7,20)-(7,25) = "Hello"
+ │ │ │ ├── closing_loc: (7,25)-(7,26) = "\""
+ │ │ │ └── unescaped: "Hello"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: (7,7)-(7,8) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (7,12)-(7,13) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (9,0)-(9,28))
+ │ ├── name: :foo
+ │ ├── name_loc: (9,8)-(9,11) = "foo"
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,4)-(9,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,4)-(9,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "obj"
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (9,16)-(9,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (9,16)-(9,28))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,16)-(9,20) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,21)-(9,28))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (9,21)-(9,28))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (9,21)-(9,22) = "\""
+ │ │ │ ├── content_loc: (9,22)-(9,27) = "Hello"
+ │ │ │ ├── closing_loc: (9,27)-(9,28) = "\""
+ │ │ │ └── unescaped: "Hello"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (9,0)-(9,3) = "def"
+ │ ├── operator_loc: (9,7)-(9,8) = "."
+ │ ├── lparen_loc: (9,11)-(9,12) = "("
+ │ ├── rparen_loc: (9,12)-(9,13) = ")"
+ │ ├── equal_loc: (9,14)-(9,15) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (11,0)-(11,23))
+ │ ├── name: :foo
+ │ ├── name_loc: (11,8)-(11,11) = "foo"
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,4)-(11,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,4)-(11,7) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "obj"
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (11,12)-(11,13))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (11,12)-(11,13))
+ │ │ │ └── name: :x
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (11,17)-(11,23))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (11,17)-(11,23))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,17)-(11,21) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,22)-(11,23))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (11,22)-(11,23))
+ │ │ │ ├── name: :x
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (11,0)-(11,3) = "def"
+ │ ├── operator_loc: (11,7)-(11,8) = "."
+ │ ├── lparen_loc: (11,11)-(11,12) = "("
+ │ ├── rparen_loc: (11,13)-(11,14) = ")"
+ │ ├── equal_loc: (11,15)-(11,16) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (13,0)-(13,60))
+ │ ├── name: :rescued
+ │ ├── name_loc: (13,4)-(13,11) = "rescued"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (13,12)-(13,13))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (13,12)-(13,13))
+ │ │ │ └── name: :x
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (13,17)-(13,60))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (13,17)-(13,60))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,17)-(13,22) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,23)-(13,60))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ RescueModifierNode (location: (13,23)-(13,60))
+ │ │ │ ├── expression:
+ │ │ │ │ @ StringNode (location: (13,23)-(13,37))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: (13,23)-(13,24) = "\""
+ │ │ │ │ ├── content_loc: (13,24)-(13,36) = "to be caught"
+ │ │ │ │ ├── closing_loc: (13,36)-(13,37) = "\""
+ │ │ │ │ └── unescaped: "to be caught"
+ │ │ │ ├── keyword_loc: (13,38)-(13,44) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ InterpolatedStringNode (location: (13,45)-(13,60))
+ │ │ │ ├── opening_loc: (13,45)-(13,46) = "\""
+ │ │ │ ├── parts: (length: 2)
+ │ │ │ │ ├── @ StringNode (location: (13,46)-(13,55))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── content_loc: (13,46)-(13,55) = "instance "
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ └── unescaped: "instance "
+ │ │ │ │ └── @ EmbeddedStatementsNode (location: (13,55)-(13,59))
+ │ │ │ │ ├── opening_loc: (13,55)-(13,57) = "\#{"
+ │ │ │ │ ├── statements:
+ │ │ │ │ │ @ StatementsNode (location: (13,57)-(13,58))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ LocalVariableReadNode (location: (13,57)-(13,58))
+ │ │ │ │ │ ├── name: :x
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ └── closing_loc: (13,58)-(13,59) = "}"
+ │ │ │ └── closing_loc: (13,59)-(13,60) = "\""
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── locals: [:x]
+ │ ├── def_keyword_loc: (13,0)-(13,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (13,11)-(13,12) = "("
+ │ ├── rparen_loc: (13,13)-(13,14) = ")"
+ │ ├── equal_loc: (13,15)-(13,16) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (15,0)-(15,62))
+ ├── name: :rescued
+ ├── name_loc: (15,9)-(15,16) = "rescued"
+ ├── receiver:
+ │ @ SelfNode (location: (15,4)-(15,8))
+ ├── parameters:
+ │ @ ParametersNode (location: (15,17)-(15,18))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (15,17)-(15,18))
+ │ │ └── name: :x
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (15,22)-(15,62))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (15,22)-(15,62))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,22)-(15,27) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,28)-(15,62))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (15,28)-(15,62))
+ │ │ ├── expression:
+ │ │ │ @ StringNode (location: (15,28)-(15,42))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (15,28)-(15,29) = "\""
+ │ │ │ ├── content_loc: (15,29)-(15,41) = "to be caught"
+ │ │ │ ├── closing_loc: (15,41)-(15,42) = "\""
+ │ │ │ └── unescaped: "to be caught"
+ │ │ ├── keyword_loc: (15,43)-(15,49) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ InterpolatedStringNode (location: (15,50)-(15,62))
+ │ │ ├── opening_loc: (15,50)-(15,51) = "\""
+ │ │ ├── parts: (length: 2)
+ │ │ │ ├── @ StringNode (location: (15,51)-(15,57))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── content_loc: (15,51)-(15,57) = "class "
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "class "
+ │ │ │ └── @ EmbeddedStatementsNode (location: (15,57)-(15,61))
+ │ │ │ ├── opening_loc: (15,57)-(15,59) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (15,59)-(15,60))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (15,59)-(15,60))
+ │ │ │ │ ├── name: :x
+ │ │ │ │ └── depth: 0
+ │ │ │ └── closing_loc: (15,60)-(15,61) = "}"
+ │ │ └── closing_loc: (15,61)-(15,62) = "\""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ ├── locals: [:x]
+ ├── def_keyword_loc: (15,0)-(15,3) = "def"
+ ├── operator_loc: (15,8)-(15,9) = "."
+ ├── lparen_loc: (15,16)-(15,17) = "("
+ ├── rparen_loc: (15,18)-(15,19) = ")"
+ ├── equal_loc: (15,20)-(15,21) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt b/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt
new file mode 100644
index 0000000000..ebdfd4c5cc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_forwarded_args_legacy.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,23))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,11))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (1,8)-(1,11))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,15)-(1,23))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,15)-(1,23))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,15)-(1,18) = "bar"
+ │ ├── opening_loc: (1,18)-(1,19) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,19)-(1,22))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (1,19)-(1,22))
+ │ ├── closing_loc: (1,22)-(1,23) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:"..."]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,11)-(1,12) = ")"
+ ├── equal_loc: (1,13)-(1,14) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt b/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt
new file mode 100644
index 0000000000..8f8e770fa9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_with_rescue_mod.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(3,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,25))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(1,20))
+ │ ├── name: :m
+ │ ├── name_loc: (1,4)-(1,5) = "m"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,10)-(1,20))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (1,10)-(1,20))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_loc: (1,12)-(1,18) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ IntegerNode (location: (1,19)-(1,20))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,5)-(1,6) = "("
+ │ ├── rparen_loc: (1,6)-(1,7) = ")"
+ │ ├── equal_loc: (1,8)-(1,9) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (3,0)-(3,25))
+ ├── name: :m
+ ├── name_loc: (3,9)-(3,10) = "m"
+ ├── receiver:
+ │ @ SelfNode (location: (3,4)-(3,8))
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (3,15)-(3,25))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (3,15)-(3,25))
+ │ ├── expression:
+ │ │ @ IntegerNode (location: (3,15)-(3,16))
+ │ │ └── flags: decimal
+ │ ├── keyword_loc: (3,17)-(3,23) = "rescue"
+ │ └── rescue_expression:
+ │ @ IntegerNode (location: (3,24)-(3,25))
+ │ └── flags: decimal
+ ├── locals: []
+ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ ├── operator_loc: (3,8)-(3,9) = "."
+ ├── lparen_loc: (3,10)-(3,11) = "("
+ ├── rparen_loc: (3,11)-(3,12) = ")"
+ ├── equal_loc: (3,13)-(3,14) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/endless_method_without_args.txt b/test/prism/snapshots/whitequark/endless_method_without_args.txt
new file mode 100644
index 0000000000..b7db96171e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/endless_method_without_args.txt
@@ -0,0 +1,85 @@
+@ ProgramNode (location: (1,0)-(7,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,28))
+ └── body: (length: 4)
+ ├── @ DefNode (location: (1,0)-(1,12))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,10)-(1,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,10)-(1,12))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (1,8)-(1,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (3,0)-(3,23))
+ │ ├── name: :foo
+ │ ├── name_loc: (3,4)-(3,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,10)-(3,23))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (3,10)-(3,23))
+ │ │ ├── expression:
+ │ │ │ @ IntegerNode (location: (3,10)-(3,12))
+ │ │ │ └── flags: decimal
+ │ │ ├── keyword_loc: (3,13)-(3,19) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (3,20)-(3,23))
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (3,8)-(3,9) = "="
+ │ └── end_keyword_loc: ∅
+ ├── @ DefNode (location: (5,0)-(5,17))
+ │ ├── name: :foo
+ │ ├── name_loc: (5,9)-(5,12) = "foo"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (5,4)-(5,8))
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,15)-(5,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,15)-(5,17))
+ │ │ └── flags: decimal
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ │ ├── operator_loc: (5,8)-(5,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (5,13)-(5,14) = "="
+ │ └── end_keyword_loc: ∅
+ └── @ DefNode (location: (7,0)-(7,28))
+ ├── name: :foo
+ ├── name_loc: (7,9)-(7,12) = "foo"
+ ├── receiver:
+ │ @ SelfNode (location: (7,4)-(7,8))
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (7,15)-(7,28))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (7,15)-(7,28))
+ │ ├── expression:
+ │ │ @ IntegerNode (location: (7,15)-(7,17))
+ │ │ └── flags: decimal
+ │ ├── keyword_loc: (7,18)-(7,24) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (7,25)-(7,28))
+ ├── locals: []
+ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ ├── operator_loc: (7,8)-(7,9) = "."
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: (7,13)-(7,14) = "="
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/ensure.txt b/test/prism/snapshots/whitequark/ensure.txt
new file mode 100644
index 0000000000..a82ec2c148
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ensure.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,29))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,29))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,29))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (1,13)-(1,29))
+ │ ├── ensure_keyword_loc: (1,13)-(1,19) = "ensure"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,21)-(1,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,21)-(1,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,21)-(1,24) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── end_keyword_loc: (1,26)-(1,29) = "end"
+ └── end_keyword_loc: (1,26)-(1,29) = "end"
diff --git a/test/prism/snapshots/whitequark/ensure_empty.txt b/test/prism/snapshots/whitequark/ensure_empty.txt
new file mode 100644
index 0000000000..0bab5d80c3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ensure_empty.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,16))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements: ∅
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (1,6)-(1,16))
+ │ ├── ensure_keyword_loc: (1,6)-(1,12) = "ensure"
+ │ ├── statements: ∅
+ │ └── end_keyword_loc: (1,13)-(1,16) = "end"
+ └── end_keyword_loc: (1,13)-(1,16) = "end"
diff --git a/test/prism/snapshots/whitequark/false.txt b/test/prism/snapshots/whitequark/false.txt
new file mode 100644
index 0000000000..00562f703a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/false.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ FalseNode (location: (1,0)-(1,5))
diff --git a/test/prism/snapshots/whitequark/float.txt b/test/prism/snapshots/whitequark/float.txt
new file mode 100644
index 0000000000..14457fcff2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/float.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ FloatNode (location: (1,0)-(1,5))
+ └── @ FloatNode (location: (3,0)-(3,4))
diff --git a/test/prism/snapshots/whitequark/for.txt b/test/prism/snapshots/whitequark/for.txt
new file mode 100644
index 0000000000..19118c0c54
--- /dev/null
+++ b/test/prism/snapshots/whitequark/for.txt
@@ -0,0 +1,81 @@
+@ ProgramNode (location: (1,0)-(3,22))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,22))
+ └── body: (length: 2)
+ ├── @ ForNode (location: (1,0)-(1,24))
+ │ ├── index:
+ │ │ @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── collection:
+ │ │ @ CallNode (location: (1,9)-(1,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,16)-(1,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,16)-(1,17) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,18)-(1,19))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (1,18)-(1,19))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "p"
+ │ ├── for_keyword_loc: (1,0)-(1,3) = "for"
+ │ ├── in_keyword_loc: (1,6)-(1,8) = "in"
+ │ ├── do_keyword_loc: (1,13)-(1,15) = "do"
+ │ └── end_keyword_loc: (1,21)-(1,24) = "end"
+ └── @ ForNode (location: (3,0)-(3,22))
+ ├── index:
+ │ @ LocalVariableTargetNode (location: (3,4)-(3,5))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── collection:
+ │ @ CallNode (location: (3,9)-(3,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,9)-(3,12) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (3,14)-(3,17))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,14)-(3,17))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,14)-(3,15) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,16)-(3,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (3,16)-(3,17))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── for_keyword_loc: (3,0)-(3,3) = "for"
+ ├── in_keyword_loc: (3,6)-(3,8) = "in"
+ ├── do_keyword_loc: ∅
+ └── end_keyword_loc: (3,19)-(3,22) = "end"
diff --git a/test/prism/snapshots/whitequark/for_mlhs.txt b/test/prism/snapshots/whitequark/for_mlhs.txt
new file mode 100644
index 0000000000..3fbca4d299
--- /dev/null
+++ b/test/prism/snapshots/whitequark/for_mlhs.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ ForNode (location: (1,0)-(1,28))
+ ├── index:
+ │ @ MultiTargetNode (location: (1,4)-(1,8))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ └── rparen_loc: ∅
+ ├── collection:
+ │ @ CallNode (location: (1,12)-(1,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,12)-(1,15) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,17)-(1,23))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,17)-(1,23))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,17)-(1,18) = "p"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,19)-(1,23))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ LocalVariableReadNode (location: (1,19)-(1,20))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableReadNode (location: (1,22)-(1,23))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "p"
+ ├── for_keyword_loc: (1,0)-(1,3) = "for"
+ ├── in_keyword_loc: (1,9)-(1,11) = "in"
+ ├── do_keyword_loc: ∅
+ └── end_keyword_loc: (1,25)-(1,28) = "end"
diff --git a/test/prism/snapshots/whitequark/forward_arg.txt b/test/prism/snapshots/whitequark/forward_arg.txt
new file mode 100644
index 0000000000..37f836e372
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forward_arg.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,27))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,27))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,27))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,11))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (1,8)-(1,11))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,14)-(1,22))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,14)-(1,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,14)-(1,17) = "bar"
+ │ ├── opening_loc: (1,17)-(1,18) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,18)-(1,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (1,18)-(1,21))
+ │ ├── closing_loc: (1,21)-(1,22) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:"..."]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,11)-(1,12) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,24)-(1,27) = "end"
diff --git a/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt b/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt
new file mode 100644
index 0000000000..7c498718cf
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forward_arg_with_open_args.txt
@@ -0,0 +1,386 @@
+@ ProgramNode (location: (1,0)-(27,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(27,28))
+ └── body: (length: 10)
+ ├── @ ParenthesesNode (location: (1,0)-(3,4))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,1)-(3,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ DefNode (location: (1,1)-(3,3))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (1,5)-(1,8) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,9)-(1,12))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ ForwardingParameterNode (location: (1,9)-(1,12))
+ │ │ │ └── block: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (2,2)-(2,5) = "bar"
+ │ │ │ ├── opening_loc: (2,5)-(2,6) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,6)-(2,9))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ForwardingArgumentsNode (location: (2,6)-(2,9))
+ │ │ │ ├── closing_loc: (2,9)-(2,10) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "bar"
+ │ │ ├── locals: [:"..."]
+ │ │ ├── def_keyword_loc: (1,1)-(1,4) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ │ ├── opening_loc: (1,0)-(1,1) = "("
+ │ └── closing_loc: (3,3)-(3,4) = ")"
+ ├── @ ParenthesesNode (location: (5,0)-(5,28))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,1)-(5,27))
+ │ │ └── body: (length: 1)
+ │ │ └── @ DefNode (location: (5,1)-(5,27))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (5,5)-(5,8) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (5,9)-(5,12))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ ForwardingParameterNode (location: (5,9)-(5,12))
+ │ │ │ └── block: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (5,14)-(5,22))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,14)-(5,22))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,14)-(5,17) = "bar"
+ │ │ │ ├── opening_loc: (5,17)-(5,18) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,18)-(5,21))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ForwardingArgumentsNode (location: (5,18)-(5,21))
+ │ │ │ ├── closing_loc: (5,21)-(5,22) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "bar"
+ │ │ ├── locals: [:"..."]
+ │ │ ├── def_keyword_loc: (5,1)-(5,4) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (5,24)-(5,27) = "end"
+ │ ├── opening_loc: (5,0)-(5,1) = "("
+ │ └── closing_loc: (5,27)-(5,28) = ")"
+ ├── @ DefNode (location: (7,0)-(8,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (7,4)-(7,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (7,8)-(7,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (7,8)-(7,11))
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
+ ├── @ DefNode (location: (10,0)-(10,26))
+ │ ├── name: :foo
+ │ ├── name_loc: (10,4)-(10,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (10,8)-(10,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (10,8)-(10,11))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (10,13)-(10,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (10,13)-(10,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (10,13)-(10,16) = "bar"
+ │ │ ├── opening_loc: (10,16)-(10,17) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (10,17)-(10,20))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (10,17)-(10,20))
+ │ │ ├── closing_loc: (10,20)-(10,21) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (10,0)-(10,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (10,23)-(10,26) = "end"
+ ├── @ DefNode (location: (12,0)-(14,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (12,4)-(12,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (12,8)-(12,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (12,8)-(12,9))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (12,11)-(12,14))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (13,2)-(13,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (13,2)-(13,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,2)-(13,5) = "bar"
+ │ │ ├── opening_loc: (13,5)-(13,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (13,6)-(13,9))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (13,6)-(13,9))
+ │ │ ├── closing_loc: (13,9)-(13,10) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:a, :"..."]
+ │ ├── def_keyword_loc: (12,0)-(12,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (14,0)-(14,3) = "end"
+ ├── @ DefNode (location: (16,0)-(16,29))
+ │ ├── name: :foo
+ │ ├── name_loc: (16,4)-(16,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (16,8)-(16,14))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (16,8)-(16,9))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (16,11)-(16,14))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (16,16)-(16,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (16,16)-(16,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (16,16)-(16,19) = "bar"
+ │ │ ├── opening_loc: (16,19)-(16,20) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (16,20)-(16,23))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (16,20)-(16,23))
+ │ │ ├── closing_loc: (16,23)-(16,24) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:a, :"..."]
+ │ ├── def_keyword_loc: (16,0)-(16,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (16,26)-(16,29) = "end"
+ ├── @ DefNode (location: (18,0)-(19,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (18,4)-(18,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (18,8)-(18,21))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (18,8)-(18,9))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (18,11)-(18,16))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (18,11)-(18,12) = "b"
+ │ │ │ ├── operator_loc: (18,13)-(18,14) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (18,15)-(18,16))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (18,18)-(18,21))
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:a, :b, :"..."]
+ │ ├── def_keyword_loc: (18,0)-(18,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (19,0)-(19,3) = "end"
+ ├── @ DefNode (location: (21,0)-(23,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (21,4)-(21,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (21,8)-(21,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (21,8)-(21,13))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (21,8)-(21,9) = "b"
+ │ │ │ ├── operator_loc: (21,10)-(21,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (21,12)-(21,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (21,15)-(21,18))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (22,2)-(22,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (22,2)-(22,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (22,2)-(22,5) = "bar"
+ │ │ ├── opening_loc: (22,5)-(22,6) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (22,6)-(22,9))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (22,6)-(22,9))
+ │ │ ├── closing_loc: (22,9)-(22,10) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:b, :"..."]
+ │ ├── def_keyword_loc: (21,0)-(21,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (23,0)-(23,3) = "end"
+ ├── @ DefNode (location: (25,0)-(25,33))
+ │ ├── name: :foo
+ │ ├── name_loc: (25,4)-(25,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (25,8)-(25,18))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (25,8)-(25,13))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (25,8)-(25,9) = "b"
+ │ │ │ ├── operator_loc: (25,10)-(25,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (25,12)-(25,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (25,15)-(25,18))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (25,20)-(25,28))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (25,20)-(25,28))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (25,20)-(25,23) = "bar"
+ │ │ ├── opening_loc: (25,23)-(25,24) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (25,24)-(25,27))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (25,24)-(25,27))
+ │ │ ├── closing_loc: (25,27)-(25,28) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:b, :"..."]
+ │ ├── def_keyword_loc: (25,0)-(25,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (25,30)-(25,33) = "end"
+ └── @ DefNode (location: (27,0)-(27,28))
+ ├── name: :foo
+ ├── name_loc: (27,4)-(27,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (27,8)-(27,14))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (27,8)-(27,9))
+ │ │ └── name: :a
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (27,11)-(27,14))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (27,16)-(27,24))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (27,16)-(27,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,16)-(27,19) = "bar"
+ │ ├── opening_loc: (27,19)-(27,20) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,20)-(27,23))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (27,20)-(27,23))
+ │ ├── closing_loc: (27,23)-(27,24) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:a, :"..."]
+ ├── def_keyword_loc: (27,0)-(27,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (27,7)-(27,8) = "("
+ ├── rparen_loc: (27,14)-(27,15) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (27,25)-(27,28) = "end"
diff --git a/test/prism/snapshots/whitequark/forward_args_legacy.txt b/test/prism/snapshots/whitequark/forward_args_legacy.txt
new file mode 100644
index 0000000000..ea271bd9ce
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forward_args_legacy.txt
@@ -0,0 +1,97 @@
+@ ProgramNode (location: (1,0)-(5,29))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,29))
+ └── body: (length: 3)
+ ├── @ DefNode (location: (1,0)-(1,27))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,8)-(1,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (1,8)-(1,11))
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,14)-(1,22))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,14)-(1,22))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,14)-(1,17) = "bar"
+ │ │ ├── opening_loc: (1,17)-(1,18) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,18)-(1,21))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ ForwardingArgumentsNode (location: (1,18)-(1,21))
+ │ │ ├── closing_loc: (1,21)-(1,22) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "bar"
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (1,7)-(1,8) = "("
+ │ ├── rparen_loc: (1,11)-(1,12) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,24)-(1,27) = "end"
+ ├── @ DefNode (location: (3,0)-(3,17))
+ │ ├── name: :foo
+ │ ├── name_loc: (3,4)-(3,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (3,8)-(3,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ ForwardingParameterNode (location: (3,8)-(3,11))
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:"..."]
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (3,7)-(3,8) = "("
+ │ ├── rparen_loc: (3,11)-(3,12) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,14)-(3,17) = "end"
+ └── @ DefNode (location: (5,0)-(5,29))
+ ├── name: :foo
+ ├── name_loc: (5,4)-(5,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (5,8)-(5,11))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (5,8)-(5,11))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (5,14)-(5,24))
+ │ └── body: (length: 1)
+ │ └── @ SuperNode (location: (5,14)-(5,24))
+ │ ├── keyword_loc: (5,14)-(5,19) = "super"
+ │ ├── lparen_loc: (5,19)-(5,20) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,20)-(5,23))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForwardingArgumentsNode (location: (5,20)-(5,23))
+ │ ├── rparen_loc: (5,23)-(5,24) = ")"
+ │ └── block: ∅
+ ├── locals: [:"..."]
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (5,7)-(5,8) = "("
+ ├── rparen_loc: (5,11)-(5,12) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (5,26)-(5,29) = "end"
diff --git a/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt b/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt
new file mode 100644
index 0000000000..3a3ddaea6e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,45))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,45))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,45))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,20))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,16))
+ │ │ └── name: :argument
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,18)-(1,20))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,18)-(1,20) = "**"
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,23)-(1,40))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,23)-(1,40))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,23)-(1,26) = "bar"
+ │ ├── opening_loc: (1,26)-(1,27) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,27)-(1,39))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ LocalVariableReadNode (location: (1,27)-(1,35))
+ │ │ │ ├── name: :argument
+ │ │ │ └── depth: 0
+ │ │ └── @ KeywordHashNode (location: (1,37)-(1,39))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (1,37)-(1,39))
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: (1,37)-(1,39) = "**"
+ │ ├── closing_loc: (1,39)-(1,40) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:argument, :**]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,20)-(1,21) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,42)-(1,45) = "end"
diff --git a/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt b/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt
new file mode 100644
index 0000000000..5c1d350672
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,43))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,43))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,43))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,19))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,16))
+ │ │ └── name: :argument
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,18)-(1,19))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,18)-(1,19) = "*"
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,22)-(1,38))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,22)-(1,38))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ ├── opening_loc: (1,25)-(1,26) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,26)-(1,37))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ LocalVariableReadNode (location: (1,26)-(1,34))
+ │ │ │ ├── name: :argument
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (1,36)-(1,37))
+ │ │ ├── operator_loc: (1,36)-(1,37) = "*"
+ │ │ └── expression: ∅
+ │ ├── closing_loc: (1,37)-(1,38) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:argument, :*]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,19)-(1,20) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,40)-(1,43) = "end"
diff --git a/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt b/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt
new file mode 100644
index 0000000000..3690613d9e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,25))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,8)-(1,10))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,8)-(1,10) = "**"
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,13)-(1,20))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,13)-(1,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ ├── opening_loc: (1,16)-(1,17) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,17)-(1,19))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,17)-(1,19))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (1,17)-(1,19))
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: (1,17)-(1,19) = "**"
+ │ ├── closing_loc: (1,19)-(1,20) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:**]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,10)-(1,11) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,22)-(1,25) = "end"
diff --git a/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt b/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
new file mode 100644
index 0000000000..87fbc462fc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,41))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,41))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,41))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,8)-(1,10))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,8)-(1,10) = "**"
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,13)-(1,36))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,13)-(1,36))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ ├── opening_loc: (1,16)-(1,17) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,17)-(1,35))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,17)-(1,35))
+ │ │ └── elements: (length: 2)
+ │ │ ├── @ AssocSplatNode (location: (1,17)-(1,19))
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: (1,17)-(1,19) = "**"
+ │ │ └── @ AssocNode (location: (1,21)-(1,35))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,21)-(1,30))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,21)-(1,29) = "from_foo"
+ │ │ │ ├── closing_loc: (1,29)-(1,30) = ":"
+ │ │ │ └── unescaped: "from_foo"
+ │ │ ├── value:
+ │ │ │ @ TrueNode (location: (1,31)-(1,35))
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: (1,35)-(1,36) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:**]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,10)-(1,11) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,38)-(1,41) = "end"
diff --git a/test/prism/snapshots/whitequark/forwarded_restarg.txt b/test/prism/snapshots/whitequark/forwarded_restarg.txt
new file mode 100644
index 0000000000..4ff9bf55a8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/forwarded_restarg.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,23))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,9))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,8)-(1,9))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,8)-(1,9) = "*"
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,12)-(1,18))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,12)-(1,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ ├── opening_loc: (1,15)-(1,16) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,16)-(1,17))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ SplatNode (location: (1,16)-(1,17))
+ │ │ ├── operator_loc: (1,16)-(1,17) = "*"
+ │ │ └── expression: ∅
+ │ ├── closing_loc: (1,17)-(1,18) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:*]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,9)-(1,10) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,20)-(1,23) = "end"
diff --git a/test/prism/snapshots/whitequark/gvar.txt b/test/prism/snapshots/whitequark/gvar.txt
new file mode 100644
index 0000000000..f4401c4389
--- /dev/null
+++ b/test/prism/snapshots/whitequark/gvar.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ GlobalVariableReadNode (location: (1,0)-(1,4))
+ └── name: :$foo
diff --git a/test/prism/snapshots/whitequark/gvasgn.txt b/test/prism/snapshots/whitequark/gvasgn.txt
new file mode 100644
index 0000000000..541a3a0fc4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/gvasgn.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ GlobalVariableWriteNode (location: (1,0)-(1,9))
+ ├── name: :$var
+ ├── name_loc: (1,0)-(1,4) = "$var"
+ ├── value:
+ │ @ IntegerNode (location: (1,7)-(1,9))
+ │ └── flags: decimal
+ └── operator_loc: (1,5)-(1,6) = "="
diff --git a/test/prism/snapshots/whitequark/hash_empty.txt b/test/prism/snapshots/whitequark/hash_empty.txt
new file mode 100644
index 0000000000..38a2c15a9a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_empty.txt
@@ -0,0 +1,9 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(1,3))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 0)
+ └── closing_loc: (1,2)-(1,3) = "}"
diff --git a/test/prism/snapshots/whitequark/hash_hashrocket.txt b/test/prism/snapshots/whitequark/hash_hashrocket.txt
new file mode 100644
index 0000000000..5b6d1e3920
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_hashrocket.txt
@@ -0,0 +1,44 @@
+@ ProgramNode (location: (1,0)-(3,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,25))
+ └── body: (length: 2)
+ ├── @ HashNode (location: (1,0)-(1,10))
+ │ ├── opening_loc: (1,0)-(1,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,2)-(1,8))
+ │ │ ├── key:
+ │ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ │ └── flags: decimal
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (1,4)-(1,6) = "=>"
+ │ └── closing_loc: (1,9)-(1,10) = "}"
+ └── @ HashNode (location: (3,0)-(3,25))
+ ├── opening_loc: (3,0)-(3,1) = "{"
+ ├── elements: (length: 2)
+ │ ├── @ AssocNode (location: (3,2)-(3,8))
+ │ │ ├── key:
+ │ │ │ @ IntegerNode (location: (3,2)-(3,3))
+ │ │ │ └── flags: decimal
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,7)-(3,8))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: (3,4)-(3,6) = "=>"
+ │ └── @ AssocNode (location: (3,10)-(3,23))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (3,10)-(3,14))
+ │ │ ├── opening_loc: (3,10)-(3,11) = ":"
+ │ │ ├── value_loc: (3,11)-(3,14) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── value:
+ │ │ @ StringNode (location: (3,18)-(3,23))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (3,18)-(3,19) = "\""
+ │ │ ├── content_loc: (3,19)-(3,22) = "bar"
+ │ │ ├── closing_loc: (3,22)-(3,23) = "\""
+ │ │ └── unescaped: "bar"
+ │ └── operator_loc: (3,15)-(3,17) = "=>"
+ └── closing_loc: (3,24)-(3,25) = "}"
diff --git a/test/prism/snapshots/whitequark/hash_kwsplat.txt b/test/prism/snapshots/whitequark/hash_kwsplat.txt
new file mode 100644
index 0000000000..506f054071
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_kwsplat.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(1,17))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 2)
+ │ ├── @ AssocNode (location: (1,2)-(1,8))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,2)-(1,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,2)-(1,5) = "foo"
+ │ │ │ ├── closing_loc: (1,5)-(1,6) = ":"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocSplatNode (location: (1,10)-(1,15))
+ │ ├── value:
+ │ │ @ CallNode (location: (1,12)-(1,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── operator_loc: (1,10)-(1,12) = "**"
+ └── closing_loc: (1,16)-(1,17) = "}"
diff --git a/test/prism/snapshots/whitequark/hash_label.txt b/test/prism/snapshots/whitequark/hash_label.txt
new file mode 100644
index 0000000000..444010d4a8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_label.txt
@@ -0,0 +1,20 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(1,10))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,2)-(1,8))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,2)-(1,6))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,2)-(1,5) = "foo"
+ │ │ ├── closing_loc: (1,5)-(1,6) = ":"
+ │ │ └── unescaped: "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: ∅
+ └── closing_loc: (1,9)-(1,10) = "}"
diff --git a/test/prism/snapshots/whitequark/hash_label_end.txt b/test/prism/snapshots/whitequark/hash_label_end.txt
new file mode 100644
index 0000000000..dfa6eb4da5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_label_end.txt
@@ -0,0 +1,92 @@
+@ ProgramNode (location: (1,0)-(5,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,22))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "f"
+ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IfNode (location: (1,2)-(1,11))
+ │ │ ├── if_keyword_loc: ∅
+ │ │ ├── predicate:
+ │ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,6)-(1,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ StringNode (location: (1,6)-(1,9))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,6)-(1,7) = "\""
+ │ │ │ ├── content_loc: (1,7)-(1,8) = "a"
+ │ │ │ ├── closing_loc: (1,8)-(1,9) = "\""
+ │ │ │ └── unescaped: "a"
+ │ │ ├── consequent:
+ │ │ │ @ ElseNode (location: (1,9)-(1,11))
+ │ │ │ ├── else_keyword_loc: (1,9)-(1,10) = ":"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,10)-(1,11))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── end_keyword_loc: ∅
+ │ │ └── end_keyword_loc: ∅
+ │ ├── closing_loc: (1,11)-(1,12) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "f"
+ ├── @ HashNode (location: (3,0)-(3,12))
+ │ ├── opening_loc: (3,0)-(3,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (3,2)-(3,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,2)-(3,8))
+ │ │ │ ├── opening_loc: (3,2)-(3,3) = "'"
+ │ │ │ ├── value_loc: (3,3)-(3,6) = "foo"
+ │ │ │ ├── closing_loc: (3,6)-(3,8) = "':"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (3,9)-(3,10))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (3,11)-(3,12) = "}"
+ └── @ HashNode (location: (5,0)-(5,22))
+ ├── opening_loc: (5,0)-(5,1) = "{"
+ ├── elements: (length: 2)
+ │ ├── @ AssocNode (location: (5,2)-(5,10))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,2)-(5,8))
+ │ │ │ ├── opening_loc: (5,2)-(5,3) = "'"
+ │ │ │ ├── value_loc: (5,3)-(5,6) = "foo"
+ │ │ │ ├── closing_loc: (5,6)-(5,8) = "':"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (5,9)-(5,10))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocNode (location: (5,12)-(5,21))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (5,12)-(5,18))
+ │ │ ├── opening_loc: (5,12)-(5,13) = "'"
+ │ │ ├── value_loc: (5,13)-(5,16) = "bar"
+ │ │ ├── closing_loc: (5,16)-(5,18) = "':"
+ │ │ └── unescaped: "bar"
+ │ ├── value:
+ │ │ @ HashNode (location: (5,19)-(5,21))
+ │ │ ├── opening_loc: (5,19)-(5,20) = "{"
+ │ │ ├── elements: (length: 0)
+ │ │ └── closing_loc: (5,20)-(5,21) = "}"
+ │ └── operator_loc: ∅
+ └── closing_loc: (5,21)-(5,22) = "}"
diff --git a/test/prism/snapshots/whitequark/hash_pair_value_omission.txt b/test/prism/snapshots/whitequark/hash_pair_value_omission.txt
new file mode 100644
index 0000000000..37e3098369
--- /dev/null
+++ b/test/prism/snapshots/whitequark/hash_pair_value_omission.txt
@@ -0,0 +1,93 @@
+@ ProgramNode (location: (1,0)-(5,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,7))
+ └── body: (length: 3)
+ ├── @ HashNode (location: (1,0)-(1,6))
+ │ ├── opening_loc: (1,0)-(1,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,1)-(1,5))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,1)-(1,5))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,1)-(1,4) = "BAR"
+ │ │ │ ├── closing_loc: (1,4)-(1,5) = ":"
+ │ │ │ └── unescaped: "BAR"
+ │ │ ├── value:
+ │ │ │ @ ImplicitNode (location: (1,1)-(1,5))
+ │ │ │ └── value:
+ │ │ │ @ ConstantReadNode (location: (1,1)-(1,5))
+ │ │ │ └── name: :BAR
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (1,5)-(1,6) = "}"
+ ├── @ HashNode (location: (3,0)-(3,8))
+ │ ├── opening_loc: (3,0)-(3,1) = "{"
+ │ ├── elements: (length: 2)
+ │ │ ├── @ AssocNode (location: (3,1)-(3,3))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (3,1)-(3,3))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (3,1)-(3,2) = "a"
+ │ │ │ │ ├── closing_loc: (3,2)-(3,3) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ ImplicitNode (location: (3,1)-(3,3))
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (3,1)-(3,3))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,1)-(3,2) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "a"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── @ AssocNode (location: (3,5)-(3,7))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (3,5)-(3,7))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (3,5)-(3,6) = "b"
+ │ │ │ ├── closing_loc: (3,6)-(3,7) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ ImplicitNode (location: (3,5)-(3,7))
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (3,5)-(3,7))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,5)-(3,6) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (3,7)-(3,8) = "}"
+ └── @ HashNode (location: (5,0)-(5,7))
+ ├── opening_loc: (5,0)-(5,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (5,1)-(5,6))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (5,1)-(5,6))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (5,1)-(5,5) = "puts"
+ │ │ ├── closing_loc: (5,5)-(5,6) = ":"
+ │ │ └── unescaped: "puts"
+ │ ├── value:
+ │ │ @ ImplicitNode (location: (5,1)-(5,6))
+ │ │ └── value:
+ │ │ @ CallNode (location: (5,1)-(5,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,1)-(5,5) = "puts"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "puts"
+ │ └── operator_loc: ∅
+ └── closing_loc: (5,6)-(5,7) = "}"
diff --git a/test/prism/snapshots/whitequark/heredoc.txt b/test/prism/snapshots/whitequark/heredoc.txt
new file mode 100644
index 0000000000..35e6d8be63
--- /dev/null
+++ b/test/prism/snapshots/whitequark/heredoc.txt
@@ -0,0 +1,22 @@
+@ ProgramNode (location: (1,0)-(11,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,8))
+ └── body: (length: 3)
+ ├── @ StringNode (location: (1,0)-(1,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,8) = "<<'HERE'"
+ │ ├── content_loc: (2,0)-(3,0) = "foo\nbar\n"
+ │ ├── closing_loc: (4,0)-(4,0) = "HERE\n"
+ │ └── unescaped: "foo\nbar\n"
+ ├── @ StringNode (location: (6,0)-(6,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (6,0)-(6,6) = "<<HERE"
+ │ ├── content_loc: (7,0)-(8,0) = "foo\nbar\n"
+ │ ├── closing_loc: (9,0)-(9,0) = "HERE\n"
+ │ └── unescaped: "foo\nbar\n"
+ └── @ XStringNode (location: (11,0)-(11,8))
+ ├── opening_loc: (11,0)-(11,8) = "<<`HERE`"
+ ├── content_loc: (12,0)-(13,0) = "foo\nbar\n"
+ ├── closing_loc: (14,0)-(14,0) = "HERE\n"
+ └── unescaped: "foo\nbar\n"
diff --git a/test/prism/snapshots/whitequark/if.txt b/test/prism/snapshots/whitequark/if.txt
new file mode 100644
index 0000000000..c5a422008e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(3,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,16))
+ └── body: (length: 2)
+ ├── @ IfNode (location: (1,0)-(1,20))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,12)-(1,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (1,17)-(1,20) = "end"
+ └── @ IfNode (location: (3,0)-(3,16))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (3,3)-(3,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (3,8)-(3,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,8)-(3,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,13)-(3,16) = "end"
diff --git a/test/prism/snapshots/whitequark/if_else.txt b/test/prism/snapshots/whitequark/if_else.txt
new file mode 100644
index 0000000000..a0b8a8d842
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_else.txt
@@ -0,0 +1,93 @@
+@ ProgramNode (location: (1,0)-(3,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,26))
+ └── body: (length: 2)
+ ├── @ IfNode (location: (1,0)-(1,30))
+ │ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,3)-(1,6))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,12)-(1,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,17)-(1,30))
+ │ │ ├── else_keyword_loc: (1,17)-(1,21) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,22)-(1,25))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,22)-(1,25))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,22)-(1,25) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── end_keyword_loc: (1,27)-(1,30) = "end"
+ │ └── end_keyword_loc: (1,27)-(1,30) = "end"
+ └── @ IfNode (location: (3,0)-(3,26))
+ ├── if_keyword_loc: (3,0)-(3,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (3,3)-(3,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,3)-(3,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (3,8)-(3,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,8)-(3,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,8)-(3,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent:
+ │ @ ElseNode (location: (3,13)-(3,26))
+ │ ├── else_keyword_loc: (3,13)-(3,17) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,18)-(3,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,18)-(3,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,18)-(3,21) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── end_keyword_loc: (3,23)-(3,26) = "end"
+ └── end_keyword_loc: (3,23)-(3,26) = "end"
diff --git a/test/prism/snapshots/whitequark/if_elsif.txt b/test/prism/snapshots/whitequark/if_elsif.txt
new file mode 100644
index 0000000000..cf55c74095
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_elsif.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(1,38))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,38))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,38))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (1,3)-(1,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,8)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,8)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,8)-(1,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent:
+ │ @ IfNode (location: (1,13)-(1,38))
+ │ ├── if_keyword_loc: (1,13)-(1,18) = "elsif"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,19)-(1,22))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,19)-(1,22) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,24)-(1,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,24)-(1,25))
+ │ │ └── flags: decimal
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,27)-(1,38))
+ │ │ ├── else_keyword_loc: (1,27)-(1,31) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,32)-(1,33))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,32)-(1,33))
+ │ │ │ └── flags: decimal
+ │ │ └── end_keyword_loc: (1,35)-(1,38) = "end"
+ │ └── end_keyword_loc: (1,35)-(1,38) = "end"
+ └── end_keyword_loc: (1,35)-(1,38) = "end"
diff --git a/test/prism/snapshots/whitequark/if_masgn__24.txt b/test/prism/snapshots/whitequark/if_masgn__24.txt
new file mode 100644
index 0000000000..3202633df6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_masgn__24.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,20))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ ParenthesesNode (location: (1,3)-(1,15))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,4)-(1,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MultiWriteNode (location: (1,4)-(1,14))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,4)-(1,5))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,7)-(1,8))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,11)-(1,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,14)-(1,15) = ")"
+ ├── statements: ∅
+ ├── consequent: ∅
+ └── end_keyword_loc: (1,17)-(1,20) = "end"
diff --git a/test/prism/snapshots/whitequark/if_mod.txt b/test/prism/snapshots/whitequark/if_mod.txt
new file mode 100644
index 0000000000..1e0f7f0bb0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_mod.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,10))
+ ├── if_keyword_loc: (1,4)-(1,6) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (1,7)-(1,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/if_nl_then.txt b/test/prism/snapshots/whitequark/if_nl_then.txt
new file mode 100644
index 0000000000..17355a73d3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_nl_then.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(2,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,12))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(2,12))
+ ├── if_keyword_loc: (1,0)-(1,2) = "if"
+ ├── predicate:
+ │ @ CallNode (location: (1,3)-(1,6))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,3)-(1,6) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (2,5)-(2,8))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (2,5)-(2,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (2,5)-(2,8) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ └── end_keyword_loc: (2,9)-(2,12) = "end"
diff --git a/test/prism/snapshots/whitequark/if_while_after_class__since_32.txt b/test/prism/snapshots/whitequark/if_while_after_class__since_32.txt
new file mode 100644
index 0000000000..e4338171c5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/if_while_after_class__since_32.txt
@@ -0,0 +1,115 @@
+@ ProgramNode (location: (1,0)-(7,48))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,48))
+ └── body: (length: 4)
+ ├── @ ClassNode (location: (1,0)-(1,38))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (1,6)-(1,33))
+ │ │ ├── parent:
+ │ │ │ @ IfNode (location: (1,6)-(1,25))
+ │ │ │ ├── if_keyword_loc: (1,6)-(1,8) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ TrueNode (location: (1,9)-(1,13))
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,15)-(1,21))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (1,15)-(1,21))
+ │ │ │ │ └── name: :Object
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: (1,22)-(1,25) = "end"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (1,27)-(1,33))
+ │ │ │ └── name: :Kernel
+ │ │ └── delimiter_loc: (1,25)-(1,27) = "::"
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (1,35)-(1,38) = "end"
+ │ └── name: :Kernel
+ ├── @ ClassNode (location: (3,0)-(3,47))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (3,0)-(3,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (3,6)-(3,42))
+ │ │ ├── parent:
+ │ │ │ @ WhileNode (location: (3,6)-(3,34))
+ │ │ │ ├── keyword_loc: (3,6)-(3,11) = "while"
+ │ │ │ ├── closing_loc: (3,31)-(3,34) = "end"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ TrueNode (location: (3,12)-(3,16))
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,18)-(3,30))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ BreakNode (location: (3,18)-(3,30))
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (3,24)-(3,30))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ ConstantReadNode (location: (3,24)-(3,30))
+ │ │ │ │ │ └── name: :Object
+ │ │ │ │ └── keyword_loc: (3,18)-(3,23) = "break"
+ │ │ │ └── flags: ∅
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (3,36)-(3,42))
+ │ │ │ └── name: :Kernel
+ │ │ └── delimiter_loc: (3,34)-(3,36) = "::"
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (3,44)-(3,47) = "end"
+ │ └── name: :Kernel
+ ├── @ ModuleNode (location: (5,0)-(5,39))
+ │ ├── locals: []
+ │ ├── module_keyword_loc: (5,0)-(5,6) = "module"
+ │ ├── constant_path:
+ │ │ @ ConstantPathNode (location: (5,7)-(5,34))
+ │ │ ├── parent:
+ │ │ │ @ IfNode (location: (5,7)-(5,26))
+ │ │ │ ├── if_keyword_loc: (5,7)-(5,9) = "if"
+ │ │ │ ├── predicate:
+ │ │ │ │ @ TrueNode (location: (5,10)-(5,14))
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (5,16)-(5,22))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (5,16)-(5,22))
+ │ │ │ │ └── name: :Object
+ │ │ │ ├── consequent: ∅
+ │ │ │ └── end_keyword_loc: (5,23)-(5,26) = "end"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (5,28)-(5,34))
+ │ │ │ └── name: :Kernel
+ │ │ └── delimiter_loc: (5,26)-(5,28) = "::"
+ │ ├── body: ∅
+ │ ├── end_keyword_loc: (5,36)-(5,39) = "end"
+ │ └── name: :Kernel
+ └── @ ModuleNode (location: (7,0)-(7,48))
+ ├── locals: []
+ ├── module_keyword_loc: (7,0)-(7,6) = "module"
+ ├── constant_path:
+ │ @ ConstantPathNode (location: (7,7)-(7,43))
+ │ ├── parent:
+ │ │ @ WhileNode (location: (7,7)-(7,35))
+ │ │ ├── keyword_loc: (7,7)-(7,12) = "while"
+ │ │ ├── closing_loc: (7,32)-(7,35) = "end"
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (7,13)-(7,17))
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (7,19)-(7,31))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ BreakNode (location: (7,19)-(7,31))
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (7,25)-(7,31))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ ConstantReadNode (location: (7,25)-(7,31))
+ │ │ │ │ └── name: :Object
+ │ │ │ └── keyword_loc: (7,19)-(7,24) = "break"
+ │ │ └── flags: ∅
+ │ ├── child:
+ │ │ @ ConstantReadNode (location: (7,37)-(7,43))
+ │ │ └── name: :Kernel
+ │ └── delimiter_loc: (7,35)-(7,37) = "::"
+ ├── body: ∅
+ ├── end_keyword_loc: (7,45)-(7,48) = "end"
+ └── name: :Kernel
diff --git a/test/prism/snapshots/whitequark/int.txt b/test/prism/snapshots/whitequark/int.txt
new file mode 100644
index 0000000000..8690dee172
--- /dev/null
+++ b/test/prism/snapshots/whitequark/int.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(5,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,2))
+ └── body: (length: 3)
+ ├── @ IntegerNode (location: (1,0)-(1,3))
+ │ └── flags: decimal
+ ├── @ IntegerNode (location: (3,0)-(3,3))
+ │ └── flags: decimal
+ └── @ IntegerNode (location: (5,0)-(5,2))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/int___LINE__.txt b/test/prism/snapshots/whitequark/int___LINE__.txt
new file mode 100644
index 0000000000..bf2ea47102
--- /dev/null
+++ b/test/prism/snapshots/whitequark/int___LINE__.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ SourceLineNode (location: (1,0)-(1,8))
diff --git a/test/prism/snapshots/whitequark/interp_digit_var.txt b/test/prism/snapshots/whitequark/interp_digit_var.txt
new file mode 100644
index 0000000000..2a97bf5780
--- /dev/null
+++ b/test/prism/snapshots/whitequark/interp_digit_var.txt
@@ -0,0 +1,249 @@
+@ ProgramNode (location: (1,1)-(85,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,1)-(85,9))
+ └── body: (length: 38)
+ ├── @ StringNode (location: (1,1)-(1,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,1)-(1,2) = "\""
+ │ ├── content_loc: (1,2)-(1,5) = "\#@1"
+ │ ├── closing_loc: (1,5)-(1,6) = "\""
+ │ └── unescaped: "\#@1"
+ ├── @ StringNode (location: (3,1)-(3,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (3,1)-(3,2) = "\""
+ │ ├── content_loc: (3,2)-(3,6) = "\#@@1"
+ │ ├── closing_loc: (3,6)-(3,7) = "\""
+ │ └── unescaped: "\#@@1"
+ ├── @ ArrayNode (location: (5,1)-(5,8))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (5,4)-(5,7))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (5,4)-(5,7) = "\#@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@1"
+ │ ├── opening_loc: (5,1)-(5,4) = "%I["
+ │ └── closing_loc: (5,7)-(5,8) = "]"
+ ├── @ ArrayNode (location: (7,1)-(7,9))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (7,4)-(7,8))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (7,4)-(7,8) = "\#@@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@@1"
+ │ ├── opening_loc: (7,1)-(7,4) = "%I["
+ │ └── closing_loc: (7,8)-(7,9) = "]"
+ ├── @ StringNode (location: (9,1)-(9,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (9,1)-(9,4) = "%Q{"
+ │ ├── content_loc: (9,4)-(9,7) = "\#@1"
+ │ ├── closing_loc: (9,7)-(9,8) = "}"
+ │ └── unescaped: "\#@1"
+ ├── @ StringNode (location: (11,1)-(11,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (11,1)-(11,4) = "%Q{"
+ │ ├── content_loc: (11,4)-(11,8) = "\#@@1"
+ │ ├── closing_loc: (11,8)-(11,9) = "}"
+ │ └── unescaped: "\#@@1"
+ ├── @ ArrayNode (location: (13,1)-(13,8))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (13,4)-(13,7))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (13,4)-(13,7) = "\#@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@1"
+ │ ├── opening_loc: (13,1)-(13,4) = "%W["
+ │ └── closing_loc: (13,7)-(13,8) = "]"
+ ├── @ ArrayNode (location: (15,1)-(15,9))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (15,4)-(15,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (15,4)-(15,8) = "\#@@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@@1"
+ │ ├── opening_loc: (15,1)-(15,4) = "%W["
+ │ └── closing_loc: (15,8)-(15,9) = "]"
+ ├── @ ArrayNode (location: (17,1)-(17,10))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (17,5)-(17,8))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (17,5)-(17,8) = "\#@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@1"
+ │ ├── opening_loc: (17,1)-(17,4) = "%i["
+ │ └── closing_loc: (17,9)-(17,10) = "]"
+ ├── @ ArrayNode (location: (19,1)-(19,11))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (19,5)-(19,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (19,5)-(19,9) = "\#@@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@@1"
+ │ ├── opening_loc: (19,1)-(19,4) = "%i["
+ │ └── closing_loc: (19,10)-(19,11) = "]"
+ ├── @ StringNode (location: (21,1)-(21,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (21,1)-(21,4) = "%q{"
+ │ ├── content_loc: (21,4)-(21,7) = "\#@1"
+ │ ├── closing_loc: (21,7)-(21,8) = "}"
+ │ └── unescaped: "\#@1"
+ ├── @ StringNode (location: (23,1)-(23,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (23,1)-(23,4) = "%q{"
+ │ ├── content_loc: (23,4)-(23,8) = "\#@@1"
+ │ ├── closing_loc: (23,8)-(23,9) = "}"
+ │ └── unescaped: "\#@@1"
+ ├── @ RegularExpressionNode (location: (25,1)-(25,8))
+ │ ├── opening_loc: (25,1)-(25,4) = "%r{"
+ │ ├── content_loc: (25,4)-(25,7) = "\#@1"
+ │ ├── closing_loc: (25,7)-(25,8) = "}"
+ │ ├── unescaped: "\#@1"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (27,1)-(27,9))
+ │ ├── opening_loc: (27,1)-(27,4) = "%r{"
+ │ ├── content_loc: (27,4)-(27,8) = "\#@@1"
+ │ ├── closing_loc: (27,8)-(27,9) = "}"
+ │ ├── unescaped: "\#@@1"
+ │ └── flags: ∅
+ ├── @ SymbolNode (location: (29,1)-(29,8))
+ │ ├── opening_loc: (29,1)-(29,4) = "%s{"
+ │ ├── value_loc: (29,4)-(29,7) = "\#@1"
+ │ ├── closing_loc: (29,7)-(29,8) = "}"
+ │ └── unescaped: "\#@1"
+ ├── @ SymbolNode (location: (31,1)-(31,9))
+ │ ├── opening_loc: (31,1)-(31,4) = "%s{"
+ │ ├── value_loc: (31,4)-(31,8) = "\#@@1"
+ │ ├── closing_loc: (31,8)-(31,9) = "}"
+ │ └── unescaped: "\#@@1"
+ ├── @ ArrayNode (location: (33,1)-(33,10))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (33,5)-(33,8))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (33,5)-(33,8) = "\#@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@1"
+ │ ├── opening_loc: (33,1)-(33,4) = "%w["
+ │ └── closing_loc: (33,9)-(33,10) = "]"
+ ├── @ ArrayNode (location: (35,1)-(35,11))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (35,5)-(35,9))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (35,5)-(35,9) = "\#@@1"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "\#@@1"
+ │ ├── opening_loc: (35,1)-(35,4) = "%w["
+ │ └── closing_loc: (35,10)-(35,11) = "]"
+ ├── @ XStringNode (location: (37,1)-(37,8))
+ │ ├── opening_loc: (37,1)-(37,4) = "%x{"
+ │ ├── content_loc: (37,4)-(37,7) = "\#@1"
+ │ ├── closing_loc: (37,7)-(37,8) = "}"
+ │ └── unescaped: "\#@1"
+ ├── @ XStringNode (location: (39,1)-(39,9))
+ │ ├── opening_loc: (39,1)-(39,4) = "%x{"
+ │ ├── content_loc: (39,4)-(39,8) = "\#@@1"
+ │ ├── closing_loc: (39,8)-(39,9) = "}"
+ │ └── unescaped: "\#@@1"
+ ├── @ StringNode (location: (41,1)-(41,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (41,1)-(41,3) = "%{"
+ │ ├── content_loc: (41,3)-(41,6) = "\#@1"
+ │ ├── closing_loc: (41,6)-(41,7) = "}"
+ │ └── unescaped: "\#@1"
+ ├── @ StringNode (location: (43,1)-(43,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (43,1)-(43,3) = "%{"
+ │ ├── content_loc: (43,3)-(43,7) = "\#@@1"
+ │ ├── closing_loc: (43,7)-(43,8) = "}"
+ │ └── unescaped: "\#@@1"
+ ├── @ StringNode (location: (45,1)-(45,6))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (45,1)-(45,2) = "'"
+ │ ├── content_loc: (45,2)-(45,5) = "\#@1"
+ │ ├── closing_loc: (45,5)-(45,6) = "'"
+ │ └── unescaped: "\#@1"
+ ├── @ StringNode (location: (47,1)-(47,7))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (47,1)-(47,2) = "'"
+ │ ├── content_loc: (47,2)-(47,6) = "\#@@1"
+ │ ├── closing_loc: (47,6)-(47,7) = "'"
+ │ └── unescaped: "\#@@1"
+ ├── @ RegularExpressionNode (location: (49,1)-(49,6))
+ │ ├── opening_loc: (49,1)-(49,2) = "/"
+ │ ├── content_loc: (49,2)-(49,5) = "\#@1"
+ │ ├── closing_loc: (49,5)-(49,6) = "/"
+ │ ├── unescaped: "\#@1"
+ │ └── flags: ∅
+ ├── @ RegularExpressionNode (location: (51,1)-(51,7))
+ │ ├── opening_loc: (51,1)-(51,2) = "/"
+ │ ├── content_loc: (51,2)-(51,6) = "\#@@1"
+ │ ├── closing_loc: (51,6)-(51,7) = "/"
+ │ ├── unescaped: "\#@@1"
+ │ └── flags: ∅
+ ├── @ SymbolNode (location: (53,1)-(53,7))
+ │ ├── opening_loc: (53,1)-(53,3) = ":\""
+ │ ├── value_loc: (53,3)-(53,6) = "\#@1"
+ │ ├── closing_loc: (53,6)-(53,7) = "\""
+ │ └── unescaped: "\#@1"
+ ├── @ SymbolNode (location: (55,1)-(55,8))
+ │ ├── opening_loc: (55,1)-(55,3) = ":\""
+ │ ├── value_loc: (55,3)-(55,7) = "\#@@1"
+ │ ├── closing_loc: (55,7)-(55,8) = "\""
+ │ └── unescaped: "\#@@1"
+ ├── @ SymbolNode (location: (57,1)-(57,7))
+ │ ├── opening_loc: (57,1)-(57,3) = ":'"
+ │ ├── value_loc: (57,3)-(57,6) = "\#@1"
+ │ ├── closing_loc: (57,6)-(57,7) = "'"
+ │ └── unescaped: "\#@1"
+ ├── @ SymbolNode (location: (59,1)-(59,8))
+ │ ├── opening_loc: (59,1)-(59,3) = ":'"
+ │ ├── value_loc: (59,3)-(59,7) = "\#@@1"
+ │ ├── closing_loc: (59,7)-(59,8) = "'"
+ │ └── unescaped: "\#@@1"
+ ├── @ XStringNode (location: (61,1)-(61,6))
+ │ ├── opening_loc: (61,1)-(61,2) = "`"
+ │ ├── content_loc: (61,2)-(61,5) = "\#@1"
+ │ ├── closing_loc: (61,5)-(61,6) = "`"
+ │ └── unescaped: "\#@1"
+ ├── @ XStringNode (location: (63,1)-(63,7))
+ │ ├── opening_loc: (63,1)-(63,2) = "`"
+ │ ├── content_loc: (63,2)-(63,6) = "\#@@1"
+ │ ├── closing_loc: (63,6)-(63,7) = "`"
+ │ └── unescaped: "\#@@1"
+ ├── @ StringNode (location: (65,0)-(65,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (65,0)-(65,9) = "<<-\"HERE\""
+ │ ├── content_loc: (66,0)-(66,0) = "\#@1\n"
+ │ ├── closing_loc: (67,0)-(67,0) = "HERE\n"
+ │ └── unescaped: "\#@1\n"
+ ├── @ StringNode (location: (69,0)-(69,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (69,0)-(69,9) = "<<-\"HERE\""
+ │ ├── content_loc: (70,0)-(70,0) = "\#@@1\n"
+ │ ├── closing_loc: (71,0)-(71,0) = "HERE\n"
+ │ └── unescaped: "\#@@1\n"
+ ├── @ StringNode (location: (73,0)-(73,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (73,0)-(73,9) = "<<-'HERE'"
+ │ ├── content_loc: (74,0)-(74,0) = "\#@1\n"
+ │ ├── closing_loc: (75,0)-(75,0) = "HERE\n"
+ │ └── unescaped: "\#@1\n"
+ ├── @ StringNode (location: (77,0)-(77,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (77,0)-(77,9) = "<<-'HERE'"
+ │ ├── content_loc: (78,0)-(78,0) = "\#@@1\n"
+ │ ├── closing_loc: (79,0)-(79,0) = "HERE\n"
+ │ └── unescaped: "\#@@1\n"
+ ├── @ XStringNode (location: (81,0)-(81,9))
+ │ ├── opening_loc: (81,0)-(81,9) = "<<-`HERE`"
+ │ ├── content_loc: (82,0)-(82,0) = "\#@1\n"
+ │ ├── closing_loc: (83,0)-(83,0) = "HERE\n"
+ │ └── unescaped: "\#@1\n"
+ └── @ XStringNode (location: (85,0)-(85,9))
+ ├── opening_loc: (85,0)-(85,9) = "<<-`HERE`"
+ ├── content_loc: (86,0)-(86,0) = "\#@@1\n"
+ ├── closing_loc: (87,0)-(87,0) = "HERE\n"
+ └── unescaped: "\#@@1\n"
diff --git a/test/prism/snapshots/whitequark/ivar.txt b/test/prism/snapshots/whitequark/ivar.txt
new file mode 100644
index 0000000000..9c70e6e959
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ivar.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ InstanceVariableReadNode (location: (1,0)-(1,4))
+ └── name: :@foo
diff --git a/test/prism/snapshots/whitequark/ivasgn.txt b/test/prism/snapshots/whitequark/ivasgn.txt
new file mode 100644
index 0000000000..3be3907f62
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ivasgn.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ InstanceVariableWriteNode (location: (1,0)-(1,9))
+ ├── name: :@var
+ ├── name_loc: (1,0)-(1,4) = "@var"
+ ├── value:
+ │ @ IntegerNode (location: (1,7)-(1,9))
+ │ └── flags: decimal
+ └── operator_loc: (1,5)-(1,6) = "="
diff --git a/test/prism/snapshots/whitequark/keyword_argument_omission.txt b/test/prism/snapshots/whitequark/keyword_argument_omission.txt
new file mode 100644
index 0000000000..b9774ebbec
--- /dev/null
+++ b/test/prism/snapshots/whitequark/keyword_argument_omission.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: (1,3)-(1,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,10))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,4)-(1,10))
+ │ └── elements: (length: 2)
+ │ ├── @ AssocNode (location: (1,4)-(1,6))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,4)-(1,6))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,4)-(1,5) = "a"
+ │ │ │ ├── closing_loc: (1,5)-(1,6) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ ImplicitNode (location: (1,4)-(1,6))
+ │ │ │ └── value:
+ │ │ │ @ CallNode (location: (1,4)-(1,6))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "a"
+ │ │ └── operator_loc: ∅
+ │ └── @ AssocNode (location: (1,8)-(1,10))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,8)-(1,10))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,8)-(1,9) = "b"
+ │ │ ├── closing_loc: (1,9)-(1,10) = ":"
+ │ │ └── unescaped: "b"
+ │ ├── value:
+ │ │ @ ImplicitNode (location: (1,8)-(1,10))
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,8)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,8)-(1,9) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ └── operator_loc: ∅
+ ├── closing_loc: (1,10)-(1,11) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "foo"
diff --git a/test/prism/snapshots/whitequark/kwarg.txt b/test/prism/snapshots/whitequark/kwarg.txt
new file mode 100644
index 0000000000..72ac3865b7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwarg.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,16))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,10))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (1,6)-(1,10) = "foo:"
+ │ │ └── value: ∅
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:foo]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,10)-(1,11) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,13)-(1,16) = "end"
diff --git a/test/prism/snapshots/whitequark/kwbegin_compstmt.txt b/test/prism/snapshots/whitequark/kwbegin_compstmt.txt
new file mode 100644
index 0000000000..0d1f9e6afa
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwbegin_compstmt.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,20))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,20))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,6)-(1,16))
+ │ └── body: (length: 2)
+ │ ├── @ CallNode (location: (1,6)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,10) = "foo!"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "foo!"
+ │ └── @ CallNode (location: (1,12)-(1,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,12)-(1,16) = "bar!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar!"
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,17)-(1,20) = "end"
diff --git a/test/prism/snapshots/whitequark/kwnilarg.txt b/test/prism/snapshots/whitequark/kwnilarg.txt
new file mode 100644
index 0000000000..42c0815710
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwnilarg.txt
@@ -0,0 +1,84 @@
+@ ProgramNode (location: (1,0)-(5,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,13))
+ └── body: (length: 3)
+ ├── @ LambdaNode (location: (1,0)-(1,12))
+ │ ├── locals: []
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,10)-(1,11) = "{"
+ │ ├── closing_loc: (1,11)-(1,12) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,2)-(1,9))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,3)-(1,8))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ NoKeywordsParameterNode (location: (1,3)-(1,8))
+ │ │ │ │ ├── operator_loc: (1,3)-(1,5) = "**"
+ │ │ │ │ └── keyword_loc: (1,5)-(1,8) = "nil"
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ │ └── closing_loc: (1,8)-(1,9) = ")"
+ │ └── body: ∅
+ ├── @ DefNode (location: (3,0)-(3,17))
+ │ ├── name: :f
+ │ ├── name_loc: (3,4)-(3,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (3,6)-(3,11))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest:
+ │ │ │ @ NoKeywordsParameterNode (location: (3,6)-(3,11))
+ │ │ │ ├── operator_loc: (3,6)-(3,8) = "**"
+ │ │ │ └── keyword_loc: (3,8)-(3,11) = "nil"
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: (3,5)-(3,6) = "("
+ │ ├── rparen_loc: (3,11)-(3,12) = ")"
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,14)-(3,17) = "end"
+ └── @ CallNode (location: (5,0)-(5,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (5,2)-(5,13))
+ │ ├── locals: []
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (5,4)-(5,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (5,5)-(5,10))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest:
+ │ │ │ │ @ NoKeywordsParameterNode (location: (5,5)-(5,10))
+ │ │ │ │ ├── operator_loc: (5,5)-(5,7) = "**"
+ │ │ │ │ └── keyword_loc: (5,7)-(5,10) = "nil"
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (5,4)-(5,5) = "|"
+ │ │ └── closing_loc: (5,10)-(5,11) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (5,2)-(5,3) = "{"
+ │ └── closing_loc: (5,12)-(5,13) = "}"
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/kwoptarg.txt b/test/prism/snapshots/whitequark/kwoptarg.txt
new file mode 100644
index 0000000000..2a3d2e8921
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwoptarg.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,18))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,12))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,12))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (1,6)-(1,10) = "foo:"
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ └── flags: decimal
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:foo]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,12)-(1,13) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,15)-(1,18) = "end"
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
new file mode 100644
index 0000000000..64ac6a7cf3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt
@@ -0,0 +1,54 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,28))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,16))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 1)
+ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,12))
+ │ │ ├── name: :a
+ │ │ ├── name_loc: (1,6)-(1,8) = "a:"
+ │ │ └── value:
+ │ │ @ NilNode (location: (1,9)-(1,12))
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,14)-(1,16))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,14)-(1,16) = "**"
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,19)-(1,24))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,19)-(1,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,19)-(1,20) = "b"
+ │ ├── opening_loc: (1,20)-(1,21) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,21)-(1,23))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,21)-(1,23))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocSplatNode (location: (1,21)-(1,23))
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: (1,21)-(1,23) = "**"
+ │ ├── closing_loc: (1,23)-(1,24) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "b"
+ ├── locals: [:a, :**]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,16)-(1,17) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,25)-(1,28) = "end"
diff --git a/test/prism/snapshots/whitequark/kwrestarg_named.txt b/test/prism/snapshots/whitequark/kwrestarg_named.txt
new file mode 100644
index 0000000000..034e260f92
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwrestarg_named.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,17))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,11))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,6)-(1,11))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (1,8)-(1,11) = "foo"
+ │ │ └── operator_loc: (1,6)-(1,8) = "**"
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:foo]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,11)-(1,12) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt b/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt
new file mode 100644
index 0000000000..9c3d0e628f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,14))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,8))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ KeywordRestParameterNode (location: (1,6)-(1,8))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,6)-(1,8) = "**"
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:**]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,8)-(1,9) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,11)-(1,14) = "end"
diff --git a/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt b/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt
new file mode 100644
index 0000000000..3bce83afdf
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lbrace_arg_after_command_args.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,22))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "let"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(1,8))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,5)-(1,7))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,5)-(1,7))
+ │ │ ├── opening_loc: (1,5)-(1,6) = ":"
+ │ │ ├── value_loc: (1,6)-(1,7) = "a"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a"
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,7)-(1,8) = ")"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,9)-(1,22))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,11)-(1,20))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,11)-(1,20))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,11)-(1,12) = "m"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,13)-(1,20))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,13)-(1,15) = "do"
+ │ │ │ └── closing_loc: (1,17)-(1,20) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "m"
+ │ ├── opening_loc: (1,9)-(1,10) = "{"
+ │ └── closing_loc: (1,21)-(1,22) = "}"
+ ├── flags: ∅
+ └── name: "let"
diff --git a/test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt b/test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt
new file mode 100644
index 0000000000..a3442293f2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lparenarg_after_lvar__since_25.txt
@@ -0,0 +1,63 @@
+@ ProgramNode (location: (1,0)-(3,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,15))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(1,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,4)-(1,14))
+ │ │ ├── receiver:
+ │ │ │ @ ParenthesesNode (location: (1,4)-(1,10))
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (1,5)-(1,9))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ FloatNode (location: (1,5)-(1,9))
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ │ └── closing_loc: (1,9)-(1,10) = ")"
+ │ │ ├── call_operator_loc: (1,10)-(1,11) = "."
+ │ │ ├── message_loc: (1,11)-(1,14) = "abs"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "abs"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "foo"
+ └── @ CallNode (location: (3,0)-(3,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,4) = "meth"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,5)-(3,15))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (3,5)-(3,15))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (3,5)-(3,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,6)-(3,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ FloatNode (location: (3,6)-(3,10))
+ │ │ ├── opening_loc: (3,5)-(3,6) = "("
+ │ │ └── closing_loc: (3,10)-(3,11) = ")"
+ │ ├── call_operator_loc: (3,11)-(3,12) = "."
+ │ ├── message_loc: (3,12)-(3,15) = "abs"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "abs"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "meth"
diff --git a/test/prism/snapshots/whitequark/lvar.txt b/test/prism/snapshots/whitequark/lvar.txt
new file mode 100644
index 0000000000..1585d64cd9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lvar.txt
@@ -0,0 +1,15 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,3))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "foo"
diff --git a/test/prism/snapshots/whitequark/lvar_injecting_match.txt b/test/prism/snapshots/whitequark/lvar_injecting_match.txt
new file mode 100644
index 0000000000..b457f19086
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lvar_injecting_match.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,31))
+├── locals: [:match]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,31))
+ └── body: (length: 2)
+ ├── @ MatchWriteNode (location: (1,0)-(1,24))
+ │ ├── call:
+ │ │ @ CallNode (location: (1,0)-(1,24))
+ │ │ ├── receiver:
+ │ │ │ @ RegularExpressionNode (location: (1,0)-(1,15))
+ │ │ │ ├── opening_loc: (1,0)-(1,1) = "/"
+ │ │ │ ├── content_loc: (1,1)-(1,14) = "(?<match>bar)"
+ │ │ │ ├── closing_loc: (1,14)-(1,15) = "/"
+ │ │ │ ├── unescaped: "(?<match>bar)"
+ │ │ │ └── flags: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,16)-(1,18) = "=~"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,19)-(1,24))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ StringNode (location: (1,19)-(1,24))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,19)-(1,20) = "'"
+ │ │ │ ├── content_loc: (1,20)-(1,23) = "bar"
+ │ │ │ ├── closing_loc: (1,23)-(1,24) = "'"
+ │ │ │ └── unescaped: "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "=~"
+ │ └── locals: [:match]
+ └── @ LocalVariableReadNode (location: (1,26)-(1,31))
+ ├── name: :match
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/lvasgn.txt b/test/prism/snapshots/whitequark/lvasgn.txt
new file mode 100644
index 0000000000..dfa7183840
--- /dev/null
+++ b/test/prism/snapshots/whitequark/lvasgn.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: [:var]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 2)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,8))
+ │ ├── name: :var
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,3) = "var"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,6)-(1,8))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,4)-(1,5) = "="
+ └── @ LocalVariableReadNode (location: (1,10)-(1,13))
+ ├── name: :var
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/masgn.txt b/test/prism/snapshots/whitequark/masgn.txt
new file mode 100644
index 0000000000..e62f8e4ca7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn.txt
@@ -0,0 +1,68 @@
+@ ProgramNode (location: (1,0)-(5,20))
+├── locals: [:foo, :bar, :baz]
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,20))
+ └── body: (length: 3)
+ ├── @ MultiWriteNode (location: (1,0)-(1,17))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (1,1)-(1,4))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (1,6)-(1,9))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (1,0)-(1,1) = "("
+ │ ├── rparen_loc: (1,9)-(1,10) = ")"
+ │ ├── operator_loc: (1,11)-(1,12) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (1,13)-(1,17))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (1,13)-(1,14))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (1,16)-(1,17))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (3,0)-(3,15))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (3,0)-(3,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (3,5)-(3,8))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (3,9)-(3,10) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (3,11)-(3,15))
+ │ ├── elements: (length: 2)
+ │ │ ├── @ IntegerNode (location: (3,11)-(3,12))
+ │ │ │ └── flags: decimal
+ │ │ └── @ IntegerNode (location: (3,14)-(3,15))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── @ MultiWriteNode (location: (5,0)-(5,20))
+ ├── targets: (length: 3)
+ │ ├── @ LocalVariableTargetNode (location: (5,0)-(5,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── @ LocalVariableTargetNode (location: (5,5)-(5,8))
+ │ │ ├── name: :bar
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (5,10)-(5,13))
+ │ ├── name: :baz
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (5,14)-(5,15) = "="
+ └── value:
+ @ ArrayNode (location: (5,16)-(5,20))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (5,16)-(5,17))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (5,19)-(5,20))
+ │ └── flags: decimal
+ ├── opening_loc: ∅
+ └── closing_loc: ∅
diff --git a/test/prism/snapshots/whitequark/masgn_attr.txt b/test/prism/snapshots/whitequark/masgn_attr.txt
new file mode 100644
index 0000000000..c4464f01d4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_attr.txt
@@ -0,0 +1,88 @@
+@ ProgramNode (location: (1,0)-(5,18))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,18))
+ └── body: (length: 3)
+ ├── @ MultiWriteNode (location: (1,0)-(1,17))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ CallNode (location: (1,0)-(1,6))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ SelfNode (location: (1,0)-(1,4))
+ │ │ │ ├── call_operator_loc: (1,4)-(1,5) = "."
+ │ │ │ ├── message_loc: (1,5)-(1,6) = "A"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "A="
+ │ │ └── @ LocalVariableTargetNode (location: (1,8)-(1,11))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (1,12)-(1,13) = "="
+ │ └── value:
+ │ @ LocalVariableReadNode (location: (1,14)-(1,17))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── @ MultiWriteNode (location: (3,0)-(3,24))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ CallNode (location: (3,0)-(3,6))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ SelfNode (location: (3,0)-(3,4))
+ │ │ │ ├── call_operator_loc: (3,4)-(3,5) = "."
+ │ │ │ ├── message_loc: (3,5)-(3,6) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "a="
+ │ │ └── @ CallNode (location: (3,8)-(3,18))
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (3,8)-(3,12))
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,12)-(3,18) = "[1, 2]"
+ │ │ ├── opening_loc: (3,12)-(3,13) = "["
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,13)-(3,17))
+ │ │ │ └── arguments: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (3,13)-(3,14))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (3,16)-(3,17))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: (3,17)-(3,18) = "]"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "[]="
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (3,19)-(3,20) = "="
+ │ └── value:
+ │ @ LocalVariableReadNode (location: (3,21)-(3,24))
+ │ ├── name: :foo
+ │ └── depth: 0
+ └── @ MultiWriteNode (location: (5,0)-(5,18))
+ ├── targets: (length: 2)
+ │ ├── @ CallNode (location: (5,0)-(5,7))
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (5,0)-(5,4))
+ │ │ ├── call_operator_loc: (5,4)-(5,6) = "::"
+ │ │ ├── message_loc: (5,6)-(5,7) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "a="
+ │ └── @ LocalVariableTargetNode (location: (5,9)-(5,12))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (5,13)-(5,14) = "="
+ └── value:
+ @ LocalVariableReadNode (location: (5,15)-(5,18))
+ ├── name: :foo
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/masgn_cmd.txt b/test/prism/snapshots/whitequark/masgn_cmd.txt
new file mode 100644
index 0000000000..e2bfcffa0b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_cmd.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: [:foo, :bar]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,16))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,8))
+ │ ├── name: :bar
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ CallNode (location: (1,11)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,11)-(1,12) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,13)-(1,16))
+ │ └── arguments: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (1,13)-(1,16))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/masgn_const.txt b/test/prism/snapshots/whitequark/masgn_const.txt
new file mode 100644
index 0000000000..3cd8f13a78
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_const.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(3,18))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,18))
+ └── body: (length: 2)
+ ├── @ MultiWriteNode (location: (1,0)-(1,14))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ ConstantPathTargetNode (location: (1,0)-(1,3))
+ │ │ │ ├── parent: ∅
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (1,2)-(1,3))
+ │ │ │ │ └── name: :A
+ │ │ │ └── delimiter_loc: (1,0)-(1,2) = "::"
+ │ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,8))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (1,9)-(1,10) = "="
+ │ └── value:
+ │ @ LocalVariableReadNode (location: (1,11)-(1,14))
+ │ ├── name: :foo
+ │ └── depth: 0
+ └── @ MultiWriteNode (location: (3,0)-(3,18))
+ ├── targets: (length: 2)
+ │ ├── @ ConstantPathTargetNode (location: (3,0)-(3,7))
+ │ │ ├── parent:
+ │ │ │ @ SelfNode (location: (3,0)-(3,4))
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (3,6)-(3,7))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (3,4)-(3,6) = "::"
+ │ └── @ LocalVariableTargetNode (location: (3,9)-(3,12))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (3,13)-(3,14) = "="
+ └── value:
+ @ LocalVariableReadNode (location: (3,15)-(3,18))
+ ├── name: :foo
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/masgn_nested.txt b/test/prism/snapshots/whitequark/masgn_nested.txt
new file mode 100644
index 0000000000..9fac89a301
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_nested.txt
@@ -0,0 +1,60 @@
+@ ProgramNode (location: (1,0)-(3,15))
+├── locals: [:b, :a, :c]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,15))
+ └── body: (length: 2)
+ ├── @ MultiWriteNode (location: (1,0)-(1,13))
+ │ ├── targets: (length: 1)
+ │ │ └── @ MultiTargetNode (location: (1,1)-(1,6))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,2)-(1,3))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ SplatNode (location: (1,3)-(1,4))
+ │ │ │ ├── operator_loc: (1,3)-(1,4) = ","
+ │ │ │ └── expression: ∅
+ │ │ ├── lparen_loc: (1,1)-(1,2) = "("
+ │ │ └── rparen_loc: (1,5)-(1,6) = ")"
+ │ ├── lparen_loc: (1,0)-(1,1) = "("
+ │ ├── rparen_loc: (1,6)-(1,7) = ")"
+ │ ├── operator_loc: (1,8)-(1,9) = "="
+ │ └── value:
+ │ @ CallNode (location: (1,10)-(1,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,10)-(1,13) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ └── @ MultiWriteNode (location: (3,0)-(3,15))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (3,0)-(3,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ MultiTargetNode (location: (3,3)-(3,9))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (3,4)-(3,5))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (3,7)-(3,8))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ ├── lparen_loc: (3,3)-(3,4) = "("
+ │ └── rparen_loc: (3,8)-(3,9) = ")"
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (3,10)-(3,11) = "="
+ └── value:
+ @ CallNode (location: (3,12)-(3,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,12)-(3,15) = "foo"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "foo"
diff --git a/test/prism/snapshots/whitequark/masgn_splat.txt b/test/prism/snapshots/whitequark/masgn_splat.txt
new file mode 100644
index 0000000000..f4148d5102
--- /dev/null
+++ b/test/prism/snapshots/whitequark/masgn_splat.txt
@@ -0,0 +1,270 @@
+@ ProgramNode (location: (1,0)-(19,16))
+├── locals: [:c, :d, :b, :a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(19,16))
+ └── body: (length: 10)
+ ├── @ MultiWriteNode (location: (1,0)-(1,7))
+ │ ├── targets: (length: 1)
+ │ │ └── @ SplatNode (location: (1,0)-(1,1))
+ │ │ ├── operator_loc: (1,0)-(1,1) = "*"
+ │ │ └── expression: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (1,2)-(1,3) = "="
+ │ └── value:
+ │ @ CallNode (location: (1,4)-(1,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,7) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ MultiWriteNode (location: (3,0)-(3,13))
+ │ ├── targets: (length: 3)
+ │ │ ├── @ MultiTargetNode (location: (3,0)-(3,1))
+ │ │ │ ├── targets: (length: 1)
+ │ │ │ │ └── @ SplatNode (location: (3,0)-(3,1))
+ │ │ │ │ ├── operator_loc: (3,0)-(3,1) = "*"
+ │ │ │ │ └── expression: ∅
+ │ │ │ ├── lparen_loc: ∅
+ │ │ │ └── rparen_loc: ∅
+ │ │ ├── @ LocalVariableTargetNode (location: (3,3)-(3,4))
+ │ │ │ ├── name: :c
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (3,6)-(3,7))
+ │ │ ├── name: :d
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (3,8)-(3,9) = "="
+ │ └── value:
+ │ @ CallNode (location: (3,10)-(3,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,10)-(3,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ MultiWriteNode (location: (5,0)-(5,8))
+ │ ├── targets: (length: 1)
+ │ │ └── @ SplatNode (location: (5,0)-(5,2))
+ │ │ ├── operator_loc: (5,0)-(5,1) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (5,1)-(5,2))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (5,3)-(5,4) = "="
+ │ └── value:
+ │ @ CallNode (location: (5,5)-(5,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,5)-(5,8) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ MultiWriteNode (location: (7,0)-(7,11))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ MultiTargetNode (location: (7,0)-(7,2))
+ │ │ │ ├── targets: (length: 1)
+ │ │ │ │ └── @ SplatNode (location: (7,0)-(7,2))
+ │ │ │ │ ├── operator_loc: (7,0)-(7,1) = "*"
+ │ │ │ │ └── expression:
+ │ │ │ │ @ LocalVariableTargetNode (location: (7,1)-(7,2))
+ │ │ │ │ ├── name: :b
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── lparen_loc: ∅
+ │ │ │ └── rparen_loc: ∅
+ │ │ └── @ LocalVariableTargetNode (location: (7,4)-(7,5))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (7,6)-(7,7) = "="
+ │ └── value:
+ │ @ CallNode (location: (7,8)-(7,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,8)-(7,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ MultiWriteNode (location: (9,0)-(9,18))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ InstanceVariableTargetNode (location: (9,0)-(9,4))
+ │ │ │ └── name: :@foo
+ │ │ └── @ ClassVariableTargetNode (location: (9,6)-(9,11))
+ │ │ └── name: :@@bar
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (9,12)-(9,13) = "="
+ │ └── value:
+ │ @ ArrayNode (location: (9,14)-(9,18))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SplatNode (location: (9,14)-(9,18))
+ │ │ ├── operator_loc: (9,14)-(9,15) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (9,15)-(9,18))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,15)-(9,18) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ ├── @ MultiWriteNode (location: (11,0)-(11,10))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (11,0)-(11,1))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (11,3)-(11,4))
+ │ │ ├── operator_loc: (11,3)-(11,4) = "*"
+ │ │ └── expression: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (11,5)-(11,6) = "="
+ │ └── value:
+ │ @ CallNode (location: (11,7)-(11,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,7)-(11,10) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ MultiWriteNode (location: (13,0)-(13,13))
+ │ ├── targets: (length: 3)
+ │ │ ├── @ LocalVariableTargetNode (location: (13,0)-(13,1))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── @ SplatNode (location: (13,3)-(13,4))
+ │ │ │ ├── operator_loc: (13,3)-(13,4) = "*"
+ │ │ │ └── expression: ∅
+ │ │ └── @ LocalVariableTargetNode (location: (13,6)-(13,7))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (13,8)-(13,9) = "="
+ │ └── value:
+ │ @ CallNode (location: (13,10)-(13,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,10)-(13,13) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ MultiWriteNode (location: (15,0)-(15,11))
+ │ ├── targets: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (15,0)-(15,1))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ SplatNode (location: (15,3)-(15,5))
+ │ │ ├── operator_loc: (15,3)-(15,4) = "*"
+ │ │ └── expression:
+ │ │ @ LocalVariableTargetNode (location: (15,4)-(15,5))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (15,6)-(15,7) = "="
+ │ └── value:
+ │ @ CallNode (location: (15,8)-(15,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,8)-(15,11) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── @ MultiWriteNode (location: (17,0)-(17,14))
+ │ ├── targets: (length: 3)
+ │ │ ├── @ LocalVariableTargetNode (location: (17,0)-(17,1))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── @ SplatNode (location: (17,3)-(17,5))
+ │ │ │ ├── operator_loc: (17,3)-(17,4) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (17,4)-(17,5))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (17,7)-(17,8))
+ │ │ ├── name: :c
+ │ │ └── depth: 0
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── operator_loc: (17,9)-(17,10) = "="
+ │ └── value:
+ │ @ CallNode (location: (17,11)-(17,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,11)-(17,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ └── @ MultiWriteNode (location: (19,0)-(19,16))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (19,0)-(19,1))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (19,3)-(19,4))
+ │ ├── name: :b
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (19,5)-(19,6) = "="
+ └── value:
+ @ ArrayNode (location: (19,7)-(19,16))
+ ├── elements: (length: 2)
+ │ ├── @ SplatNode (location: (19,7)-(19,11))
+ │ │ ├── operator_loc: (19,7)-(19,8) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (19,8)-(19,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,8)-(19,11) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── @ CallNode (location: (19,13)-(19,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,13)-(19,16) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── opening_loc: ∅
+ └── closing_loc: ∅
diff --git a/test/prism/snapshots/whitequark/method_definition_in_while_cond.txt b/test/prism/snapshots/whitequark/method_definition_in_while_cond.txt
new file mode 100644
index 0000000000..2ecf554690
--- /dev/null
+++ b/test/prism/snapshots/whitequark/method_definition_in_while_cond.txt
@@ -0,0 +1,197 @@
+@ ProgramNode (location: (1,0)-(7,47))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,47))
+ └── body: (length: 4)
+ ├── @ WhileNode (location: (1,0)-(1,45))
+ │ ├── keyword_loc: (1,0)-(1,5) = "while"
+ │ ├── closing_loc: (1,42)-(1,45) = "end"
+ │ ├── predicate:
+ │ │ @ DefNode (location: (1,6)-(1,33))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (1,10)-(1,13) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,14)-(1,28))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (1,14)-(1,28))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,14)-(1,15) = "a"
+ │ │ │ │ ├── operator_loc: (1,16)-(1,17) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (1,18)-(1,28))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,18)-(1,21) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (1,22)-(1,28))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (1,22)-(1,24) = "do"
+ │ │ │ │ │ └── closing_loc: (1,25)-(1,28) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "tap"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── body: ∅
+ │ │ ├── locals: [:a]
+ │ │ ├── def_keyword_loc: (1,6)-(1,9) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (1,30)-(1,33) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,35)-(1,40))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (1,35)-(1,40))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (1,35)-(1,40) = "break"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (3,0)-(3,42))
+ │ ├── keyword_loc: (3,0)-(3,5) = "while"
+ │ ├── closing_loc: (3,39)-(3,42) = "end"
+ │ ├── predicate:
+ │ │ @ DefNode (location: (3,6)-(3,30))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (3,10)-(3,13) = "foo"
+ │ │ ├── receiver: ∅
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,15)-(3,25))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,15)-(3,25))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,15)-(3,18) = "tap"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (3,19)-(3,25))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (3,19)-(3,21) = "do"
+ │ │ │ │ └── closing_loc: (3,22)-(3,25) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "tap"
+ │ │ ├── locals: []
+ │ │ ├── def_keyword_loc: (3,6)-(3,9) = "def"
+ │ │ ├── operator_loc: ∅
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (3,27)-(3,30) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,32)-(3,37))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (3,32)-(3,37))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (3,32)-(3,37) = "break"
+ │ └── flags: ∅
+ ├── @ WhileNode (location: (5,0)-(5,50))
+ │ ├── keyword_loc: (5,0)-(5,5) = "while"
+ │ ├── closing_loc: (5,47)-(5,50) = "end"
+ │ ├── predicate:
+ │ │ @ DefNode (location: (5,6)-(5,38))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (5,15)-(5,18) = "foo"
+ │ │ ├── receiver:
+ │ │ │ @ SelfNode (location: (5,10)-(5,14))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (5,19)-(5,33))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ └── @ OptionalParameterNode (location: (5,19)-(5,33))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (5,19)-(5,20) = "a"
+ │ │ │ │ ├── operator_loc: (5,21)-(5,22) = "="
+ │ │ │ │ └── value:
+ │ │ │ │ @ CallNode (location: (5,23)-(5,33))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (5,23)-(5,26) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (5,27)-(5,33))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (5,27)-(5,29) = "do"
+ │ │ │ │ │ └── closing_loc: (5,30)-(5,33) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "tap"
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── body: ∅
+ │ │ ├── locals: [:a]
+ │ │ ├── def_keyword_loc: (5,6)-(5,9) = "def"
+ │ │ ├── operator_loc: (5,14)-(5,15) = "."
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── equal_loc: ∅
+ │ │ └── end_keyword_loc: (5,35)-(5,38) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,40)-(5,45))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (5,40)-(5,45))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (5,40)-(5,45) = "break"
+ │ └── flags: ∅
+ └── @ WhileNode (location: (7,0)-(7,47))
+ ├── keyword_loc: (7,0)-(7,5) = "while"
+ ├── closing_loc: (7,44)-(7,47) = "end"
+ ├── predicate:
+ │ @ DefNode (location: (7,6)-(7,35))
+ │ ├── name: :foo
+ │ ├── name_loc: (7,15)-(7,18) = "foo"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (7,10)-(7,14))
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,20)-(7,30))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,20)-(7,30))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,20)-(7,23) = "tap"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (7,24)-(7,30))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (7,24)-(7,26) = "do"
+ │ │ │ └── closing_loc: (7,27)-(7,30) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "tap"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,6)-(7,9) = "def"
+ │ ├── operator_loc: (7,14)-(7,15) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (7,32)-(7,35) = "end"
+ ├── statements:
+ │ @ StatementsNode (location: (7,37)-(7,42))
+ │ └── body: (length: 1)
+ │ └── @ BreakNode (location: (7,37)-(7,42))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (7,37)-(7,42) = "break"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/module.txt b/test/prism/snapshots/whitequark/module.txt
new file mode 100644
index 0000000000..87348c4ec9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/module.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ ModuleNode (location: (1,0)-(1,15))
+ ├── locals: []
+ ├── module_keyword_loc: (1,0)-(1,6) = "module"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (1,7)-(1,10))
+ │ └── name: :Foo
+ ├── body: ∅
+ ├── end_keyword_loc: (1,12)-(1,15) = "end"
+ └── name: :Foo
diff --git a/test/prism/snapshots/whitequark/multiple_pattern_matches.txt b/test/prism/snapshots/whitequark/multiple_pattern_matches.txt
new file mode 100644
index 0000000000..ee1cbd3838
--- /dev/null
+++ b/test/prism/snapshots/whitequark/multiple_pattern_matches.txt
@@ -0,0 +1,141 @@
+@ ProgramNode (location: (1,0)-(5,12))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,12))
+ └── body: (length: 4)
+ ├── @ MatchRequiredNode (location: (1,0)-(1,12))
+ │ ├── value:
+ │ │ @ HashNode (location: (1,0)-(1,6))
+ │ │ ├── opening_loc: (1,0)-(1,1) = "{"
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (1,1)-(1,5))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (1,1)-(1,3))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (1,1)-(1,2) = "a"
+ │ │ │ │ ├── closing_loc: (1,2)-(1,3) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (1,5)-(1,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (1,10)-(1,12))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (1,10)-(1,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (1,10)-(1,12))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (1,10)-(1,11) = "a"
+ │ │ │ │ ├── closing_loc: (1,11)-(1,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (1,7)-(1,9) = "=>"
+ ├── @ MatchRequiredNode (location: (2,0)-(2,12))
+ │ ├── value:
+ │ │ @ HashNode (location: (2,0)-(2,6))
+ │ │ ├── opening_loc: (2,0)-(2,1) = "{"
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,1)-(2,5))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,1)-(2,3))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,1)-(2,2) = "a"
+ │ │ │ │ ├── closing_loc: (2,2)-(2,3) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (2,4)-(2,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (2,5)-(2,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (2,10)-(2,12))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,10)-(2,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,10)-(2,12))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,10)-(2,11) = "a"
+ │ │ │ │ ├── closing_loc: (2,11)-(2,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (2,7)-(2,9) = "=>"
+ ├── @ MatchPredicateNode (location: (4,0)-(4,12))
+ │ ├── value:
+ │ │ @ HashNode (location: (4,0)-(4,6))
+ │ │ ├── opening_loc: (4,0)-(4,1) = "{"
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (4,1)-(4,5))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (4,1)-(4,3))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (4,1)-(4,2) = "a"
+ │ │ │ │ ├── closing_loc: (4,2)-(4,3) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (4,4)-(4,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (4,5)-(4,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (4,10)-(4,12))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (4,10)-(4,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (4,10)-(4,12))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (4,10)-(4,11) = "a"
+ │ │ │ │ ├── closing_loc: (4,11)-(4,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (4,7)-(4,9) = "in"
+ └── @ MatchPredicateNode (location: (5,0)-(5,12))
+ ├── value:
+ │ @ HashNode (location: (5,0)-(5,6))
+ │ ├── opening_loc: (5,0)-(5,1) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (5,1)-(5,5))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,1)-(5,3))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (5,1)-(5,2) = "a"
+ │ │ │ ├── closing_loc: (5,2)-(5,3) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (5,4)-(5,5))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (5,5)-(5,6) = "}"
+ ├── pattern:
+ │ @ HashPatternNode (location: (5,10)-(5,12))
+ │ ├── constant: ∅
+ │ ├── assocs: (length: 1)
+ │ │ └── @ AssocNode (location: (5,10)-(5,12))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (5,10)-(5,12))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (5,10)-(5,11) = "a"
+ │ │ │ ├── closing_loc: (5,11)-(5,12) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value: ∅
+ │ │ └── operator_loc: ∅
+ │ ├── kwrest: ∅
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── operator_loc: (5,7)-(5,9) = "in"
diff --git a/test/prism/snapshots/whitequark/newline_in_hash_argument.txt b/test/prism/snapshots/whitequark/newline_in_hash_argument.txt
new file mode 100644
index 0000000000..6c91492ca8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/newline_in_hash_argument.txt
@@ -0,0 +1,141 @@
+@ ProgramNode (location: (1,0)-(14,1))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(14,1))
+ └── body: (length: 3)
+ ├── @ CaseNode (location: (1,0)-(8,3))
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── conditions: (length: 2)
+ │ │ ├── @ InNode (location: (2,0)-(4,4))
+ │ │ │ ├── pattern:
+ │ │ │ │ @ HashPatternNode (location: (2,3)-(2,5))
+ │ │ │ │ ├── constant: ∅
+ │ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ │ └── @ AssocNode (location: (2,3)-(2,5))
+ │ │ │ │ │ ├── key:
+ │ │ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── value_loc: (2,3)-(2,4) = "a"
+ │ │ │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
+ │ │ │ │ │ │ └── unescaped: "a"
+ │ │ │ │ │ ├── value: ∅
+ │ │ │ │ │ └── operator_loc: ∅
+ │ │ │ │ ├── kwrest: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ └── closing_loc: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,0)-(4,4))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ IntegerNode (location: (3,0)-(3,1))
+ │ │ │ │ │ └── flags: decimal
+ │ │ │ │ └── @ TrueNode (location: (4,0)-(4,4))
+ │ │ │ ├── in_loc: (2,0)-(2,2) = "in"
+ │ │ │ └── then_loc: ∅
+ │ │ └── @ InNode (location: (5,0)-(7,4))
+ │ │ ├── pattern:
+ │ │ │ @ HashPatternNode (location: (5,3)-(5,7))
+ │ │ │ ├── constant: ∅
+ │ │ │ ├── assocs: (length: 1)
+ │ │ │ │ └── @ AssocNode (location: (5,3)-(5,7))
+ │ │ │ │ ├── key:
+ │ │ │ │ │ @ SymbolNode (location: (5,3)-(5,7))
+ │ │ │ │ │ ├── opening_loc: (5,3)-(5,4) = "\""
+ │ │ │ │ │ ├── value_loc: (5,4)-(5,5) = "b"
+ │ │ │ │ │ ├── closing_loc: (5,5)-(5,7) = "\":"
+ │ │ │ │ │ └── unescaped: "b"
+ │ │ │ │ ├── value: ∅
+ │ │ │ │ └── operator_loc: ∅
+ │ │ │ ├── kwrest: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ └── closing_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (6,0)-(7,4))
+ │ │ │ └── body: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (6,0)-(6,1))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ TrueNode (location: (7,0)-(7,4))
+ │ │ ├── in_loc: (5,0)-(5,2) = "in"
+ │ │ └── then_loc: ∅
+ │ ├── consequent: ∅
+ │ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ │ └── end_keyword_loc: (8,0)-(8,3) = "end"
+ ├── @ CallNode (location: (10,0)-(11,1))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (10,0)-(10,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (10,0)-(10,3) = "obj"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "obj"
+ │ ├── call_operator_loc: (10,3)-(10,4) = "."
+ │ ├── message_loc: (10,4)-(10,7) = "set"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (10,8)-(11,1))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (10,8)-(11,1))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (10,8)-(11,1))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (10,8)-(10,14))
+ │ │ │ ├── opening_loc: (10,8)-(10,9) = "\""
+ │ │ │ ├── value_loc: (10,9)-(10,12) = "foo"
+ │ │ │ ├── closing_loc: (10,12)-(10,14) = "\":"
+ │ │ │ └── unescaped: "foo"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (11,0)-(11,1))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "set"
+ └── @ CallNode (location: (13,0)-(14,1))
+ ├── receiver:
+ │ @ CallNode (location: (13,0)-(13,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,3) = "obj"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "obj"
+ ├── call_operator_loc: (13,3)-(13,4) = "."
+ ├── message_loc: (13,4)-(13,7) = "set"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (13,8)-(14,1))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (13,8)-(14,1))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (13,8)-(14,1))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (13,8)-(13,12))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (13,8)-(13,11) = "foo"
+ │ │ ├── closing_loc: (13,11)-(13,12) = ":"
+ │ │ └── unescaped: "foo"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (14,0)-(14,1))
+ │ │ └── flags: decimal
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "set"
diff --git a/test/prism/snapshots/whitequark/next.txt b/test/prism/snapshots/whitequark/next.txt
new file mode 100644
index 0000000000..b7d05ff9aa
--- /dev/null
+++ b/test/prism/snapshots/whitequark/next.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(7,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,9))
+ └── body: (length: 4)
+ ├── @ NextNode (location: (1,0)-(1,4))
+ │ ├── arguments: ∅
+ │ └── keyword_loc: (1,0)-(1,4) = "next"
+ ├── @ NextNode (location: (3,0)-(3,8))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,5)-(3,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,5)-(3,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,5)-(3,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── keyword_loc: (3,0)-(3,4) = "next"
+ ├── @ NextNode (location: (5,0)-(5,6))
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,4)-(5,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (5,4)-(5,6))
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,4)-(5,5) = "("
+ │ │ └── closing_loc: (5,5)-(5,6) = ")"
+ │ └── keyword_loc: (5,0)-(5,4) = "next"
+ └── @ NextNode (location: (7,0)-(7,9))
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,4)-(7,9))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (7,4)-(7,9))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,5)-(7,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,5)-(7,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,5)-(7,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (7,4)-(7,5) = "("
+ │ └── closing_loc: (7,8)-(7,9) = ")"
+ └── keyword_loc: (7,0)-(7,4) = "next"
diff --git a/test/prism/snapshots/whitequark/next_block.txt b/test/prism/snapshots/whitequark/next_block.txt
new file mode 100644
index 0000000000..59cb11ac87
--- /dev/null
+++ b/test/prism/snapshots/whitequark/next_block.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ NextNode (location: (1,0)-(1,19))
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,5)-(1,19))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,5)-(1,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,9)-(1,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,13)-(1,19))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,13)-(1,15) = "do"
+ │ │ └── closing_loc: (1,16)-(1,19) = "end"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── keyword_loc: (1,0)-(1,4) = "next"
diff --git a/test/prism/snapshots/whitequark/nil.txt b/test/prism/snapshots/whitequark/nil.txt
new file mode 100644
index 0000000000..15774c02fd
--- /dev/null
+++ b/test/prism/snapshots/whitequark/nil.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ NilNode (location: (1,0)-(1,3))
diff --git a/test/prism/snapshots/whitequark/nil_expression.txt b/test/prism/snapshots/whitequark/nil_expression.txt
new file mode 100644
index 0000000000..7421115611
--- /dev/null
+++ b/test/prism/snapshots/whitequark/nil_expression.txt
@@ -0,0 +1,16 @@
+@ ProgramNode (location: (1,0)-(3,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,9))
+ └── body: (length: 2)
+ ├── @ ParenthesesNode (location: (1,0)-(1,2))
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "("
+ │ └── closing_loc: (1,1)-(1,2) = ")"
+ └── @ BeginNode (location: (3,0)-(3,9))
+ ├── begin_keyword_loc: (3,0)-(3,5) = "begin"
+ ├── statements: ∅
+ ├── rescue_clause: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (3,6)-(3,9) = "end"
diff --git a/test/prism/snapshots/whitequark/non_lvar_injecting_match.txt b/test/prism/snapshots/whitequark/non_lvar_injecting_match.txt
new file mode 100644
index 0000000000..d31b67c689
--- /dev/null
+++ b/test/prism/snapshots/whitequark/non_lvar_injecting_match.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── receiver:
+ │ @ InterpolatedRegularExpressionNode (location: (1,0)-(1,19))
+ │ ├── opening_loc: (1,0)-(1,1) = "/"
+ │ ├── parts: (length: 2)
+ │ │ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,5))
+ │ │ │ ├── opening_loc: (1,1)-(1,3) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,3)-(1,4))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,3)-(1,4))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── closing_loc: (1,4)-(1,5) = "}"
+ │ │ └── @ StringNode (location: (1,5)-(1,18))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,5)-(1,18) = "(?<match>bar)"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "(?<match>bar)"
+ │ ├── closing_loc: (1,18)-(1,19) = "/"
+ │ └── flags: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,20)-(1,22) = "=~"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,23)-(1,28))
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,23)-(1,28))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,23)-(1,24) = "'"
+ │ ├── content_loc: (1,24)-(1,27) = "bar"
+ │ ├── closing_loc: (1,27)-(1,28) = "'"
+ │ └── unescaped: "bar"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "=~"
diff --git a/test/prism/snapshots/whitequark/not.txt b/test/prism/snapshots/whitequark/not.txt
new file mode 100644
index 0000000000..c7706f13ba
--- /dev/null
+++ b/test/prism/snapshots/whitequark/not.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(5,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,8))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,4)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,4)-(1,7) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "not"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ ├── @ CallNode (location: (3,0)-(3,5))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "not"
+ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (3,4)-(3,5) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!"
+ └── @ CallNode (location: (5,0)-(5,8))
+ ├── receiver:
+ │ @ CallNode (location: (5,4)-(5,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,4)-(5,7) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,3) = "not"
+ ├── opening_loc: (5,3)-(5,4) = "("
+ ├── arguments: ∅
+ ├── closing_loc: (5,7)-(5,8) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/whitequark/not_cmd.txt b/test/prism/snapshots/whitequark/not_cmd.txt
new file mode 100644
index 0000000000..c31c06dc6b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/not_cmd.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver:
+ │ @ CallNode (location: (1,4)-(1,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "not"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/whitequark/not_masgn__24.txt b/test/prism/snapshots/whitequark/not_masgn__24.txt
new file mode 100644
index 0000000000..971d985d11
--- /dev/null
+++ b/test/prism/snapshots/whitequark/not_masgn__24.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver:
+ │ @ ParenthesesNode (location: (1,1)-(1,13))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,2)-(1,12))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MultiWriteNode (location: (1,2)-(1,12))
+ │ │ ├── targets: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,2)-(1,3))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,6))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── lparen_loc: ∅
+ │ │ ├── rparen_loc: ∅
+ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ └── value:
+ │ │ @ CallNode (location: (1,9)-(1,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (1,1)-(1,2) = "("
+ │ └── closing_loc: (1,12)-(1,13) = ")"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "!"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "!"
diff --git a/test/prism/snapshots/whitequark/nth_ref.txt b/test/prism/snapshots/whitequark/nth_ref.txt
new file mode 100644
index 0000000000..1d386d518b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/nth_ref.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,3))
+ └── body: (length: 1)
+ └── @ NumberedReferenceReadNode (location: (1,0)-(1,3))
+ └── number: 10
diff --git a/test/prism/snapshots/whitequark/numbered_args_after_27.txt b/test/prism/snapshots/whitequark/numbered_args_after_27.txt
new file mode 100644
index 0000000000..d6dfd5e1b5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/numbered_args_after_27.txt
@@ -0,0 +1,131 @@
+@ ProgramNode (location: (1,0)-(7,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,13))
+ └── body: (length: 4)
+ ├── @ LambdaNode (location: (1,0)-(1,17))
+ │ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,3)-(1,5) = "do"
+ │ ├── closing_loc: (1,14)-(1,17) = "end"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (1,6)-(1,13))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,6)-(1,13))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (1,6)-(1,8))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,9)-(1,10) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,11)-(1,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,11)-(1,13))
+ │ │ ├── name: :_9
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ LambdaNode (location: (3,0)-(3,13))
+ │ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ ├── operator_loc: (3,0)-(3,2) = "->"
+ │ ├── opening_loc: (3,3)-(3,4) = "{"
+ │ ├── closing_loc: (3,12)-(3,13) = "}"
+ │ ├── parameters: ∅
+ │ └── body:
+ │ @ StatementsNode (location: (3,5)-(3,12))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,5)-(3,12))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (3,5)-(3,7))
+ │ │ ├── name: :_1
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,8)-(3,9) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,10)-(3,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (3,10)-(3,12))
+ │ │ ├── name: :_9
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ CallNode (location: (5,0)-(5,16))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,2)-(5,16))
+ │ │ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ │ ├── parameters: ∅
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (5,5)-(5,12))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,5)-(5,12))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ LocalVariableReadNode (location: (5,5)-(5,7))
+ │ │ │ │ ├── name: :_1
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,8)-(5,9) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,10)-(5,12))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (5,10)-(5,12))
+ │ │ │ │ ├── name: :_9
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ ├── opening_loc: (5,2)-(5,4) = "do"
+ │ │ └── closing_loc: (5,13)-(5,16) = "end"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ └── @ CallNode (location: (7,0)-(7,13))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (7,0)-(7,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (7,2)-(7,13))
+ │ ├── locals: [:_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9]
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,4)-(7,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,4)-(7,11))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (7,4)-(7,6))
+ │ │ │ ├── name: :_1
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,7)-(7,8) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,9)-(7,11))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ LocalVariableReadNode (location: (7,9)-(7,11))
+ │ │ │ ├── name: :_9
+ │ │ │ └── depth: 0
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "+"
+ │ ├── opening_loc: (7,2)-(7,3) = "{"
+ │ └── closing_loc: (7,12)-(7,13) = "}"
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/numparam_outside_block.txt b/test/prism/snapshots/whitequark/numparam_outside_block.txt
new file mode 100644
index 0000000000..544d9c2744
--- /dev/null
+++ b/test/prism/snapshots/whitequark/numparam_outside_block.txt
@@ -0,0 +1,114 @@
+@ ProgramNode (location: (1,0)-(9,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(9,17))
+ └── body: (length: 5)
+ ├── @ CallNode (location: (1,0)-(1,2))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,2) = "_1"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "_1"
+ ├── @ SingletonClassNode (location: (3,0)-(3,21))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (3,0)-(3,5) = "class"
+ │ ├── operator_loc: (3,6)-(3,8) = "<<"
+ │ ├── expression:
+ │ │ @ CallNode (location: (3,9)-(3,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,9)-(3,12) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,14)-(3,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,14)-(3,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,14)-(3,16) = "_1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "_1"
+ │ └── end_keyword_loc: (3,18)-(3,21) = "end"
+ ├── @ ClassNode (location: (5,0)-(5,16))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (5,0)-(5,5) = "class"
+ │ ├── constant_path:
+ │ │ @ ConstantReadNode (location: (5,6)-(5,7))
+ │ │ └── name: :A
+ │ ├── inheritance_operator_loc: ∅
+ │ ├── superclass: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,9)-(5,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,9)-(5,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,9)-(5,11) = "_1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "_1"
+ │ ├── end_keyword_loc: (5,13)-(5,16) = "end"
+ │ └── name: :A
+ ├── @ DefNode (location: (7,0)-(7,19))
+ │ ├── name: :m
+ │ ├── name_loc: (7,9)-(7,10) = "m"
+ │ ├── receiver:
+ │ │ @ SelfNode (location: (7,4)-(7,8))
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (7,12)-(7,14))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (7,12)-(7,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,12)-(7,14) = "_1"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "_1"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ │ ├── operator_loc: (7,8)-(7,9) = "."
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (7,16)-(7,19) = "end"
+ └── @ ModuleNode (location: (9,0)-(9,17))
+ ├── locals: []
+ ├── module_keyword_loc: (9,0)-(9,6) = "module"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (9,7)-(9,8))
+ │ └── name: :A
+ ├── body:
+ │ @ StatementsNode (location: (9,10)-(9,12))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (9,10)-(9,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,10)-(9,12) = "_1"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "_1"
+ ├── end_keyword_loc: (9,14)-(9,17) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/whitequark/op_asgn.txt b/test/prism/snapshots/whitequark/op_asgn.txt
new file mode 100644
index 0000000000..4594c1006e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn.txt
@@ -0,0 +1,80 @@
+@ ProgramNode (location: (1,0)-(5,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,11))
+ └── body: (length: 3)
+ ├── @ CallOperatorWriteNode (location: (1,0)-(1,10))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "A"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "A"
+ │ ├── write_name: "A="
+ │ ├── operator: :+
+ │ ├── operator_loc: (1,6)-(1,8) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (1,9)-(1,10))
+ │ └── flags: decimal
+ ├── @ CallOperatorWriteNode (location: (3,0)-(3,10))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ ├── message_loc: (3,4)-(3,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "a"
+ │ ├── write_name: "a="
+ │ ├── operator: :+
+ │ ├── operator_loc: (3,6)-(3,8) = "+="
+ │ └── value:
+ │ @ IntegerNode (location: (3,9)-(3,10))
+ │ └── flags: decimal
+ └── @ CallOperatorWriteNode (location: (5,0)-(5,11))
+ ├── receiver:
+ │ @ CallNode (location: (5,0)-(5,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (5,3)-(5,5) = "::"
+ ├── message_loc: (5,5)-(5,6) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: ∅
+ ├── read_name: "a"
+ ├── write_name: "a="
+ ├── operator: :+
+ ├── operator_loc: (5,7)-(5,9) = "+="
+ └── value:
+ @ IntegerNode (location: (5,10)-(5,11))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/op_asgn_cmd.txt b/test/prism/snapshots/whitequark/op_asgn_cmd.txt
new file mode 100644
index 0000000000..c2af985002
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn_cmd.txt
@@ -0,0 +1,183 @@
+@ ProgramNode (location: (1,0)-(7,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,15))
+ └── body: (length: 4)
+ ├── @ CallOperatorWriteNode (location: (1,0)-(1,14))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "A"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "A"
+ │ ├── write_name: "A="
+ │ ├── operator: :+
+ │ ├── operator_loc: (1,6)-(1,8) = "+="
+ │ └── value:
+ │ @ CallNode (location: (1,9)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,9)-(1,10) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,11)-(1,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ CallOperatorWriteNode (location: (3,0)-(3,14))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ ├── message_loc: (3,4)-(3,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "a"
+ │ ├── write_name: "a="
+ │ ├── operator: :+
+ │ ├── operator_loc: (3,6)-(3,8) = "+="
+ │ └── value:
+ │ @ CallNode (location: (3,9)-(3,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,9)-(3,10) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,11)-(3,14))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,11)-(3,14))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,11)-(3,14) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── @ ConstantPathOperatorWriteNode (location: (5,0)-(5,15))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (5,0)-(5,6))
+ │ │ ├── parent:
+ │ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (5,5)-(5,6))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (5,3)-(5,5) = "::"
+ │ ├── operator_loc: (5,7)-(5,9) = "+="
+ │ ├── value:
+ │ │ @ CallNode (location: (5,10)-(5,15))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,10)-(5,11) = "m"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,12)-(5,15))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,12)-(5,15))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,12)-(5,15) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "m"
+ │ └── operator: :+
+ └── @ CallOperatorWriteNode (location: (7,0)-(7,15))
+ ├── receiver:
+ │ @ CallNode (location: (7,0)-(7,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (7,3)-(7,5) = "::"
+ ├── message_loc: (7,5)-(7,6) = "a"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: ∅
+ ├── read_name: "a"
+ ├── write_name: "a="
+ ├── operator: :+
+ ├── operator_loc: (7,7)-(7,9) = "+="
+ └── value:
+ @ CallNode (location: (7,10)-(7,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (7,10)-(7,11) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,12)-(7,15))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (7,12)-(7,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,12)-(7,15) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/op_asgn_index.txt b/test/prism/snapshots/whitequark/op_asgn_index.txt
new file mode 100644
index 0000000000..f44bd7a4c4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn_index.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,14))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,9) = "[0, 1]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── flags: ∅
+ ├── read_name: "[]"
+ ├── write_name: "[]="
+ ├── operator: :+
+ ├── operator_loc: (1,10)-(1,12) = "+="
+ └── value:
+ @ IntegerNode (location: (1,13)-(1,14))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/op_asgn_index_cmd.txt b/test/prism/snapshots/whitequark/op_asgn_index_cmd.txt
new file mode 100644
index 0000000000..dac4a7970e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/op_asgn_index_cmd.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(1,18))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,18))
+ └── body: (length: 1)
+ └── @ CallOperatorWriteNode (location: (1,0)-(1,18))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,9) = "[0, 1]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── flags: ∅
+ ├── read_name: "[]"
+ ├── write_name: "[]="
+ ├── operator: :+
+ ├── operator_loc: (1,10)-(1,12) = "+="
+ └── value:
+ @ CallNode (location: (1,13)-(1,18))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,13)-(1,14) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,15)-(1,18))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,15)-(1,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,15)-(1,18) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/optarg.txt b/test/prism/snapshots/whitequark/optarg.txt
new file mode 100644
index 0000000000..d0bacfdfee
--- /dev/null
+++ b/test/prism/snapshots/whitequark/optarg.txt
@@ -0,0 +1,68 @@
+@ ProgramNode (location: (1,0)-(3,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,24))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(1,18))
+ │ ├── name: :f
+ │ ├── name_loc: (1,4)-(1,5) = "f"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,6)-(1,13))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,13))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (1,6)-(1,9) = "foo"
+ │ │ │ ├── operator_loc: (1,10)-(1,11) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ └── flags: decimal
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body: ∅
+ │ ├── locals: [:foo]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,15)-(1,18) = "end"
+ └── @ DefNode (location: (3,0)-(3,24))
+ ├── name: :f
+ ├── name_loc: (3,4)-(3,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (3,6)-(3,18))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 2)
+ │ │ ├── @ OptionalParameterNode (location: (3,6)-(3,11))
+ │ │ │ ├── name: :foo
+ │ │ │ ├── name_loc: (3,6)-(3,9) = "foo"
+ │ │ │ ├── operator_loc: (3,9)-(3,10) = "="
+ │ │ │ └── value:
+ │ │ │ @ IntegerNode (location: (3,10)-(3,11))
+ │ │ │ └── flags: decimal
+ │ │ └── @ OptionalParameterNode (location: (3,13)-(3,18))
+ │ │ ├── name: :bar
+ │ │ ├── name_loc: (3,13)-(3,16) = "bar"
+ │ │ ├── operator_loc: (3,16)-(3,17) = "="
+ │ │ └── value:
+ │ │ @ IntegerNode (location: (3,17)-(3,18))
+ │ │ └── flags: decimal
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:foo, :bar]
+ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (3,5)-(3,6) = "("
+ ├── rparen_loc: (3,18)-(3,19) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (3,21)-(3,24) = "end"
diff --git a/test/prism/snapshots/whitequark/or.txt b/test/prism/snapshots/whitequark/or.txt
new file mode 100644
index 0000000000..713ca53ad7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/or.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(3,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,10))
+ └── body: (length: 2)
+ ├── @ OrNode (location: (1,0)-(1,10))
+ │ ├── left:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── right:
+ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── operator_loc: (1,4)-(1,6) = "or"
+ └── @ OrNode (location: (3,0)-(3,10))
+ ├── left:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── right:
+ │ @ CallNode (location: (3,7)-(3,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,7)-(3,10) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ └── operator_loc: (3,4)-(3,6) = "||"
diff --git a/test/prism/snapshots/whitequark/or_asgn.txt b/test/prism/snapshots/whitequark/or_asgn.txt
new file mode 100644
index 0000000000..db0b4a5adc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/or_asgn.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(3,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,15))
+ └── body: (length: 2)
+ ├── @ CallOrWriteNode (location: (1,0)-(1,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "a"
+ │ ├── write_name: "a="
+ │ ├── operator_loc: (1,6)-(1,9) = "||="
+ │ └── value:
+ │ @ IntegerNode (location: (1,10)-(1,11))
+ │ └── flags: decimal
+ └── @ CallOrWriteNode (location: (3,0)-(3,15))
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,3)-(3,9) = "[0, 1]"
+ ├── opening_loc: (3,3)-(3,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,4)-(3,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (3,4)-(3,5))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (3,7)-(3,8))
+ │ └── flags: decimal
+ ├── closing_loc: (3,8)-(3,9) = "]"
+ ├── flags: ∅
+ ├── read_name: "[]"
+ ├── write_name: "[]="
+ ├── operator_loc: (3,10)-(3,13) = "||="
+ └── value:
+ @ IntegerNode (location: (3,14)-(3,15))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/parser_bug_272.txt b/test/prism/snapshots/whitequark/parser_bug_272.txt
new file mode 100644
index 0000000000..e60da94c2a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_272.txt
@@ -0,0 +1,40 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,4))
+ │ └── arguments: (length: 1)
+ │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4))
+ │ └── name: :@b
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,5)-(1,15))
+ │ ├── locals: [:c]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,8)-(1,11))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,9)-(1,10))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10))
+ │ │ │ │ └── name: :c
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,8)-(1,9) = "|"
+ │ │ └── closing_loc: (1,10)-(1,11) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ └── closing_loc: (1,12)-(1,15) = "end"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/whitequark/parser_bug_490.txt b/test/prism/snapshots/whitequark/parser_bug_490.txt
new file mode 100644
index 0000000000..9e4cd2bd15
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_490.txt
@@ -0,0 +1,106 @@
+@ ProgramNode (location: (1,0)-(5,45))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,45))
+ └── body: (length: 3)
+ ├── @ DefNode (location: (1,0)-(1,39))
+ │ ├── name: :m
+ │ ├── name_loc: (1,4)-(1,5) = "m"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,7)-(1,34))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SingletonClassNode (location: (1,7)-(1,34))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (1,7)-(1,12) = "class"
+ │ │ ├── operator_loc: (1,13)-(1,15) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (1,16)-(1,20))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,22)-(1,29))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ ConstantWriteNode (location: (1,22)-(1,29))
+ │ │ │ ├── name: :A
+ │ │ │ ├── name_loc: (1,22)-(1,23) = "A"
+ │ │ │ ├── value:
+ │ │ │ │ @ NilNode (location: (1,26)-(1,29))
+ │ │ │ └── operator_loc: (1,24)-(1,25) = "="
+ │ │ └── end_keyword_loc: (1,31)-(1,34) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (1,36)-(1,39) = "end"
+ ├── @ DefNode (location: (3,0)-(3,44))
+ │ ├── name: :m
+ │ ├── name_loc: (3,4)-(3,5) = "m"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,7)-(3,39))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SingletonClassNode (location: (3,7)-(3,39))
+ │ │ ├── locals: []
+ │ │ ├── class_keyword_loc: (3,7)-(3,12) = "class"
+ │ │ ├── operator_loc: (3,13)-(3,15) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (3,16)-(3,20))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,22)-(3,34))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ ClassNode (location: (3,22)-(3,34))
+ │ │ │ ├── locals: []
+ │ │ │ ├── class_keyword_loc: (3,22)-(3,27) = "class"
+ │ │ │ ├── constant_path:
+ │ │ │ │ @ ConstantReadNode (location: (3,28)-(3,29))
+ │ │ │ │ └── name: :C
+ │ │ │ ├── inheritance_operator_loc: ∅
+ │ │ │ ├── superclass: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── end_keyword_loc: (3,31)-(3,34) = "end"
+ │ │ │ └── name: :C
+ │ │ └── end_keyword_loc: (3,36)-(3,39) = "end"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,41)-(3,44) = "end"
+ └── @ DefNode (location: (5,0)-(5,45))
+ ├── name: :m
+ ├── name_loc: (5,4)-(5,5) = "m"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (5,7)-(5,40))
+ │ └── body: (length: 1)
+ │ └── @ SingletonClassNode (location: (5,7)-(5,40))
+ │ ├── locals: []
+ │ ├── class_keyword_loc: (5,7)-(5,12) = "class"
+ │ ├── operator_loc: (5,13)-(5,15) = "<<"
+ │ ├── expression:
+ │ │ @ SelfNode (location: (5,16)-(5,20))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,22)-(5,35))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ModuleNode (location: (5,22)-(5,35))
+ │ │ ├── locals: []
+ │ │ ├── module_keyword_loc: (5,22)-(5,28) = "module"
+ │ │ ├── constant_path:
+ │ │ │ @ ConstantReadNode (location: (5,29)-(5,30))
+ │ │ │ └── name: :M
+ │ │ ├── body: ∅
+ │ │ ├── end_keyword_loc: (5,32)-(5,35) = "end"
+ │ │ └── name: :M
+ │ └── end_keyword_loc: (5,37)-(5,40) = "end"
+ ├── locals: []
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (5,42)-(5,45) = "end"
diff --git a/test/prism/snapshots/whitequark/parser_bug_507.txt b/test/prism/snapshots/whitequark/parser_bug_507.txt
new file mode 100644
index 0000000000..d2a3d3cba8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_507.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: [:m]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,19))
+ ├── name: :m
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,1) = "m"
+ ├── value:
+ │ @ LambdaNode (location: (1,4)-(1,19))
+ │ ├── locals: [:args]
+ │ ├── operator_loc: (1,4)-(1,6) = "->"
+ │ ├── opening_loc: (1,13)-(1,15) = "do"
+ │ ├── closing_loc: (1,16)-(1,19) = "end"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,7)-(1,12))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,7)-(1,12))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,7)-(1,12))
+ │ │ │ │ ├── name: :args
+ │ │ │ │ ├── name_loc: (1,8)-(1,12) = "args"
+ │ │ │ │ └── operator_loc: (1,7)-(1,8) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── body: ∅
+ └── operator_loc: (1,2)-(1,3) = "="
diff --git a/test/prism/snapshots/whitequark/parser_bug_518.txt b/test/prism/snapshots/whitequark/parser_bug_518.txt
new file mode 100644
index 0000000000..b63fbb8284
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_518.txt
@@ -0,0 +1,18 @@
+@ ProgramNode (location: (1,0)-(2,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,3))
+ └── body: (length: 1)
+ └── @ ClassNode (location: (1,0)-(2,3))
+ ├── locals: []
+ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ ├── constant_path:
+ │ @ ConstantReadNode (location: (1,6)-(1,7))
+ │ └── name: :A
+ ├── inheritance_operator_loc: (1,8)-(1,9) = "<"
+ ├── superclass:
+ │ @ ConstantReadNode (location: (1,10)-(1,11))
+ │ └── name: :B
+ ├── body: ∅
+ ├── end_keyword_loc: (2,0)-(2,3) = "end"
+ └── name: :A
diff --git a/test/prism/snapshots/whitequark/parser_bug_525.txt b/test/prism/snapshots/whitequark/parser_bug_525.txt
new file mode 100644
index 0000000000..9b85fcb785
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_525.txt
@@ -0,0 +1,62 @@
+@ ProgramNode (location: (1,0)-(1,32))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,32))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,32))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,2) = "m1"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,3)-(1,11))
+ │ └── arguments: (length: 1)
+ │ └── @ KeywordHashNode (location: (1,3)-(1,11))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,3)-(1,11))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,3)-(1,5))
+ │ │ ├── opening_loc: (1,3)-(1,4) = ":"
+ │ │ ├── value_loc: (1,4)-(1,5) = "k"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "k"
+ │ ├── value:
+ │ │ @ CallNode (location: (1,9)-(1,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,11) = "m2"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "m2"
+ │ └── operator_loc: (1,6)-(1,8) = "=>"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,12)-(1,32))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,16)-(1,27))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,27))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,16)-(1,18) = "m3"
+ │ │ ├── opening_loc: (1,18)-(1,19) = "("
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: (1,19)-(1,20) = ")"
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,21)-(1,27))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,21)-(1,23) = "do"
+ │ │ │ └── closing_loc: (1,24)-(1,27) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "m3"
+ │ ├── opening_loc: (1,12)-(1,14) = "do"
+ │ └── closing_loc: (1,29)-(1,32) = "end"
+ ├── flags: ∅
+ └── name: "m1"
diff --git a/test/prism/snapshots/whitequark/parser_bug_604.txt b/test/prism/snapshots/whitequark/parser_bug_604.txt
new file mode 100644
index 0000000000..3e03983f6e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_604.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,14))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,2)-(1,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,2)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "a"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,7) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "b"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,8)-(1,14))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,8)-(1,10) = "do"
+ │ └── closing_loc: (1,11)-(1,14) = "end"
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/parser_bug_640.txt b/test/prism/snapshots/whitequark/parser_bug_640.txt
new file mode 100644
index 0000000000..3ddfb52d98
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_640.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,6))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,6))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,6) = "<<~FOO"
+ ├── content_loc: (2,0)-(3,0) = " baz\\\n qux\n"
+ ├── closing_loc: (4,0)-(4,0) = "FOO\n"
+ └── unescaped: "bazqux\n"
diff --git a/test/prism/snapshots/whitequark/parser_bug_645.txt b/test/prism/snapshots/whitequark/parser_bug_645.txt
new file mode 100644
index 0000000000..4eee6234c1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_645.txt
@@ -0,0 +1,34 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,14))
+ ├── locals: [:arg]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,12)-(1,13) = "{"
+ ├── closing_loc: (1,13)-(1,14) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,3)-(1,11))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,4)-(1,10))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 1)
+ │ │ │ └── @ OptionalParameterNode (location: (1,4)-(1,10))
+ │ │ │ ├── name: :arg
+ │ │ │ ├── name_loc: (1,4)-(1,7) = "arg"
+ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ └── value:
+ │ │ │ @ HashNode (location: (1,8)-(1,10))
+ │ │ │ ├── opening_loc: (1,8)-(1,9) = "{"
+ │ │ │ ├── elements: (length: 0)
+ │ │ │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ └── closing_loc: (1,10)-(1,11) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/whitequark/parser_bug_830.txt b/test/prism/snapshots/whitequark/parser_bug_830.txt
new file mode 100644
index 0000000000..f19fffbba0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_bug_830.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RegularExpressionNode (location: (1,0)-(1,4))
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,3) = "\\("
+ ├── closing_loc: (1,3)-(1,4) = "/"
+ ├── unescaped: "("
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt b/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt
new file mode 100644
index 0000000000..8a041058b8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt
@@ -0,0 +1,19 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,7))
+ ├── opening_loc: (1,0)-(1,7) = "<<~HERE"
+ ├── parts: (length: 2)
+ │ ├── @ EmbeddedStatementsNode (location: (2,2)-(2,5))
+ │ │ ├── opening_loc: (2,2)-(2,4) = "\#{"
+ │ │ ├── statements: ∅
+ │ │ └── closing_loc: (2,4)-(2,5) = "}"
+ │ └── @ StringNode (location: (2,5)-(2,0))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (2,5)-(2,0) = "\n"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "\n"
+ └── closing_loc: (3,0)-(3,0) = "HERE\n"
diff --git a/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt b/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt
new file mode 100644
index 0000000000..a527c36f62
--- /dev/null
+++ b/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt
@@ -0,0 +1,127 @@
+@ ProgramNode (location: (1,0)-(62,2))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(62,2))
+ └── body: (length: 19)
+ ├── @ StringNode (location: (1,0)-(2,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── content_loc: (1,1)-(2,1) = "a\\\nb"
+ │ ├── closing_loc: (2,1)-(2,2) = "\""
+ │ └── unescaped: "ab"
+ ├── @ ArrayNode (location: (4,0)-(5,2))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (4,3)-(5,1))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (4,3)-(5,1) = "a\\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "ab"
+ │ ├── opening_loc: (4,0)-(4,3) = "%I{"
+ │ └── closing_loc: (5,1)-(5,2) = "}"
+ ├── @ StringNode (location: (7,0)-(8,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (7,0)-(7,3) = "%Q{"
+ │ ├── content_loc: (7,3)-(8,1) = "a\\\nb"
+ │ ├── closing_loc: (8,1)-(8,2) = "}"
+ │ └── unescaped: "ab"
+ ├── @ ArrayNode (location: (10,0)-(11,2))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (10,3)-(11,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (10,3)-(11,1) = "a\\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "ab"
+ │ ├── opening_loc: (10,0)-(10,3) = "%W{"
+ │ └── closing_loc: (11,1)-(11,2) = "}"
+ ├── @ ArrayNode (location: (13,0)-(14,2))
+ │ ├── elements: (length: 1)
+ │ │ └── @ SymbolNode (location: (13,3)-(14,1))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (13,3)-(14,1) = "a\\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\\\nb"
+ │ ├── opening_loc: (13,0)-(13,3) = "%i{"
+ │ └── closing_loc: (14,1)-(14,2) = "}"
+ ├── @ StringNode (location: (16,0)-(17,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (16,0)-(16,3) = "%q{"
+ │ ├── content_loc: (16,3)-(17,1) = "a\\\nb"
+ │ ├── closing_loc: (17,1)-(17,2) = "}"
+ │ └── unescaped: "a\\\nb"
+ ├── @ RegularExpressionNode (location: (19,0)-(20,2))
+ │ ├── opening_loc: (19,0)-(19,3) = "%r{"
+ │ ├── content_loc: (19,3)-(20,1) = "a\\\nb"
+ │ ├── closing_loc: (20,1)-(20,2) = "}"
+ │ ├── unescaped: "ab"
+ │ └── flags: ∅
+ ├── @ SymbolNode (location: (22,0)-(23,2))
+ │ ├── opening_loc: (22,0)-(22,3) = "%s{"
+ │ ├── value_loc: (22,3)-(23,1) = "a\\\nb"
+ │ ├── closing_loc: (23,1)-(23,2) = "}"
+ │ └── unescaped: "ab"
+ ├── @ ArrayNode (location: (25,0)-(26,2))
+ │ ├── elements: (length: 1)
+ │ │ └── @ StringNode (location: (25,3)-(26,1))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (25,3)-(26,1) = "a\\\nb"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "a\nb"
+ │ ├── opening_loc: (25,0)-(25,3) = "%w{"
+ │ └── closing_loc: (26,1)-(26,2) = "}"
+ ├── @ XStringNode (location: (28,0)-(29,2))
+ │ ├── opening_loc: (28,0)-(28,3) = "%x{"
+ │ ├── content_loc: (28,3)-(29,1) = "a\\\nb"
+ │ ├── closing_loc: (29,1)-(29,2) = "}"
+ │ └── unescaped: "ab"
+ ├── @ StringNode (location: (31,0)-(32,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (31,0)-(31,2) = "%{"
+ │ ├── content_loc: (31,2)-(32,1) = "a\\\nb"
+ │ ├── closing_loc: (32,1)-(32,2) = "}"
+ │ └── unescaped: "ab"
+ ├── @ StringNode (location: (34,0)-(35,2))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (34,0)-(34,1) = "'"
+ │ ├── content_loc: (34,1)-(35,1) = "a\\\nb"
+ │ ├── closing_loc: (35,1)-(35,2) = "'"
+ │ └── unescaped: "a\\\nb"
+ ├── @ RegularExpressionNode (location: (37,0)-(38,2))
+ │ ├── opening_loc: (37,0)-(37,1) = "/"
+ │ ├── content_loc: (37,1)-(38,1) = "a\\\nb"
+ │ ├── closing_loc: (38,1)-(38,2) = "/"
+ │ ├── unescaped: "ab"
+ │ └── flags: ∅
+ ├── @ SymbolNode (location: (40,0)-(41,2))
+ │ ├── opening_loc: (40,0)-(40,2) = ":\""
+ │ ├── value_loc: (40,2)-(41,1) = "a\\\nb"
+ │ ├── closing_loc: (41,1)-(41,2) = "\""
+ │ └── unescaped: "ab"
+ ├── @ SymbolNode (location: (43,0)-(44,2))
+ │ ├── opening_loc: (43,0)-(43,2) = ":'"
+ │ ├── value_loc: (43,2)-(44,1) = "a\\\nb"
+ │ ├── closing_loc: (44,1)-(44,2) = "'"
+ │ └── unescaped: "ab"
+ ├── @ StringNode (location: (46,0)-(46,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (46,0)-(46,9) = "<<-\"HERE\""
+ │ ├── content_loc: (47,0)-(48,0) = "a\\\nb\n"
+ │ ├── closing_loc: (49,0)-(49,0) = "HERE\n"
+ │ └── unescaped: "ab\n"
+ ├── @ StringNode (location: (51,0)-(51,9))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (51,0)-(51,9) = "<<-'HERE'"
+ │ ├── content_loc: (52,0)-(53,0) = "a\\\nb\n"
+ │ ├── closing_loc: (54,0)-(54,0) = "HERE\n"
+ │ └── unescaped: "a\\\nb\n"
+ ├── @ XStringNode (location: (56,0)-(56,9))
+ │ ├── opening_loc: (56,0)-(56,9) = "<<-`HERE`"
+ │ ├── content_loc: (57,0)-(58,0) = "a\\\nb\n"
+ │ ├── closing_loc: (59,0)-(59,0) = "HERE\n"
+ │ └── unescaped: "ab\n"
+ └── @ XStringNode (location: (61,0)-(62,2))
+ ├── opening_loc: (61,0)-(61,1) = "`"
+ ├── content_loc: (61,1)-(62,1) = "a\\\nb"
+ ├── closing_loc: (62,1)-(62,2) = "`"
+ └── unescaped: "ab"
diff --git a/test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt b/test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt
new file mode 100644
index 0000000000..1fc938e1ed
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching__FILE__LINE_literals.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,8)-(3,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,8)-(3,11))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,8)-(3,11))
+ ├── predicate:
+ │ @ ArrayNode (location: (1,13)-(1,51))
+ │ ├── elements: (length: 3)
+ │ │ ├── @ SourceFileNode (location: (1,14)-(1,22))
+ │ │ │ └── filepath: "whitequark/pattern_matching__FILE__LINE_literals.txt"
+ │ │ ├── @ CallNode (location: (1,24)-(1,36))
+ │ │ │ ├── receiver:
+ │ │ │ │ @ SourceLineNode (location: (1,24)-(1,32))
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,33)-(1,34) = "+"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,35)-(1,36))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ IntegerNode (location: (1,35)-(1,36))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "+"
+ │ │ └── @ SourceEncodingNode (location: (1,38)-(1,50))
+ │ ├── opening_loc: (1,13)-(1,14) = "["
+ │ └── closing_loc: (1,50)-(1,51) = "]"
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (2,10)-(2,47))
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (2,13)-(2,47))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 3)
+ │ │ │ ├── @ SourceFileNode (location: (2,14)-(2,22))
+ │ │ │ │ └── filepath: "whitequark/pattern_matching__FILE__LINE_literals.txt"
+ │ │ │ ├── @ SourceLineNode (location: (2,24)-(2,32))
+ │ │ │ └── @ SourceEncodingNode (location: (2,34)-(2,46))
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (2,13)-(2,14) = "["
+ │ │ └── closing_loc: (2,46)-(2,47) = "]"
+ │ ├── statements: ∅
+ │ ├── in_loc: (2,10)-(2,12) = "in"
+ │ └── then_loc: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,8)-(1,12) = "case"
+ └── end_keyword_loc: (3,8)-(3,11) = "end"
diff --git a/test/prism/snapshots/whitequark/pattern_matching_blank_else.txt b/test/prism/snapshots/whitequark/pattern_matching_blank_else.txt
new file mode 100644
index 0000000000..f6b212c8b2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_blank_else.txt
@@ -0,0 +1,28 @@
+@ ProgramNode (location: (1,0)-(1,26))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,26))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,26))
+ ├── predicate:
+ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (1,8)-(1,15))
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,14)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,14)-(1,15))
+ │ │ └── flags: decimal
+ │ ├── in_loc: (1,8)-(1,10) = "in"
+ │ └── then_loc: ∅
+ ├── consequent:
+ │ @ ElseNode (location: (1,17)-(1,26))
+ │ ├── else_keyword_loc: (1,17)-(1,21) = "else"
+ │ ├── statements: ∅
+ │ └── end_keyword_loc: (1,23)-(1,26) = "end"
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,23)-(1,26) = "end"
diff --git a/test/prism/snapshots/whitequark/pattern_matching_else.txt b/test/prism/snapshots/whitequark/pattern_matching_else.txt
new file mode 100644
index 0000000000..358a556947
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_else.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,29))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,29))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,29))
+ ├── predicate:
+ │ @ IntegerNode (location: (1,5)-(1,6))
+ │ └── flags: decimal
+ ├── conditions: (length: 1)
+ │ └── @ InNode (location: (1,8)-(1,15))
+ │ ├── pattern:
+ │ │ @ IntegerNode (location: (1,11)-(1,12))
+ │ │ └── flags: decimal
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,14)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,14)-(1,15))
+ │ │ └── flags: decimal
+ │ ├── in_loc: (1,8)-(1,10) = "in"
+ │ └── then_loc: ∅
+ ├── consequent:
+ │ @ ElseNode (location: (1,17)-(1,29))
+ │ ├── else_keyword_loc: (1,17)-(1,21) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,23)-(1,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,23)-(1,24))
+ │ │ └── flags: decimal
+ │ └── end_keyword_loc: (1,26)-(1,29) = "end"
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,26)-(1,29) = "end"
diff --git a/test/prism/snapshots/whitequark/pattern_matching_single_line.txt b/test/prism/snapshots/whitequark/pattern_matching_single_line.txt
new file mode 100644
index 0000000000..4cda50acb1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_single_line.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(3,11))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,11))
+ └── body: (length: 4)
+ ├── @ MatchRequiredNode (location: (1,0)-(1,8))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ │ └── flags: decimal
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (1,5)-(1,8))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,6)-(1,7))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (1,5)-(1,6) = "["
+ │ │ └── closing_loc: (1,7)-(1,8) = "]"
+ │ └── operator_loc: (1,2)-(1,4) = "=>"
+ ├── @ LocalVariableReadNode (location: (1,10)-(1,11))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ MatchPredicateNode (location: (3,0)-(3,8))
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,0)-(3,1))
+ │ │ └── flags: decimal
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (3,5)-(3,8))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (3,6)-(3,7))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: (3,5)-(3,6) = "["
+ │ │ └── closing_loc: (3,7)-(3,8) = "]"
+ │ └── operator_loc: (3,2)-(3,4) = "in"
+ └── @ LocalVariableReadNode (location: (3,10)-(3,11))
+ ├── name: :a
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt b/test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
new file mode 100644
index 0000000000..faf1c957ea
--- /dev/null
+++ b/test/prism/snapshots/whitequark/pattern_matching_single_line_allowed_omission_of_parentheses.txt
@@ -0,0 +1,221 @@
+@ ProgramNode (location: (1,0)-(11,34))
+├── locals: [:a, :b, :value]
+└── statements:
+ @ StatementsNode (location: (1,0)-(11,34))
+ └── body: (length: 12)
+ ├── @ MatchRequiredNode (location: (1,0)-(1,14))
+ │ ├── value:
+ │ │ @ ArrayNode (location: (1,0)-(1,6))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (1,1)-(1,2))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (1,0)-(1,1) = "["
+ │ │ └── closing_loc: (1,5)-(1,6) = "]"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (1,10)-(1,14))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (1,10)-(1,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (1,13)-(1,14))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (1,7)-(1,9) = "=>"
+ ├── @ LocalVariableReadNode (location: (1,16)-(1,17))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ MatchPredicateNode (location: (3,0)-(3,14))
+ │ ├── value:
+ │ │ @ ArrayNode (location: (3,0)-(3,6))
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ IntegerNode (location: (3,4)-(3,5))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (3,0)-(3,1) = "["
+ │ │ └── closing_loc: (3,5)-(3,6) = "]"
+ │ ├── pattern:
+ │ │ @ ArrayPatternNode (location: (3,10)-(3,14))
+ │ │ ├── constant: ∅
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (3,10)-(3,11))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (3,13)-(3,14))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (3,7)-(3,9) = "in"
+ ├── @ LocalVariableReadNode (location: (3,16)-(3,17))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ MatchRequiredNode (location: (5,0)-(5,12))
+ │ ├── value:
+ │ │ @ HashNode (location: (5,0)-(5,6))
+ │ │ ├── opening_loc: (5,0)-(5,1) = "{"
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (5,1)-(5,5))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (5,1)-(5,3))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (5,1)-(5,2) = "a"
+ │ │ │ │ ├── closing_loc: (5,2)-(5,3) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (5,4)-(5,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (5,5)-(5,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (5,10)-(5,12))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (5,10)-(5,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (5,10)-(5,12))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (5,10)-(5,11) = "a"
+ │ │ │ │ ├── closing_loc: (5,11)-(5,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (5,7)-(5,9) = "=>"
+ ├── @ LocalVariableReadNode (location: (5,14)-(5,15))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ MatchPredicateNode (location: (7,0)-(7,12))
+ │ ├── value:
+ │ │ @ HashNode (location: (7,0)-(7,6))
+ │ │ ├── opening_loc: (7,0)-(7,1) = "{"
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (7,1)-(7,5))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (7,1)-(7,3))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (7,1)-(7,2) = "a"
+ │ │ │ │ ├── closing_loc: (7,2)-(7,3) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (7,4)-(7,5))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (7,5)-(7,6) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (7,10)-(7,12))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (7,10)-(7,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (7,10)-(7,12))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (7,10)-(7,11) = "a"
+ │ │ │ │ ├── closing_loc: (7,11)-(7,12) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (7,7)-(7,9) = "in"
+ ├── @ LocalVariableReadNode (location: (7,14)-(7,15))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── @ MatchRequiredNode (location: (9,0)-(9,27))
+ │ ├── value:
+ │ │ @ HashNode (location: (9,0)-(9,13))
+ │ │ ├── opening_loc: (9,0)-(9,1) = "{"
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (9,1)-(9,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (9,1)-(9,5))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (9,1)-(9,4) = "key"
+ │ │ │ │ ├── closing_loc: (9,4)-(9,5) = ":"
+ │ │ │ │ └── unescaped: "key"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (9,6)-(9,12))
+ │ │ │ │ ├── opening_loc: (9,6)-(9,7) = ":"
+ │ │ │ │ ├── value_loc: (9,7)-(9,12) = "value"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "value"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (9,12)-(9,13) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (9,17)-(9,27))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (9,17)-(9,27))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (9,17)-(9,21))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (9,17)-(9,20) = "key"
+ │ │ │ │ ├── closing_loc: (9,20)-(9,21) = ":"
+ │ │ │ │ └── unescaped: "key"
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (9,22)-(9,27))
+ │ │ │ │ ├── name: :value
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (9,14)-(9,16) = "=>"
+ ├── @ LocalVariableReadNode (location: (9,29)-(9,34))
+ │ ├── name: :value
+ │ └── depth: 0
+ ├── @ MatchPredicateNode (location: (11,0)-(11,27))
+ │ ├── value:
+ │ │ @ HashNode (location: (11,0)-(11,13))
+ │ │ ├── opening_loc: (11,0)-(11,1) = "{"
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (11,1)-(11,12))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (11,1)-(11,5))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (11,1)-(11,4) = "key"
+ │ │ │ │ ├── closing_loc: (11,4)-(11,5) = ":"
+ │ │ │ │ └── unescaped: "key"
+ │ │ │ ├── value:
+ │ │ │ │ @ SymbolNode (location: (11,6)-(11,12))
+ │ │ │ │ ├── opening_loc: (11,6)-(11,7) = ":"
+ │ │ │ │ ├── value_loc: (11,7)-(11,12) = "value"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "value"
+ │ │ │ └── operator_loc: ∅
+ │ │ └── closing_loc: (11,12)-(11,13) = "}"
+ │ ├── pattern:
+ │ │ @ HashPatternNode (location: (11,17)-(11,27))
+ │ │ ├── constant: ∅
+ │ │ ├── assocs: (length: 1)
+ │ │ │ └── @ AssocNode (location: (11,17)-(11,27))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (11,17)-(11,21))
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (11,17)-(11,20) = "key"
+ │ │ │ │ ├── closing_loc: (11,20)-(11,21) = ":"
+ │ │ │ │ └── unescaped: "key"
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (11,22)-(11,27))
+ │ │ │ │ ├── name: :value
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── kwrest: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── operator_loc: (11,14)-(11,16) = "in"
+ └── @ LocalVariableReadNode (location: (11,29)-(11,34))
+ ├── name: :value
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/postexe.txt b/test/prism/snapshots/whitequark/postexe.txt
new file mode 100644
index 0000000000..1c833ffaa4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/postexe.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ PostExecutionNode (location: (1,0)-(1,9))
+ ├── statements:
+ │ @ StatementsNode (location: (1,6)-(1,7))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ └── flags: decimal
+ ├── keyword_loc: (1,0)-(1,3) = "END"
+ ├── opening_loc: (1,4)-(1,5) = "{"
+ └── closing_loc: (1,8)-(1,9) = "}"
diff --git a/test/prism/snapshots/whitequark/preexe.txt b/test/prism/snapshots/whitequark/preexe.txt
new file mode 100644
index 0000000000..955ba6d444
--- /dev/null
+++ b/test/prism/snapshots/whitequark/preexe.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ PreExecutionNode (location: (1,0)-(1,11))
+ ├── statements:
+ │ @ StatementsNode (location: (1,8)-(1,9))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ └── flags: decimal
+ ├── keyword_loc: (1,0)-(1,5) = "BEGIN"
+ ├── opening_loc: (1,6)-(1,7) = "{"
+ └── closing_loc: (1,10)-(1,11) = "}"
diff --git a/test/prism/snapshots/whitequark/procarg0.txt b/test/prism/snapshots/whitequark/procarg0.txt
new file mode 100644
index 0000000000..8518cbf811
--- /dev/null
+++ b/test/prism/snapshots/whitequark/procarg0.txt
@@ -0,0 +1,73 @@
+@ ProgramNode (location: (1,0)-(3,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,11))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,2)-(1,18))
+ │ │ ├── locals: [:foo, :bar]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (1,5)-(1,15))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredDestructuredParameterNode (location: (1,5)-(1,15))
+ │ │ │ │ │ ├── parameters: (length: 2)
+ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,9))
+ │ │ │ │ │ │ │ └── name: :foo
+ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,14))
+ │ │ │ │ │ │ └── name: :bar
+ │ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ │ └── closing_loc: (1,14)-(1,15) = ")"
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = "|"
+ │ │ │ └── closing_loc: (1,15)-(1,16) = "|"
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,2)-(1,3) = "{"
+ │ │ └── closing_loc: (1,17)-(1,18) = "}"
+ │ ├── flags: ∅
+ │ └── name: "m"
+ └── @ CallNode (location: (3,0)-(3,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (3,2)-(3,11))
+ │ ├── locals: [:foo]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (3,4)-(3,9))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (3,5)-(3,8))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (3,5)-(3,8))
+ │ │ │ │ └── name: :foo
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (3,4)-(3,5) = "|"
+ │ │ └── closing_loc: (3,8)-(3,9) = "|"
+ │ ├── body: ∅
+ │ ├── opening_loc: (3,2)-(3,3) = "{"
+ │ └── closing_loc: (3,10)-(3,11) = "}"
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/range_exclusive.txt b/test/prism/snapshots/whitequark/range_exclusive.txt
new file mode 100644
index 0000000000..7e134a3004
--- /dev/null
+++ b/test/prism/snapshots/whitequark/range_exclusive.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,5))
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── right:
+ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ └── flags: decimal
+ ├── operator_loc: (1,1)-(1,4) = "..."
+ └── flags: exclude_end
diff --git a/test/prism/snapshots/whitequark/range_inclusive.txt b/test/prism/snapshots/whitequark/range_inclusive.txt
new file mode 100644
index 0000000000..b6fe045834
--- /dev/null
+++ b/test/prism/snapshots/whitequark/range_inclusive.txt
@@ -0,0 +1,14 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RangeNode (location: (1,0)-(1,4))
+ ├── left:
+ │ @ IntegerNode (location: (1,0)-(1,1))
+ │ └── flags: decimal
+ ├── right:
+ │ @ IntegerNode (location: (1,3)-(1,4))
+ │ └── flags: decimal
+ ├── operator_loc: (1,1)-(1,3) = ".."
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/rational.txt b/test/prism/snapshots/whitequark/rational.txt
new file mode 100644
index 0000000000..260a5d2efc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rational.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(3,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,3))
+ └── body: (length: 2)
+ ├── @ RationalNode (location: (1,0)-(1,5))
+ │ └── numeric:
+ │ @ FloatNode (location: (1,0)-(1,4))
+ └── @ RationalNode (location: (3,0)-(3,3))
+ └── numeric:
+ @ IntegerNode (location: (3,0)-(3,2))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/redo.txt b/test/prism/snapshots/whitequark/redo.txt
new file mode 100644
index 0000000000..48d3da9d52
--- /dev/null
+++ b/test/prism/snapshots/whitequark/redo.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ RedoNode (location: (1,0)-(1,4))
diff --git a/test/prism/snapshots/whitequark/regex_interp.txt b/test/prism/snapshots/whitequark/regex_interp.txt
new file mode 100644
index 0000000000..71d88cae70
--- /dev/null
+++ b/test/prism/snapshots/whitequark/regex_interp.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedRegularExpressionNode (location: (1,0)-(1,14))
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,1)-(1,4) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── @ EmbeddedStatementsNode (location: (1,4)-(1,10))
+ │ │ ├── opening_loc: (1,4)-(1,6) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,6)-(1,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ └── @ StringNode (location: (1,10)-(1,13))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,10)-(1,13) = "baz"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "baz"
+ ├── closing_loc: (1,13)-(1,14) = "/"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/regex_plain.txt b/test/prism/snapshots/whitequark/regex_plain.txt
new file mode 100644
index 0000000000..e4c80c53ea
--- /dev/null
+++ b/test/prism/snapshots/whitequark/regex_plain.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ RegularExpressionNode (location: (1,0)-(1,10))
+ ├── opening_loc: (1,0)-(1,1) = "/"
+ ├── content_loc: (1,1)-(1,7) = "source"
+ ├── closing_loc: (1,7)-(1,10) = "/im"
+ ├── unescaped: "source"
+ └── flags: ignore_case, multi_line
diff --git a/test/prism/snapshots/whitequark/resbody_list.txt b/test/prism/snapshots/whitequark/resbody_list.txt
new file mode 100644
index 0000000000..2611c028cb
--- /dev/null
+++ b/test/prism/snapshots/whitequark/resbody_list.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,39))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,39))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,39))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,34))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (1,20)-(1,29))
+ │ │ └── name: :Exception
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,31)-(1,34))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,31)-(1,34))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,31)-(1,34) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,36)-(1,39) = "end"
diff --git a/test/prism/snapshots/whitequark/resbody_list_mrhs.txt b/test/prism/snapshots/whitequark/resbody_list_mrhs.txt
new file mode 100644
index 0000000000..72758b6c97
--- /dev/null
+++ b/test/prism/snapshots/whitequark/resbody_list_mrhs.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(1,44))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,44))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,44))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,39))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 2)
+ │ │ ├── @ ConstantReadNode (location: (1,20)-(1,29))
+ │ │ │ └── name: :Exception
+ │ │ └── @ CallNode (location: (1,31)-(1,34))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,31)-(1,34) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,36)-(1,39))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,36)-(1,39))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,36)-(1,39) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,41)-(1,44) = "end"
diff --git a/test/prism/snapshots/whitequark/resbody_list_var.txt b/test/prism/snapshots/whitequark/resbody_list_var.txt
new file mode 100644
index 0000000000..27798cd610
--- /dev/null
+++ b/test/prism/snapshots/whitequark/resbody_list_var.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(1,39))
+├── locals: [:ex]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,39))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,39))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,34))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 1)
+ │ │ └── @ CallNode (location: (1,20)-(1,23))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,20)-(1,23) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── operator_loc: (1,24)-(1,26) = "=>"
+ │ ├── reference:
+ │ │ @ LocalVariableTargetNode (location: (1,27)-(1,29))
+ │ │ ├── name: :ex
+ │ │ └── depth: 0
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,31)-(1,34))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,31)-(1,34))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,31)-(1,34) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,36)-(1,39) = "end"
diff --git a/test/prism/snapshots/whitequark/resbody_var.txt b/test/prism/snapshots/whitequark/resbody_var.txt
new file mode 100644
index 0000000000..1428a7e6c3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/resbody_var.txt
@@ -0,0 +1,86 @@
+@ ProgramNode (location: (1,0)-(3,35))
+├── locals: [:ex]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,35))
+ └── body: (length: 2)
+ ├── @ BeginNode (location: (1,0)-(1,36))
+ │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "meth"
+ │ ├── rescue_clause:
+ │ │ @ RescueNode (location: (1,13)-(1,31))
+ │ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ │ ├── exceptions: (length: 0)
+ │ │ ├── operator_loc: (1,20)-(1,22) = "=>"
+ │ │ ├── reference:
+ │ │ │ @ InstanceVariableTargetNode (location: (1,23)-(1,26))
+ │ │ │ └── name: :@ex
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,28)-(1,31))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,28)-(1,31))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,28)-(1,31) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── consequent: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (1,33)-(1,36) = "end"
+ └── @ BeginNode (location: (3,0)-(3,35))
+ ├── begin_keyword_loc: (3,0)-(3,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (3,7)-(3,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,7)-(3,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,7)-(3,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (3,13)-(3,30))
+ │ ├── keyword_loc: (3,13)-(3,19) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: (3,20)-(3,22) = "=>"
+ │ ├── reference:
+ │ │ @ LocalVariableTargetNode (location: (3,23)-(3,25))
+ │ │ ├── name: :ex
+ │ │ └── depth: 0
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,27)-(3,30))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,27)-(3,30))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,27)-(3,30) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (3,32)-(3,35) = "end"
diff --git a/test/prism/snapshots/whitequark/rescue.txt b/test/prism/snapshots/whitequark/rescue.txt
new file mode 100644
index 0000000000..8bf45b892e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,29))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,29))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,29))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,24))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,21)-(1,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,21)-(1,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,26)-(1,29) = "end"
diff --git a/test/prism/snapshots/whitequark/rescue_else.txt b/test/prism/snapshots/whitequark/rescue_else.txt
new file mode 100644
index 0000000000..9d39f38aef
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_else.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,40))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,40))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,40))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,24))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,21)-(1,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,21)-(1,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── consequent: ∅
+ ├── else_clause:
+ │ @ ElseNode (location: (1,26)-(1,40))
+ │ ├── else_keyword_loc: (1,26)-(1,30) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,32)-(1,35))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,32)-(1,35))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,32)-(1,35) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── end_keyword_loc: (1,37)-(1,40) = "end"
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,37)-(1,40) = "end"
diff --git a/test/prism/snapshots/whitequark/rescue_else_ensure.txt b/test/prism/snapshots/whitequark/rescue_else_ensure.txt
new file mode 100644
index 0000000000..f3d59057e7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_else_ensure.txt
@@ -0,0 +1,75 @@
+@ ProgramNode (location: (1,0)-(1,51))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,51))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,51))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,24))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,21)-(1,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,21)-(1,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,21)-(1,24) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── consequent: ∅
+ ├── else_clause:
+ │ @ ElseNode (location: (1,26)-(1,42))
+ │ ├── else_keyword_loc: (1,26)-(1,30) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,31)-(1,34))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,31)-(1,34))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,31)-(1,34) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── end_keyword_loc: (1,36)-(1,42) = "ensure"
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (1,36)-(1,51))
+ │ ├── ensure_keyword_loc: (1,36)-(1,42) = "ensure"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,44)-(1,47))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,44)-(1,47))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,44)-(1,47) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── end_keyword_loc: (1,48)-(1,51) = "end"
+ └── end_keyword_loc: (1,48)-(1,51) = "end"
diff --git a/test/prism/snapshots/whitequark/rescue_ensure.txt b/test/prism/snapshots/whitequark/rescue_ensure.txt
new file mode 100644
index 0000000000..f709474a7c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_ensure.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,42))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,42))
+ └── body: (length: 1)
+ └── @ BeginNode (location: (1,0)-(1,42))
+ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ ├── statements:
+ │ @ StatementsNode (location: (1,7)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,7)-(1,11))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,13)-(1,24))
+ │ ├── keyword_loc: (1,13)-(1,19) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,21)-(1,24))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,21)-(1,24))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,21)-(1,24) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause:
+ │ @ EnsureNode (location: (1,26)-(1,42))
+ │ ├── ensure_keyword_loc: (1,26)-(1,32) = "ensure"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,34)-(1,37))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,34)-(1,37))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,34)-(1,37) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── end_keyword_loc: (1,39)-(1,42) = "end"
+ └── end_keyword_loc: (1,39)-(1,42) = "end"
diff --git a/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt b/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt
new file mode 100644
index 0000000000..72b6842f42
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_in_lambda_block.txt
@@ -0,0 +1,26 @@
+@ ProgramNode (location: (1,0)-(1,17))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,17))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,17))
+ ├── locals: []
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,3)-(1,5) = "do"
+ ├── closing_loc: (1,14)-(1,17) = "end"
+ ├── parameters: ∅
+ └── body:
+ @ BeginNode (location: (1,6)-(1,17))
+ ├── begin_keyword_loc: ∅
+ ├── statements: ∅
+ ├── rescue_clause:
+ │ @ RescueNode (location: (1,6)-(1,12))
+ │ ├── keyword_loc: (1,6)-(1,12) = "rescue"
+ │ ├── exceptions: (length: 0)
+ │ ├── operator_loc: ∅
+ │ ├── reference: ∅
+ │ ├── statements: ∅
+ │ └── consequent: ∅
+ ├── else_clause: ∅
+ ├── ensure_clause: ∅
+ └── end_keyword_loc: (1,14)-(1,17) = "end"
diff --git a/test/prism/snapshots/whitequark/rescue_mod.txt b/test/prism/snapshots/whitequark/rescue_mod.txt
new file mode 100644
index 0000000000..a0d9cc6ceb
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_mod.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ RescueModifierNode (location: (1,0)-(1,15))
+ ├── expression:
+ │ @ CallNode (location: (1,0)-(1,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── keyword_loc: (1,5)-(1,11) = "rescue"
+ └── rescue_expression:
+ @ CallNode (location: (1,12)-(1,15))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,12)-(1,15) = "bar"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: variable_call
+ └── name: "bar"
diff --git a/test/prism/snapshots/whitequark/rescue_mod_asgn.txt b/test/prism/snapshots/whitequark/rescue_mod_asgn.txt
new file mode 100644
index 0000000000..85c68e719b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_mod_asgn.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ LocalVariableWriteNode (location: (1,0)-(1,21))
+ ├── name: :foo
+ ├── depth: 0
+ ├── name_loc: (1,0)-(1,3) = "foo"
+ ├── value:
+ │ @ RescueModifierNode (location: (1,6)-(1,21))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,6)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,10) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "meth"
+ │ ├── keyword_loc: (1,11)-(1,17) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (1,18)-(1,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,18)-(1,21) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ └── operator_loc: (1,4)-(1,5) = "="
diff --git a/test/prism/snapshots/whitequark/rescue_mod_masgn.txt b/test/prism/snapshots/whitequark/rescue_mod_masgn.txt
new file mode 100644
index 0000000000..bf2db50258
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_mod_masgn.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(1,29))
+├── locals: [:foo, :bar]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,29))
+ └── body: (length: 1)
+ └── @ MultiWriteNode (location: (1,0)-(1,29))
+ ├── targets: (length: 2)
+ │ ├── @ LocalVariableTargetNode (location: (1,0)-(1,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ └── @ LocalVariableTargetNode (location: (1,5)-(1,8))
+ │ ├── name: :bar
+ │ └── depth: 0
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── operator_loc: (1,9)-(1,10) = "="
+ └── value:
+ @ RescueModifierNode (location: (1,11)-(1,29))
+ ├── expression:
+ │ @ CallNode (location: (1,11)-(1,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,15) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── keyword_loc: (1,16)-(1,22) = "rescue"
+ └── rescue_expression:
+ @ ArrayNode (location: (1,23)-(1,29))
+ ├── elements: (length: 2)
+ │ ├── @ IntegerNode (location: (1,24)-(1,25))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,27)-(1,28))
+ │ └── flags: decimal
+ ├── opening_loc: (1,23)-(1,24) = "["
+ └── closing_loc: (1,28)-(1,29) = "]"
diff --git a/test/prism/snapshots/whitequark/rescue_mod_op_assign.txt b/test/prism/snapshots/whitequark/rescue_mod_op_assign.txt
new file mode 100644
index 0000000000..32aa9d3880
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_mod_op_assign.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ LocalVariableOperatorWriteNode (location: (1,0)-(1,22))
+ ├── name_loc: (1,0)-(1,3) = "foo"
+ ├── operator_loc: (1,4)-(1,6) = "+="
+ ├── value:
+ │ @ RescueModifierNode (location: (1,7)-(1,22))
+ │ ├── expression:
+ │ │ @ CallNode (location: (1,7)-(1,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,11) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "meth"
+ │ ├── keyword_loc: (1,12)-(1,18) = "rescue"
+ │ └── rescue_expression:
+ │ @ CallNode (location: (1,19)-(1,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,19)-(1,22) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── name: :foo
+ ├── operator: :+
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/rescue_without_begin_end.txt b/test/prism/snapshots/whitequark/rescue_without_begin_end.txt
new file mode 100644
index 0000000000..250b63fdda
--- /dev/null
+++ b/test/prism/snapshots/whitequark/rescue_without_begin_end.txt
@@ -0,0 +1,59 @@
+@ ProgramNode (location: (1,0)-(1,30))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,30))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,30))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,4) = "meth"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,5)-(1,30))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ BeginNode (location: (1,9)-(1,30))
+ │ │ ├── begin_keyword_loc: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,9)-(1,12))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── rescue_clause:
+ │ │ │ @ RescueNode (location: (1,14)-(1,25))
+ │ │ │ ├── keyword_loc: (1,14)-(1,20) = "rescue"
+ │ │ │ ├── exceptions: (length: 0)
+ │ │ │ ├── operator_loc: ∅
+ │ │ │ ├── reference: ∅
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (1,22)-(1,25))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,22)-(1,25))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,22)-(1,25) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── consequent: ∅
+ │ │ ├── else_clause: ∅
+ │ │ ├── ensure_clause: ∅
+ │ │ └── end_keyword_loc: (1,27)-(1,30) = "end"
+ │ ├── opening_loc: (1,5)-(1,7) = "do"
+ │ └── closing_loc: (1,27)-(1,30) = "end"
+ ├── flags: ∅
+ └── name: "meth"
diff --git a/test/prism/snapshots/whitequark/restarg_named.txt b/test/prism/snapshots/whitequark/restarg_named.txt
new file mode 100644
index 0000000000..3255609cdd
--- /dev/null
+++ b/test/prism/snapshots/whitequark/restarg_named.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,16))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,10))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,6)-(1,10))
+ │ │ ├── name: :foo
+ │ │ ├── name_loc: (1,7)-(1,10) = "foo"
+ │ │ └── operator_loc: (1,6)-(1,7) = "*"
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:foo]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,10)-(1,11) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,13)-(1,16) = "end"
diff --git a/test/prism/snapshots/whitequark/restarg_unnamed.txt b/test/prism/snapshots/whitequark/restarg_unnamed.txt
new file mode 100644
index 0000000000..82e8f3f7ab
--- /dev/null
+++ b/test/prism/snapshots/whitequark/restarg_unnamed.txt
@@ -0,0 +1,30 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,13))
+ ├── name: :f
+ ├── name_loc: (1,4)-(1,5) = "f"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,6)-(1,7))
+ │ ├── requireds: (length: 0)
+ │ ├── optionals: (length: 0)
+ │ ├── rest:
+ │ │ @ RestParameterNode (location: (1,6)-(1,7))
+ │ │ ├── name: nil
+ │ │ ├── name_loc: ∅
+ │ │ └── operator_loc: (1,6)-(1,7) = "*"
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body: ∅
+ ├── locals: [:*]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,5)-(1,6) = "("
+ ├── rparen_loc: (1,7)-(1,8) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,10)-(1,13) = "end"
diff --git a/test/prism/snapshots/whitequark/retry.txt b/test/prism/snapshots/whitequark/retry.txt
new file mode 100644
index 0000000000..671c369514
--- /dev/null
+++ b/test/prism/snapshots/whitequark/retry.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ RetryNode (location: (1,0)-(1,5))
diff --git a/test/prism/snapshots/whitequark/return.txt b/test/prism/snapshots/whitequark/return.txt
new file mode 100644
index 0000000000..5bf8d4ca10
--- /dev/null
+++ b/test/prism/snapshots/whitequark/return.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(7,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,11))
+ └── body: (length: 4)
+ ├── @ ReturnNode (location: (1,0)-(1,6))
+ │ ├── keyword_loc: (1,0)-(1,6) = "return"
+ │ └── arguments: ∅
+ ├── @ ReturnNode (location: (3,0)-(3,10))
+ │ ├── keyword_loc: (3,0)-(3,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (3,7)-(3,10))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (3,7)-(3,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,7)-(3,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── @ ReturnNode (location: (5,0)-(5,8))
+ │ ├── keyword_loc: (5,0)-(5,6) = "return"
+ │ └── arguments:
+ │ @ ArgumentsNode (location: (5,6)-(5,8))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (5,6)-(5,8))
+ │ ├── body: ∅
+ │ ├── opening_loc: (5,6)-(5,7) = "("
+ │ └── closing_loc: (5,7)-(5,8) = ")"
+ └── @ ReturnNode (location: (7,0)-(7,11))
+ ├── keyword_loc: (7,0)-(7,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (7,6)-(7,11))
+ └── arguments: (length: 1)
+ └── @ ParenthesesNode (location: (7,6)-(7,11))
+ ├── body:
+ │ @ StatementsNode (location: (7,7)-(7,10))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (7,7)-(7,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,7)-(7,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── opening_loc: (7,6)-(7,7) = "("
+ └── closing_loc: (7,10)-(7,11) = ")"
diff --git a/test/prism/snapshots/whitequark/return_block.txt b/test/prism/snapshots/whitequark/return_block.txt
new file mode 100644
index 0000000000..91cd334f06
--- /dev/null
+++ b/test/prism/snapshots/whitequark/return_block.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,21))
+ └── body: (length: 1)
+ └── @ ReturnNode (location: (1,0)-(1,21))
+ ├── keyword_loc: (1,0)-(1,6) = "return"
+ └── arguments:
+ @ ArgumentsNode (location: (1,7)-(1,21))
+ └── arguments: (length: 1)
+ └── @ CallNode (location: (1,7)-(1,21))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,7)-(1,10) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,11)-(1,14))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,11)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,15)-(1,21))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,15)-(1,17) = "do"
+ │ └── closing_loc: (1,18)-(1,21) = "end"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_10279.txt b/test/prism/snapshots/whitequark/ruby_bug_10279.txt
new file mode 100644
index 0000000000..be4105fff3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_10279.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ HashNode (location: (1,0)-(1,24))
+ ├── opening_loc: (1,0)-(1,1) = "{"
+ ├── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,1)-(1,23))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,1)-(1,3))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,1)-(1,2) = "a"
+ │ │ ├── closing_loc: (1,2)-(1,3) = ":"
+ │ │ └── unescaped: "a"
+ │ ├── value:
+ │ │ @ IfNode (location: (1,4)-(1,23))
+ │ │ ├── if_keyword_loc: (1,4)-(1,6) = "if"
+ │ │ ├── predicate:
+ │ │ │ @ TrueNode (location: (1,7)-(1,11))
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,17)-(1,19))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,17)-(1,19))
+ │ │ │ └── flags: decimal
+ │ │ ├── consequent: ∅
+ │ │ └── end_keyword_loc: (1,20)-(1,23) = "end"
+ │ └── operator_loc: ∅
+ └── closing_loc: (1,23)-(1,24) = "}"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_10653.txt b/test/prism/snapshots/whitequark/ruby_bug_10653.txt
new file mode 100644
index 0000000000..edd3269804
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_10653.txt
@@ -0,0 +1,166 @@
+@ ProgramNode (location: (1,0)-(5,31))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,31))
+ └── body: (length: 3)
+ ├── @ IfNode (location: (1,0)-(1,33))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (1,0)-(1,5))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,8)-(1,20))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,8)-(1,20))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,8)-(1,13) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,14)-(1,20))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
+ │ │ │ └── closing_loc: (1,17)-(1,20) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,21)-(1,33))
+ │ │ ├── else_keyword_loc: (1,21)-(1,22) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,23)-(1,33))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,23)-(1,33))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,23)-(1,26) = "tap"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (1,27)-(1,33))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (1,27)-(1,29) = "do"
+ │ │ │ │ └── closing_loc: (1,30)-(1,33) = "end"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "tap"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ ├── @ IfNode (location: (3,0)-(3,25))
+ │ ├── if_keyword_loc: ∅
+ │ ├── predicate:
+ │ │ @ FalseNode (location: (3,0)-(3,5))
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,8)-(3,16))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,8)-(3,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,8)-(3,13) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (3,14)-(3,16))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (3,14)-(3,15) = "{"
+ │ │ │ └── closing_loc: (3,15)-(3,16) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (3,17)-(3,25))
+ │ │ ├── else_keyword_loc: (3,17)-(3,18) = ":"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (3,19)-(3,25))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (3,19)-(3,25))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,19)-(3,22) = "tap"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (3,23)-(3,25))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body: ∅
+ │ │ │ │ ├── opening_loc: (3,23)-(3,24) = "{"
+ │ │ │ │ └── closing_loc: (3,24)-(3,25) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "tap"
+ │ │ └── end_keyword_loc: ∅
+ │ └── end_keyword_loc: ∅
+ └── @ IfNode (location: (5,0)-(5,31))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ TrueNode (location: (5,0)-(5,4))
+ ├── statements:
+ │ @ StatementsNode (location: (5,7)-(5,27))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (5,7)-(5,27))
+ │ ├── receiver:
+ │ │ @ IntegerNode (location: (5,7)-(5,8))
+ │ │ └── flags: decimal
+ │ ├── call_operator_loc: (5,8)-(5,9) = "."
+ │ ├── message_loc: (5,9)-(5,12) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,13)-(5,27))
+ │ │ ├── locals: [:n]
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (5,16)-(5,19))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (5,17)-(5,18))
+ │ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ │ └── @ RequiredParameterNode (location: (5,17)-(5,18))
+ │ │ │ │ │ └── name: :n
+ │ │ │ │ ├── optionals: (length: 0)
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (5,16)-(5,17) = "|"
+ │ │ │ └── closing_loc: (5,18)-(5,19) = "|"
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (5,20)-(5,23))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (5,20)-(5,23))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,20)-(5,21) = "p"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,22)-(5,23))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (5,22)-(5,23))
+ │ │ │ │ ├── name: :n
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "p"
+ │ │ ├── opening_loc: (5,13)-(5,15) = "do"
+ │ │ └── closing_loc: (5,24)-(5,27) = "end"
+ │ ├── flags: ∅
+ │ └── name: "tap"
+ ├── consequent:
+ │ @ ElseNode (location: (5,28)-(5,31))
+ │ ├── else_keyword_loc: (5,28)-(5,29) = ":"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,30)-(5,31))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,30)-(5,31))
+ │ │ └── flags: decimal
+ │ └── end_keyword_loc: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11107.txt b/test/prism/snapshots/whitequark/ruby_bug_11107.txt
new file mode 100644
index 0000000000..28aa66ee5a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11107.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,24))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,24))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (1,2)-(1,24))
+ │ ├── locals: []
+ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ ├── opening_loc: (1,7)-(1,9) = "do"
+ │ ├── closing_loc: (1,21)-(1,24) = "end"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,4)-(1,6))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ └── closing_loc: (1,5)-(1,6) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (1,10)-(1,20))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,10)-(1,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,10)-(1,11) = "a"
+ │ ├── opening_loc: (1,11)-(1,12) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (1,12)-(1,13) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,14)-(1,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
+ │ │ └── closing_loc: (1,17)-(1,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11380.txt b/test/prism/snapshots/whitequark/ruby_bug_11380.txt
new file mode 100644
index 0000000000..4453caa63d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11380.txt
@@ -0,0 +1,50 @@
+@ ProgramNode (location: (1,0)-(1,28))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,28))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,28))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,21))
+ │ └── arguments: (length: 2)
+ │ ├── @ LambdaNode (location: (1,2)-(1,15))
+ │ │ ├── locals: []
+ │ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ │ ├── closing_loc: (1,14)-(1,15) = "}"
+ │ │ ├── parameters: ∅
+ │ │ └── body:
+ │ │ @ StatementsNode (location: (1,7)-(1,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ SymbolNode (location: (1,7)-(1,13))
+ │ │ ├── opening_loc: (1,7)-(1,8) = ":"
+ │ │ ├── value_loc: (1,8)-(1,13) = "hello"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "hello"
+ │ └── @ KeywordHashNode (location: (1,17)-(1,21))
+ │ └── elements: (length: 1)
+ │ └── @ AssocNode (location: (1,17)-(1,21))
+ │ ├── key:
+ │ │ @ SymbolNode (location: (1,17)-(1,19))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,17)-(1,18) = "a"
+ │ │ ├── closing_loc: (1,18)-(1,19) = ":"
+ │ │ └── unescaped: "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,20)-(1,21))
+ │ │ └── flags: decimal
+ │ └── operator_loc: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,22)-(1,28))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,22)-(1,24) = "do"
+ │ └── closing_loc: (1,25)-(1,28) = "end"
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11873.txt b/test/prism/snapshots/whitequark/ruby_bug_11873.txt
new file mode 100644
index 0000000000..e7fdb64e9e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873.txt
@@ -0,0 +1,737 @@
+@ ProgramNode (location: (1,0)-(23,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(23,22))
+ └── body: (length: 12)
+ ├── @ CallNode (location: (1,0)-(1,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,2)-(1,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,6)-(1,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ StringNode (location: (1,10)-(1,13))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,10)-(1,11) = "\""
+ │ │ ├── content_loc: (1,11)-(1,12) = "x"
+ │ │ ├── closing_loc: (1,12)-(1,13) = "\""
+ │ │ └── unescaped: "x"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,14)-(1,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
+ │ │ └── closing_loc: (1,17)-(1,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (3,0)-(3,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (3,2)-(3,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ │ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,4)-(3,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,4)-(3,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,4)-(3,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (3,6)-(3,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (3,7)-(3,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RegularExpressionNode (location: (3,10)-(3,13))
+ │ │ ├── opening_loc: (3,10)-(3,11) = "/"
+ │ │ ├── content_loc: (3,11)-(3,12) = "x"
+ │ │ ├── closing_loc: (3,12)-(3,13) = "/"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,14)-(3,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (3,14)-(3,16) = "do"
+ │ │ └── closing_loc: (3,17)-(3,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,2)-(5,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,2)-(5,3) = "b"
+ │ │ │ ├── opening_loc: (5,3)-(5,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,4)-(5,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (5,4)-(5,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (5,4)-(5,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (5,6)-(5,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (5,6)-(5,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (5,7)-(5,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RegularExpressionNode (location: (5,10)-(5,14))
+ │ │ ├── opening_loc: (5,10)-(5,11) = "/"
+ │ │ ├── content_loc: (5,11)-(5,12) = "x"
+ │ │ ├── closing_loc: (5,12)-(5,14) = "/m"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: multi_line
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,15)-(5,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,15)-(5,17) = "do"
+ │ │ └── closing_loc: (5,18)-(5,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (7,0)-(7,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,2)-(7,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (7,2)-(7,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,2)-(7,3) = "b"
+ │ │ │ ├── opening_loc: (7,3)-(7,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (7,4)-(7,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (7,4)-(7,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (7,4)-(7,5) = "c"
+ │ │ │ │ ├── opening_loc: (7,5)-(7,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (7,6)-(7,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (7,6)-(7,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (7,7)-(7,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (7,8)-(7,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ StringNode (location: (7,11)-(7,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (7,11)-(7,12) = "\""
+ │ │ ├── content_loc: (7,12)-(7,13) = "x"
+ │ │ ├── closing_loc: (7,13)-(7,14) = "\""
+ │ │ └── unescaped: "x"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (7,15)-(7,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (7,15)-(7,17) = "do"
+ │ │ └── closing_loc: (7,18)-(7,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (9,0)-(9,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,2)-(9,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (9,2)-(9,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,2)-(9,3) = "b"
+ │ │ │ ├── opening_loc: (9,3)-(9,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,4)-(9,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (9,4)-(9,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (9,4)-(9,5) = "c"
+ │ │ │ │ ├── opening_loc: (9,5)-(9,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (9,6)-(9,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (9,6)-(9,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (9,6)-(9,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (9,7)-(9,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (9,8)-(9,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RegularExpressionNode (location: (9,11)-(9,14))
+ │ │ ├── opening_loc: (9,11)-(9,12) = "/"
+ │ │ ├── content_loc: (9,12)-(9,13) = "x"
+ │ │ ├── closing_loc: (9,13)-(9,14) = "/"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (9,15)-(9,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (9,15)-(9,17) = "do"
+ │ │ └── closing_loc: (9,18)-(9,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (11,0)-(11,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,2)-(11,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (11,2)-(11,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,2)-(11,3) = "b"
+ │ │ │ ├── opening_loc: (11,3)-(11,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (11,4)-(11,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (11,4)-(11,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (11,4)-(11,5) = "c"
+ │ │ │ │ ├── opening_loc: (11,5)-(11,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (11,6)-(11,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (11,6)-(11,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (11,6)-(11,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (11,7)-(11,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (11,8)-(11,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RegularExpressionNode (location: (11,11)-(11,15))
+ │ │ ├── opening_loc: (11,11)-(11,12) = "/"
+ │ │ ├── content_loc: (11,12)-(11,13) = "x"
+ │ │ ├── closing_loc: (11,13)-(11,15) = "/m"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: multi_line
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (11,16)-(11,22))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (11,16)-(11,18) = "do"
+ │ │ └── closing_loc: (11,19)-(11,22) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (13,0)-(13,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,2)-(13,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (13,2)-(13,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,2)-(13,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (13,3)-(13,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (13,4)-(13,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (13,4)-(13,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (13,4)-(13,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (13,6)-(13,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (13,6)-(13,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (13,6)-(13,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (13,3)-(13,4) = "{"
+ │ │ │ │ └── closing_loc: (13,7)-(13,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ StringNode (location: (13,10)-(13,13))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (13,10)-(13,11) = "\""
+ │ │ ├── content_loc: (13,11)-(13,12) = "x"
+ │ │ ├── closing_loc: (13,12)-(13,13) = "\""
+ │ │ └── unescaped: "x"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (13,14)-(13,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (13,14)-(13,16) = "do"
+ │ │ └── closing_loc: (13,17)-(13,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (15,0)-(15,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,0)-(15,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,2)-(15,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (15,2)-(15,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (15,2)-(15,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (15,3)-(15,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (15,4)-(15,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (15,4)-(15,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (15,4)-(15,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (15,6)-(15,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (15,6)-(15,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (15,6)-(15,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (15,3)-(15,4) = "{"
+ │ │ │ │ └── closing_loc: (15,7)-(15,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RegularExpressionNode (location: (15,10)-(15,13))
+ │ │ ├── opening_loc: (15,10)-(15,11) = "/"
+ │ │ ├── content_loc: (15,11)-(15,12) = "x"
+ │ │ ├── closing_loc: (15,12)-(15,13) = "/"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (15,14)-(15,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (15,14)-(15,16) = "do"
+ │ │ └── closing_loc: (15,17)-(15,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (17,0)-(17,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,2)-(17,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (17,2)-(17,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (17,2)-(17,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (17,3)-(17,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (17,4)-(17,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (17,4)-(17,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (17,4)-(17,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (17,6)-(17,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (17,6)-(17,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (17,6)-(17,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (17,3)-(17,4) = "{"
+ │ │ │ │ └── closing_loc: (17,7)-(17,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RegularExpressionNode (location: (17,10)-(17,14))
+ │ │ ├── opening_loc: (17,10)-(17,11) = "/"
+ │ │ ├── content_loc: (17,11)-(17,12) = "x"
+ │ │ ├── closing_loc: (17,12)-(17,14) = "/m"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: multi_line
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (17,15)-(17,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (17,15)-(17,17) = "do"
+ │ │ └── closing_loc: (17,18)-(17,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (19,0)-(19,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,0)-(19,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,2)-(19,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (19,2)-(19,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,2)-(19,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (19,3)-(19,9))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (19,4)-(19,8))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (19,4)-(19,8))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (19,4)-(19,5) = "c"
+ │ │ │ │ │ ├── opening_loc: (19,5)-(19,6) = "("
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (19,6)-(19,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (19,6)-(19,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: (19,7)-(19,8) = ")"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (19,3)-(19,4) = "{"
+ │ │ │ │ └── closing_loc: (19,8)-(19,9) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ StringNode (location: (19,11)-(19,14))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (19,11)-(19,12) = "\""
+ │ │ ├── content_loc: (19,12)-(19,13) = "x"
+ │ │ ├── closing_loc: (19,13)-(19,14) = "\""
+ │ │ └── unescaped: "x"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (19,15)-(19,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (19,15)-(19,17) = "do"
+ │ │ └── closing_loc: (19,18)-(19,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (21,0)-(21,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (21,0)-(21,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (21,2)-(21,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,2)-(21,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (21,3)-(21,9))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (21,4)-(21,8))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (21,4)-(21,8))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (21,4)-(21,5) = "c"
+ │ │ │ │ │ ├── opening_loc: (21,5)-(21,6) = "("
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (21,6)-(21,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (21,6)-(21,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (21,6)-(21,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: (21,7)-(21,8) = ")"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (21,3)-(21,4) = "{"
+ │ │ │ │ └── closing_loc: (21,8)-(21,9) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RegularExpressionNode (location: (21,11)-(21,14))
+ │ │ ├── opening_loc: (21,11)-(21,12) = "/"
+ │ │ ├── content_loc: (21,12)-(21,13) = "x"
+ │ │ ├── closing_loc: (21,13)-(21,14) = "/"
+ │ │ ├── unescaped: "x"
+ │ │ └── flags: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (21,15)-(21,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (21,15)-(21,17) = "do"
+ │ │ └── closing_loc: (21,18)-(21,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (23,0)-(23,22))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (23,0)-(23,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (23,2)-(23,15))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (23,2)-(23,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,2)-(23,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (23,3)-(23,9))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (23,4)-(23,8))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (23,4)-(23,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (23,4)-(23,5) = "c"
+ │ │ │ │ ├── opening_loc: (23,5)-(23,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (23,6)-(23,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (23,6)-(23,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (23,6)-(23,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (23,7)-(23,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── opening_loc: (23,3)-(23,4) = "{"
+ │ │ │ └── closing_loc: (23,8)-(23,9) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ └── @ RegularExpressionNode (location: (23,11)-(23,15))
+ │ ├── opening_loc: (23,11)-(23,12) = "/"
+ │ ├── content_loc: (23,12)-(23,13) = "x"
+ │ ├── closing_loc: (23,13)-(23,15) = "/m"
+ │ ├── unescaped: "x"
+ │ └── flags: multi_line
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (23,16)-(23,22))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (23,16)-(23,18) = "do"
+ │ └── closing_loc: (23,19)-(23,22) = "end"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt b/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt
new file mode 100644
index 0000000000..c5d24ac5f7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873_a.txt
@@ -0,0 +1,1161 @@
+@ ProgramNode (location: (1,0)-(39,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(39,20))
+ └── body: (length: 20)
+ ├── @ CallNode (location: (1,0)-(1,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,11))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (1,2)-(1,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,2)-(1,3) = "b"
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (1,4)-(1,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,4)-(1,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,6)-(1,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,12)-(1,18))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,12)-(1,14) = "do"
+ │ │ └── closing_loc: (1,15)-(1,18) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (3,0)-(3,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,2)-(3,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (3,2)-(3,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,2)-(3,3) = "b"
+ │ │ │ ├── opening_loc: (3,3)-(3,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,4)-(3,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,4)-(3,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,4)-(3,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (3,6)-(3,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (3,7)-(3,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ FloatNode (location: (3,10)-(3,13))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,14)-(3,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (3,14)-(3,16) = "do"
+ │ │ └── closing_loc: (3,17)-(3,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (5,0)-(5,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,2)-(5,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (5,2)-(5,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,2)-(5,3) = "b"
+ │ │ │ ├── opening_loc: (5,3)-(5,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,4)-(5,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (5,4)-(5,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (5,4)-(5,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (5,6)-(5,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (5,6)-(5,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (5,7)-(5,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ ImaginaryNode (location: (5,10)-(5,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (5,10)-(5,13))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,15)-(5,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,15)-(5,17) = "do"
+ │ │ └── closing_loc: (5,18)-(5,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (7,0)-(7,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,2)-(7,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (7,2)-(7,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,2)-(7,3) = "b"
+ │ │ │ ├── opening_loc: (7,3)-(7,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (7,4)-(7,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (7,4)-(7,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (7,4)-(7,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (7,6)-(7,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (7,6)-(7,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (7,6)-(7,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (7,7)-(7,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RationalNode (location: (7,10)-(7,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (7,10)-(7,13))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (7,15)-(7,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (7,15)-(7,17) = "do"
+ │ │ └── closing_loc: (7,18)-(7,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (9,0)-(9,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,0)-(9,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,2)-(9,12))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (9,2)-(9,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,2)-(9,3) = "b"
+ │ │ │ ├── opening_loc: (9,3)-(9,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (9,4)-(9,7))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (9,4)-(9,7))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (9,4)-(9,5) = "c"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (9,6)-(9,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (9,6)-(9,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (9,6)-(9,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (9,7)-(9,8) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ SymbolNode (location: (9,10)-(9,12))
+ │ │ ├── opening_loc: (9,10)-(9,11) = ":"
+ │ │ ├── value_loc: (9,11)-(9,12) = "e"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "e"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (9,13)-(9,19))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (9,13)-(9,15) = "do"
+ │ │ └── closing_loc: (9,16)-(9,19) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (11,0)-(11,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,0)-(11,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,2)-(11,12))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (11,2)-(11,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,2)-(11,3) = "b"
+ │ │ │ ├── opening_loc: (11,3)-(11,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (11,4)-(11,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (11,4)-(11,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (11,4)-(11,5) = "c"
+ │ │ │ │ ├── opening_loc: (11,5)-(11,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (11,6)-(11,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (11,6)-(11,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (11,6)-(11,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (11,7)-(11,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (11,8)-(11,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ IntegerNode (location: (11,11)-(11,12))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (11,13)-(11,19))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (11,13)-(11,15) = "do"
+ │ │ └── closing_loc: (11,16)-(11,19) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (13,0)-(13,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,2)-(13,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (13,2)-(13,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,2)-(13,3) = "b"
+ │ │ │ ├── opening_loc: (13,3)-(13,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (13,4)-(13,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (13,4)-(13,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (13,4)-(13,5) = "c"
+ │ │ │ │ ├── opening_loc: (13,5)-(13,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (13,6)-(13,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (13,6)-(13,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (13,6)-(13,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (13,7)-(13,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (13,8)-(13,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ FloatNode (location: (13,11)-(13,14))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (13,15)-(13,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (13,15)-(13,17) = "do"
+ │ │ └── closing_loc: (13,18)-(13,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (15,0)-(15,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,0)-(15,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,2)-(15,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (15,2)-(15,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (15,2)-(15,3) = "b"
+ │ │ │ ├── opening_loc: (15,3)-(15,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (15,4)-(15,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (15,4)-(15,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (15,4)-(15,5) = "c"
+ │ │ │ │ ├── opening_loc: (15,5)-(15,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (15,6)-(15,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (15,6)-(15,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (15,6)-(15,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (15,7)-(15,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (15,8)-(15,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ ImaginaryNode (location: (15,11)-(15,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (15,11)-(15,14))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (15,16)-(15,22))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (15,16)-(15,18) = "do"
+ │ │ └── closing_loc: (15,19)-(15,22) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (17,0)-(17,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,0)-(17,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,2)-(17,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (17,2)-(17,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (17,2)-(17,3) = "b"
+ │ │ │ ├── opening_loc: (17,3)-(17,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (17,4)-(17,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (17,4)-(17,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (17,4)-(17,5) = "c"
+ │ │ │ │ ├── opening_loc: (17,5)-(17,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (17,6)-(17,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (17,6)-(17,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (17,6)-(17,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (17,7)-(17,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (17,8)-(17,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RationalNode (location: (17,11)-(17,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (17,11)-(17,14))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (17,16)-(17,22))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (17,16)-(17,18) = "do"
+ │ │ └── closing_loc: (17,19)-(17,22) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (19,0)-(19,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,0)-(19,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,2)-(19,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (19,2)-(19,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,2)-(19,3) = "b"
+ │ │ │ ├── opening_loc: (19,3)-(19,4) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (19,4)-(19,8))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (19,4)-(19,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (19,4)-(19,5) = "c"
+ │ │ │ │ ├── opening_loc: (19,5)-(19,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (19,6)-(19,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (19,6)-(19,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (19,7)-(19,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── closing_loc: (19,8)-(19,9) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ SymbolNode (location: (19,11)-(19,13))
+ │ │ ├── opening_loc: (19,11)-(19,12) = ":"
+ │ │ ├── value_loc: (19,12)-(19,13) = "e"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "e"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (19,14)-(19,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (19,14)-(19,16) = "do"
+ │ │ └── closing_loc: (19,17)-(19,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (21,0)-(21,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (21,0)-(21,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,2)-(21,11))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (21,2)-(21,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,2)-(21,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (21,3)-(21,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (21,4)-(21,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (21,4)-(21,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (21,4)-(21,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (21,6)-(21,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (21,6)-(21,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (21,6)-(21,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (21,3)-(21,4) = "{"
+ │ │ │ │ └── closing_loc: (21,7)-(21,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ IntegerNode (location: (21,10)-(21,11))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (21,12)-(21,18))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (21,12)-(21,14) = "do"
+ │ │ └── closing_loc: (21,15)-(21,18) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (23,0)-(23,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (23,0)-(23,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,2)-(23,13))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (23,2)-(23,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (23,2)-(23,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (23,3)-(23,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (23,4)-(23,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (23,4)-(23,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (23,4)-(23,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (23,6)-(23,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (23,6)-(23,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (23,6)-(23,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (23,3)-(23,4) = "{"
+ │ │ │ │ └── closing_loc: (23,7)-(23,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ FloatNode (location: (23,10)-(23,13))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (23,14)-(23,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (23,14)-(23,16) = "do"
+ │ │ └── closing_loc: (23,17)-(23,20) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (25,0)-(25,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,0)-(25,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,2)-(25,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (25,2)-(25,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (25,2)-(25,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (25,3)-(25,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (25,4)-(25,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (25,4)-(25,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (25,4)-(25,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (25,6)-(25,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (25,6)-(25,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (25,6)-(25,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (25,3)-(25,4) = "{"
+ │ │ │ │ └── closing_loc: (25,7)-(25,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ ImaginaryNode (location: (25,10)-(25,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (25,10)-(25,13))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (25,15)-(25,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (25,15)-(25,17) = "do"
+ │ │ └── closing_loc: (25,18)-(25,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (27,0)-(27,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,0)-(27,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,2)-(27,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (27,2)-(27,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (27,2)-(27,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (27,3)-(27,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (27,4)-(27,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (27,4)-(27,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (27,4)-(27,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (27,6)-(27,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (27,6)-(27,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (27,6)-(27,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (27,3)-(27,4) = "{"
+ │ │ │ │ └── closing_loc: (27,7)-(27,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RationalNode (location: (27,10)-(27,14))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (27,10)-(27,13))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (27,15)-(27,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (27,15)-(27,17) = "do"
+ │ │ └── closing_loc: (27,18)-(27,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (29,0)-(29,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (29,0)-(29,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,2)-(29,12))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (29,2)-(29,8))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (29,2)-(29,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (29,3)-(29,8))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (29,4)-(29,7))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (29,4)-(29,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (29,4)-(29,5) = "c"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (29,6)-(29,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (29,6)-(29,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (29,6)-(29,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (29,3)-(29,4) = "{"
+ │ │ │ │ └── closing_loc: (29,7)-(29,8) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ SymbolNode (location: (29,10)-(29,12))
+ │ │ ├── opening_loc: (29,10)-(29,11) = ":"
+ │ │ ├── value_loc: (29,11)-(29,12) = "e"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "e"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (29,13)-(29,19))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (29,13)-(29,15) = "do"
+ │ │ └── closing_loc: (29,16)-(29,19) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (31,0)-(31,19))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,0)-(31,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,2)-(31,12))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (31,2)-(31,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (31,2)-(31,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (31,3)-(31,9))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (31,4)-(31,8))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (31,4)-(31,8))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (31,4)-(31,5) = "c"
+ │ │ │ │ │ ├── opening_loc: (31,5)-(31,6) = "("
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (31,6)-(31,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (31,6)-(31,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (31,6)-(31,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: (31,7)-(31,8) = ")"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (31,3)-(31,4) = "{"
+ │ │ │ │ └── closing_loc: (31,8)-(31,9) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ IntegerNode (location: (31,11)-(31,12))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (31,13)-(31,19))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (31,13)-(31,15) = "do"
+ │ │ └── closing_loc: (31,16)-(31,19) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (33,0)-(33,21))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (33,0)-(33,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,2)-(33,14))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (33,2)-(33,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (33,2)-(33,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (33,3)-(33,9))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (33,4)-(33,8))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (33,4)-(33,8))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (33,4)-(33,5) = "c"
+ │ │ │ │ │ ├── opening_loc: (33,5)-(33,6) = "("
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (33,6)-(33,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (33,6)-(33,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (33,6)-(33,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: (33,7)-(33,8) = ")"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (33,3)-(33,4) = "{"
+ │ │ │ │ └── closing_loc: (33,8)-(33,9) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ FloatNode (location: (33,11)-(33,14))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (33,15)-(33,21))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (33,15)-(33,17) = "do"
+ │ │ └── closing_loc: (33,18)-(33,21) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (35,0)-(35,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,0)-(35,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,2)-(35,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (35,2)-(35,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (35,2)-(35,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (35,3)-(35,9))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (35,4)-(35,8))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (35,4)-(35,8))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (35,4)-(35,5) = "c"
+ │ │ │ │ │ ├── opening_loc: (35,5)-(35,6) = "("
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (35,6)-(35,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (35,6)-(35,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (35,6)-(35,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: (35,7)-(35,8) = ")"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (35,3)-(35,4) = "{"
+ │ │ │ │ └── closing_loc: (35,8)-(35,9) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ ImaginaryNode (location: (35,11)-(35,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (35,11)-(35,14))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (35,16)-(35,22))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (35,16)-(35,18) = "do"
+ │ │ └── closing_loc: (35,19)-(35,22) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ ├── @ CallNode (location: (37,0)-(37,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,0)-(37,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,2)-(37,15))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ CallNode (location: (37,2)-(37,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (37,2)-(37,3) = "b"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block:
+ │ │ │ │ @ BlockNode (location: (37,3)-(37,9))
+ │ │ │ │ ├── locals: []
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ ├── body:
+ │ │ │ │ │ @ StatementsNode (location: (37,4)-(37,8))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (37,4)-(37,8))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (37,4)-(37,5) = "c"
+ │ │ │ │ │ ├── opening_loc: (37,5)-(37,6) = "("
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (37,6)-(37,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (37,6)-(37,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (37,6)-(37,7) = "d"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "d"
+ │ │ │ │ │ ├── closing_loc: (37,7)-(37,8) = ")"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "c"
+ │ │ │ │ ├── opening_loc: (37,3)-(37,4) = "{"
+ │ │ │ │ └── closing_loc: (37,8)-(37,9) = "}"
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "b"
+ │ │ └── @ RationalNode (location: (37,11)-(37,15))
+ │ │ └── numeric:
+ │ │ @ FloatNode (location: (37,11)-(37,14))
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (37,16)-(37,22))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (37,16)-(37,18) = "do"
+ │ │ └── closing_loc: (37,19)-(37,22) = "end"
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ CallNode (location: (39,0)-(39,20))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (39,0)-(39,1) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (39,2)-(39,13))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (39,2)-(39,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,2)-(39,3) = "b"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (39,3)-(39,9))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (39,4)-(39,8))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (39,4)-(39,8))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (39,4)-(39,5) = "c"
+ │ │ │ │ ├── opening_loc: (39,5)-(39,6) = "("
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (39,6)-(39,7))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (39,6)-(39,7))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (39,6)-(39,7) = "d"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "d"
+ │ │ │ │ ├── closing_loc: (39,7)-(39,8) = ")"
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "c"
+ │ │ │ ├── opening_loc: (39,3)-(39,4) = "{"
+ │ │ │ └── closing_loc: (39,8)-(39,9) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "b"
+ │ └── @ SymbolNode (location: (39,11)-(39,13))
+ │ ├── opening_loc: (39,11)-(39,12) = ":"
+ │ ├── value_loc: (39,12)-(39,13) = "e"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "e"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (39,14)-(39,20))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (39,14)-(39,16) = "do"
+ │ └── closing_loc: (39,17)-(39,20) = "end"
+ ├── flags: ∅
+ └── name: "a"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt b/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt
new file mode 100644
index 0000000000..89323d4778
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11873_b.txt
@@ -0,0 +1,95 @@
+@ ProgramNode (location: (1,0)-(1,25))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,25))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,25))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,18))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (1,2)-(1,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,2)-(1,3) = "p"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,3)-(1,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body:
+ │ │ │ │ @ StatementsNode (location: (1,4)-(1,12))
+ │ │ │ │ └── body: (length: 2)
+ │ │ │ │ ├── @ CallNode (location: (1,4)-(1,8))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,4)-(1,5) = "p"
+ │ │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "("
+ │ │ │ │ │ ├── arguments:
+ │ │ │ │ │ │ @ ArgumentsNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ │ └── @ CallNode (location: (1,6)-(1,7))
+ │ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ │ ├── message_loc: (1,6)-(1,7) = "p"
+ │ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ │ └── name: "p"
+ │ │ │ │ │ ├── closing_loc: (1,7)-(1,8) = ")"
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: "p"
+ │ │ │ │ └── @ CallNode (location: (1,9)-(1,12))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,9)-(1,10) = "p"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments:
+ │ │ │ │ │ @ ArgumentsNode (location: (1,11)-(1,12))
+ │ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ │ ├── message_loc: (1,11)-(1,12) = "p"
+ │ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ │ ├── block: ∅
+ │ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ │ └── name: "p"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: "p"
+ │ │ │ ├── opening_loc: (1,3)-(1,4) = "{"
+ │ │ │ └── closing_loc: (1,12)-(1,13) = "}"
+ │ │ ├── flags: ∅
+ │ │ └── name: "p"
+ │ └── @ CallNode (location: (1,15)-(1,18))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,15)-(1,18) = "tap"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "tap"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,19)-(1,25))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,19)-(1,21) = "do"
+ │ └── closing_loc: (1,22)-(1,25) = "end"
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11989.txt b/test/prism/snapshots/whitequark/ruby_bug_11989.txt
new file mode 100644
index 0000000000..b271785d13
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11989.txt
@@ -0,0 +1,23 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ StringNode (location: (1,2)-(1,8))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,2)-(1,8) = "<<~\"E\""
+ │ ├── content_loc: (2,0)-(2,0) = " x\\n y\n"
+ │ ├── closing_loc: (3,0)-(3,0) = "E\n"
+ │ └── unescaped: "x\n y\n"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11990.txt b/test/prism/snapshots/whitequark/ruby_bug_11990.txt
new file mode 100644
index 0000000000..08179b6c76
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_11990.txt
@@ -0,0 +1,32 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "p"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,12))
+ │ └── arguments: (length: 1)
+ │ └── @ StringConcatNode (location: (1,2)-(1,12))
+ │ ├── left:
+ │ │ @ StringNode (location: (1,2)-(1,6))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,2)-(1,6) = "<<~E"
+ │ │ ├── content_loc: (2,0)-(2,0) = " x\n"
+ │ │ ├── closing_loc: (3,0)-(3,0) = "E\n"
+ │ │ └── unescaped: "x\n"
+ │ └── right:
+ │ @ StringNode (location: (1,7)-(1,12))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,7)-(1,8) = "\""
+ │ ├── content_loc: (1,8)-(1,11) = " y"
+ │ ├── closing_loc: (1,11)-(1,12) = "\""
+ │ └── unescaped: " y"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "p"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_12073.txt b/test/prism/snapshots/whitequark/ruby_bug_12073.txt
new file mode 100644
index 0000000000..8d87e2ff0d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12073.txt
@@ -0,0 +1,89 @@
+@ ProgramNode (location: (1,0)-(3,34))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,34))
+ └── body: (length: 3)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,5))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,1) = "a"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,2)-(1,3) = "="
+ ├── @ CallNode (location: (1,7)-(1,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,8) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,9)-(1,13))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ KeywordHashNode (location: (1,9)-(1,13))
+ │ │ └── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (1,9)-(1,13))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (1,9)-(1,11))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (1,9)-(1,10) = "b"
+ │ │ │ ├── closing_loc: (1,10)-(1,11) = ":"
+ │ │ │ └── unescaped: "b"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (1,12)-(1,13))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a"
+ └── @ DefNode (location: (3,0)-(3,34))
+ ├── name: :foo
+ ├── name_loc: (3,4)-(3,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (3,8)-(3,13))
+ │ ├── requireds: (length: 1)
+ │ │ └── @ RequiredParameterNode (location: (3,8)-(3,13))
+ │ │ └── name: :raise
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest: ∅
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (3,15)-(3,29))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,15)-(3,29))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,15)-(3,20) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,21)-(3,29))
+ │ │ └── arguments: (length: 2)
+ │ │ ├── @ ConstantPathNode (location: (3,21)-(3,25))
+ │ │ │ ├── parent:
+ │ │ │ │ @ ConstantReadNode (location: (3,21)-(3,22))
+ │ │ │ │ └── name: :A
+ │ │ │ ├── child:
+ │ │ │ │ @ ConstantReadNode (location: (3,24)-(3,25))
+ │ │ │ │ └── name: :B
+ │ │ │ └── delimiter_loc: (3,22)-(3,24) = "::"
+ │ │ └── @ StringNode (location: (3,27)-(3,29))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (3,27)-(3,28) = "'"
+ │ │ ├── content_loc: (3,28)-(3,28) = ""
+ │ │ ├── closing_loc: (3,28)-(3,29) = "'"
+ │ │ └── unescaped: ""
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ ├── locals: [:raise]
+ ├── def_keyword_loc: (3,0)-(3,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (3,31)-(3,34) = "end"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_12402.txt b/test/prism/snapshots/whitequark/ruby_bug_12402.txt
new file mode 100644
index 0000000000..8b3ca59827
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12402.txt
@@ -0,0 +1,571 @@
+@ ProgramNode (location: (1,0)-(27,31))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(27,31))
+ └── body: (length: 14)
+ ├── @ LocalVariableOperatorWriteNode (location: (1,0)-(1,27))
+ │ ├── name_loc: (1,0)-(1,3) = "foo"
+ │ ├── operator_loc: (1,4)-(1,6) = "+="
+ │ ├── value:
+ │ │ @ CallNode (location: (1,7)-(1,27))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,12) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,13)-(1,27))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ RescueModifierNode (location: (1,13)-(1,27))
+ │ │ │ ├── expression:
+ │ │ │ │ @ CallNode (location: (1,13)-(1,16))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── keyword_loc: (1,17)-(1,23) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ NilNode (location: (1,24)-(1,27))
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── name: :foo
+ │ ├── operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,28))
+ │ ├── name_loc: (3,0)-(3,3) = "foo"
+ │ ├── operator_loc: (3,4)-(3,6) = "+="
+ │ ├── value:
+ │ │ @ RescueModifierNode (location: (3,7)-(3,28))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (3,7)-(3,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,7)-(3,12) = "raise"
+ │ │ │ ├── opening_loc: (3,12)-(3,13) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,13)-(3,16))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,13)-(3,16))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,13)-(3,16) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── closing_loc: (3,16)-(3,17) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "raise"
+ │ │ ├── keyword_loc: (3,18)-(3,24) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (3,25)-(3,28))
+ │ ├── name: :foo
+ │ ├── operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableWriteNode (location: (5,0)-(5,26))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (5,0)-(5,3) = "foo"
+ │ ├── value:
+ │ │ @ CallNode (location: (5,6)-(5,26))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,6)-(5,11) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,12)-(5,26))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ RescueModifierNode (location: (5,12)-(5,26))
+ │ │ │ ├── expression:
+ │ │ │ │ @ CallNode (location: (5,12)-(5,15))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (5,12)-(5,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── keyword_loc: (5,16)-(5,22) = "rescue"
+ │ │ │ └── rescue_expression:
+ │ │ │ @ NilNode (location: (5,23)-(5,26))
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ └── operator_loc: (5,4)-(5,5) = "="
+ ├── @ LocalVariableWriteNode (location: (7,0)-(7,27))
+ │ ├── name: :foo
+ │ ├── depth: 0
+ │ ├── name_loc: (7,0)-(7,3) = "foo"
+ │ ├── value:
+ │ │ @ RescueModifierNode (location: (7,6)-(7,27))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (7,6)-(7,16))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (7,6)-(7,11) = "raise"
+ │ │ │ ├── opening_loc: (7,11)-(7,12) = "("
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (7,12)-(7,15))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (7,12)-(7,15))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (7,12)-(7,15) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ ├── closing_loc: (7,15)-(7,16) = ")"
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "raise"
+ │ │ ├── keyword_loc: (7,17)-(7,23) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (7,24)-(7,27))
+ │ └── operator_loc: (7,4)-(7,5) = "="
+ ├── @ CallOperatorWriteNode (location: (9,0)-(9,29))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (9,0)-(9,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (9,3)-(9,4) = "."
+ │ ├── message_loc: (9,4)-(9,5) = "C"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "C"
+ │ ├── write_name: "C="
+ │ ├── operator: :+
+ │ ├── operator_loc: (9,6)-(9,8) = "+="
+ │ └── value:
+ │ @ CallNode (location: (9,9)-(9,29))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,9)-(9,14) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,15)-(9,29))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (9,15)-(9,29))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (9,15)-(9,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (9,15)-(9,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── keyword_loc: (9,19)-(9,25) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (9,26)-(9,29))
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ ├── @ CallOperatorWriteNode (location: (11,0)-(11,30))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (11,0)-(11,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (11,3)-(11,4) = "."
+ │ ├── message_loc: (11,4)-(11,5) = "C"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "C"
+ │ ├── write_name: "C="
+ │ ├── operator: :+
+ │ ├── operator_loc: (11,6)-(11,8) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (11,9)-(11,30))
+ │ ├── expression:
+ │ │ @ CallNode (location: (11,9)-(11,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,9)-(11,14) = "raise"
+ │ │ ├── opening_loc: (11,14)-(11,15) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,15)-(11,18))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (11,15)-(11,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (11,15)-(11,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: (11,18)-(11,19) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── keyword_loc: (11,20)-(11,26) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (11,27)-(11,30))
+ ├── @ CallOperatorWriteNode (location: (13,0)-(13,29))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (13,0)-(13,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (13,3)-(13,4) = "."
+ │ ├── message_loc: (13,4)-(13,5) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "m"
+ │ ├── write_name: "m="
+ │ ├── operator: :+
+ │ ├── operator_loc: (13,6)-(13,8) = "+="
+ │ └── value:
+ │ @ CallNode (location: (13,9)-(13,29))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,9)-(13,14) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,15)-(13,29))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (13,15)-(13,29))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (13,15)-(13,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (13,15)-(13,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── keyword_loc: (13,19)-(13,25) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (13,26)-(13,29))
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ ├── @ CallOperatorWriteNode (location: (15,0)-(15,30))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (15,0)-(15,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (15,3)-(15,4) = "."
+ │ ├── message_loc: (15,4)-(15,5) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "m"
+ │ ├── write_name: "m="
+ │ ├── operator: :+
+ │ ├── operator_loc: (15,6)-(15,8) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (15,9)-(15,30))
+ │ ├── expression:
+ │ │ @ CallNode (location: (15,9)-(15,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,9)-(15,14) = "raise"
+ │ │ ├── opening_loc: (15,14)-(15,15) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (15,15)-(15,18))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (15,15)-(15,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (15,15)-(15,18) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: (15,18)-(15,19) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── keyword_loc: (15,20)-(15,26) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (15,27)-(15,30))
+ ├── @ ConstantPathOrWriteNode (location: (17,0)-(17,31))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (17,0)-(17,6))
+ │ │ ├── parent:
+ │ │ │ @ LocalVariableReadNode (location: (17,0)-(17,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (17,5)-(17,6))
+ │ │ │ └── name: :C
+ │ │ └── delimiter_loc: (17,3)-(17,5) = "::"
+ │ ├── operator_loc: (17,7)-(17,10) = "||="
+ │ └── value:
+ │ @ CallNode (location: (17,11)-(17,31))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,11)-(17,16) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,17)-(17,31))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (17,17)-(17,31))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (17,17)-(17,20))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (17,17)-(17,20) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── keyword_loc: (17,21)-(17,27) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (17,28)-(17,31))
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ ├── @ ConstantPathOrWriteNode (location: (19,0)-(19,32))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (19,0)-(19,6))
+ │ │ ├── parent:
+ │ │ │ @ LocalVariableReadNode (location: (19,0)-(19,3))
+ │ │ │ ├── name: :foo
+ │ │ │ └── depth: 0
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (19,5)-(19,6))
+ │ │ │ └── name: :C
+ │ │ └── delimiter_loc: (19,3)-(19,5) = "::"
+ │ ├── operator_loc: (19,7)-(19,10) = "||="
+ │ └── value:
+ │ @ RescueModifierNode (location: (19,11)-(19,32))
+ │ ├── expression:
+ │ │ @ CallNode (location: (19,11)-(19,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,11)-(19,16) = "raise"
+ │ │ ├── opening_loc: (19,16)-(19,17) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (19,17)-(19,20))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (19,17)-(19,20))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (19,17)-(19,20) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: (19,20)-(19,21) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── keyword_loc: (19,22)-(19,28) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (19,29)-(19,32))
+ ├── @ CallOperatorWriteNode (location: (21,0)-(21,30))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (21,0)-(21,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (21,3)-(21,5) = "::"
+ │ ├── message_loc: (21,5)-(21,6) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "m"
+ │ ├── write_name: "m="
+ │ ├── operator: :+
+ │ ├── operator_loc: (21,7)-(21,9) = "+="
+ │ └── value:
+ │ @ CallNode (location: (21,10)-(21,30))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (21,10)-(21,15) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,16)-(21,30))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (21,16)-(21,30))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (21,16)-(21,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (21,16)-(21,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── keyword_loc: (21,20)-(21,26) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (21,27)-(21,30))
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ ├── @ CallOperatorWriteNode (location: (23,0)-(23,31))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (23,0)-(23,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: (23,3)-(23,5) = "::"
+ │ ├── message_loc: (23,5)-(23,6) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── flags: ∅
+ │ ├── read_name: "m"
+ │ ├── write_name: "m="
+ │ ├── operator: :+
+ │ ├── operator_loc: (23,7)-(23,9) = "+="
+ │ └── value:
+ │ @ RescueModifierNode (location: (23,10)-(23,31))
+ │ ├── expression:
+ │ │ @ CallNode (location: (23,10)-(23,20))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,10)-(23,15) = "raise"
+ │ │ ├── opening_loc: (23,15)-(23,16) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (23,16)-(23,19))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (23,16)-(23,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (23,16)-(23,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: (23,19)-(23,20) = ")"
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ ├── keyword_loc: (23,21)-(23,27) = "rescue"
+ │ └── rescue_expression:
+ │ @ NilNode (location: (23,28)-(23,31))
+ ├── @ CallOperatorWriteNode (location: (25,0)-(25,30))
+ │ ├── receiver:
+ │ │ @ LocalVariableReadNode (location: (25,0)-(25,3))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,3)-(25,6) = "[0]"
+ │ ├── opening_loc: (25,3)-(25,4) = "["
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,4)-(25,5))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (25,4)-(25,5))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (25,5)-(25,6) = "]"
+ │ ├── flags: ∅
+ │ ├── read_name: "[]"
+ │ ├── write_name: "[]="
+ │ ├── operator: :+
+ │ ├── operator_loc: (25,7)-(25,9) = "+="
+ │ └── value:
+ │ @ CallNode (location: (25,10)-(25,30))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,10)-(25,15) = "raise"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,16)-(25,30))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (25,16)-(25,30))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (25,16)-(25,19))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (25,16)-(25,19) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── keyword_loc: (25,20)-(25,26) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (25,27)-(25,30))
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ └── @ CallOperatorWriteNode (location: (27,0)-(27,31))
+ ├── receiver:
+ │ @ LocalVariableReadNode (location: (27,0)-(27,3))
+ │ ├── name: :foo
+ │ └── depth: 0
+ ├── call_operator_loc: ∅
+ ├── message_loc: (27,3)-(27,6) = "[0]"
+ ├── opening_loc: (27,3)-(27,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (27,4)-(27,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (27,4)-(27,5))
+ │ └── flags: decimal
+ ├── closing_loc: (27,5)-(27,6) = "]"
+ ├── flags: ∅
+ ├── read_name: "[]"
+ ├── write_name: "[]="
+ ├── operator: :+
+ ├── operator_loc: (27,7)-(27,9) = "+="
+ └── value:
+ @ RescueModifierNode (location: (27,10)-(27,31))
+ ├── expression:
+ │ @ CallNode (location: (27,10)-(27,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,10)-(27,15) = "raise"
+ │ ├── opening_loc: (27,15)-(27,16) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,16)-(27,19))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (27,16)-(27,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (27,16)-(27,19) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (27,19)-(27,20) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "raise"
+ ├── keyword_loc: (27,21)-(27,27) = "rescue"
+ └── rescue_expression:
+ @ NilNode (location: (27,28)-(27,31))
diff --git a/test/prism/snapshots/whitequark/ruby_bug_12669.txt b/test/prism/snapshots/whitequark/ruby_bug_12669.txt
new file mode 100644
index 0000000000..f9380994e9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12669.txt
@@ -0,0 +1,125 @@
+@ ProgramNode (location: (1,0)-(7,16))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,16))
+ └── body: (length: 4)
+ ├── @ LocalVariableOperatorWriteNode (location: (1,0)-(1,18))
+ │ ├── name_loc: (1,0)-(1,1) = "a"
+ │ ├── operator_loc: (1,2)-(1,4) = "+="
+ │ ├── value:
+ │ │ @ LocalVariableOperatorWriteNode (location: (1,5)-(1,18))
+ │ │ ├── name_loc: (1,5)-(1,6) = "b"
+ │ │ ├── operator_loc: (1,7)-(1,9) = "+="
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (1,10)-(1,18))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,10)-(1,15) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (1,16)-(1,18))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (1,16)-(1,18))
+ │ │ │ │ ├── opening_loc: (1,16)-(1,17) = ":"
+ │ │ │ │ ├── value_loc: (1,17)-(1,18) = "x"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "raise"
+ │ │ ├── name: :b
+ │ │ ├── operator: :+
+ │ │ └── depth: 0
+ │ ├── name: :a
+ │ ├── operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableOperatorWriteNode (location: (3,0)-(3,17))
+ │ ├── name_loc: (3,0)-(3,1) = "a"
+ │ ├── operator_loc: (3,2)-(3,4) = "+="
+ │ ├── value:
+ │ │ @ LocalVariableWriteNode (location: (3,5)-(3,17))
+ │ │ ├── name: :b
+ │ │ ├── depth: 0
+ │ │ ├── name_loc: (3,5)-(3,6) = "b"
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (3,9)-(3,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (3,9)-(3,14) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (3,15)-(3,17))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (3,15)-(3,17))
+ │ │ │ │ ├── opening_loc: (3,15)-(3,16) = ":"
+ │ │ │ │ ├── value_loc: (3,16)-(3,17) = "x"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "raise"
+ │ │ └── operator_loc: (3,7)-(3,8) = "="
+ │ ├── name: :a
+ │ ├── operator: :+
+ │ └── depth: 0
+ ├── @ LocalVariableWriteNode (location: (5,0)-(5,17))
+ │ ├── name: :a
+ │ ├── depth: 0
+ │ ├── name_loc: (5,0)-(5,1) = "a"
+ │ ├── value:
+ │ │ @ LocalVariableOperatorWriteNode (location: (5,4)-(5,17))
+ │ │ ├── name_loc: (5,4)-(5,5) = "b"
+ │ │ ├── operator_loc: (5,6)-(5,8) = "+="
+ │ │ ├── value:
+ │ │ │ @ CallNode (location: (5,9)-(5,17))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,9)-(5,14) = "raise"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (5,15)-(5,17))
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ SymbolNode (location: (5,15)-(5,17))
+ │ │ │ │ ├── opening_loc: (5,15)-(5,16) = ":"
+ │ │ │ │ ├── value_loc: (5,16)-(5,17) = "x"
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── unescaped: "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: "raise"
+ │ │ ├── name: :b
+ │ │ ├── operator: :+
+ │ │ └── depth: 0
+ │ └── operator_loc: (5,2)-(5,3) = "="
+ └── @ LocalVariableWriteNode (location: (7,0)-(7,16))
+ ├── name: :a
+ ├── depth: 0
+ ├── name_loc: (7,0)-(7,1) = "a"
+ ├── value:
+ │ @ LocalVariableWriteNode (location: (7,4)-(7,16))
+ │ ├── name: :b
+ │ ├── depth: 0
+ │ ├── name_loc: (7,4)-(7,5) = "b"
+ │ ├── value:
+ │ │ @ CallNode (location: (7,8)-(7,16))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,8)-(7,13) = "raise"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,14)-(7,16))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ SymbolNode (location: (7,14)-(7,16))
+ │ │ │ ├── opening_loc: (7,14)-(7,15) = ":"
+ │ │ │ ├── value_loc: (7,15)-(7,16) = "x"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "x"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "raise"
+ │ └── operator_loc: (7,6)-(7,7) = "="
+ └── operator_loc: (7,2)-(7,3) = "="
diff --git a/test/prism/snapshots/whitequark/ruby_bug_12686.txt b/test/prism/snapshots/whitequark/ruby_bug_12686.txt
new file mode 100644
index 0000000000..c5d14532cb
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_12686.txt
@@ -0,0 +1,38 @@
+@ ProgramNode (location: (1,0)-(1,16))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,16))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,16))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,1) = "f"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,2)-(1,16))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,2)-(1,16))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,3)-(1,15))
+ │ │ └── body: (length: 1)
+ │ │ └── @ RescueModifierNode (location: (1,3)-(1,15))
+ │ │ ├── expression:
+ │ │ │ @ CallNode (location: (1,3)-(1,4))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,3)-(1,4) = "g"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "g"
+ │ │ ├── keyword_loc: (1,5)-(1,11) = "rescue"
+ │ │ └── rescue_expression:
+ │ │ @ NilNode (location: (1,12)-(1,15))
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,15)-(1,16) = ")"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "f"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_13547.txt b/test/prism/snapshots/whitequark/ruby_bug_13547.txt
new file mode 100644
index 0000000000..e370f58367
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_13547.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,4)-(1,6) = "[]"
+ ├── opening_loc: (1,4)-(1,5) = "["
+ ├── arguments: ∅
+ ├── closing_loc: (1,5)-(1,6) = "]"
+ ├── block:
+ │ @ BlockNode (location: (1,7)-(1,9))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,7)-(1,8) = "{"
+ │ └── closing_loc: (1,8)-(1,9) = "}"
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_14690.txt b/test/prism/snapshots/whitequark/ruby_bug_14690.txt
new file mode 100644
index 0000000000..949de2297a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_14690.txt
@@ -0,0 +1,57 @@
+@ ProgramNode (location: (1,0)-(1,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,23))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,23))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "let"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(1,6))
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,5)-(1,6) = ")"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,7)-(1,23))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,9)-(1,21))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,9)-(1,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,9)-(1,10) = "m"
+ │ │ ├── opening_loc: (1,10)-(1,11) = "("
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,11)-(1,12))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,11)-(1,12))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,11)-(1,12) = "a"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "a"
+ │ │ ├── closing_loc: (1,12)-(1,13) = ")"
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,14)-(1,21))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,14)-(1,16) = "do"
+ │ │ │ └── closing_loc: (1,18)-(1,21) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "m"
+ │ ├── opening_loc: (1,7)-(1,8) = "{"
+ │ └── closing_loc: (1,22)-(1,23) = "}"
+ ├── flags: ∅
+ └── name: "let"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_15789.txt b/test/prism/snapshots/whitequark/ruby_bug_15789.txt
new file mode 100644
index 0000000000..2de0b0f7a9
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_15789.txt
@@ -0,0 +1,112 @@
+@ ProgramNode (location: (1,0)-(3,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,19))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,20))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,2)-(1,20))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LambdaNode (location: (1,2)-(1,20))
+ │ │ ├── locals: [:a]
+ │ │ ├── operator_loc: (1,2)-(1,4) = "->"
+ │ │ ├── opening_loc: (1,17)-(1,18) = "{"
+ │ │ ├── closing_loc: (1,19)-(1,20) = "}"
+ │ │ ├── parameters:
+ │ │ │ @ BlockParametersNode (location: (1,4)-(1,16))
+ │ │ │ ├── parameters:
+ │ │ │ │ @ ParametersNode (location: (1,5)-(1,15))
+ │ │ │ │ ├── requireds: (length: 0)
+ │ │ │ │ ├── optionals: (length: 1)
+ │ │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,15))
+ │ │ │ │ │ ├── name: :a
+ │ │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a"
+ │ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "="
+ │ │ │ │ │ └── value:
+ │ │ │ │ │ @ LambdaNode (location: (1,9)-(1,15))
+ │ │ │ │ │ ├── locals: [:_1]
+ │ │ │ │ │ ├── operator_loc: (1,9)-(1,11) = "->"
+ │ │ │ │ │ ├── opening_loc: (1,11)-(1,12) = "{"
+ │ │ │ │ │ ├── closing_loc: (1,14)-(1,15) = "}"
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ └── body:
+ │ │ │ │ │ @ StatementsNode (location: (1,12)-(1,14))
+ │ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ │ └── @ LocalVariableReadNode (location: (1,12)-(1,14))
+ │ │ │ │ │ ├── name: :_1
+ │ │ │ │ │ └── depth: 0
+ │ │ │ │ ├── rest: ∅
+ │ │ │ │ ├── posts: (length: 0)
+ │ │ │ │ ├── keywords: (length: 0)
+ │ │ │ │ ├── keyword_rest: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── locals: (length: 0)
+ │ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ │ └── closing_loc: (1,15)-(1,16) = ")"
+ │ │ └── body:
+ │ │ @ StatementsNode (location: (1,18)-(1,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,18)-(1,19))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ └── @ CallNode (location: (3,0)-(3,19))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (3,0)-(3,1) = "m"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,2)-(3,19))
+ │ └── arguments: (length: 1)
+ │ └── @ LambdaNode (location: (3,2)-(3,19))
+ │ ├── locals: [:a]
+ │ ├── operator_loc: (3,2)-(3,4) = "->"
+ │ ├── opening_loc: (3,16)-(3,17) = "{"
+ │ ├── closing_loc: (3,18)-(3,19) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (3,4)-(3,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (3,5)-(3,14))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (3,5)-(3,14))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (3,5)-(3,7) = "a:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ LambdaNode (location: (3,8)-(3,14))
+ │ │ │ │ ├── locals: [:_1]
+ │ │ │ │ ├── operator_loc: (3,8)-(3,10) = "->"
+ │ │ │ │ ├── opening_loc: (3,10)-(3,11) = "{"
+ │ │ │ │ ├── closing_loc: (3,13)-(3,14) = "}"
+ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ └── body:
+ │ │ │ │ @ StatementsNode (location: (3,11)-(3,13))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (3,11)-(3,13))
+ │ │ │ │ ├── name: :_1
+ │ │ │ │ └── depth: 0
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (3,4)-(3,5) = "("
+ │ │ └── closing_loc: (3,14)-(3,15) = ")"
+ │ └── body:
+ │ @ StatementsNode (location: (3,17)-(3,18))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (3,17)-(3,18))
+ │ ├── name: :a
+ │ └── depth: 0
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "m"
diff --git a/test/prism/snapshots/whitequark/ruby_bug_9669.txt b/test/prism/snapshots/whitequark/ruby_bug_9669.txt
new file mode 100644
index 0000000000..62a25ef2ce
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ruby_bug_9669.txt
@@ -0,0 +1,56 @@
+@ ProgramNode (location: (1,0)-(8,1))
+├── locals: [:o]
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,1))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(3,3))
+ │ ├── name: :a
+ │ ├── name_loc: (1,4)-(1,5) = "a"
+ │ ├── receiver: ∅
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,6)-(1,8))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (1,6)-(1,8))
+ │ │ │ ├── name: :b
+ │ │ │ ├── name_loc: (1,6)-(1,8) = "b:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,0)-(2,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ReturnNode (location: (2,0)-(2,6))
+ │ │ ├── keyword_loc: (2,0)-(2,6) = "return"
+ │ │ └── arguments: ∅
+ │ ├── locals: [:b]
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── @ LocalVariableWriteNode (location: (5,0)-(8,1))
+ ├── name: :o
+ ├── depth: 0
+ ├── name_loc: (5,0)-(5,1) = "o"
+ ├── value:
+ │ @ HashNode (location: (5,4)-(8,1))
+ │ ├── opening_loc: (5,4)-(5,5) = "{"
+ │ ├── elements: (length: 1)
+ │ │ └── @ AssocNode (location: (6,0)-(7,1))
+ │ │ ├── key:
+ │ │ │ @ SymbolNode (location: (6,0)-(6,2))
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── value_loc: (6,0)-(6,1) = "a"
+ │ │ │ ├── closing_loc: (6,1)-(6,2) = ":"
+ │ │ │ └── unescaped: "a"
+ │ │ ├── value:
+ │ │ │ @ IntegerNode (location: (7,0)-(7,1))
+ │ │ │ └── flags: decimal
+ │ │ └── operator_loc: ∅
+ │ └── closing_loc: (8,0)-(8,1) = "}"
+ └── operator_loc: (5,2)-(5,3) = "="
diff --git a/test/prism/snapshots/whitequark/sclass.txt b/test/prism/snapshots/whitequark/sclass.txt
new file mode 100644
index 0000000000..81584a8ca6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/sclass.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,22))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,22))
+ └── body: (length: 1)
+ └── @ SingletonClassNode (location: (1,0)-(1,22))
+ ├── locals: []
+ ├── class_keyword_loc: (1,0)-(1,5) = "class"
+ ├── operator_loc: (1,6)-(1,8) = "<<"
+ ├── expression:
+ │ @ CallNode (location: (1,9)-(1,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,9)-(1,12) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── body:
+ │ @ StatementsNode (location: (1,14)-(1,17))
+ │ └── body: (length: 1)
+ │ └── @ NilNode (location: (1,14)-(1,17))
+ └── end_keyword_loc: (1,19)-(1,22) = "end"
diff --git a/test/prism/snapshots/whitequark/self.txt b/test/prism/snapshots/whitequark/self.txt
new file mode 100644
index 0000000000..c69f8fa8c5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/self.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ SelfNode (location: (1,0)-(1,4))
diff --git a/test/prism/snapshots/whitequark/send_attr_asgn.txt b/test/prism/snapshots/whitequark/send_attr_asgn.txt
new file mode 100644
index 0000000000..2f005fb4dc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_attr_asgn.txt
@@ -0,0 +1,99 @@
+@ ProgramNode (location: (1,0)-(7,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,10))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,5) = "A"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "A="
+ ├── @ CallNode (location: (3,0)-(3,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (3,3)-(3,4) = "."
+ │ ├── message_loc: (3,4)-(3,5) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,8)-(3,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,8)-(3,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "a="
+ ├── @ ConstantPathWriteNode (location: (5,0)-(5,10))
+ │ ├── target:
+ │ │ @ ConstantPathNode (location: (5,0)-(5,6))
+ │ │ ├── parent:
+ │ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "foo"
+ │ │ ├── child:
+ │ │ │ @ ConstantReadNode (location: (5,5)-(5,6))
+ │ │ │ └── name: :A
+ │ │ └── delimiter_loc: (5,3)-(5,5) = "::"
+ │ ├── operator_loc: (5,7)-(5,8) = "="
+ │ └── value:
+ │ @ IntegerNode (location: (5,9)-(5,10))
+ │ └── flags: decimal
+ └── @ CallNode (location: (7,0)-(7,10))
+ ├── receiver:
+ │ @ CallNode (location: (7,0)-(7,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (7,3)-(7,5) = "::"
+ ├── message_loc: (7,5)-(7,6) = "a"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,9)-(7,10))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (7,9)-(7,10))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "a="
diff --git a/test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt b/test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt
new file mode 100644
index 0000000000..e6ea102a26
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_attr_asgn_conditional.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,8))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "b="
diff --git a/test/prism/snapshots/whitequark/send_binary_op.txt b/test/prism/snapshots/whitequark/send_binary_op.txt
new file mode 100644
index 0000000000..d0b3aedae8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_binary_op.txt
@@ -0,0 +1,509 @@
+@ ProgramNode (location: (1,0)-(41,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(41,7))
+ └── body: (length: 21)
+ ├── @ CallNode (location: (1,0)-(1,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,6) = "!="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,7)-(1,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!="
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,4)-(3,6) = "!~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,7)-(3,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (3,7)-(3,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "!~"
+ ├── @ CallNode (location: (5,0)-(5,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,4)-(5,5) = "%"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "%"
+ ├── @ CallNode (location: (7,0)-(7,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,0)-(7,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,4)-(7,5) = "&"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,6)-(7,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (7,6)-(7,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "&"
+ ├── @ CallNode (location: (9,0)-(9,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,0)-(9,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (9,4)-(9,5) = "*"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,6)-(9,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (9,6)-(9,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "*"
+ ├── @ CallNode (location: (11,0)-(11,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,0)-(11,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,0)-(11,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (11,4)-(11,6) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,7)-(11,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (11,7)-(11,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "**"
+ ├── @ CallNode (location: (13,0)-(13,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (13,0)-(13,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (13,0)-(13,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,4)-(13,5) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,6)-(13,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,6)-(13,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+"
+ ├── @ CallNode (location: (15,0)-(15,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (15,0)-(15,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (15,0)-(15,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (15,4)-(15,5) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (15,6)-(15,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (15,6)-(15,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "-"
+ ├── @ CallNode (location: (17,0)-(17,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (17,0)-(17,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (17,0)-(17,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (17,4)-(17,5) = "/"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (17,6)-(17,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (17,6)-(17,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "/"
+ ├── @ CallNode (location: (19,0)-(19,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (19,0)-(19,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (19,0)-(19,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (19,4)-(19,5) = "<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (19,6)-(19,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (19,6)-(19,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<"
+ ├── @ CallNode (location: (21,0)-(21,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (21,0)-(21,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (21,0)-(21,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (21,4)-(21,6) = "<<"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (21,7)-(21,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (21,7)-(21,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<<"
+ ├── @ CallNode (location: (23,0)-(23,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (23,0)-(23,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (23,0)-(23,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (23,4)-(23,6) = "<="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (23,7)-(23,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (23,7)-(23,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<="
+ ├── @ CallNode (location: (25,0)-(25,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (25,0)-(25,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (25,0)-(25,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (25,4)-(25,7) = "<=>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (25,8)-(25,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (25,8)-(25,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "<=>"
+ ├── @ CallNode (location: (27,0)-(27,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (27,0)-(27,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (27,0)-(27,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (27,4)-(27,6) = "=="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (27,7)-(27,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (27,7)-(27,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=="
+ ├── @ CallNode (location: (29,0)-(29,9))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (29,0)-(29,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (29,0)-(29,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (29,4)-(29,7) = "==="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (29,8)-(29,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (29,8)-(29,9))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "==="
+ ├── @ CallNode (location: (31,0)-(31,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (31,0)-(31,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (31,0)-(31,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (31,4)-(31,6) = "=~"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (31,7)-(31,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (31,7)-(31,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "=~"
+ ├── @ CallNode (location: (33,0)-(33,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (33,0)-(33,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (33,0)-(33,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (33,4)-(33,5) = ">"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (33,6)-(33,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (33,6)-(33,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">"
+ ├── @ CallNode (location: (35,0)-(35,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (35,0)-(35,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (35,0)-(35,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (35,4)-(35,6) = ">="
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (35,7)-(35,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (35,7)-(35,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">="
+ ├── @ CallNode (location: (37,0)-(37,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (37,0)-(37,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (37,0)-(37,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (37,4)-(37,6) = ">>"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (37,7)-(37,8))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (37,7)-(37,8))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: ">>"
+ ├── @ CallNode (location: (39,0)-(39,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (39,0)-(39,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (39,0)-(39,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (39,4)-(39,5) = "^"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (39,6)-(39,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (39,6)-(39,7))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "^"
+ └── @ CallNode (location: (41,0)-(41,7))
+ ├── receiver:
+ │ @ CallNode (location: (41,0)-(41,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (41,0)-(41,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (41,4)-(41,5) = "|"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (41,6)-(41,7))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (41,6)-(41,7))
+ │ └── flags: decimal
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "|"
diff --git a/test/prism/snapshots/whitequark/send_block_chain_cmd.txt b/test/prism/snapshots/whitequark/send_block_chain_cmd.txt
new file mode 100644
index 0000000000..c82d388037
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_block_chain_cmd.txt
@@ -0,0 +1,305 @@
+@ ProgramNode (location: (1,0)-(13,23))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,23))
+ └── body: (length: 7)
+ ├── @ CallNode (location: (1,0)-(1,21))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (1,7)-(1,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (1,7)-(1,9) = "do"
+ │ │ │ └── closing_loc: (1,10)-(1,13) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "meth"
+ │ ├── call_operator_loc: (1,13)-(1,14) = "."
+ │ ├── message_loc: (1,14)-(1,17) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,18)-(1,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,18)-(1,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,18)-(1,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,28))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,5)-(3,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,5)-(3,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (3,7)-(3,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (3,7)-(3,9) = "do"
+ │ │ │ └── closing_loc: (3,10)-(3,13) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "meth"
+ │ ├── call_operator_loc: (3,13)-(3,14) = "."
+ │ ├── message_loc: (3,14)-(3,17) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,18)-(3,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,18)-(3,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,18)-(3,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,22)-(3,28))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (3,22)-(3,24) = "do"
+ │ │ └── closing_loc: (3,25)-(3,28) = "end"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (5,0)-(5,20))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (5,0)-(5,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (5,0)-(5,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (5,5)-(5,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (5,5)-(5,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (5,7)-(5,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (5,7)-(5,9) = "do"
+ │ │ │ └── closing_loc: (5,10)-(5,13) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "meth"
+ │ ├── call_operator_loc: (5,13)-(5,14) = "."
+ │ ├── message_loc: (5,14)-(5,17) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,18)-(5,20))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,18)-(5,19) = "{"
+ │ │ └── closing_loc: (5,19)-(5,20) = "}"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (7,0)-(7,22))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (7,0)-(7,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,0)-(7,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (7,5)-(7,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (7,5)-(7,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (7,7)-(7,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (7,7)-(7,9) = "do"
+ │ │ │ └── closing_loc: (7,10)-(7,13) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "meth"
+ │ ├── call_operator_loc: (7,13)-(7,14) = "."
+ │ ├── message_loc: (7,14)-(7,17) = "fun"
+ │ ├── opening_loc: (7,17)-(7,18) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (7,18)-(7,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (7,18)-(7,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (7,18)-(7,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (7,21)-(7,22) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (9,0)-(9,25))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (9,0)-(9,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,0)-(9,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (9,5)-(9,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (9,5)-(9,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (9,7)-(9,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (9,7)-(9,9) = "do"
+ │ │ │ └── closing_loc: (9,10)-(9,13) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "meth"
+ │ ├── call_operator_loc: (9,13)-(9,14) = "."
+ │ ├── message_loc: (9,14)-(9,17) = "fun"
+ │ ├── opening_loc: (9,17)-(9,18) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (9,18)-(9,21))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (9,18)-(9,21))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (9,18)-(9,21) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: (9,21)-(9,22) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (9,23)-(9,25))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (9,23)-(9,24) = "{"
+ │ │ └── closing_loc: (9,24)-(9,25) = "}"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (11,0)-(11,22))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (11,0)-(11,13))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,0)-(11,4) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (11,5)-(11,6))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (11,5)-(11,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (11,7)-(11,13))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (11,7)-(11,9) = "do"
+ │ │ │ └── closing_loc: (11,10)-(11,13) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: "meth"
+ │ ├── call_operator_loc: (11,13)-(11,15) = "::"
+ │ ├── message_loc: (11,15)-(11,18) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (11,19)-(11,22))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (11,19)-(11,22))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (11,19)-(11,22) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── @ CallNode (location: (13,0)-(13,23))
+ ├── receiver:
+ │ @ CallNode (location: (13,0)-(13,13))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,0)-(13,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (13,5)-(13,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (13,5)-(13,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (13,7)-(13,13))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (13,7)-(13,9) = "do"
+ │ │ └── closing_loc: (13,10)-(13,13) = "end"
+ │ ├── flags: ∅
+ │ └── name: "meth"
+ ├── call_operator_loc: (13,13)-(13,15) = "::"
+ ├── message_loc: (13,15)-(13,18) = "fun"
+ ├── opening_loc: (13,18)-(13,19) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (13,19)-(13,22))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (13,19)-(13,22))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (13,19)-(13,22) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── closing_loc: (13,22)-(13,23) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/send_block_conditional.txt b/test/prism/snapshots/whitequark/send_block_conditional.txt
new file mode 100644
index 0000000000..5fc2660cf7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_block_conditional.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (1,3)-(1,5) = "&."
+ ├── message_loc: (1,5)-(1,8) = "bar"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,9)-(1,11))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,9)-(1,10) = "{"
+ │ └── closing_loc: (1,10)-(1,11) = "}"
+ ├── flags: safe_navigation
+ └── name: "bar"
diff --git a/test/prism/snapshots/whitequark/send_call.txt b/test/prism/snapshots/whitequark/send_call.txt
new file mode 100644
index 0000000000..639381d9e5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_call.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 2)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: ∅
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,5)-(1,6))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: (1,6)-(1,7) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "call"
+ └── @ CallNode (location: (3,0)-(3,8))
+ ├── receiver:
+ │ @ CallNode (location: (3,0)-(3,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ ├── message_loc: ∅
+ ├── opening_loc: (3,5)-(3,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,6)-(3,7))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (3,6)-(3,7))
+ │ └── flags: decimal
+ ├── closing_loc: (3,7)-(3,8) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "call"
diff --git a/test/prism/snapshots/whitequark/send_conditional.txt b/test/prism/snapshots/whitequark/send_conditional.txt
new file mode 100644
index 0000000000..cf7412a9fa
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_conditional.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,4))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: safe_navigation
+ └── name: "b"
diff --git a/test/prism/snapshots/whitequark/send_index.txt b/test/prism/snapshots/whitequark/send_index.txt
new file mode 100644
index 0000000000..1689635083
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/whitequark/send_index_asgn.txt b/test/prism/snapshots/whitequark/send_index_asgn.txt
new file mode 100644
index 0000000000..190b6b4eb4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_asgn.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ └── flags: decimal
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]="
diff --git a/test/prism/snapshots/whitequark/send_index_asgn_legacy.txt b/test/prism/snapshots/whitequark/send_index_asgn_legacy.txt
new file mode 100644
index 0000000000..190b6b4eb4
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_asgn_legacy.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,13))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,13))
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ ├── @ IntegerNode (location: (1,7)-(1,8))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,12)-(1,13))
+ │ └── flags: decimal
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]="
diff --git a/test/prism/snapshots/whitequark/send_index_cmd.txt b/test/prism/snapshots/whitequark/send_index_cmd.txt
new file mode 100644
index 0000000000..a5a4f9586f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_cmd.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,10))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,10) = "[m bar]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,9))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,4)-(1,5) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── closing_loc: (1,9)-(1,10) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/whitequark/send_index_legacy.txt b/test/prism/snapshots/whitequark/send_index_legacy.txt
new file mode 100644
index 0000000000..1689635083
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_index_legacy.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,3)-(1,9) = "[1, 2]"
+ ├── opening_loc: (1,3)-(1,4) = "["
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,8))
+ │ └── arguments: (length: 2)
+ │ ├── @ IntegerNode (location: (1,4)-(1,5))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (1,7)-(1,8))
+ │ └── flags: decimal
+ ├── closing_loc: (1,8)-(1,9) = "]"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "[]"
diff --git a/test/prism/snapshots/whitequark/send_lambda.txt b/test/prism/snapshots/whitequark/send_lambda.txt
new file mode 100644
index 0000000000..aa21442971
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(5,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,5))
+ └── body: (length: 3)
+ ├── @ LambdaNode (location: (1,0)-(1,8))
+ │ ├── locals: [:*]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,5)-(1,6) = "{"
+ │ ├── closing_loc: (1,7)-(1,8) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,3)-(1,4))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,3)-(1,4))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest:
+ │ │ │ │ @ RestParameterNode (location: (1,3)-(1,4))
+ │ │ │ │ ├── name: nil
+ │ │ │ │ ├── name_loc: ∅
+ │ │ │ │ └── operator_loc: (1,3)-(1,4) = "*"
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (3,0)-(3,9))
+ │ ├── locals: []
+ │ ├── operator_loc: (3,0)-(3,2) = "->"
+ │ ├── opening_loc: (3,3)-(3,5) = "do"
+ │ ├── closing_loc: (3,6)-(3,9) = "end"
+ │ ├── parameters: ∅
+ │ └── body: ∅
+ └── @ LambdaNode (location: (5,0)-(5,5))
+ ├── locals: []
+ ├── operator_loc: (5,0)-(5,2) = "->"
+ ├── opening_loc: (5,2)-(5,3) = "{"
+ ├── closing_loc: (5,4)-(5,5) = "}"
+ ├── parameters: ∅
+ └── body: ∅
diff --git a/test/prism/snapshots/whitequark/send_lambda_args.txt b/test/prism/snapshots/whitequark/send_lambda_args.txt
new file mode 100644
index 0000000000..0e5dd9a7c0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda_args.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(3,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,9))
+ └── body: (length: 2)
+ ├── @ LambdaNode (location: (1,0)-(1,10))
+ │ ├── locals: [:a]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,7)-(1,8) = "{"
+ │ ├── closing_loc: (1,9)-(1,10) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,3)-(1,6))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,4)-(1,5))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (1,4)-(1,5))
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ │ └── closing_loc: (1,5)-(1,6) = ")"
+ │ └── body: ∅
+ └── @ LambdaNode (location: (3,0)-(3,9))
+ ├── locals: [:a]
+ ├── operator_loc: (3,0)-(3,2) = "->"
+ ├── opening_loc: (3,6)-(3,7) = "{"
+ ├── closing_loc: (3,8)-(3,9) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (3,2)-(3,5))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (3,3)-(3,4))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (3,3)-(3,4))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: (3,2)-(3,3) = "("
+ │ └── closing_loc: (3,4)-(3,5) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt b/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt
new file mode 100644
index 0000000000..f28ed889a8
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(3,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,9))
+ └── body: (length: 2)
+ ├── @ LambdaNode (location: (1,0)-(1,11))
+ │ ├── locals: [:a]
+ │ ├── operator_loc: (1,0)-(1,2) = "->"
+ │ ├── opening_loc: (1,8)-(1,9) = "{"
+ │ ├── closing_loc: (1,10)-(1,11) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (1,3)-(1,7))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (1,3)-(1,7))
+ │ │ │ ├── requireds: (length: 0)
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 1)
+ │ │ │ │ └── @ KeywordParameterNode (location: (1,3)-(1,7))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── name_loc: (1,3)-(1,5) = "a:"
+ │ │ │ │ └── value:
+ │ │ │ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ │ │ │ └── flags: decimal
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: ∅
+ │ │ └── closing_loc: ∅
+ │ └── body: ∅
+ └── @ LambdaNode (location: (3,0)-(3,9))
+ ├── locals: [:a]
+ ├── operator_loc: (3,0)-(3,2) = "->"
+ ├── opening_loc: (3,6)-(3,7) = "{"
+ ├── closing_loc: (3,8)-(3,9) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (3,3)-(3,5))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (3,3)-(3,5))
+ │ │ ├── requireds: (length: 0)
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 1)
+ │ │ │ └── @ KeywordParameterNode (location: (3,3)-(3,5))
+ │ │ │ ├── name: :a
+ │ │ │ ├── name_loc: (3,3)-(3,5) = "a:"
+ │ │ │ └── value: ∅
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 0)
+ │ ├── opening_loc: ∅
+ │ └── closing_loc: ∅
+ └── body: ∅
diff --git a/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt b/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt
new file mode 100644
index 0000000000..2e1160427c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda_args_shadow.txt
@@ -0,0 +1,31 @@
+@ ProgramNode (location: (1,0)-(1,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,19))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,19))
+ ├── locals: [:a, :foo, :bar]
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,16)-(1,17) = "{"
+ ├── closing_loc: (1,18)-(1,19) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (1,2)-(1,15))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (1,3)-(1,4))
+ │ │ ├── requireds: (length: 1)
+ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4))
+ │ │ │ └── name: :a
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 2)
+ │ │ ├── @ BlockLocalVariableNode (location: (1,6)-(1,9))
+ │ │ │ └── name: :foo
+ │ │ └── @ BlockLocalVariableNode (location: (1,11)-(1,14))
+ │ │ └── name: :bar
+ │ ├── opening_loc: (1,2)-(1,3) = "("
+ │ └── closing_loc: (1,14)-(1,15) = ")"
+ └── body: ∅
diff --git a/test/prism/snapshots/whitequark/send_lambda_legacy.txt b/test/prism/snapshots/whitequark/send_lambda_legacy.txt
new file mode 100644
index 0000000000..3a64e941b6
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_lambda_legacy.txt
@@ -0,0 +1,12 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ LambdaNode (location: (1,0)-(1,5))
+ ├── locals: []
+ ├── operator_loc: (1,0)-(1,2) = "->"
+ ├── opening_loc: (1,2)-(1,3) = "{"
+ ├── closing_loc: (1,4)-(1,5) = "}"
+ ├── parameters: ∅
+ └── body: ∅
diff --git a/test/prism/snapshots/whitequark/send_op_asgn_conditional.txt b/test/prism/snapshots/whitequark/send_op_asgn_conditional.txt
new file mode 100644
index 0000000000..2507dfa904
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_op_asgn_conditional.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,10))
+ └── body: (length: 1)
+ └── @ CallAndWriteNode (location: (1,0)-(1,10))
+ ├── receiver:
+ │ @ CallNode (location: (1,0)-(1,1))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "a"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "a"
+ ├── call_operator_loc: (1,1)-(1,3) = "&."
+ ├── message_loc: (1,3)-(1,4) = "b"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── flags: safe_navigation
+ ├── read_name: "b"
+ ├── write_name: "b="
+ ├── operator_loc: (1,5)-(1,8) = "&&="
+ └── value:
+ @ IntegerNode (location: (1,9)-(1,10))
+ └── flags: decimal
diff --git a/test/prism/snapshots/whitequark/send_plain.txt b/test/prism/snapshots/whitequark/send_plain.txt
new file mode 100644
index 0000000000..de49cba3c3
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_plain.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(5,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,8))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,7))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,7) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,10))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ │ ├── message_loc: (3,5)-(3,8) = "Fun"
+ │ ├── opening_loc: (3,8)-(3,9) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (3,9)-(3,10) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Fun"
+ └── @ CallNode (location: (5,0)-(5,8))
+ ├── receiver:
+ │ @ CallNode (location: (5,0)-(5,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (5,3)-(5,5) = "::"
+ ├── message_loc: (5,5)-(5,8) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/send_plain_cmd.txt b/test/prism/snapshots/whitequark/send_plain_cmd.txt
new file mode 100644
index 0000000000..1ddca9e15e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_plain_cmd.txt
@@ -0,0 +1,101 @@
+@ ProgramNode (location: (1,0)-(5,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,12))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,11))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,7) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,8)-(1,11))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,8)-(1,11) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,12))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ │ ├── message_loc: (3,5)-(3,8) = "Fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,9)-(3,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,9)-(3,12))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,9)-(3,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "Fun"
+ └── @ CallNode (location: (5,0)-(5,12))
+ ├── receiver:
+ │ @ CallNode (location: (5,0)-(5,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: (5,3)-(5,5) = "::"
+ ├── message_loc: (5,5)-(5,8) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,9)-(5,12))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (5,9)-(5,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,9)-(5,12) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/send_self.txt b/test/prism/snapshots/whitequark/send_self.txt
new file mode 100644
index 0000000000..aa1de85d59
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_self.txt
@@ -0,0 +1,39 @@
+@ ProgramNode (location: (1,0)-(5,6))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,6))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,4) = "fun!"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "fun!"
+ └── @ CallNode (location: (5,0)-(5,6))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,3) = "fun"
+ ├── opening_loc: (5,3)-(5,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,4)-(5,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (5,4)-(5,5))
+ │ └── flags: decimal
+ ├── closing_loc: (5,5)-(5,6) = ")"
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/send_self_block.txt b/test/prism/snapshots/whitequark/send_self_block.txt
new file mode 100644
index 0000000000..929f3ecaf2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_self_block.txt
@@ -0,0 +1,73 @@
+@ ProgramNode (location: (1,0)-(7,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,10))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(1,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,4)-(1,10))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,4)-(1,6) = "do"
+ │ │ └── closing_loc: (1,7)-(1,10) = "end"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,7))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,3) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,4)-(3,7))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (3,4)-(3,5) = "{"
+ │ │ └── closing_loc: (3,6)-(3,7) = "}"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (5,0)-(5,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,0)-(5,3) = "fun"
+ │ ├── opening_loc: (5,3)-(5,4) = "("
+ │ ├── arguments: ∅
+ │ ├── closing_loc: (5,4)-(5,5) = ")"
+ │ ├── block:
+ │ │ @ BlockNode (location: (5,6)-(5,9))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (5,6)-(5,7) = "{"
+ │ │ └── closing_loc: (5,8)-(5,9) = "}"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── @ CallNode (location: (7,0)-(7,10))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (7,0)-(7,3) = "fun"
+ ├── opening_loc: (7,3)-(7,4) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,4)-(7,5))
+ │ └── arguments: (length: 1)
+ │ └── @ IntegerNode (location: (7,4)-(7,5))
+ │ └── flags: decimal
+ ├── closing_loc: (7,5)-(7,6) = ")"
+ ├── block:
+ │ @ BlockNode (location: (7,7)-(7,10))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (7,7)-(7,8) = "{"
+ │ └── closing_loc: (7,9)-(7,10) = "}"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/send_unary_op.txt b/test/prism/snapshots/whitequark/send_unary_op.txt
new file mode 100644
index 0000000000..6b1f4a383b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/send_unary_op.txt
@@ -0,0 +1,65 @@
+@ ProgramNode (location: (1,0)-(5,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,4))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,1)-(1,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,1)-(1,4) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,1) = "+"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "+@"
+ ├── @ CallNode (location: (3,0)-(3,4))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,1)-(3,4))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,1)-(3,4) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "-@"
+ └── @ CallNode (location: (5,0)-(5,4))
+ ├── receiver:
+ │ @ CallNode (location: (5,1)-(5,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,1)-(5,4) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,1) = "~"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "~"
diff --git a/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt b/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt
new file mode 100644
index 0000000000..2a63c8cb0b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(8,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(8,4))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(1,4))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,4) = "<<-E"
+ │ ├── content_loc: (2,0)-(4,0) = " 1 \\\n 2\n 3\n"
+ │ ├── closing_loc: (5,0)-(5,0) = "E\n"
+ │ └── unescaped: " 1 2\n 3\n"
+ └── @ StringNode (location: (8,0)-(8,4))
+ ├── flags: ∅
+ ├── opening_loc: (8,0)-(8,4) = "<<~E"
+ ├── content_loc: (9,0)-(11,0) = " 1 \\\n 2\n 3\n"
+ ├── closing_loc: (12,0)-(12,0) = "E\n"
+ └── unescaped: "1 2\n3\n"
diff --git a/test/prism/snapshots/whitequark/space_args_arg.txt b/test/prism/snapshots/whitequark/space_args_arg.txt
new file mode 100644
index 0000000000..78e1933537
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,7))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,7))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(1,7))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,6)-(1,7) = ")"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/space_args_arg_block.txt b/test/prism/snapshots/whitequark/space_args_arg_block.txt
new file mode 100644
index 0000000000..f16e099147
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg_block.txt
@@ -0,0 +1,103 @@
+@ ProgramNode (location: (1,0)-(5,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,10))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,14))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (1,0)-(1,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (1,3)-(1,4) = "."
+ │ ├── message_loc: (1,4)-(1,7) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,11))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (1,8)-(1,11))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,9)-(1,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,9)-(1,10))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (1,8)-(1,9) = "("
+ │ │ └── closing_loc: (1,10)-(1,11) = ")"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (1,12)-(1,14))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (1,12)-(1,13) = "{"
+ │ │ └── closing_loc: (1,13)-(1,14) = "}"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ ├── @ CallNode (location: (3,0)-(3,15))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,0)-(3,3))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,0)-(3,3) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── call_operator_loc: (3,3)-(3,5) = "::"
+ │ ├── message_loc: (3,5)-(3,8) = "fun"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,9)-(3,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (3,9)-(3,12))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (3,10)-(3,11))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,10)-(3,11))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (3,9)-(3,10) = "("
+ │ │ └── closing_loc: (3,11)-(3,12) = ")"
+ │ ├── closing_loc: ∅
+ │ ├── block:
+ │ │ @ BlockNode (location: (3,13)-(3,15))
+ │ │ ├── locals: []
+ │ │ ├── parameters: ∅
+ │ │ ├── body: ∅
+ │ │ ├── opening_loc: (3,13)-(3,14) = "{"
+ │ │ └── closing_loc: (3,14)-(3,15) = "}"
+ │ ├── flags: ∅
+ │ └── name: "fun"
+ └── @ CallNode (location: (5,0)-(5,10))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,4)-(5,7))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (5,4)-(5,7))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (5,5)-(5,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,5)-(5,6))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (5,4)-(5,5) = "("
+ │ └── closing_loc: (5,6)-(5,7) = ")"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (5,8)-(5,10))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (5,8)-(5,9) = "{"
+ │ └── closing_loc: (5,9)-(5,10) = "}"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/space_args_arg_call.txt b/test/prism/snapshots/whitequark/space_args_arg_call.txt
new file mode 100644
index 0000000000..5de0873d9a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg_call.txt
@@ -0,0 +1,35 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,12))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,12))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (1,4)-(1,12))
+ │ ├── receiver:
+ │ │ @ ParenthesesNode (location: (1,4)-(1,7))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ │ └── flags: decimal
+ │ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ │ └── closing_loc: (1,6)-(1,7) = ")"
+ │ ├── call_operator_loc: (1,7)-(1,8) = "."
+ │ ├── message_loc: (1,8)-(1,12) = "to_i"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "to_i"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/space_args_arg_newline.txt b/test/prism/snapshots/whitequark/space_args_arg_newline.txt
new file mode 100644
index 0000000000..edc8183494
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_arg_newline.txt
@@ -0,0 +1,25 @@
+@ ProgramNode (location: (1,0)-(2,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(2,1))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(2,1))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(2,1))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(2,1))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,5)-(1,6))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,5)-(1,6))
+ │ │ └── flags: decimal
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (2,0)-(2,1) = ")"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/space_args_block.txt b/test/prism/snapshots/whitequark/space_args_block.txt
new file mode 100644
index 0000000000..b8e35e9d20
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_block.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,9))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,6))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(1,6))
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,5)-(1,6) = ")"
+ ├── closing_loc: ∅
+ ├── block:
+ │ @ BlockNode (location: (1,7)-(1,9))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,7)-(1,8) = "{"
+ │ └── closing_loc: (1,8)-(1,9) = "}"
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/space_args_cmd.txt b/test/prism/snapshots/whitequark/space_args_cmd.txt
new file mode 100644
index 0000000000..ef1ed11ec0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/space_args_cmd.txt
@@ -0,0 +1,45 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ CallNode (location: (1,0)-(1,11))
+ ├── receiver: ∅
+ ├── call_operator_loc: ∅
+ ├── message_loc: (1,0)-(1,3) = "fun"
+ ├── opening_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (1,4)-(1,11))
+ │ └── arguments: (length: 1)
+ │ └── @ ParenthesesNode (location: (1,4)-(1,11))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,5)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,5)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,6) = "f"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (1,7)-(1,10))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "f"
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,10)-(1,11) = ")"
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "fun"
diff --git a/test/prism/snapshots/whitequark/string___FILE__.txt b/test/prism/snapshots/whitequark/string___FILE__.txt
new file mode 100644
index 0000000000..c6ce21be5f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string___FILE__.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ SourceFileNode (location: (1,0)-(1,8))
+ └── filepath: "whitequark/string___FILE__.txt"
diff --git a/test/prism/snapshots/whitequark/string_concat.txt b/test/prism/snapshots/whitequark/string_concat.txt
new file mode 100644
index 0000000000..2c15895d7e
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string_concat.txt
@@ -0,0 +1,29 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ StringConcatNode (location: (1,0)-(1,14))
+ ├── left:
+ │ @ InterpolatedStringNode (location: (1,0)-(1,8))
+ │ ├── opening_loc: (1,0)-(1,1) = "\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (1,1)-(1,4) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ EmbeddedVariableNode (location: (1,4)-(1,7))
+ │ │ ├── operator_loc: (1,4)-(1,5) = "#"
+ │ │ └── variable:
+ │ │ @ InstanceVariableReadNode (location: (1,5)-(1,7))
+ │ │ └── name: :@a
+ │ └── closing_loc: (1,7)-(1,8) = "\""
+ └── right:
+ @ StringNode (location: (1,9)-(1,14))
+ ├── flags: ∅
+ ├── opening_loc: (1,9)-(1,10) = "\""
+ ├── content_loc: (1,10)-(1,13) = "bar"
+ ├── closing_loc: (1,13)-(1,14) = "\""
+ └── unescaped: "bar"
diff --git a/test/prism/snapshots/whitequark/string_dvar.txt b/test/prism/snapshots/whitequark/string_dvar.txt
new file mode 100644
index 0000000000..123b36e01d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string_dvar.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,14))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 5)
+ │ ├── @ EmbeddedVariableNode (location: (1,1)-(1,4))
+ │ │ ├── operator_loc: (1,1)-(1,2) = "#"
+ │ │ └── variable:
+ │ │ @ InstanceVariableReadNode (location: (1,2)-(1,4))
+ │ │ └── name: :@a
+ │ ├── @ StringNode (location: (1,4)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,4)-(1,5) = " "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " "
+ │ ├── @ EmbeddedVariableNode (location: (1,5)-(1,9))
+ │ │ ├── operator_loc: (1,5)-(1,6) = "#"
+ │ │ └── variable:
+ │ │ @ ClassVariableReadNode (location: (1,6)-(1,9))
+ │ │ └── name: :@@a
+ │ ├── @ StringNode (location: (1,9)-(1,10))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,9)-(1,10) = " "
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " "
+ │ └── @ EmbeddedVariableNode (location: (1,10)-(1,13))
+ │ ├── operator_loc: (1,10)-(1,11) = "#"
+ │ └── variable:
+ │ @ GlobalVariableReadNode (location: (1,11)-(1,13))
+ │ └── name: :$a
+ └── closing_loc: (1,13)-(1,14) = "\""
diff --git a/test/prism/snapshots/whitequark/string_interp.txt b/test/prism/snapshots/whitequark/string_interp.txt
new file mode 100644
index 0000000000..9c372473fe
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string_interp.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedStringNode (location: (1,0)-(1,14))
+ ├── opening_loc: (1,0)-(1,1) = "\""
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,1)-(1,4) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── @ EmbeddedStatementsNode (location: (1,4)-(1,10))
+ │ │ ├── opening_loc: (1,4)-(1,6) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,6)-(1,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ └── @ StringNode (location: (1,10)-(1,13))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,10)-(1,13) = "baz"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "baz"
+ └── closing_loc: (1,13)-(1,14) = "\""
diff --git a/test/prism/snapshots/whitequark/string_plain.txt b/test/prism/snapshots/whitequark/string_plain.txt
new file mode 100644
index 0000000000..7534ac1844
--- /dev/null
+++ b/test/prism/snapshots/whitequark/string_plain.txt
@@ -0,0 +1,17 @@
+@ ProgramNode (location: (1,0)-(3,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,8))
+ └── body: (length: 2)
+ ├── @ StringNode (location: (1,0)-(1,10))
+ │ ├── flags: ∅
+ │ ├── opening_loc: (1,0)-(1,3) = "%q("
+ │ ├── content_loc: (1,3)-(1,9) = "foobar"
+ │ ├── closing_loc: (1,9)-(1,10) = ")"
+ │ └── unescaped: "foobar"
+ └── @ StringNode (location: (3,0)-(3,8))
+ ├── flags: ∅
+ ├── opening_loc: (3,0)-(3,1) = "'"
+ ├── content_loc: (3,1)-(3,7) = "foobar"
+ ├── closing_loc: (3,7)-(3,8) = "'"
+ └── unescaped: "foobar"
diff --git a/test/prism/snapshots/whitequark/super.txt b/test/prism/snapshots/whitequark/super.txt
new file mode 100644
index 0000000000..694b4c796d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/super.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(5,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,10))
+ └── body: (length: 3)
+ ├── @ SuperNode (location: (1,0)-(1,9))
+ │ ├── keyword_loc: (1,0)-(1,5) = "super"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,6)-(1,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── rparen_loc: ∅
+ │ └── block: ∅
+ ├── @ SuperNode (location: (3,0)-(3,7))
+ │ ├── keyword_loc: (3,0)-(3,5) = "super"
+ │ ├── lparen_loc: (3,5)-(3,6) = "("
+ │ ├── arguments: ∅
+ │ ├── rparen_loc: (3,6)-(3,7) = ")"
+ │ └── block: ∅
+ └── @ SuperNode (location: (5,0)-(5,10))
+ ├── keyword_loc: (5,0)-(5,5) = "super"
+ ├── lparen_loc: (5,5)-(5,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (5,6)-(5,9))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (5,6)-(5,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,6)-(5,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── rparen_loc: (5,9)-(5,10) = ")"
+ └── block: ∅
diff --git a/test/prism/snapshots/whitequark/super_block.txt b/test/prism/snapshots/whitequark/super_block.txt
new file mode 100644
index 0000000000..ffb07e7715
--- /dev/null
+++ b/test/prism/snapshots/whitequark/super_block.txt
@@ -0,0 +1,47 @@
+@ ProgramNode (location: (1,0)-(3,21))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,21))
+ └── body: (length: 2)
+ ├── @ ForwardingSuperNode (location: (1,0)-(1,12))
+ │ └── block:
+ │ @ BlockNode (location: (1,6)-(1,12))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,6)-(1,8) = "do"
+ │ └── closing_loc: (1,9)-(1,12) = "end"
+ └── @ SuperNode (location: (3,0)-(3,21))
+ ├── keyword_loc: (3,0)-(3,5) = "super"
+ ├── lparen_loc: ∅
+ ├── arguments:
+ │ @ ArgumentsNode (location: (3,6)-(3,14))
+ │ └── arguments: (length: 2)
+ │ ├── @ CallNode (location: (3,6)-(3,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── @ CallNode (location: (3,11)-(3,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,11)-(3,14) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── rparen_loc: ∅
+ └── block:
+ @ BlockNode (location: (3,15)-(3,21))
+ ├── locals: []
+ ├── parameters: ∅
+ ├── body: ∅
+ ├── opening_loc: (3,15)-(3,17) = "do"
+ └── closing_loc: (3,18)-(3,21) = "end"
diff --git a/test/prism/snapshots/whitequark/symbol_interp.txt b/test/prism/snapshots/whitequark/symbol_interp.txt
new file mode 100644
index 0000000000..fae980d98a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/symbol_interp.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,15))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,15))
+ └── body: (length: 1)
+ └── @ InterpolatedSymbolNode (location: (1,0)-(1,15))
+ ├── opening_loc: (1,0)-(1,2) = ":\""
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,2)-(1,5))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,2)-(1,5) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── @ EmbeddedStatementsNode (location: (1,5)-(1,11))
+ │ │ ├── opening_loc: (1,5)-(1,7) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,7)-(1,10))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,7)-(1,10))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,7)-(1,10) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── closing_loc: (1,10)-(1,11) = "}"
+ │ └── @ StringNode (location: (1,11)-(1,14))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,11)-(1,14) = "baz"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "baz"
+ └── closing_loc: (1,14)-(1,15) = "\""
diff --git a/test/prism/snapshots/whitequark/symbol_plain.txt b/test/prism/snapshots/whitequark/symbol_plain.txt
new file mode 100644
index 0000000000..95b1246d41
--- /dev/null
+++ b/test/prism/snapshots/whitequark/symbol_plain.txt
@@ -0,0 +1,15 @@
+@ ProgramNode (location: (1,0)-(3,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,4))
+ └── body: (length: 2)
+ ├── @ SymbolNode (location: (1,0)-(1,6))
+ │ ├── opening_loc: (1,0)-(1,2) = ":'"
+ │ ├── value_loc: (1,2)-(1,5) = "foo"
+ │ ├── closing_loc: (1,5)-(1,6) = "'"
+ │ └── unescaped: "foo"
+ └── @ SymbolNode (location: (3,0)-(3,4))
+ ├── opening_loc: (3,0)-(3,1) = ":"
+ ├── value_loc: (3,1)-(3,4) = "foo"
+ ├── closing_loc: ∅
+ └── unescaped: "foo"
diff --git a/test/prism/snapshots/whitequark/ternary.txt b/test/prism/snapshots/whitequark/ternary.txt
new file mode 100644
index 0000000000..ce65ca09ec
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ternary.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,11))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,11))
+ └── body: (length: 1)
+ └── @ IfNode (location: (1,0)-(1,11))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,6)-(1,7))
+ │ └── body: (length: 1)
+ │ └── @ IntegerNode (location: (1,6)-(1,7))
+ │ └── flags: decimal
+ ├── consequent:
+ │ @ ElseNode (location: (1,8)-(1,11))
+ │ ├── else_keyword_loc: (1,8)-(1,9) = ":"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,10)-(1,11))
+ │ │ └── body: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,10)-(1,11))
+ │ │ └── flags: decimal
+ │ └── end_keyword_loc: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt b/test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt
new file mode 100644
index 0000000000..3b9457d471
--- /dev/null
+++ b/test/prism/snapshots/whitequark/ternary_ambiguous_symbol.txt
@@ -0,0 +1,48 @@
+@ ProgramNode (location: (1,0)-(1,13))
+├── locals: [:t]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,13))
+ └── body: (length: 2)
+ ├── @ LocalVariableWriteNode (location: (1,0)-(1,3))
+ │ ├── name: :t
+ │ ├── depth: 0
+ │ ├── name_loc: (1,0)-(1,1) = "t"
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,2)-(1,3))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (1,1)-(1,2) = "="
+ └── @ IfNode (location: (1,4)-(1,13))
+ ├── if_keyword_loc: ∅
+ ├── predicate:
+ │ @ ParenthesesNode (location: (1,4)-(1,9))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (1,5)-(1,8))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,5)-(1,8))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── opening_loc: (1,4)-(1,5) = "("
+ │ └── closing_loc: (1,8)-(1,9) = ")"
+ ├── statements:
+ │ @ StatementsNode (location: (1,10)-(1,11))
+ │ └── body: (length: 1)
+ │ └── @ LocalVariableReadNode (location: (1,10)-(1,11))
+ │ ├── name: :t
+ │ └── depth: 0
+ ├── consequent:
+ │ @ ElseNode (location: (1,11)-(1,13))
+ │ ├── else_keyword_loc: (1,11)-(1,12) = ":"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,12)-(1,13))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ConstantReadNode (location: (1,12)-(1,13))
+ │ │ └── name: :T
+ │ └── end_keyword_loc: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/trailing_forward_arg.txt b/test/prism/snapshots/whitequark/trailing_forward_arg.txt
new file mode 100644
index 0000000000..a67b8552b5
--- /dev/null
+++ b/test/prism/snapshots/whitequark/trailing_forward_arg.txt
@@ -0,0 +1,51 @@
+@ ProgramNode (location: (1,0)-(1,40))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,40))
+ └── body: (length: 1)
+ └── @ DefNode (location: (1,0)-(1,40))
+ ├── name: :foo
+ ├── name_loc: (1,4)-(1,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters:
+ │ @ ParametersNode (location: (1,8)-(1,17))
+ │ ├── requireds: (length: 2)
+ │ │ ├── @ RequiredParameterNode (location: (1,8)-(1,9))
+ │ │ │ └── name: :a
+ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12))
+ │ │ └── name: :b
+ │ ├── optionals: (length: 0)
+ │ ├── rest: ∅
+ │ ├── posts: (length: 0)
+ │ ├── keywords: (length: 0)
+ │ ├── keyword_rest:
+ │ │ @ ForwardingParameterNode (location: (1,14)-(1,17))
+ │ └── block: ∅
+ ├── body:
+ │ @ StatementsNode (location: (1,20)-(1,35))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,20)-(1,35))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,20)-(1,23) = "bar"
+ │ ├── opening_loc: (1,23)-(1,24) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,24)-(1,34))
+ │ │ └── arguments: (length: 3)
+ │ │ ├── @ LocalVariableReadNode (location: (1,24)-(1,25))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── @ IntegerNode (location: (1,27)-(1,29))
+ │ │ │ └── flags: decimal
+ │ │ └── @ ForwardingArgumentsNode (location: (1,31)-(1,34))
+ │ ├── closing_loc: (1,34)-(1,35) = ")"
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "bar"
+ ├── locals: [:a, :b, :"..."]
+ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: (1,7)-(1,8) = "("
+ ├── rparen_loc: (1,17)-(1,18) = ")"
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (1,37)-(1,40) = "end"
diff --git a/test/prism/snapshots/whitequark/true.txt b/test/prism/snapshots/whitequark/true.txt
new file mode 100644
index 0000000000..3e1ceef586
--- /dev/null
+++ b/test/prism/snapshots/whitequark/true.txt
@@ -0,0 +1,6 @@
+@ ProgramNode (location: (1,0)-(1,4))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,4))
+ └── body: (length: 1)
+ └── @ TrueNode (location: (1,0)-(1,4))
diff --git a/test/prism/snapshots/whitequark/unary_num_pow_precedence.txt b/test/prism/snapshots/whitequark/unary_num_pow_precedence.txt
new file mode 100644
index 0000000000..e0efa7e17c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unary_num_pow_precedence.txt
@@ -0,0 +1,71 @@
+@ ProgramNode (location: (1,0)-(5,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(5,10))
+ └── body: (length: 3)
+ ├── @ CallNode (location: (1,0)-(1,10))
+ │ ├── receiver:
+ │ │ @ FloatNode (location: (1,0)-(1,4))
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,7) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,8)-(1,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (1,8)-(1,10))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "**"
+ ├── @ CallNode (location: (3,0)-(3,8))
+ │ ├── receiver:
+ │ │ @ CallNode (location: (3,1)-(3,8))
+ │ │ ├── receiver:
+ │ │ │ @ IntegerNode (location: (3,1)-(3,2))
+ │ │ │ └── flags: decimal
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,3)-(3,5) = "**"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (3,6)-(3,8))
+ │ │ │ └── arguments: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (3,6)-(3,8))
+ │ │ │ └── flags: decimal
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: ∅
+ │ │ └── name: "**"
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,0)-(3,1) = "-"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "-@"
+ └── @ CallNode (location: (5,0)-(5,10))
+ ├── receiver:
+ │ @ CallNode (location: (5,1)-(5,10))
+ │ ├── receiver:
+ │ │ @ FloatNode (location: (5,1)-(5,4))
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (5,5)-(5,7) = "**"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,8)-(5,10))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,8)-(5,10))
+ │ │ └── flags: decimal
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "**"
+ ├── call_operator_loc: ∅
+ ├── message_loc: (5,0)-(5,1) = "-"
+ ├── opening_loc: ∅
+ ├── arguments: ∅
+ ├── closing_loc: ∅
+ ├── block: ∅
+ ├── flags: ∅
+ └── name: "-@"
diff --git a/test/prism/snapshots/whitequark/undef.txt b/test/prism/snapshots/whitequark/undef.txt
new file mode 100644
index 0000000000..1012a03c57
--- /dev/null
+++ b/test/prism/snapshots/whitequark/undef.txt
@@ -0,0 +1,36 @@
+@ ProgramNode (location: (1,0)-(1,27))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,27))
+ └── body: (length: 1)
+ └── @ UndefNode (location: (1,0)-(1,27))
+ ├── names: (length: 3)
+ │ ├── @ SymbolNode (location: (1,6)-(1,9))
+ │ │ ├── opening_loc: ∅
+ │ │ ├── value_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── @ SymbolNode (location: (1,11)-(1,15))
+ │ │ ├── opening_loc: (1,11)-(1,12) = ":"
+ │ │ ├── value_loc: (1,12)-(1,15) = "bar"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "bar"
+ │ └── @ InterpolatedSymbolNode (location: (1,17)-(1,27))
+ │ ├── opening_loc: (1,17)-(1,19) = ":\""
+ │ ├── parts: (length: 2)
+ │ │ ├── @ StringNode (location: (1,19)-(1,22))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (1,19)-(1,22) = "foo"
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo"
+ │ │ └── @ EmbeddedStatementsNode (location: (1,22)-(1,26))
+ │ │ ├── opening_loc: (1,22)-(1,24) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,24)-(1,25))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ IntegerNode (location: (1,24)-(1,25))
+ │ │ │ └── flags: decimal
+ │ │ └── closing_loc: (1,25)-(1,26) = "}"
+ │ └── closing_loc: (1,26)-(1,27) = "\""
+ └── keyword_loc: (1,0)-(1,5) = "undef"
diff --git a/test/prism/snapshots/whitequark/unless.txt b/test/prism/snapshots/whitequark/unless.txt
new file mode 100644
index 0000000000..8f34c0f21f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unless.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(3,20))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,20))
+ └── body: (length: 2)
+ ├── @ UnlessNode (location: (1,0)-(1,24))
+ │ ├── keyword_loc: (1,0)-(1,6) = "unless"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,10) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,16)-(1,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent: ∅
+ │ └── end_keyword_loc: (1,21)-(1,24) = "end"
+ └── @ UnlessNode (location: (3,0)-(3,20))
+ ├── keyword_loc: (3,0)-(3,6) = "unless"
+ ├── predicate:
+ │ @ CallNode (location: (3,7)-(3,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,7)-(3,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (3,12)-(3,15))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,12)-(3,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,12)-(3,15) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ └── end_keyword_loc: (3,17)-(3,20) = "end"
diff --git a/test/prism/snapshots/whitequark/unless_else.txt b/test/prism/snapshots/whitequark/unless_else.txt
new file mode 100644
index 0000000000..77ca14355c
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unless_else.txt
@@ -0,0 +1,93 @@
+@ ProgramNode (location: (1,0)-(3,30))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,30))
+ └── body: (length: 2)
+ ├── @ UnlessNode (location: (1,0)-(1,34))
+ │ ├── keyword_loc: (1,0)-(1,6) = "unless"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,7)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,7)-(1,10) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,16)-(1,19))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,16)-(1,19))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ ├── consequent:
+ │ │ @ ElseNode (location: (1,21)-(1,34))
+ │ │ ├── else_keyword_loc: (1,21)-(1,25) = "else"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,26)-(1,29))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,26)-(1,29))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,26)-(1,29) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── end_keyword_loc: (1,31)-(1,34) = "end"
+ │ └── end_keyword_loc: (1,31)-(1,34) = "end"
+ └── @ UnlessNode (location: (3,0)-(3,30))
+ ├── keyword_loc: (3,0)-(3,6) = "unless"
+ ├── predicate:
+ │ @ CallNode (location: (3,7)-(3,10))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,7)-(3,10) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (3,12)-(3,15))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,12)-(3,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,12)-(3,15) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent:
+ │ @ ElseNode (location: (3,17)-(3,30))
+ │ ├── else_keyword_loc: (3,17)-(3,21) = "else"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (3,22)-(3,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (3,22)-(3,25))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,22)-(3,25) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "baz"
+ │ └── end_keyword_loc: (3,27)-(3,30) = "end"
+ └── end_keyword_loc: (3,27)-(3,30) = "end"
diff --git a/test/prism/snapshots/whitequark/unless_mod.txt b/test/prism/snapshots/whitequark/unless_mod.txt
new file mode 100644
index 0000000000..923b4d3cc0
--- /dev/null
+++ b/test/prism/snapshots/whitequark/unless_mod.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ UnlessNode (location: (1,0)-(1,14))
+ ├── keyword_loc: (1,4)-(1,10) = "unless"
+ ├── predicate:
+ │ @ CallNode (location: (1,11)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,3))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,0)-(1,3))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,3) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ └── end_keyword_loc: ∅
diff --git a/test/prism/snapshots/whitequark/until.txt b/test/prism/snapshots/whitequark/until.txt
new file mode 100644
index 0000000000..a00febb20a
--- /dev/null
+++ b/test/prism/snapshots/whitequark/until.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(3,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,19))
+ └── body: (length: 2)
+ ├── @ UntilNode (location: (1,0)-(1,21))
+ │ ├── keyword_loc: (1,0)-(1,5) = "until"
+ │ ├── closing_loc: (1,18)-(1,21) = "end"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,13)-(1,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,13)-(1,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,13)-(1,17) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "meth"
+ │ └── flags: ∅
+ └── @ UntilNode (location: (3,0)-(3,19))
+ ├── keyword_loc: (3,0)-(3,5) = "until"
+ ├── closing_loc: (3,16)-(3,19) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (3,6)-(3,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (3,11)-(3,15))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,11)-(3,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,11)-(3,15) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/until_mod.txt b/test/prism/snapshots/whitequark/until_mod.txt
new file mode 100644
index 0000000000..56cc47b9d7
--- /dev/null
+++ b/test/prism/snapshots/whitequark/until_mod.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ UntilNode (location: (1,0)-(1,14))
+ ├── keyword_loc: (1,5)-(1,10) = "until"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,11)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,4))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,0)-(1,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/until_post.txt b/test/prism/snapshots/whitequark/until_post.txt
new file mode 100644
index 0000000000..7bcfd2678b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/until_post.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ UntilNode (location: (1,0)-(1,24))
+ ├── keyword_loc: (1,15)-(1,20) = "until"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,21)-(1,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,14))
+ │ └── body: (length: 1)
+ │ └── @ BeginNode (location: (1,0)-(1,14))
+ │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,6)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,10) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "meth"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (1,11)-(1,14) = "end"
+ └── flags: begin_modifier
diff --git a/test/prism/snapshots/whitequark/var_and_asgn.txt b/test/prism/snapshots/whitequark/var_and_asgn.txt
new file mode 100644
index 0000000000..fc746a9350
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_and_asgn.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ LocalVariableAndWriteNode (location: (1,0)-(1,7))
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── operator_loc: (1,2)-(1,5) = "&&="
+ ├── value:
+ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ └── flags: decimal
+ ├── name: :a
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/var_op_asgn.txt b/test/prism/snapshots/whitequark/var_op_asgn.txt
new file mode 100644
index 0000000000..7160141b07
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_op_asgn.txt
@@ -0,0 +1,53 @@
+@ ProgramNode (location: (1,0)-(7,23))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,23))
+ └── body: (length: 4)
+ ├── @ ClassVariableOperatorWriteNode (location: (1,0)-(1,11))
+ │ ├── name: :@@var
+ │ ├── name_loc: (1,0)-(1,5) = "@@var"
+ │ ├── operator_loc: (1,6)-(1,8) = "|="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (1,9)-(1,11))
+ │ │ └── flags: decimal
+ │ └── operator: :|
+ ├── @ InstanceVariableOperatorWriteNode (location: (3,0)-(3,7))
+ │ ├── name: :@a
+ │ ├── name_loc: (3,0)-(3,2) = "@a"
+ │ ├── operator_loc: (3,3)-(3,5) = "|="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (3,6)-(3,7))
+ │ │ └── flags: decimal
+ │ └── operator: :|
+ ├── @ LocalVariableOperatorWriteNode (location: (5,0)-(5,6))
+ │ ├── name_loc: (5,0)-(5,1) = "a"
+ │ ├── operator_loc: (5,2)-(5,4) = "+="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (5,5)-(5,6))
+ │ │ └── flags: decimal
+ │ ├── name: :a
+ │ ├── operator: :+
+ │ └── depth: 0
+ └── @ DefNode (location: (7,0)-(7,23))
+ ├── name: :a
+ ├── name_loc: (7,4)-(7,5) = "a"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (7,7)-(7,18))
+ │ └── body: (length: 1)
+ │ └── @ ClassVariableOperatorWriteNode (location: (7,7)-(7,18))
+ │ ├── name: :@@var
+ │ ├── name_loc: (7,7)-(7,12) = "@@var"
+ │ ├── operator_loc: (7,13)-(7,15) = "|="
+ │ ├── value:
+ │ │ @ IntegerNode (location: (7,16)-(7,18))
+ │ │ └── flags: decimal
+ │ └── operator: :|
+ ├── locals: []
+ ├── def_keyword_loc: (7,0)-(7,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (7,20)-(7,23) = "end"
diff --git a/test/prism/snapshots/whitequark/var_op_asgn_cmd.txt b/test/prism/snapshots/whitequark/var_op_asgn_cmd.txt
new file mode 100644
index 0000000000..9f9750cedd
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_op_asgn_cmd.txt
@@ -0,0 +1,27 @@
+@ ProgramNode (location: (1,0)-(1,12))
+├── locals: [:foo]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,12))
+ └── body: (length: 1)
+ └── @ LocalVariableOperatorWriteNode (location: (1,0)-(1,12))
+ ├── name_loc: (1,0)-(1,3) = "foo"
+ ├── operator_loc: (1,4)-(1,6) = "+="
+ ├── value:
+ │ @ CallNode (location: (1,7)-(1,12))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,7)-(1,8) = "m"
+ │ ├── opening_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,9)-(1,12))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (1,9)-(1,12))
+ │ │ ├── name: :foo
+ │ │ └── depth: 0
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: ∅
+ │ └── name: "m"
+ ├── name: :foo
+ ├── operator: :+
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/var_or_asgn.txt b/test/prism/snapshots/whitequark/var_or_asgn.txt
new file mode 100644
index 0000000000..d5064bc55b
--- /dev/null
+++ b/test/prism/snapshots/whitequark/var_or_asgn.txt
@@ -0,0 +1,13 @@
+@ ProgramNode (location: (1,0)-(1,7))
+├── locals: [:a]
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,7))
+ └── body: (length: 1)
+ └── @ LocalVariableOrWriteNode (location: (1,0)-(1,7))
+ ├── name_loc: (1,0)-(1,1) = "a"
+ ├── operator_loc: (1,2)-(1,5) = "||="
+ ├── value:
+ │ @ IntegerNode (location: (1,6)-(1,7))
+ │ └── flags: decimal
+ ├── name: :a
+ └── depth: 0
diff --git a/test/prism/snapshots/whitequark/when_multi.txt b/test/prism/snapshots/whitequark/when_multi.txt
new file mode 100644
index 0000000000..499369644d
--- /dev/null
+++ b/test/prism/snapshots/whitequark/when_multi.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(1,37))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,37))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,37))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,10)-(1,32))
+ │ ├── keyword_loc: (1,10)-(1,14) = "when"
+ │ ├── conditions: (length: 2)
+ │ │ ├── @ StringNode (location: (1,15)-(1,20))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: (1,15)-(1,16) = "'"
+ │ │ │ ├── content_loc: (1,16)-(1,19) = "bar"
+ │ │ │ ├── closing_loc: (1,19)-(1,20) = "'"
+ │ │ │ └── unescaped: "bar"
+ │ │ └── @ StringNode (location: (1,22)-(1,27))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,22)-(1,23) = "'"
+ │ │ ├── content_loc: (1,23)-(1,26) = "baz"
+ │ │ ├── closing_loc: (1,26)-(1,27) = "'"
+ │ │ └── unescaped: "baz"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,29)-(1,32))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,29)-(1,32))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,29)-(1,32) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,34)-(1,37) = "end"
diff --git a/test/prism/snapshots/whitequark/when_splat.txt b/test/prism/snapshots/whitequark/when_splat.txt
new file mode 100644
index 0000000000..d09637b1a1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/when_splat.txt
@@ -0,0 +1,69 @@
+@ ProgramNode (location: (1,0)-(1,43))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,43))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,43))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── conditions: (length: 2)
+ │ ├── @ WhenNode (location: (1,10)-(1,27))
+ │ │ ├── keyword_loc: (1,10)-(1,14) = "when"
+ │ │ ├── conditions: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (1,15)-(1,16))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── @ SplatNode (location: (1,18)-(1,22))
+ │ │ │ ├── operator_loc: (1,18)-(1,19) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ CallNode (location: (1,19)-(1,22))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,19)-(1,22) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "baz"
+ │ │ └── statements:
+ │ │ @ StatementsNode (location: (1,24)-(1,27))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,24)-(1,27))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,24)-(1,27) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "bar"
+ │ └── @ WhenNode (location: (1,29)-(1,38))
+ │ ├── keyword_loc: (1,29)-(1,33) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ SplatNode (location: (1,34)-(1,38))
+ │ │ ├── operator_loc: (1,34)-(1,35) = "*"
+ │ │ └── expression:
+ │ │ @ CallNode (location: (1,35)-(1,38))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,35)-(1,38) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── statements: ∅
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,40)-(1,43) = "end"
diff --git a/test/prism/snapshots/whitequark/when_then.txt b/test/prism/snapshots/whitequark/when_then.txt
new file mode 100644
index 0000000000..01feb88737
--- /dev/null
+++ b/test/prism/snapshots/whitequark/when_then.txt
@@ -0,0 +1,43 @@
+@ ProgramNode (location: (1,0)-(1,34))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,34))
+ └── body: (length: 1)
+ └── @ CaseNode (location: (1,0)-(1,34))
+ ├── predicate:
+ │ @ CallNode (location: (1,5)-(1,8))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,5)-(1,8) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── conditions: (length: 1)
+ │ └── @ WhenNode (location: (1,10)-(1,29))
+ │ ├── keyword_loc: (1,10)-(1,14) = "when"
+ │ ├── conditions: (length: 1)
+ │ │ └── @ StringNode (location: (1,15)-(1,20))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: (1,15)-(1,16) = "'"
+ │ │ ├── content_loc: (1,16)-(1,19) = "bar"
+ │ │ ├── closing_loc: (1,19)-(1,20) = "'"
+ │ │ └── unescaped: "bar"
+ │ └── statements:
+ │ @ StatementsNode (location: (1,26)-(1,29))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,26)-(1,29))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,26)-(1,29) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "bar"
+ ├── consequent: ∅
+ ├── case_keyword_loc: (1,0)-(1,4) = "case"
+ └── end_keyword_loc: (1,31)-(1,34) = "end"
diff --git a/test/prism/snapshots/whitequark/while.txt b/test/prism/snapshots/whitequark/while.txt
new file mode 100644
index 0000000000..2fae4e412f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/while.txt
@@ -0,0 +1,61 @@
+@ ProgramNode (location: (1,0)-(3,19))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,19))
+ └── body: (length: 2)
+ ├── @ WhileNode (location: (1,0)-(1,21))
+ │ ├── keyword_loc: (1,0)-(1,5) = "while"
+ │ ├── closing_loc: (1,18)-(1,21) = "end"
+ │ ├── predicate:
+ │ │ @ CallNode (location: (1,6)-(1,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,13)-(1,17))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,13)-(1,17))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,13)-(1,17) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "meth"
+ │ └── flags: ∅
+ └── @ WhileNode (location: (3,0)-(3,19))
+ ├── keyword_loc: (3,0)-(3,5) = "while"
+ ├── closing_loc: (3,16)-(3,19) = "end"
+ ├── predicate:
+ │ @ CallNode (location: (3,6)-(3,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (3,11)-(3,15))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (3,11)-(3,15))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (3,11)-(3,15) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/while_mod.txt b/test/prism/snapshots/whitequark/while_mod.txt
new file mode 100644
index 0000000000..46b1d20033
--- /dev/null
+++ b/test/prism/snapshots/whitequark/while_mod.txt
@@ -0,0 +1,33 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ WhileNode (location: (1,0)-(1,14))
+ ├── keyword_loc: (1,5)-(1,10) = "while"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,11)-(1,14))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,11)-(1,14) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,4))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (1,0)-(1,4))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,0)-(1,4) = "meth"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "meth"
+ └── flags: ∅
diff --git a/test/prism/snapshots/whitequark/while_post.txt b/test/prism/snapshots/whitequark/while_post.txt
new file mode 100644
index 0000000000..7ec16db0a1
--- /dev/null
+++ b/test/prism/snapshots/whitequark/while_post.txt
@@ -0,0 +1,42 @@
+@ ProgramNode (location: (1,0)-(1,24))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,24))
+ └── body: (length: 1)
+ └── @ WhileNode (location: (1,0)-(1,24))
+ ├── keyword_loc: (1,15)-(1,20) = "while"
+ ├── closing_loc: ∅
+ ├── predicate:
+ │ @ CallNode (location: (1,21)-(1,24))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (1,21)-(1,24) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ ├── statements:
+ │ @ StatementsNode (location: (1,0)-(1,14))
+ │ └── body: (length: 1)
+ │ └── @ BeginNode (location: (1,0)-(1,14))
+ │ ├── begin_keyword_loc: (1,0)-(1,5) = "begin"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (1,6)-(1,10))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (1,6)-(1,10))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (1,6)-(1,10) = "meth"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "meth"
+ │ ├── rescue_clause: ∅
+ │ ├── else_clause: ∅
+ │ ├── ensure_clause: ∅
+ │ └── end_keyword_loc: (1,11)-(1,14) = "end"
+ └── flags: begin_modifier
diff --git a/test/prism/snapshots/whitequark/xstring_interp.txt b/test/prism/snapshots/whitequark/xstring_interp.txt
new file mode 100644
index 0000000000..53844dfbe2
--- /dev/null
+++ b/test/prism/snapshots/whitequark/xstring_interp.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(1,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,14))
+ └── body: (length: 1)
+ └── @ InterpolatedXStringNode (location: (1,0)-(1,14))
+ ├── opening_loc: (1,0)-(1,1) = "`"
+ ├── parts: (length: 3)
+ │ ├── @ StringNode (location: (1,1)-(1,4))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (1,1)-(1,4) = "foo"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: "foo"
+ │ ├── @ EmbeddedStatementsNode (location: (1,4)-(1,10))
+ │ │ ├── opening_loc: (1,4)-(1,6) = "\#{"
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (1,6)-(1,9))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (1,6)-(1,9))
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── message_loc: (1,6)-(1,9) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ ├── block: ∅
+ │ │ │ ├── flags: variable_call
+ │ │ │ └── name: "bar"
+ │ │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ └── @ StringNode (location: (1,10)-(1,13))
+ │ ├── flags: ∅
+ │ ├── opening_loc: ∅
+ │ ├── content_loc: (1,10)-(1,13) = "baz"
+ │ ├── closing_loc: ∅
+ │ └── unescaped: "baz"
+ └── closing_loc: (1,13)-(1,14) = "`"
diff --git a/test/prism/snapshots/whitequark/xstring_plain.txt b/test/prism/snapshots/whitequark/xstring_plain.txt
new file mode 100644
index 0000000000..2546f9829f
--- /dev/null
+++ b/test/prism/snapshots/whitequark/xstring_plain.txt
@@ -0,0 +1,10 @@
+@ ProgramNode (location: (1,0)-(1,8))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,8))
+ └── body: (length: 1)
+ └── @ XStringNode (location: (1,0)-(1,8))
+ ├── opening_loc: (1,0)-(1,1) = "`"
+ ├── content_loc: (1,1)-(1,7) = "foobar"
+ ├── closing_loc: (1,7)-(1,8) = "`"
+ └── unescaped: "foobar"
diff --git a/test/prism/snapshots/whitequark/yield.txt b/test/prism/snapshots/whitequark/yield.txt
new file mode 100644
index 0000000000..4d1ca051cc
--- /dev/null
+++ b/test/prism/snapshots/whitequark/yield.txt
@@ -0,0 +1,49 @@
+@ ProgramNode (location: (1,0)-(7,10))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,10))
+ └── body: (length: 4)
+ ├── @ YieldNode (location: (1,0)-(1,5))
+ │ ├── keyword_loc: (1,0)-(1,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments: ∅
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (3,0)-(3,9))
+ │ ├── keyword_loc: (3,0)-(3,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (3,6)-(3,9))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ CallNode (location: (3,6)-(3,9))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (3,6)-(3,9) = "foo"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ ├── flags: variable_call
+ │ │ └── name: "foo"
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (5,0)-(5,7))
+ │ ├── keyword_loc: (5,0)-(5,5) = "yield"
+ │ ├── lparen_loc: (5,5)-(5,6) = "("
+ │ ├── arguments: ∅
+ │ └── rparen_loc: (5,6)-(5,7) = ")"
+ └── @ YieldNode (location: (7,0)-(7,10))
+ ├── keyword_loc: (7,0)-(7,5) = "yield"
+ ├── lparen_loc: (7,5)-(7,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,6)-(7,9))
+ │ └── arguments: (length: 1)
+ │ └── @ CallNode (location: (7,6)-(7,9))
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── message_loc: (7,6)-(7,9) = "foo"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ ├── block: ∅
+ │ ├── flags: variable_call
+ │ └── name: "foo"
+ └── rparen_loc: (7,9)-(7,10) = ")"
diff --git a/test/prism/snapshots/whitequark/zsuper.txt b/test/prism/snapshots/whitequark/zsuper.txt
new file mode 100644
index 0000000000..9c28128d06
--- /dev/null
+++ b/test/prism/snapshots/whitequark/zsuper.txt
@@ -0,0 +1,7 @@
+@ ProgramNode (location: (1,0)-(1,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,5))
+ └── body: (length: 1)
+ └── @ ForwardingSuperNode (location: (1,0)-(1,5))
+ └── block: ∅
diff --git a/test/prism/snapshots/xstring.txt b/test/prism/snapshots/xstring.txt
new file mode 100644
index 0000000000..5cea973e4f
--- /dev/null
+++ b/test/prism/snapshots/xstring.txt
@@ -0,0 +1,52 @@
+@ ProgramNode (location: (1,0)-(7,5))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,5))
+ └── body: (length: 4)
+ ├── @ XStringNode (location: (1,0)-(1,7))
+ │ ├── opening_loc: (1,0)-(1,3) = "%x["
+ │ ├── content_loc: (1,3)-(1,6) = "foo"
+ │ ├── closing_loc: (1,6)-(1,7) = "]"
+ │ └── unescaped: "foo"
+ ├── @ InterpolatedXStringNode (location: (3,0)-(3,16))
+ │ ├── opening_loc: (3,0)-(3,1) = "`"
+ │ ├── parts: (length: 3)
+ │ │ ├── @ StringNode (location: (3,1)-(3,5))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── content_loc: (3,1)-(3,5) = "foo "
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── unescaped: "foo "
+ │ │ ├── @ EmbeddedStatementsNode (location: (3,5)-(3,11))
+ │ │ │ ├── opening_loc: (3,5)-(3,7) = "\#{"
+ │ │ │ ├── statements:
+ │ │ │ │ @ StatementsNode (location: (3,7)-(3,10))
+ │ │ │ │ └── body: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (3,7)-(3,10))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (3,7)-(3,10) = "bar"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block: ∅
+ │ │ │ │ ├── flags: variable_call
+ │ │ │ │ └── name: "bar"
+ │ │ │ └── closing_loc: (3,10)-(3,11) = "}"
+ │ │ └── @ StringNode (location: (3,11)-(3,15))
+ │ │ ├── flags: ∅
+ │ │ ├── opening_loc: ∅
+ │ │ ├── content_loc: (3,11)-(3,15) = " baz"
+ │ │ ├── closing_loc: ∅
+ │ │ └── unescaped: " baz"
+ │ └── closing_loc: (3,15)-(3,16) = "`"
+ ├── @ XStringNode (location: (5,0)-(5,6))
+ │ ├── opening_loc: (5,0)-(5,1) = "`"
+ │ ├── content_loc: (5,1)-(5,5) = "f\\oo"
+ │ ├── closing_loc: (5,5)-(5,6) = "`"
+ │ └── unescaped: "foo"
+ └── @ XStringNode (location: (7,0)-(7,5))
+ ├── opening_loc: (7,0)-(7,1) = "`"
+ ├── content_loc: (7,1)-(7,4) = "foo"
+ ├── closing_loc: (7,4)-(7,5) = "`"
+ └── unescaped: "foo"
diff --git a/test/prism/snapshots/yield.txt b/test/prism/snapshots/yield.txt
new file mode 100644
index 0000000000..ecdf48f026
--- /dev/null
+++ b/test/prism/snapshots/yield.txt
@@ -0,0 +1,37 @@
+@ ProgramNode (location: (1,0)-(7,14))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,14))
+ └── body: (length: 4)
+ ├── @ YieldNode (location: (1,0)-(1,5))
+ │ ├── keyword_loc: (1,0)-(1,5) = "yield"
+ │ ├── lparen_loc: ∅
+ │ ├── arguments: ∅
+ │ └── rparen_loc: ∅
+ ├── @ YieldNode (location: (3,0)-(3,7))
+ │ ├── keyword_loc: (3,0)-(3,5) = "yield"
+ │ ├── lparen_loc: (3,5)-(3,6) = "("
+ │ ├── arguments: ∅
+ │ └── rparen_loc: (3,6)-(3,7) = ")"
+ ├── @ YieldNode (location: (5,0)-(5,8))
+ │ ├── keyword_loc: (5,0)-(5,5) = "yield"
+ │ ├── lparen_loc: (5,5)-(5,6) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (5,6)-(5,7))
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ IntegerNode (location: (5,6)-(5,7))
+ │ │ └── flags: decimal
+ │ └── rparen_loc: (5,7)-(5,8) = ")"
+ └── @ YieldNode (location: (7,0)-(7,14))
+ ├── keyword_loc: (7,0)-(7,5) = "yield"
+ ├── lparen_loc: (7,5)-(7,6) = "("
+ ├── arguments:
+ │ @ ArgumentsNode (location: (7,6)-(7,13))
+ │ └── arguments: (length: 3)
+ │ ├── @ IntegerNode (location: (7,6)-(7,7))
+ │ │ └── flags: decimal
+ │ ├── @ IntegerNode (location: (7,9)-(7,10))
+ │ │ └── flags: decimal
+ │ └── @ IntegerNode (location: (7,12)-(7,13))
+ │ └── flags: decimal
+ └── rparen_loc: (7,13)-(7,14) = ")"
diff --git a/test/prism/test_helper.rb b/test/prism/test_helper.rb
new file mode 100644
index 0000000000..086b73dd56
--- /dev/null
+++ b/test/prism/test_helper.rb
@@ -0,0 +1,91 @@
+# frozen_string_literal: true
+
+require "yarp"
+require "ripper"
+require "pp"
+require "test/unit"
+require "tempfile"
+
+puts "Using YARP backend: #{YARP::BACKEND}" if ENV["YARP_FFI_BACKEND"]
+
+# It is useful to have a diff even if the strings to compare are big
+# However, ruby/ruby does not have a version of Test::Unit with access to
+# max_diff_target_string_size
+if defined?(Test::Unit::Assertions::AssertionMessage)
+ Test::Unit::Assertions::AssertionMessage.max_diff_target_string_size = 5000
+end
+
+module YARP
+ class TestCase < ::Test::Unit::TestCase
+ private
+
+ def assert_raises(*args, &block)
+ raise "Use assert_raise instead"
+ end
+
+ def assert_equal_nodes(expected, actual, compare_location: true, parent: nil)
+ assert_equal expected.class, actual.class
+
+ case expected
+ when Array
+ assert_equal(
+ expected.size,
+ actual.size,
+ -> { "Arrays were different sizes. Parent: #{parent.pretty_inspect}" }
+ )
+
+ expected.zip(actual).each do |(expected_element, actual_element)|
+ assert_equal_nodes(
+ expected_element,
+ actual_element,
+ compare_location: compare_location,
+ parent: actual
+ )
+ end
+ when SourceFileNode
+ deconstructed_expected = expected.deconstruct_keys(nil)
+ deconstructed_actual = actual.deconstruct_keys(nil)
+ assert_equal deconstructed_expected.keys, deconstructed_actual.keys
+
+ # Filepaths can be different if test suites were run on different
+ # machines. We accommodate for this by comparing the basenames, and not
+ # the absolute filepaths.
+ assert_equal deconstructed_expected.except(:filepath), deconstructed_actual.except(:filepath)
+ assert_equal File.basename(deconstructed_expected[:filepath]), File.basename(deconstructed_actual[:filepath])
+ when Node
+ deconstructed_expected = expected.deconstruct_keys(nil)
+ deconstructed_actual = actual.deconstruct_keys(nil)
+ assert_equal deconstructed_expected.keys, deconstructed_actual.keys
+
+ deconstructed_expected.each_key do |key|
+ assert_equal_nodes(
+ deconstructed_expected[key],
+ deconstructed_actual[key],
+ compare_location: compare_location,
+ parent: actual
+ )
+ end
+ when Location
+ assert_operator actual.start_offset, :<=, actual.end_offset, -> {
+ "start_offset > end_offset for #{actual.inspect}, parent is #{parent.pretty_inspect}"
+ }
+
+ if compare_location
+ assert_equal(
+ expected.start_offset,
+ actual.start_offset,
+ -> { "Start locations were different. Parent: #{parent.pretty_inspect}" }
+ )
+
+ assert_equal(
+ expected.end_offset,
+ actual.end_offset,
+ -> { "End locations were different. Parent: #{parent.pretty_inspect}" }
+ )
+ end
+ else
+ assert_equal expected, actual
+ end
+ end
+ end
+end
diff --git a/test/prism/unescape_test.rb b/test/prism/unescape_test.rb
new file mode 100644
index 0000000000..a7d955b315
--- /dev/null
+++ b/test/prism/unescape_test.rb
@@ -0,0 +1,165 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+return if YARP::BACKEND == :FFI
+
+module YARP
+ class UnescapeNoneTest < TestCase
+ def test_backslash
+ assert_unescape_none("\\")
+ end
+
+ def test_single_quote
+ assert_unescape_none("'")
+ end
+
+ private
+
+ def assert_unescape_none(source)
+ assert_equal(source, Debug.unescape_none(source))
+ end
+ end
+
+ class UnescapeMinimalTest < TestCase
+ def test_backslash
+ assert_unescape_minimal("\\", "\\\\")
+ end
+
+ def test_single_quote
+ assert_unescape_minimal("'", "\\'")
+ end
+
+ def test_single_char
+ assert_unescape_minimal("\\a", "\\a")
+ end
+
+ private
+
+ def assert_unescape_minimal(expected, source)
+ assert_equal(expected, Debug.unescape_minimal(source))
+ end
+ end
+
+ class UnescapeAllTest < TestCase
+ def test_backslash
+ assert_unescape_all("\\", "\\\\")
+ end
+
+ def test_single_quote
+ assert_unescape_all("'", "\\'")
+ end
+
+ def test_single_char
+ assert_unescape_all("\a", "\\a")
+ assert_unescape_all("\b", "\\b")
+ assert_unescape_all("\e", "\\e")
+ assert_unescape_all("\f", "\\f")
+ assert_unescape_all("\n", "\\n")
+ assert_unescape_all("\r", "\\r")
+ assert_unescape_all("\s", "\\s")
+ assert_unescape_all("\t", "\\t")
+ assert_unescape_all("\v", "\\v")
+ end
+
+ def test_octal
+ assert_unescape_all("\a", "\\7")
+ assert_unescape_all("#", "\\43")
+ assert_unescape_all("a", "\\141")
+ end
+
+ def test_hexadecimal
+ assert_unescape_all("\a", "\\x7")
+ assert_unescape_all("#", "\\x23")
+ assert_unescape_all("a", "\\x61")
+ end
+
+ def test_deletes
+ assert_unescape_all("\x7f", "\\c?")
+ assert_unescape_all("\x7f", "\\C-?")
+ end
+
+ def test_unicode_codepoint
+ assert_unescape_all("a", "\\u0061")
+ assert_unescape_all("Ā", "\\u0100", "UTF-8")
+ assert_unescape_all("က", "\\u1000", "UTF-8")
+ assert_unescape_all("တ", "\\u1010", "UTF-8")
+
+ assert_nil(unescape_all("\\uxxxx"))
+ end
+
+ def test_unicode_codepoints
+ assert_unescape_all("a", "\\u{61}")
+ assert_unescape_all("Ā", "\\u{0100}", "UTF-8")
+ assert_unescape_all("က", "\\u{1000}", "UTF-8")
+ assert_unescape_all("တ", "\\u{1010}", "UTF-8")
+ assert_unescape_all("𐀀", "\\u{10000}", "UTF-8")
+ assert_unescape_all("𐀐", "\\u{10010}", "UTF-8")
+ assert_unescape_all("aĀကတ𐀀𐀐", "\\u{ 61\s100\n1000\t1010\r10000\v10010 }", "UTF-8")
+
+ assert_nil(unescape_all("\\u{110000}"))
+ assert_nil(unescape_all("\\u{110000 110001 110002}"))
+ end
+
+ def test_control_characters
+ each_printable do |chr|
+ byte = eval("\"\\c#{chr}\"").bytes.first
+ assert_unescape_all(byte.chr, "\\c#{chr}")
+
+ byte = eval("\"\\C-#{chr}\"").bytes.first
+ assert_unescape_all(byte.chr, "\\C-#{chr}")
+ end
+ end
+
+ def test_meta_characters
+ each_printable do |chr|
+ byte = eval("\"\\M-#{chr}\"").bytes.first
+ assert_unescape_all(byte.chr, "\\M-#{chr}")
+ end
+ end
+
+ def test_meta_control_characters
+ each_printable do |chr|
+ byte = eval("\"\\M-\\c#{chr}\"").bytes.first
+ assert_unescape_all(byte.chr, "\\M-\\c#{chr}")
+
+ byte = eval("\"\\M-\\C-#{chr}\"").bytes.first
+ assert_unescape_all(byte.chr, "\\M-\\C-#{chr}")
+
+ byte = eval("\"\\c\\M-#{chr}\"").bytes.first
+ assert_unescape_all(byte.chr, "\\c\\M-#{chr}")
+ end
+ end
+
+ def test_escaping_normal_characters
+ assert_unescape_all("d", "\\d")
+ assert_unescape_all("g", "\\g")
+ end
+
+ def test_whitespace_escaping_string_list
+ assert_equal("a b", Debug.unescape_whitespace("a\\ b"))
+ assert_equal("a\tb", Debug.unescape_whitespace("a\\\tb"))
+ assert_equal("a\nb", Debug.unescape_whitespace("a\\\nb"))
+ assert_equal("a\nb", Debug.unescape_whitespace("a\\\r\nb"))
+ end
+
+ private
+
+ def unescape_all(source)
+ Debug.unescape_all(source)
+ end
+
+ def assert_unescape_all(expected, source, forced_encoding = nil)
+ result = unescape_all(source)
+ result.force_encoding(forced_encoding) if forced_encoding
+ assert_equal(expected, result)
+ end
+
+ def each_printable
+ (1..127).each do |ord|
+ chr = ord.chr
+ yield chr if chr.match?(/[[:print:]]/) && chr != " " && chr != "\\"
+ end
+ end
+ end
+end
diff --git a/test/prism/version_test.rb b/test/prism/version_test.rb
new file mode 100644
index 0000000000..6011eb695d
--- /dev/null
+++ b/test/prism/version_test.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module YARP
+ class VersionTest < TestCase
+ def test_version_is_set
+ refute_nil VERSION
+ end
+ end
+end